6a8ad706514c5aac1c080b162e973c6c1c74ab28
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_winchannel_wb2000.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 "ar9344.dtsi"
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 = "wb2000:green:2g";
43 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
44 default-state = "off";
45 linux,default-trigger = "phy0tpt";
46 };
47
48 usb {
49 label = "wb2000:green:usb";
50 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
51 default-state = "off";
52 trigger-sources = <&hub_port1>, <&hub_port2>;
53 linux,default-trigger = "usbport";
54 };
55
56 led_system: system {
57 label = "wb2000:green:system";
58 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
59 default-state = "on";
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys-polled";
65 poll-interval = <50>;
66
67 reset {
68 linux,code = <KEY_RESTART>;
69 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
70 debounce-interval = <60>;
71 };
72 };
73
74 ath9k-leds {
75 compatible = "gpio-leds";
76
77 wlan {
78 label = "wb2000:green:5g";
79 gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
80 default-state = "off";
81 linux,default-trigger = "phy1tpt";
82 };
83 };
84 };
85
86 &ref {
87 clock-frequency = <40000000>;
88 };
89
90 &uart {
91 status = "okay";
92 };
93
94 &spi {
95 num-cs = <1>;
96
97 status = "okay";
98
99 flash@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <25000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x0 0x40000>;
112 read-only;
113 };
114
115 partition@40000 {
116 label = "u-boot-env";
117 reg = <0x40000 0x10000>;
118 read-only;
119 };
120
121 partition@50000 {
122 label = "firmware";
123 reg = <0x50000 0xf80000>;
124 compatible = "denx,uimage";
125 };
126
127 partition@fd0000 {
128 label = "nvram";
129 reg = <0xfd0000 0x10000>;
130 read-only;
131 };
132
133 art: partition@fe0000 {
134 label = "art";
135 reg = <0xfe0000 0x10000>;
136 read-only;
137 };
138
139 addr: partition@ff0000 {
140 label = "addr";
141 reg = <0xff0000 0x10000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &pcie {
149 status = "okay";
150
151 ath9k: wifi@0,0 {
152 compatible = "pci168c,0030";
153 reg = <0x0000 0 0 0 0>;
154 qca,no-eeprom;
155 mtd-mac-address = <&addr 0x0>;
156 mtd-mac-address-increment = <0x10>;
157 #gpio-cells = <2>;
158 gpio-controller;
159 };
160 };
161
162 &usb {
163 #address-cells = <1>;
164 #size-cells = <0>;
165 status = "okay";
166
167 port@1 {
168 #address-cells = <1>;
169 #size-cells = <0>;
170 reg = <1>;
171 #trigger-source-cells = <0>;
172
173 hub_port1: port@1 {
174 reg = <1>;
175 #trigger-source-cells = <0>;
176 };
177
178 hub_port2: port@2 {
179 reg = <2>;
180 #trigger-source-cells = <0>;
181 };
182 };
183 };
184
185 &usb_phy {
186 status = "okay";
187 };
188
189 &wmac {
190 status = "okay";
191
192 mtd-cal-data = <&art 0x1000>;
193 mtd-mac-address = <&addr 0x0>;
194 };
195
196 &mdio0 {
197 status = "okay";
198
199 phy-mask = <0x10>;
200
201 phy4: ethernet-phy@4 {
202 reg = <4>;
203 };
204 };
205
206 &eth0 {
207 status = "okay";
208
209 pll-data = <0xe000000 0x04000101 0x04001313>;
210
211 mtd-mac-address = <&addr 0x0>;
212 mtd-mac-address-increment = <0x21>;
213
214 phy-mode = "rgmii-rxid";
215 phy-handle = <&phy4>;
216
217 gmac-config {
218 device = <&gmac>;
219 rgmii-gmac0 = <1>;
220 rxd-delay = <1>;
221 rxdv-delay = <1>;
222 };
223 };