ath79: utilize nvmem on Netgear EX7300 v2
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qcn5502_netgear_ex7300-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Netgear EX7300 v2";
10 compatible = "netgear,ex7300-v2", "qca,qcn5500", "qca,qca9560";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_amber;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_amber;
17 label-mac-device = &eth0;
18 };
19
20 led_spi {
21 compatible = "spi-gpio";
22 #address-cells = <1>;
23 #size-cells = <0>;
24
25 sck-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
26 mosi-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 num-chipselects = <0>;
28
29 led_gpio: led_gpio@0 {
30 compatible = "fairchild,74hc595";
31 reg = <0>;
32 gpio-controller;
33 #gpio-cells = <2>;
34 registers-number = <1>;
35 spi-max-frequency = <500000>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_power_green: power_green {
43 label = "green:power";
44 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
45 };
46
47 led_power_amber: power_amber {
48 label = "amber:power";
49 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
50 };
51
52 wps_green {
53 label = "green:wps";
54 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
55 };
56
57 router_red {
58 label = "red:router";
59 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
60 };
61
62 router_green {
63 label = "green:router";
64 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
65 };
66
67 client_red {
68 label = "red:client";
69 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
70 };
71
72 client_green {
73 label = "green:client";
74 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
75 };
76
77 left_blue {
78 label = "blue:left";
79 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
80 };
81
82 right_blue {
83 label = "blue:right";
84 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
85 };
86 };
87
88 keys {
89 compatible = "gpio-keys";
90
91 reset {
92 label = "Reset button";
93 linux,code = <KEY_RESTART>;
94 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
95 debounce-interval = <60>;
96 };
97
98 wps {
99 label = "WPS button";
100 linux,code = <KEY_WPS_BUTTON>;
101 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
102 debounce-interval = <60>;
103 };
104
105 extender_apmode {
106 label = "EXTENDER/APMODE switch";
107 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
108 linux,code = <BTN_0>;
109 linux,input-type = <EV_SW>;
110 debounce-interval = <60>;
111 };
112 };
113 };
114
115 &pcie {
116 status = "okay";
117
118 wifi@0,0 {
119 compatible = "qcom,ath10k";
120 reg = <0 0 0 0 0>;
121
122 nvmem-cells = <&macaddr_artmtd_c>, <&precal_art_5000>;
123 nvmem-cell-names = "mac-address", "pre-calibration";
124 };
125 };
126
127 &pll {
128 clocks = <&extosc>;
129 };
130
131 &spi {
132 status = "okay";
133
134 flash@0 {
135 compatible = "jedec,spi-nor";
136 reg = <0>;
137 spi-max-frequency = <25000000>;
138
139 partitions {
140 compatible = "fixed-partitions";
141 #address-cells = <1>;
142 #size-cells = <1>;
143
144 partition@0 {
145 label = "u-boot";
146 reg = <0x000000 0x040000>;
147 read-only;
148 };
149
150 partition@40000 {
151 label = "u-boot-env";
152 reg = <0x040000 0x010000>;
153 read-only;
154 };
155
156 partition@50000 {
157 label = "config";
158 reg = <0x050000 0x010000>;
159 };
160
161 partition@60000 {
162 label = "pot";
163 reg = <0x060000 0x010000>;
164 read-only;
165 };
166
167 partition@70000 {
168 label = "firmware";
169 reg = <0x70000 0xe30000>;
170 compatible = "denx,uimage";
171 };
172
173 partition@ea0000 {
174 label = "rae";
175 reg = <0xea0000 0x100000>;
176 read-only;
177 };
178
179 partition@fa0000 {
180 label = "oopsdump";
181 reg = <0xfa0000 0x40000>;
182 read-only;
183 };
184
185 partition@fe0000 {
186 label = "artmtd";
187 reg = <0xfe0000 0x10000>;
188
189 compatible = "nvmem-cells";
190 #address-cells = <1>;
191 #size-cells = <1>;
192
193 macaddr_artmtd_0: macaddr@0 {
194 reg = <0x0 0x6>;
195 };
196
197 macaddr_artmtd_6: macaddr@6 {
198 reg = <0x6 0x6>;
199 };
200
201 macaddr_artmtd_c: macaddr@c {
202 reg = <0xc 0x6>;
203 };
204 };
205
206 partition@ff0000 {
207 label = "art";
208 reg = <0xff0000 0x10000>;
209 read-only;
210
211 compatible = "nvmem-cells";
212 #address-cells = <1>;
213 #size-cells = <1>;
214
215 cal_art_1000: cal@1000 {
216 reg = <0x1000 0x440>;
217 };
218
219 precal_art_5000: precal@5000 {
220 reg = <0x5000 0x2f20>;
221 };
222 };
223 };
224 };
225 };
226
227
228 &wmac {
229 /* Does not work due to lack of QCN5502 support in ath9k. */
230 status = "disabled";
231
232 nvmem-cells = <&macaddr_artmtd_6>, <&cal_art_1000>;
233 nvmem-cell-names = "mac-address", "calibration";
234 };
235
236 &mdio0 {
237 status = "okay";
238
239 phy5: ethernet-phy@5 {
240 reg = <5>;
241 phy-mode = "sgmii";
242 };
243 };
244
245 &eth0 {
246 status = "okay";
247
248 nvmem-cells = <&macaddr_artmtd_0>;
249 nvmem-cell-names = "mac-address";
250
251 phy-handle = <&phy5>;
252 phy-mode = "sgmii";
253
254 pll-data = <0x03000000 0x00000101 0x00001313>;
255 };