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