Revert "mac80211: ath10k: replace LEDs patch with upstream patch"
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_winchannel_wb2000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Winchannel WB2000";
11 compatible = "winchannel,wb2000", "qca,ar9344";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 i2c {
25 compatible = "i2c-gpio";
26 gpios = <&gpio 17 GPIO_ACTIVE_HIGH
27 &gpio 16 GPIO_ACTIVE_HIGH
28 >;
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 rtc@68 {
33 compatible = "dallas,ds1339";
34 reg = <0x68>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 wlan2g {
42 label = "green:2g";
43 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
44 linux,default-trigger = "phy0tpt";
45 };
46
47 usb {
48 function = LED_FUNCTION_USB;
49 color = <LED_COLOR_ID_GREEN>;
50 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
51 trigger-sources = <&hub_port>;
52 linux,default-trigger = "usbport";
53 };
54
55 led_system: system {
56 label = "green:system";
57 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
58 default-state = "on";
59 };
60 };
61
62 keys {
63 compatible = "gpio-keys";
64
65 reset {
66 linux,code = <KEY_RESTART>;
67 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70 };
71
72 ath9k-leds {
73 compatible = "gpio-leds";
74
75 wlan {
76 label = "green:5g";
77 gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
78 linux,default-trigger = "phy1tpt";
79 };
80 };
81 };
82
83 &ref {
84 clock-frequency = <40000000>;
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <25000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x0 0x40000>;
103 read-only;
104 };
105
106 partition@40000 {
107 label = "u-boot-env";
108 reg = <0x40000 0x10000>;
109 read-only;
110 };
111
112 partition@50000 {
113 label = "firmware";
114 reg = <0x50000 0xf80000>;
115 compatible = "denx,uimage";
116 };
117
118 partition@fd0000 {
119 label = "nvram";
120 reg = <0xfd0000 0x10000>;
121 read-only;
122 };
123
124 partition@fe0000 {
125 label = "art";
126 reg = <0xfe0000 0x10000>;
127 read-only;
128
129 nvmem-layout {
130 compatible = "fixed-layout";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 calibration_art_1000: calibration@1000 {
135 reg = <0x1000 0x440>;
136 };
137
138 calibration_art_5000: calibration@5000 {
139 reg = <0x5000 0x440>;
140 };
141 };
142 };
143
144 partition@ff0000 {
145 label = "addr";
146 reg = <0xff0000 0x10000>;
147 read-only;
148
149 nvmem-layout {
150 compatible = "fixed-layout";
151 #address-cells = <1>;
152 #size-cells = <1>;
153
154 macaddr_addr_0: macaddr@0 {
155 compatible = "mac-base";
156 reg = <0x0 0x6>;
157 #nvmem-cell-cells = <1>;
158 };
159 };
160 };
161 };
162 };
163 };
164
165 &pcie {
166 status = "okay";
167
168 ath9k: wifi@0,0 {
169 compatible = "pci168c,0030";
170 reg = <0x0000 0 0 0 0>;
171 nvmem-cells = <&macaddr_addr_0 0x10>, <&calibration_art_5000>;
172 nvmem-cell-names = "mac-address", "calibration";
173 #gpio-cells = <2>;
174 gpio-controller;
175 };
176 };
177
178 &usb {
179 status = "okay";
180 };
181
182 &usb_phy {
183 status = "okay";
184 };
185
186 &wmac {
187 status = "okay";
188
189 nvmem-cells = <&macaddr_addr_0 0>, <&calibration_art_1000>;
190 nvmem-cell-names = "mac-address", "calibration";
191 };
192
193 &mdio0 {
194 status = "okay";
195
196 phy4: ethernet-phy@4 {
197 reg = <4>;
198 };
199 };
200
201 &eth0 {
202 status = "okay";
203
204 pll-data = <0xe000000 0x04000101 0x04001313>;
205
206 nvmem-cells = <&macaddr_addr_0 0x21>;
207 nvmem-cell-names = "mac-address";
208
209 phy-mode = "rgmii-rxid";
210 phy-handle = <&phy4>;
211
212 gmac-config {
213 device = <&gmac>;
214 rgmii-gmac0 = <1>;
215 rxd-delay = <1>;
216 rxdv-delay = <1>;
217 };
218 };
219