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