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