ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetching
[openwrt/openwrt.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 extosc: ref {
18 compatible = "fixed-clock";
19 #clock-cells = <0>;
20 clock-output-names = "ref";
21 clock-frequency = <40000000>;
22 };
23
24 reset-leds {
25 compatible = "reset-leds";
26
27 usb_led {
28 label = "green:usb";
29 resets = <&rst 12>;
30 trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
31 linux,default-trigger = "usbport";
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 wps {
39 label = "orange:wps";
40 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
41 };
42
43 led_power_green: power_green {
44 label = "green:power";
45 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46 };
47
48 led_power_orange: power_orange {
49 label = "orange:power";
50 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 wps_green {
55 label = "green:wps";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 };
58
59 wan_green {
60 label = "green:wan";
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 phy-mask = <0x10>;
114
115 phy4: ethernet-phy@4 {
116 reg = <4>;
117 phy-mode = "rgmii";
118 };
119 };
120 };
121 };
122
123 &usb_phy {
124 status = "okay";
125 };
126
127 &usb1 {
128 #address-cells = <1>;
129 #size-cells = <0>;
130 status = "okay";
131
132 usb_ohci_port: port@1 {
133 reg = <1>;
134 #trigger-source-cells = <0>;
135 };
136 };
137
138 &usb2 {
139 #address-cells = <1>;
140 #size-cells = <0>;
141 status = "okay";
142
143 usb_ehci_port: port@1 {
144 reg = <1>;
145 #trigger-source-cells = <0>;
146 };
147 };
148
149 &pcie0 {
150 status = "okay";
151
152 ath9k0: wifi@0,11 {
153 compatible = "pci168c,0029";
154 reg = <0x8800 0 0 0 0>;
155
156 #gpio-cells = <2>;
157 gpio-controller;
158
159 /* all WNDR3700 variants have four antennae dedicated
160 * to the 2.4GHz radio. Two antennae are available for
161 * each chain. The following configuration is the
162 * default setting which taken from the vendor's wifi
163 * code for that radio.
164 *
165 * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
166 * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
167 */
168 antenna-demux {
169 gpio-hog;
170 line-name = "fixed antenna group 1";
171 gpios = <6 GPIO_ACTIVE_LOW>,
172 <7 GPIO_ACTIVE_HIGH>,
173 <8 GPIO_ACTIVE_LOW>,
174 <9 GPIO_ACTIVE_HIGH>;
175 output-high;
176 };
177 };
178
179 ath9k1: wifi@0,12 {
180 compatible = "pci168c,0029";
181 reg = <0x9000 0 0 0 0>;
182
183 #gpio-cells = <2>;
184 gpio-controller;
185 };
186 };
187
188 &spi {
189 status = "okay";
190
191 flash@0 {
192 compatible = "jedec,spi-nor";
193 reg = <0>;
194 spi-max-frequency = <25000000>;
195
196 partitions: partitions {
197 compatible = "fixed-partitions";
198 #address-cells = <1>;
199 #size-cells = <1>;
200 };
201 };
202 };
203
204 &eth0 {
205 status = "okay";
206
207 pll-data = <0x11110000 0x00001099 0x00991099>;
208
209 fixed-link {
210 speed = <1000>;
211 full-duplex;
212 };
213 };
214
215 &eth1 {
216 status = "okay";
217
218 pll-data = <0x11110000 0x00001099 0x00991099>;
219
220 phy-handle = <&phy4>;
221 };