ath79: add new ar934x spi driver
[openwrt/staging/jogo.git] / target / linux / ath79 / dts / qca9563_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9 chosen {
10 bootargs = "console=ttyS0,115200n8";
11 };
12
13 aliases {
14 led-boot = &led_power_amber;
15 led-failsafe = &led_power_amber;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_amber;
18 label-mac-device = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 wps {
25 label = "wps";
26 linux,code = <KEY_WPS_BUTTON>;
27 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
28 };
29
30 reset {
31 label = "reset";
32 linux,code = <KEY_RESTART>;
33 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 ath9k-keys {
38 compatible = "gpio-keys-polled";
39 poll-interval = <20>;
40
41 rfkill {
42 label = "rfkill";
43 linux,code = <KEY_RFKILL>;
44 gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
45 debounce-interval = <60>;
46 };
47 };
48
49 leds: leds {
50 compatible = "gpio-leds";
51
52 pinctrl-names = "default";
53 pinctrl-0 = <&jtag_disable_pins>;
54
55 led_power_green: power_green {
56 label = "netgear:green:power";
57 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
58 };
59
60 led_power_amber: power_amber {
61 label = "netgear:amber:power";
62 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
63 default-state = "keep";
64 };
65
66 wan_green {
67 label = "netgear:green:wan";
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 };
70
71 wan_amber {
72 label = "netgear:amber:wan";
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 };
75
76 wlan2g_green {
77 label = "netgear:green:wlan2g";
78 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "phy0tpt";
80 };
81
82 wps_green {
83 label = "netgear:green:wps";
84 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
85 };
86 };
87
88 ath9k-leds {
89 compatible = "gpio-leds";
90
91 wlan5g_blue {
92 label = "netgear:blue:wlan5g";
93 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
94 linux,default-trigger = "phy1tpt";
95 };
96 };
97 };
98
99 &spi {
100 status = "okay";
101
102 num-cs = <2>;
103
104 flash@0 {
105 compatible = "jedec,spi-nor";
106 reg = <0>;
107 spi-max-frequency = <25000000>;
108
109 partitions {
110 compatible = "fixed-partitions";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 partition@0 {
115 label = "u-boot";
116 reg = <0x0 0x40000>;
117 read-only;
118 };
119
120 partition@40000 {
121 label = "u-boot-env";
122 reg = <0x40000 0x10000>;
123 };
124
125 partition@50000 {
126 label = "caldata_backup";
127 reg = <0x50000 0x10000>;
128 read-only;
129 };
130
131 partition@60000 {
132 label = "config";
133 reg = <0x60000 0x10000>;
134 };
135
136 partition@70000 {
137 label = "traffic_meter";
138 reg = <0x70000 0x10000>;
139 };
140
141 partition@80000 {
142 label = "pot";
143 reg = <0x80000 0x10000>;
144 };
145
146 partition@90000 {
147 label = "reserved";
148 reg = <0x90000 0x160000>;
149 };
150
151 caldata: partition@1f0000 {
152 label = "caldata";
153 reg = <0x1f0000 0x10000>;
154 read-only;
155 };
156 };
157 };
158
159 flash@1 {
160 compatible = "spi-nand";
161 reg = <1>;
162 spi-max-frequency = <25000000>;
163
164 partitions {
165 compatible = "fixed-partitions";
166 #address-cells = <1>;
167 #size-cells = <1>;
168
169 partition@0 {
170 label = "kernel";
171 reg = <0x0 0x400000>;
172 };
173
174 partition@400000 {
175 label = "ubi";
176 reg = <0x400000 0x7c00000>;
177 };
178 };
179 };
180 };
181
182 &mdio0 {
183 status = "okay";
184
185 phy-mask = <0>;
186
187 phy0: ethernet-phy@0 {
188 reg = <0>;
189 phy-mode = "sgmii";
190 qca,mib-poll-interval = <500>;
191
192 qca,ar8327-initvals = <
193 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
194 0x10 0x81000080 /* POWER_ON_STRIP */
195 0x50 0xcc35cc35 /* LED_CTRL0 */
196 0x54 0xcb37cb37 /* LED_CTRL1 */
197 0x58 0x00000000 /* LED_CTRL2 */
198 0x5c 0x00f3cf00 /* LED_CTRL3 */
199 0x7c 0x0000007e /* PORT0_STATUS */
200 0x94 0x00000200 /* PORT6_STATUS */
201 >;
202 };
203 };
204
205 &eth0 {
206 status = "okay";
207
208 pll-data = <0x03000101 0x00000101 0x00001919>;
209
210 mtd-mac-address = <&caldata 0x0>;
211
212 phy-mode = "sgmii";
213 phy-handle = <&phy0>;
214 };
215
216 &wmac {
217 status = "okay";
218
219 mtd-mac-address = <&caldata 0x0>;
220 qca,no-eeprom;
221 };
222
223 &pcie {
224 status = "okay";
225
226 ath9k: wifi@0,0 {
227 /* chip is AR9580, override bogus PCI ID 168c:abcd */
228 compatible = "pci168c,0033";
229 reg = <0x0000 0 0 0 0>;
230 mtd-mac-address = <&caldata 0xc>;
231 qca,no-eeprom;
232 qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */
233 #gpio-cells = <2>;
234 gpio-controller;
235 };
236 };
237
238 &usb_phy0 {
239 status = "okay";
240 };
241
242 &usb0 {
243 #address-cells = <1>;
244 #size-cells = <0>;
245 status = "okay";
246
247 hub_port0: port@1 {
248 reg = <1>;
249 #trigger-source-cells = <0>;
250 };
251 };
252
253 &uart {
254 status = "okay";
255 };