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