Skip to content

Commit 9a09d72

Browse files
committed
ipq60xx: add DPtech AP3000-2C support
Signed-off-by: Willem Lee <1980490718@qq.com>
1 parent 58d1180 commit 9a09d72

7 files changed

Lines changed: 401 additions & 3 deletions

File tree

package/firmware/ipq-wifi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ALLWIFIBOARDS:= \
3434
buffalo_wxr-5950ax12 \
3535
cmcc_rax3000q \
3636
compex_wpq873 \
37+
dptech_ap3000-2c \
3738
dynalink_dl-wrx36 \
3839
edgecore_eap102 \
3940
edimax_cax1800 \
@@ -170,6 +171,7 @@ $(eval $(call generate-ipq-wifi-package,arcadyan_aw1000,Arcadyan AW1000))
170171
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
171172
$(eval $(call generate-ipq-wifi-package,cmcc_rax3000q,CMCC RAX3000Q))
172173
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
174+
$(eval $(call generate-ipq-wifi-package,dptech_ap3000-2c,DPtech AP3000-2C))
173175
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
174176
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
175177
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
64.1 KB
Binary file not shown.
Lines changed: 375 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,375 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
/dts-v1/;
4+
5+
#include "ipq6018-512m.dtsi"
6+
#include "ipq6018-ess.dtsi"
7+
#include "ipq6018-mp5496.dtsi"
8+
#include "ipq6018-nss.dtsi"
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/input/input.h>
12+
#include <dt-bindings/leds/common.h>
13+
14+
/ {
15+
model = "DPtech AP3000-2C";
16+
compatible = "dptech,ap3000-2c", "qcom,ipq6018";
17+
18+
aliases {
19+
serial0 = &blsp1_uart3;
20+
led-boot = &led_power;
21+
led-failsafe = &led_power;
22+
led-running = &led_power;
23+
led-upgrade = &led_power;
24+
label-mac-device = &dp4;
25+
};
26+
27+
chosen {
28+
stdout-path = "serial0:115200n8";
29+
bootargs-append = " root=/dev/ubiblock0_1";
30+
};
31+
32+
keys {
33+
compatible = "gpio-keys";
34+
pinctrl-0 = <&button_pins>;
35+
pinctrl-names = "default";
36+
37+
reset {
38+
label = "reset";
39+
linux,code = <KEY_RESTART>;
40+
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
41+
};
42+
};
43+
44+
leds {
45+
compatible = "gpio-leds";
46+
pinctrl-0 = <&led_pins>;
47+
pinctrl-names = "default";
48+
49+
led_power: power {
50+
color = <LED_COLOR_ID_GREEN>;
51+
function = LED_FUNCTION_POWER;
52+
gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
53+
};
54+
55+
wlan2g {
56+
color = <LED_COLOR_ID_GREEN>;
57+
function = LED_FUNCTION_WLAN_2GHZ;
58+
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
59+
linux,default-trigger = "phy1radio";
60+
};
61+
62+
wlan5g {
63+
color = <LED_COLOR_ID_GREEN>;
64+
function = LED_FUNCTION_WLAN_5GHZ;
65+
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
66+
linux,default-trigger = "phy0radio";
67+
};
68+
};
69+
};
70+
71+
&tlmm {
72+
button_pins: button_pinmux {
73+
pins = "gpio9";
74+
function = "gpio";
75+
drive-strength = <8>;
76+
bias-pull-up;
77+
};
78+
79+
led_pins: led_pinmux {
80+
pins = "gpio23", "gpio37", "gpio55";
81+
function = "gpio";
82+
drive-strength = <8>;
83+
bias-pull-up;
84+
};
85+
86+
mdio_pins: mdio_pinmux {
87+
mdc {
88+
pins = "gpio64";
89+
function = "mdc";
90+
drive-strength = <8>;
91+
bias-pull-up;
92+
};
93+
94+
mdio {
95+
pins = "gpio65";
96+
function = "mdio";
97+
drive-strength = <8>;
98+
bias-pull-up;
99+
};
100+
};
101+
102+
spi_pins: spi_pinmux {
103+
pins = "gpio38", "gpio39", "gpio40", "gpio41";
104+
function = "blsp0_spi";
105+
drive-strength = <8>;
106+
bias-pull-down;
107+
};
108+
};
109+
110+
&blsp1_uart3 {
111+
status = "okay";
112+
113+
pinctrl-0 = <&serial_3_pins>;
114+
pinctrl-names = "default";
115+
};
116+
117+
&blsp1_spi1 {
118+
status = "okay";
119+
120+
pinctrl-0 = <&spi_pins>;
121+
pinctrl-names = "default";
122+
123+
flash@0 {
124+
reg = <0>;
125+
compatible = "jedec,spi-nor";
126+
spi-max-frequency = <50000000>;
127+
128+
partitions {
129+
compatible = "fixed-partitions";
130+
#address-cells = <1>;
131+
#size-cells = <1>;
132+
133+
partition@0 {
134+
label = "0:sbl1";
135+
reg = <0x0 0xc0000>;
136+
read-only;
137+
};
138+
139+
partition@c0000 {
140+
label = "0:mibib";
141+
reg = <0xc0000 0x10000>;
142+
read-only;
143+
};
144+
145+
partition@d0000 {
146+
label = "0:bootconfig";
147+
reg = <0xd0000 0x20000>;
148+
};
149+
150+
partition@f0000 {
151+
label = "0:bootconfig1";
152+
reg = <0xf0000 0x20000>;
153+
};
154+
155+
partition@110000 {
156+
label = "0:qsee";
157+
reg = <0x110000 0x1a0000>;
158+
read-only;
159+
};
160+
161+
partition@2b0000 {
162+
label = "0:qsee_1";
163+
reg = <0x2b0000 0x1a0000>;
164+
read-only;
165+
};
166+
167+
partition@450000 {
168+
label = "0:devcfg";
169+
reg = <0x450000 0x10000>;
170+
read-only;
171+
};
172+
173+
partition@460000 {
174+
label = "0:devcfg_1";
175+
reg = <0x460000 0x10000>;
176+
read-only;
177+
};
178+
179+
partition@470000 {
180+
label = "0:rpm";
181+
reg = <0x470000 0x40000>;
182+
read-only;
183+
};
184+
185+
partition@4b0000 {
186+
label = "0:rpm_1";
187+
reg = <0x4b0000 0x40000>;
188+
read-only;
189+
};
190+
191+
partition@4f0000 {
192+
label = "0:cdt";
193+
reg = <0x4f0000 0x10000>;
194+
read-only;
195+
};
196+
197+
partition@500000 {
198+
label = "0:cdt_1";
199+
reg = <0x500000 0x10000>;
200+
read-only;
201+
};
202+
203+
partition@510000 {
204+
compatible = "u-boot,env";
205+
label = "0:appsblenv";
206+
reg = <0x510000 0x10000>;
207+
};
208+
209+
partition@520000 {
210+
label = "0:appsbl";
211+
reg = <0x520000 0xa0000>;
212+
read-only;
213+
};
214+
215+
partition@5c0000 {
216+
label = "0:appsbl_1";
217+
reg = <0x5c0000 0xa0000>;
218+
read-only;
219+
};
220+
221+
partition@660000 {
222+
label = "0:art";
223+
reg = <0x660000 0x40000>;
224+
read-only;
225+
226+
nvmem-layout {
227+
compatible = "fixed-layout";
228+
#address-cells = <1>;
229+
#size-cells = <1>;
230+
231+
macaddr_art_0: macaddr@0 {
232+
reg = <0x0 0x6>;
233+
};
234+
235+
macaddr_art_6: macaddr@6 {
236+
reg = <0x6 0x6>;
237+
};
238+
};
239+
};
240+
};
241+
};
242+
};
243+
244+
&qpic_bam {
245+
status = "okay";
246+
};
247+
248+
&qpic_nand {
249+
status = "okay";
250+
251+
partitions {
252+
status = "disabled";
253+
};
254+
255+
nand@0 {
256+
reg = <0>;
257+
258+
nand-ecc-strength = <4>;
259+
nand-ecc-step-size = <512>;
260+
nand-bus-width = <8>;
261+
262+
partitions {
263+
compatible = "fixed-partitions";
264+
#address-cells = <1>;
265+
#size-cells = <1>;
266+
267+
partition@0 {
268+
label = "rootfs";
269+
reg = <0x0 0x0>;
270+
};
271+
};
272+
};
273+
};
274+
275+
&qusb_phy_0 {
276+
status = "okay";
277+
};
278+
279+
&ssphy_0 {
280+
status = "okay";
281+
};
282+
283+
&usb3 {
284+
status = "okay";
285+
};
286+
287+
&mdio {
288+
status = "okay";
289+
290+
pinctrl-0 = <&mdio_pins>;
291+
pinctrl-names = "default";
292+
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
293+
294+
qca8075_2: ethernet-phy@2 {
295+
compatible = "ethernet-phy-ieee802.3-c22";
296+
reg = <2>;
297+
};
298+
299+
qca8075_3: ethernet-phy@3 {
300+
compatible = "ethernet-phy-ieee802.3-c22";
301+
reg = <3>;
302+
};
303+
304+
qca8075_4: ethernet-phy@4 {
305+
compatible = "ethernet-phy-ieee802.3-c22";
306+
reg = <4>;
307+
};
308+
};
309+
310+
&switch {
311+
status = "okay";
312+
313+
switch_cpu_bmp = <0x1>;
314+
switch_lan_bmp = <0x1e>;
315+
switch_wan_bmp = <0x20>;
316+
switch_inner_bmp = <0xc0>;
317+
switch_mac_mode = <0x0>;
318+
switch_mac_mode1 = <0xff>;
319+
switch_mac_mode2 = <0xff>;
320+
bm_tick_mode = <0x00>;
321+
tm_tick_mode = <0x00>;
322+
323+
qcom,port_phyinfo {
324+
port@2 {
325+
port_id = <3>;
326+
phy_address = <2>;
327+
};
328+
port@3 {
329+
port_id = <4>;
330+
phy_address = <3>;
331+
};
332+
port@4 {
333+
port_id = <5>;
334+
phy_address = <4>;
335+
};
336+
};
337+
};
338+
339+
&edma {
340+
status = "okay";
341+
};
342+
343+
&dp3 {
344+
status = "okay";
345+
346+
phy-handle = <&qca8075_2>;
347+
label = "wan";
348+
nvmem-cells = <&macaddr_art_0>;
349+
nvmem-cell-names = "mac-address";
350+
};
351+
352+
&dp4 {
353+
status = "okay";
354+
355+
phy-handle = <&qca8075_3>;
356+
label = "lan1";
357+
nvmem-cells = <&macaddr_art_6>;
358+
nvmem-cell-names = "mac-address";
359+
};
360+
361+
&dp5 {
362+
status = "okay";
363+
364+
phy-handle = <&qca8075_4>;
365+
label = "lan2";
366+
nvmem-cells = <&macaddr_art_6>;
367+
nvmem-cell-names = "mac-address";
368+
};
369+
370+
&wifi {
371+
status = "okay";
372+
373+
qcom,ath11k-calibration-variant = "DPtech-AP3000-2C";
374+
qcom,ath11k-fw-memory-mode = <1>;
375+
};

0 commit comments

Comments
 (0)