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