ath79: add support for Qihoo C301
[openwrt/openwrt.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 cs-gpios= <0>, <0>;
114
115 flash@0 {
116 #address-cells = <1>;
117 #size-cells = <1>;
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <25000000>;
121
122 partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 uboot: partition@0 {
128 label = "u-boot";
129 reg = <0x0 0x40000>;
130 read-only;
131 };
132
133 partition@40000 {
134 label = "u-boot-env";
135 reg = <0x40000 0x10000>;
136 read-only;
137 };
138
139 partition@50000 {
140 label = "devdata";
141 reg = <0x50000 0x10000>;
142 read-only;
143 };
144
145 partition@60000 {
146 label = "devconf";
147 reg = <0x60000 0x10000>;
148 read-only;
149 };
150
151 partition@70000 {
152 compatible = "seama";
153 label = "firmware";
154 reg = <0x70000 0xf60000>;
155 };
156
157 partition@fd0000 {
158 label = "warm_start";
159 reg = <0xfd0000 0x10000>;
160 read-only;
161 };
162
163 partition@fe0000 {
164 label = "action_image_config";
165 reg = <0xfe0000 0x10000>;
166 };
167
168 partition@ff0000 {
169 label = "radiocfg";
170 reg = <0xff0000 0x10000>;
171 read-only;
172 };
173 };
174 };
175
176 flash@1 {
177 #address-cells = <1>;
178 #size-cells = <1>;
179 compatible = "jedec,spi-nor";
180 reg = <1>;
181 spi-max-frequency = <25000000>;
182
183 partitions {
184 compatible = "fixed-partitions";
185 #address-cells = <1>;
186 #size-cells = <1>;
187
188 partition@0 {
189 label = "firmware2";
190 reg = <0x0 0xf00000>;
191 };
192
193 partition@f00000 {
194 label = "privatedata";
195 reg = <0xf00000 0x100000>;
196 read-only;
197 };
198 };
199 };
200 };
201
202 &usb {
203 status = "okay";
204 };
205
206 &usb_phy {
207 status = "okay";
208 };
209
210 &pcie {
211 status = "okay";
212
213 wifi@0,0 {
214 compatible = "qcom,ath10k";
215 reg = <0 0 0 0 0>;
216 };
217 };
218
219 &wmac {
220 status = "okay";
221 qca,no-eeprom;
222 };
223
224 &eth1 {
225 status = "okay";
226 gmac-config {
227 device = <&gmac>;
228 switch-phy-swap = <1>;
229 switch-only-mode = <1>;
230 };
231 };
232
233 &eth0 {
234 status = "okay";
235 phy-handle = <&swphy0>;
236 };