1ab92c698cc9a936f8d4d64e7f92c2b774e544db
[openwrt/staging/jow.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_port>;
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 &spi {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <25000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x40000>;
101 read-only;
102 };
103
104 partition@40000 {
105 label = "u-boot-env";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 label = "firmware";
112 reg = <0x50000 0xf80000>;
113 compatible = "denx,uimage";
114 };
115
116 partition@fd0000 {
117 label = "nvram";
118 reg = <0xfd0000 0x10000>;
119 read-only;
120 };
121
122 partition@fe0000 {
123 label = "art";
124 reg = <0xfe0000 0x10000>;
125 read-only;
126
127 nvmem-layout {
128 compatible = "fixed-layout";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 calibration_art_1000: calibration@1000 {
133 reg = <0x1000 0x440>;
134 };
135
136 calibration_art_5000: calibration@5000 {
137 reg = <0x5000 0x440>;
138 };
139 };
140 };
141
142 partition@ff0000 {
143 label = "addr";
144 reg = <0xff0000 0x10000>;
145 read-only;
146
147 nvmem-layout {
148 compatible = "fixed-layout";
149 #address-cells = <1>;
150 #size-cells = <1>;
151
152 macaddr_addr_0: macaddr@0 {
153 reg = <0x0 0x6>;
154 };
155 };
156 };
157 };
158 };
159 };
160
161 &pcie {
162 status = "okay";
163
164 ath9k: wifi@0,0 {
165 compatible = "pci168c,0030";
166 reg = <0x0000 0 0 0 0>;
167 nvmem-cells = <&macaddr_addr_0>, <&calibration_art_5000>;
168 nvmem-cell-names = "mac-address", "calibration";
169 mac-address-increment = <0x10>;
170 #gpio-cells = <2>;
171 gpio-controller;
172 };
173 };
174
175 &usb {
176 status = "okay";
177 };
178
179 &usb_phy {
180 status = "okay";
181 };
182
183 &wmac {
184 status = "okay";
185
186 nvmem-cells = <&macaddr_addr_0>, <&calibration_art_1000>;
187 nvmem-cell-names = "mac-address", "calibration";
188 };
189
190 &mdio0 {
191 status = "okay";
192
193 phy4: ethernet-phy@4 {
194 reg = <4>;
195 };
196 };
197
198 &eth0 {
199 status = "okay";
200
201 pll-data = <0xe000000 0x04000101 0x04001313>;
202
203 nvmem-cells = <&macaddr_addr_0>;
204 nvmem-cell-names = "mac-address";
205 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 };
217