generic: 5.15: refresh kernel patches
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_netgear_wnr1000-v2.dts
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 "ar7240.dtsi"
8
9 / {
10 compatible = "netgear,wnr1000-v2", "qca,ar7240";
11 model = "Netgear WNR1000 v2";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_power_amber;
19 led-failsafe = &led_power_amber;
20 led-running = &led_power_green;
21 led-upgrade = &led_power_amber;
22 label-mac-device = &eth1;
23 };
24
25 ath9k-keys {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 wps {
30 label = "wps";
31 linux,code = <KEY_WPS_BUTTON>;
32 gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35
36 reset {
37 label = "reset";
38 linux,code = <KEY_RESTART>;
39 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
40 debounce-interval = <60>;
41 };
42
43 rfkill {
44 label = "rfkill";
45 linux,code = <KEY_RFKILL>;
46 gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
47 debounce-interval = <60>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53
54 pinctrl-names = "default";
55 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
56
57 led_power_green: power_green {
58 label = "netgear:green:power";
59 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
60 };
61
62 led_power_amber: power_amber {
63 label = "netgear:amber:power";
64 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
65 default-state = "keep";
66 };
67
68 wan_green {
69 label = "netgear:green:wan";
70 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
71 };
72
73 wan_amber {
74 label = "netgear:amber:wan";
75 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
76 };
77
78 lan1_green {
79 label = "netgear:green:lan1";
80 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
81 };
82
83 lan1_amber {
84 label = "netgear:amber:lan1";
85 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
86 };
87
88 lan2_green {
89 label = "netgear:green:lan2";
90 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
91 };
92
93 lan2_amber {
94 label = "netgear:amber:lan2";
95 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
96 };
97
98 lan3_green {
99 label = "netgear:green:lan3";
100 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
101 };
102
103 lan3_amber {
104 label = "netgear:amber:lan3";
105 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
106 };
107
108 lan4_green {
109 label = "netgear:green:lan4";
110 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
111 };
112
113 lan4_amber {
114 label = "netgear:amber:lan4";
115 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
116 };
117 };
118
119 ath9k-leds {
120 compatible = "gpio-leds";
121
122 wps_green {
123 label = "netgear:green:wps";
124 gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
125 };
126
127 wlan_blue {
128 label = "netgear:blue:wlan";
129 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
130 linux,default-trigger = "phy0tpt";
131 };
132 };
133 };
134
135 &spi {
136 status = "okay";
137
138 num-cs = <1>;
139
140 flash@0 {
141 compatible = "jedec,spi-nor";
142 reg = <0>;
143 spi-max-frequency = <25000000>;
144
145 partitions {
146 compatible = "fixed-partitions";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 partition@0 {
151 label = "u-boot";
152 reg = <0x0 0x40000>;
153 read-only;
154 };
155
156 partition@40000 {
157 label = "u-boot-env";
158 reg = <0x40000 0x10000>;
159 };
160
161 partition@50000 {
162 label = "firmware";
163 reg = <0x50000 0x3a0000>;
164 compatible = "netgear,uimage";
165 };
166
167 art: partition@3f0000 {
168 label = "art";
169 reg = <0x3f0000 0x10000>;
170 read-only;
171 };
172 };
173 };
174 };
175
176 &eth0 {
177 status = "okay";
178
179 mtd-mac-address = <&art 0x0>;
180 };
181
182 &eth1 {
183 status = "okay";
184
185 mtd-mac-address = <&art 0x6>;
186 };
187
188 &pcie {
189 status = "okay";
190
191 ath9k: wifi@0,0 {
192 compatible = "pci168c,002b";
193 reg = <0x0000 0 0 0 0>;
194 mtd-mac-address = <&art 0x0>;
195 mtd-mac-address-increment = <1>;
196 qca,no-eeprom;
197 #gpio-cells = <2>;
198 gpio-controller;
199 };
200 };
201
202 &uart {
203 status = "okay";
204 };