ath79: fix pci_device_reg errors
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar7161_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/mtd/partitions/uimage.h>
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 };
16
17 reset-leds {
18 compatible = "reset-leds";
19
20 usb_led {
21 label = "green:usb";
22 resets = <&rst 12>;
23 trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
24 linux,default-trigger = "usbport";
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 wps {
32 label = "orange:wps";
33 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
34 };
35
36 led_power_green: power_green {
37 label = "green:power";
38 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
39 };
40
41 led_power_orange: power_orange {
42 label = "orange:power";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 default-state = "on";
45 };
46
47 wps_green {
48 label = "green:wps";
49 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
50 };
51
52 wan_green {
53 label = "green:wan";
54 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 ath9k-leds {
59 compatible = "gpio-leds";
60
61 wlan2g {
62 label = "green:wlan2g";
63 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66 wlan5g {
67 label = "blue:wlan5g";
68 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
69 linux,default-trigger = "phy1tpt";
70 };
71 };
72
73 keys {
74 compatible = "gpio-keys";
75
76 wps {
77 label = "wps";
78 linux,code = <KEY_WPS_BUTTON>;
79 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
80 };
81
82 reset {
83 label = "reset";
84 linux,code = <KEY_RESTART>;
85 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
86 };
87
88 rfkill {
89 label = "rfkill";
90 linux,code = <KEY_RFKILL>;
91 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
92 };
93 };
94
95 rtl8366s {
96 compatible = "realtek,rtl8366s";
97
98 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
99 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
100
101 mdio-bus {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 status = "okay";
105
106 phy4: ethernet-phy@4 {
107 reg = <4>;
108 phy-mode = "rgmii";
109 };
110 };
111 };
112 };
113
114 &usb_phy {
115 status = "okay";
116 };
117
118 &usb1 {
119 status = "okay";
120 };
121
122 &usb2 {
123 status = "okay";
124 };
125
126 &pcie0 {
127 status = "okay";
128
129 ath9k0: wifi@11,0 {
130 compatible = "pci168c,0029";
131 reg = <0x8800 0 0 0 0>;
132
133 #gpio-cells = <2>;
134 gpio-controller;
135
136 /* all WNDR3700 variants have four antennae dedicated
137 * to the 2.4GHz radio. Two antennae are available for
138 * each chain. The following configuration is the
139 * default setting which taken from the vendor's wifi
140 * code for that radio.
141 *
142 * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
143 * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
144 */
145 antenna-demux {
146 gpio-hog;
147 line-name = "fixed antenna group 1";
148 gpios = <6 GPIO_ACTIVE_LOW>,
149 <7 GPIO_ACTIVE_HIGH>,
150 <8 GPIO_ACTIVE_LOW>,
151 <9 GPIO_ACTIVE_HIGH>;
152 output-high;
153 };
154 };
155
156 ath9k1: wifi@12,0 {
157 compatible = "pci168c,0029";
158 reg = <0x9000 0 0 0 0>;
159
160 #gpio-cells = <2>;
161 gpio-controller;
162 };
163 };
164
165 &spi {
166 status = "okay";
167
168 flash@0 {
169 compatible = "jedec,spi-nor";
170 reg = <0>;
171 spi-max-frequency = <25000000>;
172
173 partitions: partitions {
174 compatible = "fixed-partitions";
175 #address-cells = <1>;
176 #size-cells = <1>;
177 };
178 };
179 };
180
181 &eth0 {
182 status = "okay";
183
184 pll-data = <0x11110000 0x00001099 0x00991099>;
185
186 fixed-link {
187 speed = <1000>;
188 full-duplex;
189 };
190 };
191
192 &eth1 {
193 status = "okay";
194
195 pll-data = <0x11110000 0x00001099 0x00991099>;
196
197 phy-handle = <&phy4>;
198 };