ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar9344_enterasys_ws-ap3705i.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 compatible = "enterasys,ws-ap3705i", "qca,ar9344";
11 model = "Enterasys WS-AP3705i";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_power_green;
19 led-failsafe = &led_power_red;
20 led-running = &led_power_green;
21 led-upgrade = &led_power_red;
22 label-mac-device = &eth0;
23 };
24
25 mtd-concat {
26 compatible = "mtd-concat";
27 devices = <&concat0 &concat1>;
28
29 partitions {
30 compatible = "fixed-partitions";
31 #address-cells = <1>;
32 #size-cells = <1>;
33
34 partition@0 {
35 compatible = "denx,uimage";
36 label = "firmware";
37 reg = <0x0 0x1dd0000>;
38 };
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 pinctrl-names = "default";
46 pinctrl-0 = <&enable_gpio_11 &enable_gpio_16>;
47
48 led_power_green: power_green {
49 label = "ws-ap3705i:green:power";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 };
52
53 led_power_red: power_red {
54 label = "ws-ap3705i:red:power";
55 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
56 };
57
58 lan_blue {
59 label = "ws-ap3705i:blue:lan";
60 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
61 };
62
63 lan_green {
64 label = "ws-ap3705i:green:lan";
65 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
66 };
67
68 radio2 {
69 label = "ws-ap3705i:green:radio2";
70 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
71 linux,default-trigger = "phy0tpt";
72 };
73 };
74
75 ath9k-leds {
76 compatible = "gpio-leds";
77
78 radio1 {
79 label = "ws-ap3705i:green:radio1";
80 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "phy1tpt";
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87
88 reset {
89 label = "Reset button";
90 linux,code = <KEY_RESTART>;
91 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
92 };
93 };
94 };
95
96 &ref {
97 clock-frequency = <40000000>;
98 };
99
100 &uart {
101 status = "okay";
102 };
103
104 &pinmux {
105 enable_gpio_16: pinmux_enable_gpio_16 {
106 pinctrl-single,bits = <0x10 0x0 0x000000ff>;
107 };
108
109 enable_gpio_11: pinmux_enable_gpio_11 {
110 pinctrl-single,bits = <0x8 0x0 0xff000000>;
111 };
112 };
113
114 &gpio {
115 status = "okay";
116 };
117
118 &wmac {
119 status = "okay";
120 qca,no-eeprom;
121 };
122
123 &spi {
124 status = "okay";
125
126 cs-gpios = <0>, <0>;
127 num-cs = <2>;
128
129 flash@0 {
130 compatible = "jedec,spi-nor";
131 reg = <0>;
132 spi-max-frequency = <25000000>;
133
134 partitions {
135 compatible = "fixed-partitions";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 partition@0 {
140 label = "u-boot-bak";
141 reg = <0x0 0x80000>;
142 read-only;
143 };
144
145 partition@80000 {
146 label = "u-boot-env0";
147 reg = <0x80000 0x10000>;
148 read-only;
149 };
150
151 partition@90000 {
152 label = "u-boot-env1";
153 reg = <0x90000 0x10000>;
154 read-only;
155 };
156
157 partition@a0000 {
158 label = "u-boot";
159 reg = <0xa0000 0x80000>;
160 read-only;
161 };
162
163 partition@120000 {
164 label = "calibrate";
165 reg = <0x120000 0x10000>;
166 read-only;
167 };
168
169 partition@130000 {
170 label = "nvram";
171 reg = <0x130000 0x100000>;
172 read-only;
173 };
174
175 concat0: partition@230000 {
176 label = "concat0";
177 reg = <0x230000 0xdd0000>;
178 };
179 };
180 };
181
182 flash@1 {
183 compatible = "jedec,spi-nor";
184 reg = <1>;
185 spi-max-frequency = <25000000>;
186
187 partitions {
188 compatible = "fixed-partitions";
189 #address-cells = <1>;
190 #size-cells = <1>;
191
192 concat1: partition@0 {
193 label = "concat1";
194 reg = <0x0 0x1000000>;
195 };
196 };
197 };
198 };
199
200 &pcie {
201 status = "okay";
202
203 ath9k: wifi@0,0 {
204 compatible = "pci168c,0033";
205 reg = <0x0000 0 0 0 0>;
206 qca,no-eeprom;
207 #gpio-cells = <2>;
208 gpio-controller;
209 };
210 };
211
212 &mdio0 {
213 status = "okay";
214
215 phy0: ethernet-phy@0 {
216 reg = <0>;
217 };
218 };
219
220 &eth0 {
221 status = "okay";
222
223 pll-data = <0x1e000000 0x08000101 0x08001313>;
224
225 phy-mode = "rgmii";
226 phy-handle = <&phy0>;
227
228 gmac-config {
229 device = <&gmac>;
230 rgmii-gmac0 = <1>;
231 rxd-delay = <0>;
232 rxdv-delay = <0>;
233 txen-delay = <0>;
234 txd-delay = <0>;
235 };
236 };