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