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