ath79: convert Netgear EX7300 caldata to nvmem
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_netgear_ex7300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Netgear EX7300";
10 compatible = "netgear,ex7300", "qca,qca9558";
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 18 GPIO_ACTIVE_HIGH>;
26 mosi-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
27 num-chipselects = <0>;
28
29 led_gpio: led_gpio@0 {
30 compatible = "nxp,74lvc594";
31 reg = <0>;
32 gpio-controller;
33 #gpio-cells = <2>;
34 registers-number = <1>;
35 spi-max-frequency = <500000>;
36
37 gpio_latch_bit {
38 gpio-hog;
39 gpios = <4 GPIO_ACTIVE_HIGH>;
40 output-high;
41 line-name = "gpio-latch-bit";
42 };
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led_power_green: power_green {
50 label = "green:power";
51 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
52 };
53
54 led_power_amber: power_amber {
55 label = "amber:power";
56 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
57 };
58
59 left_blue {
60 label = "blue:left";
61 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
62 };
63
64 right_blue {
65 label = "blue:right";
66 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
67 };
68
69 wps_green {
70 label = "green:wps";
71 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
72 };
73
74 client_red {
75 label = "red:client";
76 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
77 };
78
79 client_green {
80 label = "green:client";
81 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
82 };
83
84 router_red {
85 label = "red:router";
86 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
87 };
88
89 router_green {
90 label = "green:router";
91 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
92 };
93 };
94
95 keys {
96 compatible = "gpio-keys";
97
98 reset {
99 label = "Reset button";
100 linux,code = <KEY_RESTART>;
101 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
102 debounce-interval = <60>;
103 };
104
105 wps {
106 label = "WPS button";
107 linux,code = <KEY_WPS_BUTTON>;
108 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
109 debounce-interval = <60>;
110 };
111
112 extender_apmode {
113 label = "EXTENDER/APMODE switch";
114 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
115 linux,code = <BTN_0>;
116 linux,input-type = <EV_SW>;
117 debounce-interval = <60>;
118 };
119 };
120 };
121
122 &pcie0 {
123 status = "okay";
124
125 wifi@0,0 {
126 compatible = "qcom,ath10k";
127 reg = <0 0 0 0 0>;
128
129 nvmem-cells = <&macaddr_caldata_c>, <&precal_caldata_5000>;
130 nvmem-cell-names = "mac-address", "pre-calibration";
131 };
132 };
133
134 &spi {
135 status = "okay";
136
137 flash@0 {
138 compatible = "jedec,spi-nor";
139 reg = <0>;
140 spi-max-frequency = <25000000>;
141
142 partitions {
143 compatible = "fixed-partitions";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 uboot: partition@0 {
148 label = "u-boot";
149 reg = <0x000000 0x040000>;
150 read-only;
151 };
152
153 partition@40000 {
154 label = "u-boot-env";
155 reg = <0x040000 0x010000>;
156 };
157
158 caldata: partition@50000 {
159 label = "caldata";
160 reg = <0x050000 0x010000>;
161 read-only;
162 };
163
164 partition@60000 {
165 label = "caldata-backup";
166 reg = <0x060000 0x010000>;
167 read-only;
168 };
169
170 partition@70000 {
171 label = "config";
172 reg = <0x070000 0x010000>;
173 };
174
175 partition@80000 {
176 label = "pot";
177 reg = <0x080000 0x010000>;
178 };
179
180 partition@90000 {
181 label = "firmware";
182 reg = <0x090000 0xf30000>;
183 compatible = "denx,uimage";
184 };
185
186 partition@fc0000 {
187 label = "language";
188 reg = <0xfc0000 0x040000>;
189 };
190 };
191 };
192 };
193
194 &wmac {
195 status = "okay";
196
197 nvmem-cells = <&macaddr_caldata_6>, <&cal_caldata_1000>;
198 nvmem-cell-names = "mac-address", "calibration";
199 };
200
201 &mdio0 {
202 status = "okay";
203
204 phy4: ethernet-phy@4 {
205 reg = <4>;
206 phy-mode = "rgmii";
207 };
208 };
209
210 &eth0 {
211 status = "okay";
212
213 nvmem-cells = <&macaddr_caldata_0>;
214 nvmem-cell-names = "mac-address";
215
216 phy-handle = <&phy4>;
217 phy-mode = "rgmii-rxid";
218
219 pll-data = <0x86000000 0x80000101 0x80001313>;
220 };
221
222 &caldata {
223 compatible = "nvmem-cells";
224 #address-cells = <1>;
225 #size-cells = <1>;
226
227 macaddr_caldata_0: macaddr@0 {
228 reg = <0x0 0x6>;
229 };
230
231 macaddr_caldata_6: macaddr@6 {
232 reg = <0x6 0x6>;
233 };
234
235 macaddr_caldata_c: macaddr@c {
236 reg = <0xc 0x6>;
237 };
238
239 cal_caldata_1000: cal@1000 {
240 reg = <0x1000 0x440>;
241 };
242
243 precal_caldata_5000: precal@5000 {
244 reg = <0x5000 0x2f20>;
245 };
246 };