mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 03:13:17 +00:00
409 lines
11 KiB
Diff
409 lines
11 KiB
Diff
From f7dea8b5a8e96c51111059e5cd74eae8c61474d1 Mon Sep 17 00:00:00 2001
|
|
From: Siddharth Pandey <siddharth.pandey@vvdntech.com>
|
|
Date: Thu, 2 Sep 2021 08:05:57 +0530
|
|
Subject: [PATCH] HFCL ION4 Target addition patch.
|
|
|
|
Signed-off-by: Siddharth Pandey <siddharth.pandey@vvdntech.com>
|
|
---
|
|
package/boot/uboot-envtools/files/ipq40xx | 4 +
|
|
package/firmware/ipq-wifi/Makefile | 5 +-
|
|
.../linux/ipq40xx/base-files/etc/board.d/01_leds | 4 +
|
|
.../ipq40xx/base-files/etc/board.d/02_network | 1 +
|
|
.../etc/hotplug.d/firmware/11-ath10k-caldata | 6 +
|
|
.../ipq40xx/base-files/lib/upgrade/platform.sh | 1 +
|
|
.../arch/arm/boot/dts/qcom-ipq4019-hfcl-ion4.dts | 236 +++++++++++++++++++++
|
|
target/linux/ipq40xx/image/Makefile | 14 ++
|
|
.../ipq40xx/patches-4.14/999-hfcl-ion4-dts.patch | 12 ++
|
|
9 files changed, 282 insertions(+), 1 deletion(-)
|
|
create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hfcl-ion4.dts
|
|
create mode 100644 target/linux/ipq40xx/patches-4.14/999-hfcl-ion4-dts.patch
|
|
|
|
diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx
|
|
index ad0fd62..8712c09 100644
|
|
--- a/package/boot/uboot-envtools/files/ipq40xx
|
|
+++ b/package/boot/uboot-envtools/files/ipq40xx
|
|
@@ -47,6 +47,10 @@ linksys,ea8300)
|
|
zyxel,nbg6617)
|
|
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x10000" "0x10000"
|
|
;;
|
|
+hfcl,ion4)
|
|
+ env=$(ubootenv_mtdinfo)
|
|
+ ubootenv_add_uci_config $env
|
|
+ ;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
|
|
index 05f4cd9..9f48030 100644
|
|
--- a/package/firmware/ipq-wifi/Makefile
|
|
+++ b/package/firmware/ipq-wifi/Makefile
|
|
@@ -39,7 +39,8 @@ ALLWIFIBOARDS:= \
|
|
qxwlan_e2600ac \
|
|
tp-link_ap2220 \
|
|
tp-link_ec420-g1 \
|
|
- cig_wf610d
|
|
+ cig_wf610d \
|
|
+ hfcl_ion4
|
|
|
|
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
|
|
|
|
@@ -118,5 +119,7 @@ $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
|
$(eval $(call generate-ipq-wifi-package,tp-link_ap2220,tp-link AP2220))
|
|
$(eval $(call generate-ipq-wifi-package,tp-link_ec420-g1,tp-link EC420-G1))
|
|
$(eval $(call generate-ipq-wifi-package,cig_wf610d,CIG WF_610D))
|
|
+$(eval $(call generate-ipq-wifi-package,hfcl_ion4,HFCL ION4))
|
|
+
|
|
|
|
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
|
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 0336617..c286202 100755
|
|
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
|
|
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
|
|
@@ -68,6 +68,10 @@ cig,wf610d)
|
|
ucidef_set_led_wlan "wifi2g" "WIFI2G" "wf6203:green:wifi2g" "phy0tpt"
|
|
ucidef_set_led_wlan "wifi5g" "WIFI5G" "wf6203:green:wifi5g" "phy1tpt"
|
|
;;
|
|
+hfcl,ion4)
|
|
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "yellow:wlan2g" "phy0tpt"
|
|
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "red:wlan5g" "phy1tpt"
|
|
+ ;;
|
|
|
|
*)
|
|
;;
|
|
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 bd28bcf..1cc91dd 100755
|
|
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
|
|
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
|
|
@@ -51,6 +51,7 @@ ipq40xx_setup_interfaces()
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
tp-link,ec420-g1|\
|
|
+ hfcl,ion4|\
|
|
cig,wf610d)
|
|
ucidef_set_interface_wan "eth0"
|
|
ucidef_set_interface_lan ""
|
|
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
index 38f248f..941e66a 100644
|
|
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
@@ -202,6 +202,9 @@ case "$FIRMWARE" in
|
|
ath10kcal_extract "0:ART" 4096 12064
|
|
ath10kcal_patch_mac_crc $(macaddr_add "$(cat /sys/class/net/eth0/address)" 9) #2.4G, wlan1
|
|
;;
|
|
+ hfcl,ion4)
|
|
+ ath10kcal_extract "0:ART" 4096 12064
|
|
+ ;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-ahb-a800000.wifi.bin")
|
|
@@ -268,6 +271,9 @@ case "$FIRMWARE" in
|
|
ath10kcal_extract "ART" 20480 12064
|
|
ath10kcal_patch_mac_crc $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
|
|
;;
|
|
+ hfcl,ion4)
|
|
+ ath10kcal_extract "0:ART" 20480 12064
|
|
+ ;;
|
|
esac
|
|
;;
|
|
*)
|
|
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
|
|
index 8200b76..6710b77 100644
|
|
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
|
|
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
|
|
@@ -55,6 +55,7 @@ platform_do_upgrade() {
|
|
edgecore,ecw5211 |\
|
|
edgecore,oap100 |\
|
|
qxwlan,e2600ac-c2 |\
|
|
+ hfcl,ion4 |\
|
|
tp-link,ec420-g1)
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hfcl-ion4.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hfcl-ion4.dts
|
|
new file mode 100644
|
|
index 0000000..97fb482
|
|
--- /dev/null
|
|
+++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hfcl-ion4.dts
|
|
@@ -0,0 +1,236 @@
|
|
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
+
|
|
+#include "qcom-ipq4019.dtsi"
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/input/input.h>
|
|
+#include <dt-bindings/soc/qcom,tcsr.h>
|
|
+
|
|
+/ {
|
|
+ model = "HFCL Ltd, ION4";
|
|
+ compatible = "hfcl,ion4";
|
|
+
|
|
+ aliases {
|
|
+/* led-boot = &power_green;
|
|
+ led-failsafe = &power_red;
|
|
+ led-running = &power_green;
|
|
+ led-upgrade = &power_red;
|
|
+ label-mac-device = &wifi0;
|
|
+ */
|
|
+ };
|
|
+
|
|
+ soc {
|
|
+ rng@22000 {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ mdio@90000 {
|
|
+ status = "okay";
|
|
+ pinctrl-0 = <&mdio_pins>;
|
|
+ pinctrl-names = "default";
|
|
+
|
|
+ /delete-node/ ethernet-phy@1;
|
|
+ /delete-node/ ethernet-phy@2;
|
|
+ /delete-node/ ethernet-phy@3;
|
|
+ /delete-node/ ethernet-phy@4;
|
|
+ /delete-node/ psgmii-phy@5;
|
|
+ };
|
|
+
|
|
+ tcsr@1949000 {
|
|
+ compatible = "qcom,tcsr";
|
|
+ reg = <0x1949000 0x100>;
|
|
+ qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
|
+ };
|
|
+
|
|
+ ess_tcsr@1953000 {
|
|
+ compatible = "qcom,tcsr";
|
|
+ reg = <0x1953000 0x1000>;
|
|
+ qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
|
|
+ };
|
|
+
|
|
+ tcsr@1957000 {
|
|
+ compatible = "qcom,tcsr";
|
|
+ reg = <0x1957000 0x100>;
|
|
+ qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
|
+ };
|
|
+
|
|
+ crypto@8e3a000 {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ watchdog@b017000 {
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ ess-switch@c000000 {
|
|
+ switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
|
|
+ switch_lan_bmp = <0x0>; /* lan port bitmap */
|
|
+ switch_wan_bmp = <0x10>; /* wan port bitmap */
|
|
+ };
|
|
+
|
|
+ edma@c080000 {
|
|
+ status = "okay";
|
|
+ phy-mode = "rgmii-id";
|
|
+ qcom,num_gmac = <1>;
|
|
+ qcom,single-phy;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ gpio_key {
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ button@1 {
|
|
+ label = "reset";
|
|
+ linux,code = <KEY_RESTART>;
|
|
+ gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
|
+ linux,input-type = <1>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ leds {
|
|
+ compatible = "gpio-leds";
|
|
+
|
|
+ power_red: power_red {
|
|
+ label = "yellow:wlan2g";
|
|
+ gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
|
+ };
|
|
+
|
|
+ power_green: power_green {
|
|
+ label = "red:wlan5g";
|
|
+ gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&tlmm {
|
|
+ serial_0_pins: serial_pinmux {
|
|
+ mux {
|
|
+ pins = "gpio16", "gpio17";
|
|
+ function = "blsp_uart0";
|
|
+ bias-disable;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ nand_pins: nand_pins {
|
|
+ pullups {
|
|
+ pins = "gpio53", "gpio58", "gpio59";
|
|
+ function = "qpic";
|
|
+ bias-pull-up;
|
|
+ };
|
|
+
|
|
+ pulldowns {
|
|
+ pins = "gpio54", "gpio55", "gpio56",
|
|
+ "gpio57", "gpio60", "gpio61",
|
|
+ "gpio62", "gpio63", "gpio64",
|
|
+ "gpio65", "gpio66", "gpio67",
|
|
+ "gpio68", "gpio69";
|
|
+ function = "qpic";
|
|
+ bias-pull-down;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ mdio_pins: mdio_pinmux {
|
|
+ mux_1 {
|
|
+ pins = "gpio6";
|
|
+ function = "mdio";
|
|
+ bias-pull-up;
|
|
+ };
|
|
+ mux_2 {
|
|
+ pins = "gpio7";
|
|
+ function = "mdc";
|
|
+ bias-pull-up;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&nand {
|
|
+ pinctrl-0 = <&nand_pins>;
|
|
+ pinctrl-names = "default";
|
|
+ status = "okay";
|
|
+
|
|
+ nand@0 {
|
|
+ partitions {
|
|
+ compatible = "fixed-partitions";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+
|
|
+ partition0@0 {
|
|
+ label = "0:SBL1";
|
|
+ reg = <0x00000000 0x00100000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition1@100000 {
|
|
+ label = "0:MIBIB";
|
|
+ reg = <0x00100000 0x00100000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition2@200000 {
|
|
+ label = "0:BOOTCONFIG";
|
|
+ reg = <0x00200000 0x00100000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition3@300000 {
|
|
+ label = "0:QSEE";
|
|
+ reg = <0x00300000 0x00200000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition4@500000 {
|
|
+ label = "0:CDT";
|
|
+ reg = <0x00500000 0x00180000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition5@680000 {
|
|
+ label = "0:APPSBLENV";
|
|
+ reg = <0x00680000 0x00080000>;
|
|
+ };
|
|
+ partition6@700000 {
|
|
+ label = "0:APPSBL";
|
|
+ reg = <0x00700000 0x00400000>;
|
|
+ read-only;
|
|
+ };
|
|
+ partition7@b00000 {
|
|
+ label = "0:ART";
|
|
+ reg = <0x00b00000 0x00080000>;
|
|
+ };
|
|
+ partition8@b80000 {
|
|
+ label = "kernel";
|
|
+ reg = <0x00b80000 0x1000000>;
|
|
+ };
|
|
+ partition8@180000 {
|
|
+ label = "ubi";
|
|
+ reg = <0x02b80000 0x5480000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&cryptobam {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&blsp_dma {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&blsp1_uart1 {
|
|
+ pinctrl-0 = <&serial_0_pins>;
|
|
+ pinctrl-names = "default";
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&qpic_bam {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&wifi0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&wifi1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&gmac0 {
|
|
+ qcom,phy_mdio_addr = <0>;
|
|
+ qcom,poll_required = <1>;
|
|
+ vlan_tag = <0 0x20>;
|
|
+};
|
|
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
|
|
index efc343a..150e4cb 100644
|
|
--- a/target/linux/ipq40xx/image/Makefile
|
|
+++ b/target/linux/ipq40xx/image/Makefile
|
|
@@ -440,6 +440,20 @@ define Device/tp-link_ec420_g1
|
|
endef
|
|
TARGET_DEVICES += tp-link_ec420_g1
|
|
|
|
+define Device/hfcl_ion4
|
|
+ $(call Device/FitImage)
|
|
+ $(call Device/UbiFit)
|
|
+ DEVICE_DTS := qcom-ipq4019-hfcl-ion4
|
|
+ KERNEL_INSTALL := 1
|
|
+ KERNEL_SIZE := 4048k
|
|
+ BLOCKSIZE := 128k
|
|
+ PAGESIZE := 2048
|
|
+ BOARD_NAME := hfcl-ion4
|
|
+ DEVICE_TITLE := HFCL ION4
|
|
+ DEVICE_PACKAGES := uboot-envtools
|
|
+endef
|
|
+TARGET_DEVICES += hfcl_ion4
|
|
+
|
|
define Device/zyxel_nbg6617
|
|
$(call Device/FitImageLzma)
|
|
DEVICE_DTS := qcom-ipq4018-nbg6617
|
|
diff --git a/target/linux/ipq40xx/patches-4.14/999-hfcl-ion4-dts.patch b/target/linux/ipq40xx/patches-4.14/999-hfcl-ion4-dts.patch
|
|
new file mode 100644
|
|
index 0000000..6ab2647
|
|
--- /dev/null
|
|
+++ b/target/linux/ipq40xx/patches-4.14/999-hfcl-ion4-dts.patch
|
|
@@ -0,0 +1,12 @@
|
|
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
|
+index 7e1d62a..0c40c64 100644
|
|
+--- a/arch/arm/boot/dts/Makefile
|
|
++++ b/arch/arm/boot/dts/Makefile
|
|
+@@ -713,6 +713,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
|
+ qcom-ipq4019-ap.dk01.1-c1.dtb \
|
|
+ qcom-ipq4019-a62.dtb \
|
|
+ qcom-ipq4019-ap.dk04.1-c1.dtb \
|
|
++ qcom-ipq4019-hfcl-ion4.dtb \
|
|
+ qcom-ipq4019-fritzbox-7530.dtb \
|
|
+ qcom-ipq4019-fritzrepeater-1200.dtb \
|
|
+ qcom-ipq4019-fritzrepeater-3000.dtb \
|
|
--
|
|
2.7.4
|
|
|