ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9132_buffalo_wzr-hp-g300nh.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9132.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 / {
8 aliases {
9 led-boot = &led_diag;
10 led-failsafe = &led_security;
11 led-upgrade = &led_diag;
12 };
13
14 /* There is a GPIO driven NXP 74HC153 dual 4-way multiplexer on board
15 * used for buttons that are on top of the the device.
16 */
17 mux: mux-controller {
18 compatible = "gpio-mux";
19 #mux-control-cells = <0>;
20
21 mux-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>, /* s0 */
22 <&gpio 11 GPIO_ACTIVE_HIGH>; /* s1 */
23 };
24
25 gpio2: key-mux1 {
26 compatible = "gpio-cascade";
27 mux-controls = <&mux>;
28
29 gpio-controller;
30 #gpio-cells = <2>;
31
32 // GPIOs used by this node, the mux pin
33 upstream-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; /* 1y */
34 };
35
36 gpio3: key-mux2 {
37 compatible = "gpio-cascade";
38 mux-controls = <&mux>;
39
40 gpio-controller;
41 #gpio-cells = <2>;
42
43 // GPIOs used by this node, the mux pin
44 upstream-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; /* 2y */
45 };
46
47 keys {
48 compatible = "gpio-keys-polled";
49 poll-interval = <20>;
50
51 aoss {
52 label = "aoss";
53 linux,code = <KEY_WPS_BUTTON>;
54 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57
58 reset {
59 label = "reset";
60 linux,code = <KEY_RESTART>;
61 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
62 debounce-interval = <60>;
63 };
64
65 router_on {
66 label = "router_on";
67 linux,code = <BTN_5>;
68 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
69 debounce-interval = <60>;
70 };
71
72 movie_off {
73 label = "movie_off";
74 linux,code = <BTN_3>;
75 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
76 debounce-interval = <60>;
77 };
78
79 usb {
80 label = "usb";
81 linux,code = <BTN_2>;
82 gpios = <&gpio3 1 GPIO_ACTIVE_LOW>;
83 debounce-interval = <60>;
84 };
85
86 router_auto {
87 label = "router_auto";
88 linux,code = <BTN_6>;
89 gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
90 debounce-interval = <60>;
91 };
92
93 movie_on {
94 label = "movie_on";
95 linux,code = <BTN_4>;
96 gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
97 debounce-interval = <60>;
98 };
99 };
100
101 flash@1e000000 {
102 compatible = "cfi-flash";
103 reg = <0x1e000000 0x2000000>;
104 bank-width = <2>;
105 device-width = <2>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x0000000 0x0040000>;
115 read-only;
116 };
117
118 partition@40000 {
119 label = "u-boot-env";
120 reg = <0x0040000 0x0020000>;
121 read-only;
122 };
123
124 partition@60000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x0060000 0x1f60000>;
128 };
129
130 partition@1fc0000 {
131 label = "user_property";
132 reg = <0x1fc0000 0x0020000>;
133 read-only;
134 };
135
136 art: partition@1fe0000 {
137 label = "art";
138 reg = <0x1fe0000 0x020000>;
139 read-only;
140
141 nvmem-layout {
142 compatible = "fixed-layout";
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 macaddr_art_1120c: macaddr@1120c {
147 reg = <0x1120c 0x6>;
148 };
149 };
150 };
151 };
152 };
153
154 leds {
155 compatible = "gpio-leds";
156
157 usb {
158 label = "blue:usb";
159 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
160 trigger-sources = <&hub_port>;
161 linux,default-trigger = "usbport";
162 };
163
164 led_diag: diag {
165 label = "red:diag";
166 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
167 };
168
169 wireless {
170 label = "green:wireless";
171 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
172 linux,default-trigger = "phy0tpt";
173 };
174
175 led_security: security {
176 label = "amber:security";
177 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
178 };
179
180 router {
181 label = "green:router";
182 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
183 };
184 };
185
186 switch: switch {
187 status = "disabled";
188
189 gpio-sda = <&gpio 19 GPIO_ACTIVE_HIGH>;
190 gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>;
191
192 mdio-bus {
193 status = "okay";
194
195 #address-cells = <1>;
196 #size-cells = <0>;
197
198 phy4: ethernet-phy@4 {
199 reg = <4>;
200 phy-mode = "rgmii";
201 };
202 };
203 };
204 };
205
206 &mdio0 {
207 status = "okay";
208 };
209
210 &eth0 {
211 status = "disabled";
212
213 phy-mode = "rgmii";
214 nvmem-cells = <&macaddr_art_1120c>;
215 nvmem-cell-names = "mac-address";
216
217 fixed-link {
218 speed = <1000>;
219 full-duplex;
220 };
221 };
222
223 &mdio1 {
224 status = "okay";
225 };
226
227 &eth1 {
228 status = "disabled";
229
230 compatible = "qca,ar9130-eth", "syscon";
231 reg = <0x1a000000 0x200
232 0x18070004 0x4>;
233
234 pll-reg = <0x4 0x18 22>;
235 pll-handle = <&pll>;
236
237 phy-mode = "rgmii";
238 phy-handle = <&phy4>;
239 resets = <&rst 13>;
240 reset-names = "mac";
241 qca,mac-idx = <1>;
242 nvmem-cells = <&macaddr_art_1120c>;
243 nvmem-cell-names = "mac-address";
244 };
245
246 &wmac {
247 status = "okay";
248
249 mtd-cal-data = <&art 0x11000>;
250 };
251
252 &uart {
253 status = "okay";
254 };
255
256 &usb {
257 status = "okay";
258 };
259
260 &usb_phy {
261 status = "okay";
262 };