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