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