apm821xx: add u-boot,env compatible
[openwrt/staging/mans0n.git] / target / linux / apm821xx / dts / netgear-wndap6x0.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Device Tree Source for Netgear WNDAP620 and WNDAP660
4 */
5
6 #include <dt-bindings/leds/common.h>
7 #include "apm82181.dtsi"
8
9 / {
10 aliases {
11 serial0 = &UART0;
12 };
13
14 chosen {
15 stdout-path = "/plb/opb/serial@ef600300";
16 };
17 };
18
19 &CRYPTO {
20 status = "okay";
21 };
22
23 &PKA {
24 status = "okay";
25 };
26
27 &TRNG {
28 status = "okay";
29 };
30
31 &ndfc {
32 status = "okay";
33 /* 32 MiB SLC NAND Flash */
34
35 nand {
36 nand-is-boot-medium;
37
38 partitions {
39 compatible = "fixed-partitions";
40 #address-cells = <1>;
41 #size-cells = <1>;
42
43 partition@0 {
44 label = "u-boot";
45 reg = <0x00000000 0x00100000>;
46 read-only;
47 };
48
49 partition@100000 {
50 compatible = "u-boot,env";
51 label = "u-boot-env";
52 reg = <0x00100000 0x0004000>;
53 read-only;
54
55 ethaddr {
56 };
57
58 bootcmd {
59 };
60
61 serno {
62 };
63
64 ProductID {
65 };
66
67 HardwareVer {
68 };
69 };
70
71 /* 0x104000 - 0x10ffff free */
72
73 partition@110000 {
74 label = "firmware";
75 reg = <0x00110000 0x01ac0000>;
76
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 /*
83 * The u-boot bootloader will look at this
84 * offset (0x110000) for an uImage binary.
85 */
86 label = "kernel";
87 reg = <0x00000000 0x005f0000>;
88 };
89
90 partition@5f0000 {
91 label = "ubi";
92 reg = <0x005f0000 0x014d0000>;
93 };
94 };
95
96 partition@1bd0000 {
97 /*
98 * original vendor device-tree - do not use or
99 * overwrite. The original u-boot also supports
100 * the gzipped legacy monolithic/Multi-File Image
101 * format, which is a better choice.
102 */
103 label = "device-tree";
104 reg = <0x01bd0000 0x0010000>;
105 read-only;
106 };
107
108 partition@1be0000 {
109 label = "var";
110 reg = <0x01be0000 0x00400000>;
111 read-only;
112 };
113
114 partition@1fe0000 {
115 label = "manudata";
116 reg = <0x01fe0000 0x00020000>;
117 read-only;
118 };
119 };
120 };
121 };
122
123 &UART0 {
124 status = "okay";
125 };
126
127 &GPIO0 {
128 status = "okay";
129 };
130
131 &EMAC0 {
132 status = "okay";
133
134 fixed-link {
135 speed = <1000>;
136 full-duplex;
137 pause;
138 asym-pause;
139 };
140
141 mdio0: mdio {
142 #address-cells = <1>;
143 #size-cells = <0>;
144 };
145 };
146
147 &POB0 {
148 keys {
149 compatible = "gpio-keys";
150
151 button-restart {
152 label = "Reset Button";
153 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
154 linux,code = <KEY_RESTART>;
155 interrupt-parent = <&UIC1>;
156 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
157 debounce-interval = <60>;
158 };
159 };
160
161 LEDS: leds {
162 compatible = "gpio-leds";
163
164 led-0 {
165 color = <LED_COLOR_ID_GREEN>;
166 function = LED_FUNCTION_POWER;
167 gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
168 };
169
170 led-1 {
171 color = <LED_COLOR_ID_AMBER>;
172 function = LED_FUNCTION_FAULT;
173 gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
174 panic-indicator;
175 };
176
177 led-2 {
178 color = <LED_COLOR_ID_GREEN>;
179 function = LED_FUNCTION_LAN;
180 function-enumerator = <0>;
181 gpios = <&GPIO0 21 GPIO_ACTIVE_HIGH>;
182 };
183
184 led-3 {
185 color = <LED_COLOR_ID_GREEN>;
186 function = LED_FUNCTION_WLAN;
187 function-enumerator = <0>;
188 gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
189 };
190
191 led-4 {
192 color = <LED_COLOR_ID_GREEN>;
193 function = LED_FUNCTION_WLAN;
194 function-enumerator = <1>;
195 gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
196 };
197 };
198
199 gpio-export {
200 compatible = "gpio-export";
201
202 internal-antenna {
203 gpio-export,name = "wndap6x0:internal-antenna";
204 gpio-export,output = <1>;
205 gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
206 };
207
208 external-antenna {
209 gpio-export,name = "wndap6x0:external-antenna";
210 gpio-export,output = <0>;
211 gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
212 };
213
214 mains-powered {
215 /*
216 * Input pin describing what powers the AP
217 * 0/Low = PoE
218 * 1/High = 12v mains powered
219 */
220 gpio-export,name = "wndap620:mains-powered";
221 gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
222 };
223 };
224
225 rtl8367b {
226 compatible = "realtek,rtl8367b";
227 cpu_port = <5>;
228 realtek,extif0 = <1 2 1 1 1 1 1 1 2>;
229 mii-bus = <&mdio0>;
230 };
231 };
232
233 &PCIE0 {
234 status = "okay";
235 };
236
237 &IIC0 {
238 status = "okay";
239
240 at24@52 {
241 compatible = "atmel,24c04";
242 reg = <0x52>;
243 pagesize = <16>;
244 read-only;
245 };
246 };