Skip to content

Commit cdd6967

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

7 files changed

Lines changed: 387 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: 361 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,361 @@
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+
compatible = "qcom,ipq6018-nand", "qcom,ebi2-nandc-bam-v1.5.0";
252+
253+
nand@0 {
254+
reg = <0>;
255+
nand-ecc-strength = <4>;
256+
nand-ecc-step-size = <512>;
257+
nand-bus-width = <8>;
258+
};
259+
};
260+
261+
&qusb_phy_0 {
262+
status = "okay";
263+
};
264+
265+
&ssphy_0 {
266+
status = "okay";
267+
};
268+
269+
&usb3 {
270+
status = "okay";
271+
};
272+
273+
&mdio {
274+
status = "okay";
275+
276+
pinctrl-0 = <&mdio_pins>;
277+
pinctrl-names = "default";
278+
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
279+
280+
qca8075_2: ethernet-phy@2 {
281+
compatible = "ethernet-phy-ieee802.3-c22";
282+
reg = <2>;
283+
};
284+
285+
qca8075_3: ethernet-phy@3 {
286+
compatible = "ethernet-phy-ieee802.3-c22";
287+
reg = <3>;
288+
};
289+
290+
qca8075_4: ethernet-phy@4 {
291+
compatible = "ethernet-phy-ieee802.3-c22";
292+
reg = <4>;
293+
};
294+
};
295+
296+
&switch {
297+
status = "okay";
298+
299+
switch_cpu_bmp = <0x1>;
300+
switch_lan_bmp = <0x1e>;
301+
switch_wan_bmp = <0x20>;
302+
switch_inner_bmp = <0xc0>;
303+
switch_mac_mode = <0x0>;
304+
switch_mac_mode1 = <0xff>;
305+
switch_mac_mode2 = <0xff>;
306+
bm_tick_mode = <0x00>;
307+
tm_tick_mode = <0x00>;
308+
309+
qcom,port_phyinfo {
310+
port@2 {
311+
port_id = <3>;
312+
phy_address = <2>;
313+
};
314+
port@3 {
315+
port_id = <4>;
316+
phy_address = <3>;
317+
};
318+
port@4 {
319+
port_id = <5>;
320+
phy_address = <4>;
321+
};
322+
};
323+
};
324+
325+
&edma {
326+
status = "okay";
327+
};
328+
329+
&dp3 {
330+
status = "okay";
331+
332+
phy-handle = <&qca8075_2>;
333+
label = "wan";
334+
nvmem-cells = <&macaddr_art_0>;
335+
nvmem-cell-names = "mac-address";
336+
};
337+
338+
&dp4 {
339+
status = "okay";
340+
341+
phy-handle = <&qca8075_3>;
342+
label = "lan1";
343+
nvmem-cells = <&macaddr_art_6>;
344+
nvmem-cell-names = "mac-address";
345+
};
346+
347+
&dp5 {
348+
status = "okay";
349+
350+
phy-handle = <&qca8075_4>;
351+
label = "lan2";
352+
nvmem-cells = <&macaddr_art_6>;
353+
nvmem-cell-names = "mac-address";
354+
};
355+
356+
&wifi {
357+
status = "okay";
358+
359+
qcom,ath11k-calibration-variant = "DPtech-AP3000-2C";
360+
qcom,ath11k-fw-memory-mode = <1>;
361+
};

target/linux/qualcommax/image/ipq60xx.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ define Device/cmiot_ax18
1717
endef
1818
TARGET_DEVICES += cmiot_ax18
1919

20+
define Device/dptech_ap3000-2c
21+
$(call Device/FitImage)
22+
$(call Device/UbiFit)
23+
DEVICE_VENDOR := DPtech
24+
DEVICE_MODEL := AP3000-2C
25+
BLOCKSIZE := 128k
26+
PAGESIZE := 2048
27+
SOC := ipq6000
28+
DEVICE_DTS_CONFIG := config@cp03-c1-DP019
29+
DEVICE_PACKAGES := ipq-wifi-dptech_ap3000-2c
30+
endef
31+
TARGET_DEVICES += dptech_ap3000-2c
32+
2033
define Device/glinet_gl-common
2134
$(call Device/FitImage)
2235
$(call Device/UbiFit)

0 commit comments

Comments
 (0)