From 90868338c753fd268266fe32a5ee65eb0d2e8cb6 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 18 Nov 2021 10:50:45 +0100 Subject: [PATCH] ipq807x: add hfcl ion4x support Fixes: WIFI-5797 Signed-off-by: John Crispin --- feeds/ipq807x/qca-ssdk/src/config | 2 + patches/0051-ipq807x-add-hfcl-ion4xe-i.patch | 1009 ++++++++++++++++++ profiles/hfcl_ion4xe.yml | 12 + profiles/hfcl_ion4xi.yml | 12 + 4 files changed, 1035 insertions(+) create mode 100644 patches/0051-ipq807x-add-hfcl-ion4xe-i.patch create mode 100644 profiles/hfcl_ion4xe.yml create mode 100644 profiles/hfcl_ion4xi.yml diff --git a/feeds/ipq807x/qca-ssdk/src/config b/feeds/ipq807x/qca-ssdk/src/config index a7076f11c..9ee9472f8 100644 --- a/feeds/ipq807x/qca-ssdk/src/config +++ b/feeds/ipq807x/qca-ssdk/src/config @@ -230,6 +230,8 @@ IN_SFP_PHY=TRUE IN_MALIBU_PHY=TRUE else ifeq (CPPE, $(CHIP_TYPE)) IN_QCA808X_PHY=TRUE +IN_QCA803X_PHY=TRUE +IN_SFP_PHY=TRUE IN_PHY_I2C_MODE=TRUE IN_MALIBU_PHY=TRUE else ifeq (DESS, $(CHIP_TYPE)) diff --git a/patches/0051-ipq807x-add-hfcl-ion4xe-i.patch b/patches/0051-ipq807x-add-hfcl-ion4xe-i.patch new file mode 100644 index 000000000..ca96d0e36 --- /dev/null +++ b/patches/0051-ipq807x-add-hfcl-ion4xe-i.patch @@ -0,0 +1,1009 @@ +From 0d552e892a9e3d467a23d1d2bcec73bc788adfd3 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 18 Nov 2021 10:44:40 +0100 +Subject: [PATCH] ipq807x: add hfcl ion4xe/i + +Signed-off-by: John Crispin +--- + .../ipq807x/base-files/etc/board.d/01_leds | 5 + + .../ipq807x/base-files/etc/board.d/02_network | 5 + + .../etc/hotplug.d/firmware/10-ath11k-caldata | 2 + + .../base-files/lib/upgrade/platform.sh | 4 + + target/linux/ipq807x/config-4.4 | 5 +- + .../arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts | 18 + + .../arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts | 18 + + .../boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi | 478 ++++++++++++++++++ + .../dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts | 155 ++++++ + .../dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts | 156 ++++++ + target/linux/ipq807x/image/ipq60xx.mk | 18 + + 11 files changed, 861 insertions(+), 3 deletions(-) + create mode 100644 target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts + create mode 100644 target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts + create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi + create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts + create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts + +diff --git a/target/linux/ipq807x/base-files/etc/board.d/01_leds b/target/linux/ipq807x/base-files/etc/board.d/01_leds +index 1f1797b0c6..ab19fd0532 100755 +--- a/target/linux/ipq807x/base-files/etc/board.d/01_leds ++++ b/target/linux/ipq807x/base-files/etc/board.d/01_leds +@@ -31,6 +31,11 @@ edgecore,eap102) + ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt" + ;; ++hfcl,ion4xi|\ ++hfcl,ion4xe) ++ ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt" ++ ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt" ++ ;; + esac + + board_config_flush +diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network +index b337a3517c..d370a3e49a 100755 +--- a/target/linux/ipq807x/base-files/etc/board.d/02_network ++++ b/target/linux/ipq807x/base-files/etc/board.d/02_network +@@ -12,6 +12,11 @@ qcom_setup_interfaces() + ucidef_add_switch_attr "switch0" "reset" "false" + + case $board in ++ hfcl,ion4xi|\ ++ hfcl,ion4xe) ++ ucidef_set_interface_wan "eth0 eth1" ++ ucidef_set_interface_lan "" ++ ;; + cig,wf188|\ + tplink,ex227|\ + tplink,ex447) +diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata +index b235c32ad5..3fa8388c5e 100755 +--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata ++++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata +@@ -58,6 +58,8 @@ case "$FIRMWARE" in + cig,wf188|\ + cig,wf188n|\ + edgecore,eap101|\ ++ hfcl,ion4xi|\ ++ hfcl,ion4xe|\ + wallys,dr6018|\ + qcom,ipq6018-cp01|\ + xiaomi,ax1800) +diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +index 407db099f6..ef8cce8614 100755 +--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +@@ -28,6 +28,8 @@ platform_check_image() { + edgecore,eap101|\ + edgecore,eap102|\ + edgecore,eap106|\ ++ hfcl,ion4xi|\ ++ hfcl,ion4xe|\ + tplink,ex227|\ + tplink,ex447|\ + qcom,ipq6018-cp01|\ +@@ -53,6 +55,8 @@ platform_do_upgrade() { + cig,wf188n|\ + cig,wf194c|\ + cig,wf194c4|\ ++ hfcl,ion4xi|\ ++ hfcl,ion4xe|\ + qcom,ipq6018-cp01|\ + qcom,ipq807x-hk01|\ + qcom,ipq807x-hk14|\ +diff --git a/target/linux/ipq807x/config-4.4 b/target/linux/ipq807x/config-4.4 +index 951420cd2a..cef3f951b6 100644 +--- a/target/linux/ipq807x/config-4.4 ++++ b/target/linux/ipq807x/config-4.4 +@@ -363,7 +363,6 @@ CONFIG_KPSS_XCC=y + # CONFIG_KRAIT_CLOCKS is not set + # CONFIG_KRAIT_L2_ACCESSORS is not set + CONFIG_LEDS_IPQ=y +-CONFIG_LEDS_PWM=y + CONFIG_LEDS_TLC591XX=y + # CONFIG_LEDS_PCA9956B is not set + CONFIG_LIBFDT=y +@@ -550,7 +549,7 @@ CONFIG_PSTORE_RAM=y + # CONFIG_PSTORE_CONSOLE is not set + # CONFIG_PSTORE_PMSG is not set + CONFIG_PWM=y +-CONFIG_PWM_IPQ4019=y ++# CONFIG_PWM_IPQ4019 is not set + # CONFIG_PWM_PCA9685 is not set + CONFIG_PWM_SYSFS=y + CONFIG_QCOM_ADM=y +@@ -639,7 +638,7 @@ CONFIG_SND_PCM=y + CONFIG_SND_SOC=y + # CONFIG_SND_SOC_APQ8016_SBC is not set + CONFIG_SND_SOC_I2C_AND_SPI=y +-CONFIG_SND_SOC_IPQ=y ++# CONFIG_SND_SOC_IPQ is not set + # CONFIG_SND_SOC_IPQ806X_LPAIF is not set + # CONFIG_SND_SOC_IPQ806X_PCM_RAW is not set + CONFIG_SND_SOC_IPQ_ADSS=y +diff --git a/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts +new file mode 100644 +index 0000000000..5a44b9a3e7 +--- /dev/null ++++ b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts +@@ -0,0 +1,18 @@ ++/* ++ * Copyright (c) 2019, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts" ++#include "qcom-ipq6018.dtsi" +diff --git a/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts +new file mode 100644 +index 0000000000..8edd1d817a +--- /dev/null ++++ b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts +@@ -0,0 +1,18 @@ ++/* ++ * Copyright (c) 2019, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts" ++#include "qcom-ipq6018.dtsi" +diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi +new file mode 100644 +index 0000000000..7c67cf7ade +--- /dev/null ++++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi +@@ -0,0 +1,478 @@ ++/* ++ * Copyright (c) 2019, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "qcom-ipq6018.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <0x2>; ++ #size-cells = <0x2>; ++ compatible = "qcom,ipq6018-cp01", "qcom,ipq6018"; ++ interrupt-parent = <&intc>; ++ qcom,msm-id = <0x192 0x0>, <0x193 0x0>; ++ ++ aliases { ++ serial0 = &blsp1_uart3; ++ serial1 = &blsp1_uart2; ++ sdhc2 = &sdhc_2; ++ /* ++ * Aliases as required by u-boot ++ * to patch MAC addresses ++ */ ++ ethernet0 = "/soc/dp1"; ++ ethernet1 = "/soc/dp2"; ++ }; ++ ++ chosen { ++ bootargs = "console=ttyMSM0,115200,n8 rw init=/init"; ++#ifdef __IPQ_MEM_PROFILE_256_MB__ ++ bootargs-append = " swiotlb=1"; ++#else ++ bootargs-append = " swiotlb=1 coherent_pool=2M"; ++#endif ++ }; ++ ++}; ++ ++&tlmm { ++ pinctrl-0 = <&sd_ldo_pins &hfcl_gpio>; ++ pinctrl-names = "default"; ++ ++ uart_pins: uart_pins { ++ mux { ++ pins = "gpio44", "gpio45"; ++ function = "blsp2_uart"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ sd_ldo_pins: sd_ldo_pins { ++ mux { ++ pins = "gpio66"; ++ function = "gpio"; ++ drive-strength = <2>; ++ bias-disable; ++ output-low; ++ }; ++ }; ++ ++ spi_0_pins: spi_0_pins { ++ mux { ++ pins = "gpio38", "gpio39", "gpio40", "gpio41"; ++ function = "blsp0_spi"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ qpic_pins: qpic_pins { ++ data_0 { ++ pins = "gpio15"; ++ function = "qpic_pad0"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_1 { ++ pins = "gpio12"; ++ function = "qpic_pad1"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_2 { ++ pins = "gpio13"; ++ function = "qpic_pad2"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_3 { ++ pins = "gpio14"; ++ function = "qpic_pad3"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_4 { ++ pins = "gpio5"; ++ function = "qpic_pad4"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_5 { ++ pins = "gpio6"; ++ function = "qpic_pad5"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_6 { ++ pins = "gpio7"; ++ function = "qpic_pad6"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ data_7 { ++ pins = "gpio8"; ++ function = "qpic_pad7"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ qpic_pad { ++ pins = "gpio1", "gpio3", "gpio4", ++ "gpio10", "gpio11", "gpio17"; ++ function = "qpic_pad"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ sd_pins: sd_pins { ++ mux { ++ pins = "gpio62"; ++ function = "sd_card"; ++ drive-strength = <8>; ++ bias-pull-up; ++ }; ++ }; ++ ++ extcon_usb_pins: extcon_usb_pins { ++ mux { ++ pins = "gpio26"; ++ function = "gpio"; ++ drive-strength = <2>; ++ bias-pull-down; ++ }; ++ }; ++ ++ button_pins: button_pins { ++ reset_button { ++ pins = "gpio53"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-up; ++ }; ++ }; ++ ++ mdio_pins: mdio_pinmux { ++ mux_0 { ++ pins = "gpio64"; ++ function = "mdc"; ++ drive-strength = <8>; ++ bias-pull-up; ++ }; ++ mux_1 { ++ pins = "gpio65"; ++ function = "mdio"; ++ drive-strength = <8>; ++ bias-pull-up; ++ }; ++ mux_2 { ++ pins = "gpio75"; ++ function = "gpio"; ++ bias-pull-up; ++ }; ++ mux_3 { ++ pins = "gpio77"; ++ function = "gpio"; ++ bias-pull-up; ++ }; ++ }; ++ ++ leds_pins: leds_pins { ++ led_5g { ++ pins = "gpio60"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ led_2g { ++ pins = "gpio61"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ hfcl_gpio: hfcl_gpio { ++ mux_0 { ++ pins = "gpio25"; ++ function = "gpio"; ++ drive-strength = <8>; ++ output-low; ++ }; ++ mux_1 { ++ pins = "gpio29"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_2 { ++ pins = "gpio33"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_3 { ++ pins = "gpio34"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_4 { ++ pins = "gpio35"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_5 { ++ pins = "gpio59"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_6 { ++ pins = "gpio67"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_7 { ++ pins = "gpio70"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ mux_8 { ++ pins = "gpio79"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ uniphy_pins: uniphy_pinmux { ++ mux { ++ pins = "gpio63"; ++ function = "rx0"; ++ bias-disable; ++ }; ++ sfp_tx { ++ pins = "gpio48"; ++ function = "gpio"; ++ driver-strength = <8>; ++ bias-pull-down; ++ output-low; ++ }; ++ }; ++ ++ hsuart_pins: hsuart_pins { ++ mux { ++ pins = "gpio71", "gpio72"; ++ function = "blsp1_uart"; ++ drive-strength = <8>; ++ bias-disable; ++ }; ++ }; ++ ++}; ++ ++&soc { ++ extcon_usb: extcon_usb { ++ pinctrl-0 = <&extcon_usb_pins>; ++ pinctrl-names = "default"; ++ id-gpio = <&tlmm 26 GPIO_ACTIVE_LOW>; ++ status = "disabled"; ++ }; ++ ++ mdio: mdio@90000 { ++ pinctrl-0 = <&mdio_pins>; ++ pinctrl-names = "default"; ++ phy-reset-gpio = <&tlmm 77 0>; ++ status = "ok"; ++ phy0: ethernet-phy@0 { ++ reg = <4>; ++ }; ++ phy1: ethernet-phy@1 { ++ reg = <30>; ++ }; ++ }; ++ ++ dp1 { ++ device_type = "network"; ++ compatible = "qcom,nss-dp"; ++ qcom,id = <4>; ++ reg = <0x3a001600 0x200>; ++ qcom,mactype = <0>; ++ local-mac-address = [000000000000]; ++ qcom,link-poll = <1>; ++ qcom,phy-mdio-addr = <4>; ++ phy-mode = "sgmii"; ++ }; ++ ++ dp2 { ++ device_type = "network"; ++ compatible = "qcom,nss-dp"; ++ qcom,id = <5>; ++ reg = <0x3a003000 0x3fff>; ++ qcom,mactype = <1>; ++ local-mac-address = [000000000000]; ++ qcom,link-poll = <1>; ++ qcom,phy-mdio-addr = <30>; ++ phy-mode = "sgmii"; ++ }; ++ ++ nss-macsec1 { ++ compatible = "qcom,nss-macsec"; ++ phy_addr = <30>; ++ phy_access_mode = <0>; ++ mdiobus = <&mdio>; ++ }; ++ ++ ess-switch@3a000000 { ++ pinctrl-0 = <&uniphy_pins>; ++ pinctrl-names = "default"; ++ switch_cpu_bmp = <0x1>; /* cpu port bitmap */ ++ switch_lan_bmp = <0x10>; /* lan port bitmap */ ++ switch_wan_bmp = <0x20>; /* wan port bitmap */ ++ switch_inner_bmp = <0xc0>; /*inner port bitmap*/ ++ switch_mac_mode = <0xf>; /* mac mode for uniphy instance0*/ ++ switch_mac_mode1 = <0x14>; /* mac mode for uniphy instance1*/ ++ switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ ++ qcom,port_phyinfo { ++ port@0 { ++ port_id = <4>; ++ phy_address = <4>; ++ }; ++ port@2 { ++ port_id = <5>; ++ phy_address = <30>; ++ phy_i2c_address = <30>; ++ phy-i2c-mode; ++ port_mac_sel = "GMAC_PORT"; ++ }; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-0 = <&button_pins>; ++ pinctrl-names = "default"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&tlmm 53 GPIO_ACTIVE_LOW>; ++ linux,input-type = <1>; ++ debounce-interval = <60>; ++ }; ++ }; ++ ++ i2c_2: i2c@78b9000 { ++ compatible = "qcom,i2c-qup-v2.2.1"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x78b9000 0x600>; ++ interrupts = ; ++ clocks = <&gcc GCC_BLSP1_AHB_CLK>, ++ <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>; ++ clock-names = "iface", "core"; ++ clock-frequency = <400000>; ++ dmas = <&blsp_dma 21>, <&blsp_dma 20>; ++ dma-names = "rx", "tx"; ++ status = "disabled"; ++ }; ++}; ++ ++&blsp1_uart3 { ++ pinctrl-0 = <&uart_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++}; ++ ++&spi_0 { ++ pinctrl-0 = <&spi_0_pins>; ++ pinctrl-names = "default"; ++ cs-select = <0>; ++ status = "ok"; ++ ++ m25p80@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ reg = <0>; ++ compatible = "n25q128a11"; ++ linux,modalias = "m25p80", "n25q128a11"; ++ spi-max-frequency = <50000000>; ++ use-default-sizes; ++ }; ++}; ++ ++&blsp1_uart2 { ++ pinctrl-0 = <&hsuart_pins>; ++ pinctrl-names = "default"; ++ dmas = <&blsp_dma 2>, ++ <&blsp_dma 3>; ++ dma-names = "tx", "rx"; ++ status = "ok"; ++}; ++ ++&qpic_bam { ++ status = "ok"; ++}; ++ ++&nand { ++ pinctrl-0 = <&qpic_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++}; ++ ++&ssphy_0 { ++ status = "ok"; ++}; ++ ++&qusb_phy_0 { ++ status = "ok"; ++}; ++ ++&qusb_phy_1 { ++ status = "ok"; ++}; ++ ++&usb2 { ++ status = "ok"; ++}; ++ ++&usb3 { ++ status = "ok"; ++}; ++ ++&nss_crypto { ++ status = "ok"; ++}; ++ ++&pcie_phy { ++ status = "disabled"; ++}; ++ ++&pcie0 { ++ status = "disabled"; ++}; ++ ++&qpic_lcd { ++ status = "disabled"; ++}; ++ ++&qpic_lcd_panel { ++ status = "disabled"; ++}; +diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts +new file mode 100644 +index 0000000000..a64ec25a8a +--- /dev/null ++++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts +@@ -0,0 +1,155 @@ ++/dts-v1/; ++/* ++ * Copyright (c) 2019, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "qcom-ipq6018-cp01-hfcl.dtsi" ++#include "qcom-ipq6018-rpm-regulator.dtsi" ++#include "qcom-ipq6018-cpr-regulator.dtsi" ++#include "qcom-ipq6018-cp-cpu.dtsi" ++ ++/ { ++ model = "HFCL ION4Xe"; ++ compatible = "hfcl,ion4xe", "qcom,ipq6018-cp01", "qcom,ipq6018"; ++ ++ /* ++ * +=========+==============+========================+ ++ * | | | | ++ * | Region | Start Offset | Size | ++ * | | | | ++ * +--------+--------------+-------------------------+ ++ * | | | | ++ * | | | | ++ * | | | | ++ * | | | | ++ * | Linux | 0x41000000 | 139MB | ++ * | | | | ++ * | | | | ++ * | | | | ++ * +--------+--------------+-------------------------+ ++ * | TZ App | 0x49B00000 | 6MB | ++ * +--------+--------------+-------------------------+ ++ * ++ * From the available 145 MB for Linux in the first 256 MB, ++ * we are reserving 6 MB for TZAPP. ++ * ++ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi ++ * for memory layout. ++ */ ++ ++/* TZAPP is enabled in default memory profile only */ ++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__) ++ reserved-memory { ++ tzapp:tzapp@49B00000 { /* TZAPPS */ ++ no-map; ++ reg = <0x0 0x49B00000 0x0 0x00600000>; ++ }; ++ }; ++#endif ++}; ++ ++&tlmm { ++ i2c_1_pins: i2c_1_pins { ++ mux { ++ pins = "gpio42", "gpio43"; ++ function = "blsp2_i2c"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ i2c_2_pins: i2c_2_pins { ++ mux { ++ pins = "gpio55", "gpio56"; ++ function = "blsp4_i2c"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++}; ++ ++&i2c_1 { ++ pinctrl-0 = <&i2c_1_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++ ++ lm75@48 { ++ compatible = "lm75"; ++ reg = <0x48>; ++ status = "okay"; ++ }; ++}; ++ ++&i2c_2 { ++ pinctrl-0 = <&i2c_2_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++}; ++ ++&sdhc_2 { ++ pinctrl-0 = <&sd_pins>; ++ pinctrl-names = "default"; ++ cd-gpios = <&tlmm 62 1>; ++ sd-ldo-gpios = <&tlmm 66 0>; ++ vqmmc-supply = <&ipq6018_l2_corner>; ++ status = "ok"; ++}; ++ ++&soc { ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-0 = <&leds_pins>; ++ pinctrl-names = "default"; ++ ++ led@60 { ++ label = "blue:wifi5"; ++ gpios = <&tlmm 60 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "led_5g"; ++ default-state = "off"; ++ }; ++ led@61 { ++ label = "blue:wifi2"; ++ gpios = <&tlmm 61 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "led_2g"; ++ default-state = "off"; ++ }; ++ }; ++}; ++ ++&tlmm { ++ leds_pins: leds_pins { ++ led_5g { ++ pins = "gpio60"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ led_2g { ++ pins = "gpio61"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++}; ++ ++/* TZAPP is enabled in default memory profile only */ ++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__) ++&qseecom { ++ mem-start = <0x49B00000>; ++ mem-size = <0x600000>; ++ status = "ok"; ++}; ++#endif +diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts +new file mode 100644 +index 0000000000..88b609f37e +--- /dev/null ++++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts +@@ -0,0 +1,156 @@ ++/dts-v1/; ++/* ++ * Copyright (c) 2019, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "qcom-ipq6018-cp01-hfcl.dtsi" ++#include "qcom-ipq6018-rpm-regulator.dtsi" ++#include "qcom-ipq6018-cpr-regulator.dtsi" ++#include "qcom-ipq6018-cp-cpu.dtsi" ++ ++/ { ++ model = "HFCL ION4Xi"; ++ compatible = "hfcl,ion4xi", "qcom,ipq6018-cp01", "qcom,ipq6018"; ++ ++ /* ++ * +=========+==============+========================+ ++ * | | | | ++ * | Region | Start Offset | Size | ++ * | | | | ++ * +--------+--------------+-------------------------+ ++ * | | | | ++ * | | | | ++ * | | | | ++ * | | | | ++ * | Linux | 0x41000000 | 139MB | ++ * | | | | ++ * | | | | ++ * | | | | ++ * +--------+--------------+-------------------------+ ++ * | TZ App | 0x49B00000 | 6MB | ++ * +--------+--------------+-------------------------+ ++ * ++ * From the available 145 MB for Linux in the first 256 MB, ++ * we are reserving 6 MB for TZAPP. ++ * ++ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi ++ * for memory layout. ++ */ ++ ++/* TZAPP is enabled in default memory profile only */ ++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__) ++ reserved-memory { ++ tzapp:tzapp@49B00000 { /* TZAPPS */ ++ no-map; ++ reg = <0x0 0x49B00000 0x0 0x00600000>; ++ }; ++ }; ++#endif ++}; ++ ++&tlmm { ++ i2c_1_pins: i2c_1_pins { ++ mux { ++ pins = "gpio42", "gpio43"; ++ function = "blsp2_i2c"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++ ++ i2c_2_pins: i2c_2_pins { ++ mux { ++ pins = "gpio55", "gpio56"; ++ function = "blsp4_i2c"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++}; ++ ++&i2c_1 { ++ pinctrl-0 = <&i2c_1_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++ ++ lm75@48 { ++ compatible = "lm75"; ++ reg = <0x48>; ++ status = "okay"; ++ }; ++}; ++ ++&i2c_2 { ++ pinctrl-0 = <&i2c_2_pins>; ++ pinctrl-names = "default"; ++ status = "ok"; ++}; ++ ++&sdhc_2 { ++ pinctrl-0 = <&sd_pins>; ++ pinctrl-names = "default"; ++ cd-gpios = <&tlmm 62 1>; ++ sd-ldo-gpios = <&tlmm 66 0>; ++ vqmmc-supply = <&ipq6018_l2_corner>; ++ status = "ok"; ++}; ++ ++&soc { ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-0 = <&leds_pins>; ++ pinctrl-names = "default"; ++ ++ led@60 { ++ label = "blue:wifi5"; ++ gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "led_5g"; ++ default-state = "off"; ++ }; ++ led@61 { ++ label = "blue:wifi2"; ++ gpios = <&tlmm 31 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "led_2g"; ++ default-state = "off"; ++ }; ++ }; ++}; ++ ++&tlmm { ++ leds_pins: leds_pins { ++ led_5g { ++ pins = "gpio32"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ led_2g { ++ pins = "gpio31"; ++ function = "gpio"; ++ drive-strength = <8>; ++ bias-pull-down; ++ }; ++ }; ++}; ++ ++ ++/* TZAPP is enabled in default memory profile only */ ++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__) ++&qseecom { ++ mem-start = <0x49B00000>; ++ mem-size = <0x600000>; ++ status = "ok"; ++}; ++#endif +diff --git a/target/linux/ipq807x/image/ipq60xx.mk b/target/linux/ipq807x/image/ipq60xx.mk +index e94ab22785..30ec2160bc 100644 +--- a/target/linux/ipq807x/image/ipq60xx.mk ++++ b/target/linux/ipq807x/image/ipq60xx.mk +@@ -20,6 +20,24 @@ define Device/cig_wf188n + endef + TARGET_DEVICES += cig_wf188n + ++define Device/hfcl_ion4xe ++ DEVICE_TITLE := HFCL ION4Xe ++ DEVICE_DTS := qcom-ipq6018-hfcl-ion4xe ++ DEVICE_DTS_CONFIG := config@cp01-c1 ++ SUPPORTED_DEVICES := hfcl,ion4xe ++ DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-envtools ++endef ++TARGET_DEVICES += hfcl_ion4xe ++ ++define Device/hfcl_ion4xi ++ DEVICE_TITLE := HFCL ION4Xi ++ DEVICE_DTS := qcom-ipq6018-hfcl-ion4xi ++ DEVICE_DTS_CONFIG := config@cp01-c1 ++ SUPPORTED_DEVICES := hfcl,ion4xi ++ DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-envtools ++endef ++TARGET_DEVICES += hfcl_ion4xi ++ + define Device/edgecore_eap101 + DEVICE_TITLE := EdgeCore EAP101 + DEVICE_DTS := qcom-ipq6018-edgecore-eap101 +-- +2.25.1 + diff --git a/profiles/hfcl_ion4xe.yml b/profiles/hfcl_ion4xe.yml new file mode 100644 index 000000000..a5b851bd9 --- /dev/null +++ b/profiles/hfcl_ion4xe.yml @@ -0,0 +1,12 @@ +--- +profile: hfcl_ion4xe +target: ipq807x +subtarget: ipq60xx +description: Build image for the HFCL ION 4XE +image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-hfcl_ion4xe-squashfs-sysupgrade.tar +feeds: + - name: ipq807x + path: ../../feeds/ipq807x +include: + - wifi-ax + - ucentral-ap diff --git a/profiles/hfcl_ion4xi.yml b/profiles/hfcl_ion4xi.yml new file mode 100644 index 000000000..7197dfe84 --- /dev/null +++ b/profiles/hfcl_ion4xi.yml @@ -0,0 +1,12 @@ +--- +profile: hfcl_ion4xi +target: ipq807x +subtarget: ipq60xx +description: Build image for the HFCL ION 4XI +image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-hfcl_ion4xi-squashfs-sysupgrade.tar +feeds: + - name: ipq807x + path: ../../feeds/ipq807x +include: + - wifi-ax + - ucentral-ap