Skip to content

Commit e15446b

Browse files
committed
ipq60xx: add support for CMIOT AX18
1 parent 08ebc6e commit e15446b

File tree

4 files changed

+238
-5
lines changed

4 files changed

+238
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
/dts-v1/;
4+
5+
#include "ipq6018-256m.dtsi"
6+
#include "ipq6018-ess.dtsi"
7+
#include "ipq6000-opp.dtsi"
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/input/input.h>
11+
12+
/ {
13+
model = "CMIOT AX18";
14+
compatible = "cmiot,ax18", "qcom,ipq6018";
15+
16+
aliases {
17+
serial0 = &blsp1_uart3;
18+
led-boot = &led_power;
19+
led-failsafe = &led_power;
20+
led-running = &led_power;
21+
led-upgrade = &led_power;
22+
label-mac-device = &dp1;
23+
24+
ethernet0 = &dp1;
25+
ethernet1 = &dp2;
26+
ethernet3 = &dp4;
27+
ethernet4 = &dp5;
28+
};
29+
30+
chosen {
31+
stdout-path = "serial0:115200n8";
32+
bootargs-append = " root=/dev/ubiblock0_1";
33+
};
34+
35+
keys {
36+
compatible = "gpio-keys";
37+
38+
wps {
39+
label = "wps";
40+
linux,code = <KEY_WPS_BUTTON>;
41+
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
42+
};
43+
44+
reset {
45+
label = "reset";
46+
linux,code = <KEY_RESTART>;
47+
gpios = <&tlmm 60 GPIO_ACTIVE_LOW>;
48+
};
49+
};
50+
51+
leds {
52+
compatible = "gpio-leds";
53+
54+
led_power: power {
55+
label = "blue:power";
56+
gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
57+
};
58+
59+
wan {
60+
label = "blue:wan";
61+
gpio = <&tlmm 74 GPIO_ACTIVE_HIGH>;
62+
};
63+
64+
wlan2g {
65+
label = "blue:wlan2g";
66+
gpio = <&tlmm 37 GPIO_ACTIVE_HIGH>;
67+
};
68+
69+
wlan5g {
70+
label = "blue:wlan5g";
71+
gpio = <&tlmm 35 GPIO_ACTIVE_HIGH>;
72+
};
73+
74+
wps {
75+
label = "red:wps";
76+
gpio = <&tlmm 69 GPIO_ACTIVE_HIGH>;
77+
};
78+
};
79+
};
80+
81+
&tlmm {
82+
mdio_pins: mdio-pins {
83+
mdc {
84+
pins = "gpio64";
85+
function = "mdc";
86+
drive-strength = <8>;
87+
bias-pull-up;
88+
};
89+
90+
mdio {
91+
pins = "gpio65";
92+
function = "mdio";
93+
drive-strength = <8>;
94+
bias-pull-up;
95+
};
96+
};
97+
};
98+
99+
&blsp1_uart3 {
100+
pinctrl-0 = <&serial_3_pins>;
101+
pinctrl-names = "default";
102+
status = "okay";
103+
};
104+
105+
&qpic_bam {
106+
status = "okay";
107+
};
108+
109+
&qpic_nand {
110+
status = "okay";
111+
112+
nand@0 {
113+
reg = <0>;
114+
nand-ecc-strength = <4>;
115+
nand-ecc-step-size = <512>;
116+
nand-bus-width = <8>;
117+
118+
partitions {
119+
compatible = "qcom,smem-part";
120+
};
121+
};
122+
};
123+
124+
&rpm {
125+
status = "disabled";
126+
};
127+
128+
&mdio {
129+
status = "okay";
130+
131+
pinctrl-0 = <&mdio_pins>;
132+
pinctrl-names = "default";
133+
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
134+
135+
qca8075_0: ethernet-phy@0 {
136+
compatible = "ethernet-phy-ieee802.3-c22";
137+
reg = <0>;
138+
};
139+
140+
qca8075_1: ethernet-phy@1 {
141+
compatible = "ethernet-phy-ieee802.3-c22";
142+
reg = <1>;
143+
};
144+
145+
qca8075_3: ethernet-phy@3 {
146+
compatible = "ethernet-phy-ieee802.3-c22";
147+
reg = <3>;
148+
};
149+
150+
qca8075_4: ethernet-phy@4 {
151+
compatible = "ethernet-phy-ieee802.3-c22";
152+
reg = <4>;
153+
};
154+
};
155+
156+
&switch {
157+
status = "okay";
158+
159+
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
160+
switch_lan_bmp = <0x16>; /* lan port bitmap */
161+
switch_wan_bmp = <0x20>; /* wan port bitmap */
162+
switch_inner_bmp = <0xc0>; /*inner port bitmap*/
163+
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
164+
switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
165+
switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
166+
167+
qcom,port_phyinfo {
168+
port@0 {
169+
port_id = <1>;
170+
phy_address = <0>;
171+
};
172+
port@1 {
173+
port_id = <2>;
174+
phy_address = <1>;
175+
};
176+
port@2 {
177+
port_id = <4>;
178+
phy_address = <3>;
179+
};
180+
port@3 {
181+
port_id = <5>;
182+
phy_address = <4>;
183+
};
184+
};
185+
};
186+
187+
&edma {
188+
status = "okay";
189+
};
190+
191+
&dp1 {
192+
status = "okay";
193+
phy-handle = <&qca8075_0>;
194+
label = "lan3";
195+
};
196+
197+
&dp2 {
198+
status = "okay";
199+
phy-handle = <&qca8075_1>;
200+
label = "lan2";
201+
};
202+
203+
&dp4 {
204+
status = "okay";
205+
phy-handle = <&qca8075_3>;
206+
label = "lan1";
207+
};
208+
209+
&dp5 {
210+
status = "okay";
211+
phy-handle = <&qca8075_4>;
212+
label = "wan";
213+
};
214+
215+
&wifi {
216+
status = "disabled";
217+
qcom,ath11k-fw-memory-mode = <2>;
218+
};

target/linux/qualcommax/image/ipq60xx.mk

+12
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ define Device/EmmcImage
2323
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata
2424
endef
2525

26+
define Device/cmiot_ax18
27+
$(call Device/FitImage)
28+
$(call Device/UbiFit)
29+
DEVICE_VENDOR := CMIOT
30+
DEVICE_MODEL := AX18
31+
BLOCKSIZE := 128k
32+
PAGESIZE := 2048
33+
DEVICE_DTS_CONFIG := config@cp03-c1
34+
SOC := ipq6000
35+
endef
36+
TARGET_DEVICES += cmiot_ax18
37+
2638
define Device/glinet_gl-ax1800
2739
$(call Device/FitImage)
2840
$(call Device/UbiFit)

target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ ipq60xx_setup_interfaces()
1111
local board="$1"
1212

1313
case "$board" in
14+
cmiot,ax18|\
15+
qihoo,360v6|\
16+
redmi,ax5-*|\
17+
xiaomi,rm1800)
18+
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
19+
;;
1420
glinet,gl-ax1800|\
1521
linksys,mr7350)
1622
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
1723
;;
1824
glinet,gl-axt1800)
1925
ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
2026
;;
21-
qihoo,360v6|\
22-
redmi,ax5-*|\
23-
xiaomi,rm1800)
24-
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
25-
;;
2627
*)
2728
echo "Unsupported hardware. Network interfaces not initialized"
2829
;;

target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh

+2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ platform_check_image() {
1010

1111
platform_do_upgrade() {
1212
case "$(board_name)" in
13+
cmiot,ax18|\
1314
glinet,gl-ax1800|\
1415
glinet,gl-axt1800|\
16+
qihoo,360v6|\
1517
xiaomi,rm1800)
1618
nand_do_upgrade "$1"
1719
;;

0 commit comments

Comments
 (0)