ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.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 nvmem-layout {
164 compatible = "fixed-layout";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 macaddr_caldata_0: macaddr@0 {
169 reg = <0x0 0x6>;
170 };
171
172 macaddr_caldata_6: macaddr@6 {
173 reg = <0x6 0x6>;
174 };
175
176 macaddr_caldata_c: macaddr@c {
177 reg = <0xc 0x6>;
178 };
179
180 cal_caldata_1000: cal@1000 {
181 reg = <0x1000 0x440>;
182 };
183
184 precal_caldata_5000: precal@5000 {
185 reg = <0x5000 0x2f20>;
186 };
187 };
188 };
189
190 partition@60000 {
191 label = "caldata-backup";
192 reg = <0x060000 0x010000>;
193 read-only;
194 };
195
196 partition@70000 {
197 label = "config";
198 reg = <0x070000 0x010000>;
199 };
200
201 partition@80000 {
202 label = "pot";
203 reg = <0x080000 0x010000>;
204 };
205
206 partition@90000 {
207 label = "firmware";
208 reg = <0x090000 0xf30000>;
209 compatible = "denx,uimage";
210 };
211
212 partition@fc0000 {
213 label = "language";
214 reg = <0xfc0000 0x040000>;
215 };
216 };
217 };
218 };
219
220 &wmac {
221 status = "okay";
222
223 nvmem-cells = <&macaddr_caldata_6>, <&cal_caldata_1000>;
224 nvmem-cell-names = "mac-address", "calibration";
225 };
226
227 &mdio0 {
228 status = "okay";
229
230 phy4: ethernet-phy@4 {
231 reg = <4>;
232 phy-mode = "rgmii";
233 };
234 };
235
236 &eth0 {
237 status = "okay";
238
239 nvmem-cells = <&macaddr_caldata_0>;
240 nvmem-cell-names = "mac-address";
241
242 phy-handle = <&phy4>;
243 phy-mode = "rgmii-rxid";
244
245 pll-data = <0x86000000 0x80000101 0x80001313>;
246 };