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