[openwrt/openwrt] ipq40xx: convert to DSA and enable Sony NCP-HG100/Cellular
LEDE Commits
lede-commits at lists.infradead.org
Sun Oct 9 14:20:50 PDT 2022
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/32e41ba18a41eac8cc782de78fd988b18fc44527
commit 32e41ba18a41eac8cc782de78fd988b18fc44527
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Oct 5 23:35:21 2022 +0900
ipq40xx: convert to DSA and enable Sony NCP-HG100/Cellular
This patch converts networking on Sony NCP-HG100/Cellular to DSA and
re-enables support for the device.
Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
.../linux/ipq40xx/base-files/etc/board.d/01_leds | 4 +--
.../ipq40xx/base-files/etc/board.d/02_network | 1 +
.../boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts | 34 ++++++++++++----------
target/linux/ipq40xx/image/generic.mk | 3 +-
4 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index 74f31e778f..cd68ed32c0 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -95,8 +95,8 @@ qxwlan,e2600ac-c2)
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
;;
sony,ncp-hg100-cellular)
- ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
- ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
+ ucidef_set_led_netdev "lan" "LAN" "green:lan" "lan"
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
ucidef_set_led_netdev "wwan" "WWAN" "green:wan-4" "wwan0"
;;
zyxel,nbg6617 |\
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 583b5c8fbd..1089a7f3f8 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -34,6 +34,7 @@ ipq40xx_setup_interfaces()
luma,wrtq-329acn|\
mikrotik,cap-ac|\
netgear,wac510|\
+ sony,ncp-hg100-cellular|\
zte,mf289f)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
index f1ac5fd52f..ea27defea3 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
@@ -16,7 +16,7 @@
led-failsafe = &led_cloud_red;
led-running = &led_cloud_green;
led-upgrade = &led_cloud_green;
- label-mac-device = &gmac0;
+ label-mac-device = &gmac;
};
chosen {
@@ -57,23 +57,9 @@
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
- ess-psgmii at 98000 {
- status = "okay";
- };
-
dma at 7984000 {
status = "okay";
};
-
- ess-switch at c000000 {
- status = "okay";
- switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */
- switch_initvlas = <0x0007c 0x54>; /* PORT0_STATUS */
- };
-
- edma at c080000 {
- status = "okay";
- };
};
keys-repeat {
@@ -616,6 +602,24 @@
status = "okay";
};
+&gmac {
+ status = "okay";
+};
+
+&switch {
+ status = "okay";
+};
+
+&swport4 {
+ status = "okay";
+ label = "lan";
+};
+
+&swport5 {
+ status = "okay";
+ label = "wan";
+};
+
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 82c7464b87..68ce31c205 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -1048,8 +1048,7 @@ define Device/sony_ncp-hg100-cellular
DEVICE_PACKAGES := e2fsprogs ipq-wifi-sony_ncp-hg100-cellular \
kmod-fs-ext4 uqmi
endef
-# Missing DSA Setup
-#TARGET_DEVICES += sony_ncp-hg100-cellular
+TARGET_DEVICES += sony_ncp-hg100-cellular
define Device/teltonika_rutx10
$(call Device/FitImage)
More information about the lede-commits
mailing list