ath79: fix WNDR3700/WNDR3800 wifi reg size
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_netgear_wndr3700.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 "ar7100.dtsi"
8
9 / {
10 aliases {
11 led-boot = &led_power_orange;
12 led-failsafe = &led_power_orange;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_orange;
15 label-mac-device = &eth0;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 extosc: ref {
23 compatible = "fixed-clock";
24 #clock-cells = <0>;
25 clock-output-names = "ref";
26 clock-frequency = <40000000>;
27 };
28
29 reset-leds {
30 compatible = "reset-leds";
31
32 usb_led {
33 label = "netgear:green:usb";
34 resets = <&rst 12>;
35 trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
36 linux,default-trigger = "usbport";
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 wps {
44 label = "netgear:orange:wps";
45 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
46 };
47
48 led_power_green: power_green {
49 label = "netgear:green:power";
50 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
51 };
52
53 led_power_orange: power_orange {
54 label = "netgear:orange:power";
55 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
56 default-state = "on";
57 };
58
59 wps_green {
60 label = "netgear:green:wps";
61 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
62 };
63
64 wan_green {
65 label = "netgear:green:wan";
66 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 ath9k-leds {
71 compatible = "gpio-leds";
72
73 wlan2g {
74 label = "netgear:green:wlan2g";
75 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
76 linux,default-trigger = "phy0tpt";
77 };
78 wlan5g {
79 label = "netgear:blue:wlan5g";
80 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "phy1tpt";
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87
88 wps {
89 label = "wps";
90 linux,code = <KEY_WPS_BUTTON>;
91 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
92 };
93
94 reset {
95 label = "reset";
96 linux,code = <KEY_RESTART>;
97 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
98 };
99
100 rfkill {
101 label = "rfkill";
102 linux,code = <KEY_RFKILL>;
103 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
104 };
105 };
106
107 rtl8366s {
108 compatible = "realtek,rtl8366s";
109
110 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
111 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
112
113 mdio-bus {
114 #address-cells = <1>;
115 #size-cells = <0>;
116 status = "okay";
117
118 phy-mask = <0x10>;
119
120 phy4: ethernet-phy@4 {
121 reg = <4>;
122 phy-mode = "rgmii";
123 };
124 };
125 };
126 };
127
128 &usb_phy {
129 status = "okay";
130 };
131
132 &usb1 {
133 #address-cells = <1>;
134 #size-cells = <0>;
135 status = "okay";
136
137 usb_ochi_port: port@1 {
138 reg = <1>;
139 #trigger-source-cells = <0>;
140 };
141 };
142
143 &usb2 {
144 #address-cells = <1>;
145 #size-cells = <0>;
146 status = "okay";
147
148 usb_echi_port: port@1 {
149 reg = <1>;
150 #trigger-source-cells = <0>;
151 };
152 };
153
154 &pcie0 {
155 status = "okay";
156
157 ath9k0: wifi@0,11 {
158 compatible = "pci168c,0029";
159 reg = <0x8800 0 0 0 0>;
160 mtd-mac-address = <&art 0x0>;
161 qca,no-eeprom;
162 #gpio-cells = <2>;
163 gpio-controller;
164 };
165
166 ath9k1: wifi@0,12 {
167 compatible = "pci168c,0029";
168 reg = <0x9000 0 0 0 0>;
169 mtd-mac-address = <&art 0xc>;
170 qca,no-eeprom;
171 #gpio-cells = <2>;
172 gpio-controller;
173 };
174 };
175
176 &uart {
177 status = "okay";
178 };
179
180 &spi {
181 status = "okay";
182
183 num-cs = <1>;
184
185 flash@0 {
186 compatible = "jedec,spi-nor";
187 reg = <0>;
188 spi-max-frequency = <25000000>;
189
190 partitions: partitions {
191 compatible = "fixed-partitions";
192 #address-cells = <1>;
193 #size-cells = <1>;
194 };
195 };
196 };
197
198 &eth0 {
199 status = "okay";
200
201 pll-data = <0x11110000 0x00001099 0x00991099>;
202
203 mtd-mac-address = <&art 0x00>;
204
205 fixed-link {
206 speed = <1000>;
207 full-duplex;
208 };
209 };
210
211 &eth1 {
212 status = "okay";
213
214 pll-data = <0x11110000 0x00001099 0x00991099>;
215
216 mtd-mac-address = <&art 0x06>;
217
218 phy-handle = <&phy4>;
219 };