apm821xx: use nested fixed-partitions
[openwrt/staging/chunkeey.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 label = "u-boot-env";
51 reg = <0x00100000 0x00010000>;
52 read-only;
53 };
54
55 partition@110000 {
56 label = "firmware";
57 reg = <0x00110000 0x01ac0000>;
58
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 /*
65 * The u-boot bootloader will look at this
66 * offset (0x110000) for an uImage binary.
67 */
68 label = "kernel";
69 reg = <0x00000000 0x005f0000>;
70 };
71
72 partition@5f0000 {
73 label = "ubi";
74 reg = <0x005f0000 0x014d0000>;
75 };
76 };
77
78 partition@1bd0000 {
79 /*
80 * original vendor device-tree - do not use or
81 * overwrite. The original u-boot also supports
82 * the gzipped legacy monolithic/Multi-File Image
83 * format, which is a better choice.
84 */
85 label = "device-tree";
86 reg = <0x01bd0000 0x0010000>;
87 read-only;
88 };
89
90 partition@1be0000 {
91 label = "var";
92 reg = <0x01be0000 0x00400000>;
93 read-only;
94 };
95
96 partition@1fe0000 {
97 label = "manudata";
98 reg = <0x01fe0000 0x00020000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &UART0 {
106 status = "okay";
107 };
108
109 &GPIO0 {
110 status = "okay";
111 };
112
113 &EMAC0 {
114 status = "okay";
115
116 fixed-link {
117 speed = <1000>;
118 full-duplex;
119 pause;
120 asym-pause;
121 };
122
123 mdio0: mdio {
124 #address-cells = <1>;
125 #size-cells = <0>;
126 };
127 };
128
129 &POB0 {
130 keys {
131 compatible = "gpio-keys";
132
133 reset {
134 label = "Reset Button";
135 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
136 linux,code = <KEY_RESTART>;
137 interrupt-parent = <&UIC1>;
138 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
139 debounce-interval = <60>;
140 };
141 };
142
143 LEDS: leds {
144 compatible = "gpio-leds";
145
146 led-0 {
147 color = <LED_COLOR_ID_GREEN>;
148 function = LED_FUNCTION_POWER;
149 gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
150 };
151
152 led-1 {
153 color = <LED_COLOR_ID_AMBER>;
154 function = LED_FUNCTION_FAULT;
155 gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
156 panic-indicator;
157 };
158
159 led-2 {
160 color = <LED_COLOR_ID_GREEN>;
161 function = LED_FUNCTION_LAN;
162 function-enumerator = <0>;
163 gpios = <&GPIO0 21 GPIO_ACTIVE_HIGH>;
164 };
165
166 led-3 {
167 color = <LED_COLOR_ID_GREEN>;
168 function = LED_FUNCTION_WLAN;
169 function-enumerator = <0>;
170 gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
171 };
172
173 led-4 {
174 color = <LED_COLOR_ID_GREEN>;
175 function = LED_FUNCTION_WLAN;
176 function-enumerator = <1>;
177 gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
178 };
179 };
180
181 gpio-export {
182 compatible = "gpio-export";
183
184 internal-antenna {
185 gpio-export,name = "wndap6x0:internal-antenna";
186 gpio-export,output = <1>;
187 gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
188 };
189
190 external-antenna {
191 gpio-export,name = "wndap6x0:external-antenna";
192 gpio-export,output = <0>;
193 gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
194 };
195
196 mains-powered {
197 /*
198 * Input pin describing what powers the AP
199 * 0/Low = PoE
200 * 1/High = 12v mains powered
201 */
202 gpio-export,name = "wndap620:mains-powered";
203 gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
204 };
205 };
206
207 rtl8367b {
208 compatible = "realtek,rtl8367b";
209 cpu_port = <5>;
210 realtek,extif0 = <1 2 1 1 1 1 1 1 2>;
211 mii-bus = <&mdio0>;
212 };
213 };
214
215 &PCIE0 {
216 status = "okay";
217 };
218
219 &IIC0 {
220 status = "okay";
221
222 at24@52 {
223 compatible = "atmel,24c04";
224 reg = <0x52>;
225 pagesize = <16>;
226 read-only;
227 };
228 };