ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar9344_qihoo_c301.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 = "Qihoo 360 C301";
11 compatible = "qihoo,c301";
12
13 aliases {
14 led-boot = &led_wlan_g;
15 led-failsafe = &led_wlan_o;
16 led-upgrade = &led_wlan_o;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21 pinctrl-names = "default";
22 pinctrl-0 = <&jtag_disable_pins>;
23
24 led_wlan_g: wlan_g {
25 label = "c301:green:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
27 };
28
29 led_wlan_o: wlan_o {
30 label = "c301:orange:wlan";
31 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
43 };
44 };
45
46 reg_eth_led_vbus {
47 compatible = "regulator-fixed";
48 regulator-name = "eth_led_vbus";
49 regulator-min-microvolt = <3300000>;
50 regulator-max-microvolt = <3300000>;
51 regulator-always-on;
52 gpio = <&gpio 18 GPIO_ACTIVE_LOW>;
53 };
54
55 reg_usb_vbus {
56 compatible = "regulator-fixed";
57 regulator-name = "usb_vbus";
58 regulator-min-microvolt = <5000000>;
59 regulator-max-microvolt = <5000000>;
60 enable-active-high;
61 regulator-always-on;
62 gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
63 };
64 };
65
66 &pinmux {
67 pmx_spi_cs1: pinmux_spi_cs1 {
68 pinctrl-single,bits = <0xc 0x07 0xff>;
69 };
70
71 pmx_led_switch: pinmux_led_switch {
72 pinctrl-single,bits = <0x0 0x2b2a2d00 0xffffff00>;
73 };
74 };
75
76 &ref {
77 clock-frequency = <40000000>;
78 };
79
80 &uart {
81 status = "okay";
82 };
83
84 &gpio {
85 status = "okay";
86
87 gpio_ext_lna0 {
88 gpio-hog;
89 gpios = <14 0>;
90 output-high;
91 line-name = "c301:ext:lna0";
92 };
93
94 gpio_ext_lna1 {
95 gpio-hog;
96 gpios = <15 0>;
97 output-high;
98 line-name = "c301:ext:lna1";
99 };
100 };
101
102 &builtin_switch {
103 pinctrl-names = "default";
104 pinctrl-0 = <&pmx_led_switch>;
105 };
106
107 &spi {
108 pinctrl-names = "default";
109 pinctrl-0 = <&pmx_spi_cs1>;
110 status = "okay";
111
112 num-cs = <2>;
113
114 flash@0 {
115 #address-cells = <1>;
116 #size-cells = <1>;
117 compatible = "jedec,spi-nor";
118 reg = <0>;
119 spi-max-frequency = <25000000>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 uboot: partition@0 {
127 label = "u-boot";
128 reg = <0x0 0x40000>;
129 read-only;
130 };
131
132 partition@40000 {
133 label = "u-boot-env";
134 reg = <0x40000 0x10000>;
135 read-only;
136 };
137
138 partition@50000 {
139 label = "devdata";
140 reg = <0x50000 0x10000>;
141 read-only;
142 };
143
144 partition@60000 {
145 label = "devconf";
146 reg = <0x60000 0x10000>;
147 read-only;
148 };
149
150 partition@70000 {
151 compatible = "seama";
152 label = "firmware";
153 reg = <0x70000 0xf60000>;
154 };
155
156 partition@fd0000 {
157 label = "warm_start";
158 reg = <0xfd0000 0x10000>;
159 read-only;
160 };
161
162 partition@fe0000 {
163 label = "action_image_config";
164 reg = <0xfe0000 0x10000>;
165 };
166
167 partition@ff0000 {
168 label = "radiocfg";
169 reg = <0xff0000 0x10000>;
170 read-only;
171 };
172 };
173 };
174
175 flash@1 {
176 #address-cells = <1>;
177 #size-cells = <1>;
178 compatible = "jedec,spi-nor";
179 reg = <1>;
180 spi-max-frequency = <25000000>;
181
182 partitions {
183 compatible = "fixed-partitions";
184 #address-cells = <1>;
185 #size-cells = <1>;
186
187 partition@0 {
188 label = "firmware2";
189 reg = <0x0 0xf00000>;
190 };
191
192 partition@f00000 {
193 label = "privatedata";
194 reg = <0xf00000 0x100000>;
195 read-only;
196 };
197 };
198 };
199 };
200
201 &usb {
202 status = "okay";
203 };
204
205 &usb_phy {
206 status = "okay";
207 };
208
209 &pcie {
210 status = "okay";
211
212 wifi@0,0 {
213 compatible = "qcom,ath10k";
214 reg = <0 0 0 0 0>;
215 };
216 };
217
218 &wmac {
219 status = "okay";
220 qca,no-eeprom;
221 };
222
223 &eth1 {
224 status = "okay";
225 gmac-config {
226 device = <&gmac>;
227 switch-phy-swap = <1>;
228 switch-only-mode = <1>;
229 };
230 };
231
232 &eth0 {
233 status = "okay";
234 phy-handle = <&swphy0>;
235 };