013a998a0239e4039d2c554b37fc1313d721015f
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_mikrotik_routerboard-sxt-5n.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mikrotik,routerboard-sxt-5n", "qca,ar9344";
10 model = "MikroTik SXT 5N platform";
11
12 aliases {
13 led-boot = &led_user;
14 led-failsafe = &led_user;
15 led-running = &led_user;
16 led-upgrade = &led_user;
17 serial0 = &uart;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "green:power";
25 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 rssilow {
30 label = "green:rssilow";
31 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
32 };
33
34 rssimediumlow {
35 label = "green:rssimediumlow";
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 };
38
39 rssimedium {
40 label = "green:rssimedium";
41 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
42 };
43
44 rssimediumhigh {
45 label = "green:rssimediumhigh";
46 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
47 };
48
49 rssihigh {
50 label = "green:rssihigh";
51 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
52 };
53
54 led_user: user {
55 label = "green:user";
56 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 reset {
64 label = "reset";
65 linux,code = <KEY_RESTART>;
66 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
67 debounce-interval = <60>;
68 };
69 };
70
71 gpio-export {
72 compatible = "gpio-export";
73
74 gpio_nand_power {
75 gpio-export,name = "sxt5n:power:nand";
76 gpio-export,output = <0>;
77 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
78 };
79 };
80
81 beeper {
82 compatible = "gpio-beeper";
83 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
84 };
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <40000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "RouterBoot";
102 reg = <0x0 0x20000>;
103 read-only;
104 compatible = "mikrotik,routerboot-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "bootloader1";
110 reg = <0x0 0x0>;
111 read-only;
112 };
113
114 hard_config: hard_config {
115 read-only;
116 };
117
118 bios {
119 size = <0x1000>;
120 read-only;
121 };
122
123 soft_config {
124 };
125
126 partition@10000 {
127 label = "bootloader2";
128 reg = <0x10000 0x10000>;
129 read-only;
130 };
131 };
132 };
133 };
134 };
135
136 &nand {
137 status = "okay";
138
139 nand-ecc-mode = "soft";
140 qca,nand-swap-dma;
141 qca,nand-scan-fixup;
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "booter";
150 reg = <0x0000000 0x0040000>;
151 read-only;
152 };
153
154 partition@40000 {
155 label = "kernel";
156 reg = <0x0040000 0x03c0000>;
157 };
158
159 partition@400000 {
160 label = "ubi";
161 reg = <0x0400000 0x7c00000>;
162 };
163 };
164 };
165
166 &uart {
167 status = "okay";
168 };
169
170 &eth0 {
171 status = "okay";
172
173 phy-handle = <&swphy0>;
174
175 gmac-config {
176 device = <&gmac>;
177 switch-phy-swap = <1>;
178 };
179 };
180
181 &eth1 {
182 status = "okay";
183
184 compatible = "syscon", "simple-mfd";
185 };
186
187 &wmac {
188 status = "okay";
189
190 qca,no-eeprom;
191 };