From a9694847cdd76f611cd7c10f583a27f8df83e157 Mon Sep 17 00:00:00 2001 From: Wingate Chi Date: Wed, 5 Feb 2025 09:41:18 +0000 Subject: [PATCH] WIFI-14410: Wifi7 driver with RAP7110C-341X support Signed-off-by: Wingate Chi --- .github/workflows/build-dev.yml | 2 +- .../ipq53xx/base-files/etc/board.d/01_leds | 3 + .../ipq53xx/base-files/etc/board.d/02_network | 13 +- .../etc/hotplug.d/firmware/10-ath12k-caldata | 13 +- .../base-files/lib/upgrade/platform.sh | 73 ++++ feeds/qca/ipq53xx/config-6.1 | 1 + .../dts/ipq5332-sonicfi-rap7110c-341x.dts | 365 ++++++++++++++++++ feeds/qca/ipq53xx/image/ipq53xx.mk | 13 + .../certificates/files/usr/bin/mount_certs | 4 + ...ipq53xx-increase-rootfs-size-to-500M.patch | 42 ++ profiles/sonicfi_rap7110c-341x.yml | 15 + 11 files changed, 537 insertions(+), 7 deletions(-) mode change 100644 => 100755 feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh mode change 100644 => 100755 feeds/qca/ipq53xx/config-6.1 create mode 100755 feeds/qca/ipq53xx/dts/ipq5332-sonicfi-rap7110c-341x.dts mode change 100644 => 100755 feeds/qca/ipq53xx/image/ipq53xx.mk create mode 100755 patches/0085-ipq53xx-increase-rootfs-size-to-500M.patch create mode 100755 profiles/sonicfi_rap7110c-341x.yml diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index be10be823..7b4b43381 100755 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'cybertan_rap630w-312g', 'cybertan_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'sercomm_ap72tip', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ] + target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'cybertan_rap630w-312g', 'cybertan_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap7110c-341x', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'sercomm_ap72tip', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ] steps: - uses: actions/checkout@v3 diff --git a/feeds/qca/ipq53xx/base-files/etc/board.d/01_leds b/feeds/qca/ipq53xx/base-files/etc/board.d/01_leds index d245c44be..7434964c0 100755 --- a/feeds/qca/ipq53xx/base-files/etc/board.d/01_leds +++ b/feeds/qca/ipq53xx/base-files/etc/board.d/01_leds @@ -11,6 +11,9 @@ sercomm,ap72tip) ucidef_set_led_netdev "wan_link" "wan_link" "green:phy" "eth0" "link" ucidef_set_led_netdev "wan_act" "wan_act" "yellow:phy" "eth0" "rx tx" ;; +sonicfi,rap7110c-341x) + ucidef_set_led_default "power" "POWER" "pwm:blue" "on" + ;; esac board_config_flush diff --git a/feeds/qca/ipq53xx/base-files/etc/board.d/02_network b/feeds/qca/ipq53xx/base-files/etc/board.d/02_network index b79fdeac9..5fa859b49 100755 --- a/feeds/qca/ipq53xx/base-files/etc/board.d/02_network +++ b/feeds/qca/ipq53xx/base-files/etc/board.d/02_network @@ -12,19 +12,20 @@ ipq53xx_setup_interfaces() qcom,ipq9574-ap-al02-c4) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; - cig,wf189|\ edgecore,eap105|\ sercomm,ap72tip) ucidef_set_interfaces_lan_wan "eth1" "eth0" - ;; + ;; + sonicfi,rap7110c-341x) + ucidef_set_interfaces_lan_wan "" "eth0" + ;; esac } qcom_setup_macs() { local board="$1" - case $board in cig,wf189) mtd=$(find_mtd_chardev "0:APPSBLENV") @@ -44,6 +45,12 @@ qcom_setup_macs() wan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_add "$wan_mac" 1) ;; + sonicfi,rap7110c-341x) + wan_mac=$(cat /sys/class/net/eth0/address) + ucidef_set_wireless_macaddr_base 2g $(macaddr_add "$wan_mac" 1) + ucidef_set_wireless_macaddr_base 5g $(macaddr_add "$wan_mac" 2) + ucidef_set_wireless_macaddr_base 6g $(macaddr_add "$wan_mac" 3) + ;; *) wan_mac=$(cat /sys/class/net/eth1/address) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/feeds/qca/ipq53xx/base-files/etc/hotplug.d/firmware/10-ath12k-caldata b/feeds/qca/ipq53xx/base-files/etc/hotplug.d/firmware/10-ath12k-caldata index a8b05fea8..802bad0c5 100755 --- a/feeds/qca/ipq53xx/base-files/etc/hotplug.d/firmware/10-ath12k-caldata +++ b/feeds/qca/ipq53xx/base-files/etc/hotplug.d/firmware/10-ath12k-caldata @@ -1,9 +1,9 @@ #!/bin/sh - [ -e /lib/firmware/$FIRMWARE ] && exit 0 . /lib/functions.sh . /lib/functions/system.sh +. /lib/functions/caldata.sh caldata_die() { echo "caldata: " "$*" @@ -35,23 +35,30 @@ ath12k_generate_macs_eap105() { } board=$(board_name) - case "$FIRMWARE" in ath12k/IPQ5332/hw1.0/caldata.bin) case "$board" in cig,wf189|\ edgecore,eap105|\ + sonicfi,rap750w-311a|\ sercomm,ap72tip) caldata_extract "0:ART" 0x1000 0x20000 ;; + sonicfi,rap7110c-341x) + caldata_extract_mmc "0:ART" 0x1000 0xF800 + ;; esac ;; ath12k/QCN92XX/hw1.0/cal-pci-0001:01:00.0.bin) case "$board" in cig,wf189|\ edgecore,eap105|\ + sonicfi,rap750w-311a|\ sercomm,ap72tip) - caldata_extract "0:ART" 0x58800 0x2d000 + caldata_extract "0:ART" 0x58800 0x2d000 + ;; + sonicfi,rap7110c-341x) + caldata_extract_mmc "0:ART" 0x58800 0x2d000 ;; esac ;; diff --git a/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh b/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh old mode 100644 new mode 100755 index b4b49d4db..32e096a05 --- a/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh +++ b/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh @@ -3,6 +3,76 @@ RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' +find_mmc_part() { + local DEVNAME PARTNAME + + if grep -q "$1" /proc/mtd; then + echo "" && return 0 + fi + + for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do + PARTNAME=$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=') + [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0 + done +} + +do_flash_emmc() { + local tar_file=$1 + local emmcblock=$(find_mmc_part $2) + local board_dir=$3 + local part=$4 + + [ -b "$emmcblock" ] || emmcblock=$(find_mmc_part $2) + + [ -z "$emmcblock" ] && { + echo failed to find $2 + return + } + + echo erase $4 / $emmcblock + dd if=/dev/zero of=${emmcblock} 2> /dev/null + echo flash $4 + tar Oxf $tar_file ${board_dir}/$part | dd of=${emmcblock} +} + +emmc_do_upgrade() { + local tar_file="$1" + local block_kernel="0:HLOS" + local block_rootfs="rootfs" + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + board=$(board_name) + case $board in + sonicfi,rap7110c-341x) + local boot_part="" + boot_part=$(fw_printenv | grep bootfrom | awk -F'=' '{printf $2}') + [ -n "$boot_part" ] || boot_part="0" + echo "**** boot_part=$boot_part" > /dev/console + + if [ "$boot_part" = "0" ]; then + block_kernel="0:HLOS_1" + block_rootfs="rootfs_1" + fw_setenv bootfrom 1 + elif [ "$boot_part" = "1" ]; then + block_kernel="0:HLOS" + block_rootfs="rootfs" + fw_setenv bootfrom 0 + else + echo "Invalid boot partition $boot_part! Skip upgrade....." + return + fi + ;; + esac + do_flash_emmc $tar_file $block_kernel $board_dir kernel + do_flash_emmc $tar_file $block_rootfs $board_dir root + + local emmcblock="$(find_mmc_part "rootfs_data")" + if [ -e "$emmcblock" ]; then + mkfs.ext4 -F "$emmcblock" + fi +} + platform_check_image() { local magic_long="$(get_magic_long "$1")" [ "$magic_long" = "73797375" ] && return 0 @@ -40,5 +110,8 @@ platform_do_upgrade() { fi nand_upgrade_tar "$1" ;; + sonicfi,rap7110c-341x) + emmc_do_upgrade $1 $1 + ;; esac } diff --git a/feeds/qca/ipq53xx/config-6.1 b/feeds/qca/ipq53xx/config-6.1 old mode 100644 new mode 100755 index f3d0c7eeb..9b26557c3 --- a/feeds/qca/ipq53xx/config-6.1 +++ b/feeds/qca/ipq53xx/config-6.1 @@ -1217,3 +1217,4 @@ CONFIG_ARM_PMU=y CONFIG_REALTEK_PHY=y CONFIG_RTK_MSSDK_PHY=y # CONFIG_NF_CONNTRACK_CHAIN_EVENTS is not set +CONFIG_LEDS_PWM=y \ No newline at end of file diff --git a/feeds/qca/ipq53xx/dts/ipq5332-sonicfi-rap7110c-341x.dts b/feeds/qca/ipq53xx/dts/ipq5332-sonicfi-rap7110c-341x.dts new file mode 100755 index 000000000..3e6c8b3c8 --- /dev/null +++ b/feeds/qca/ipq53xx/dts/ipq5332-sonicfi-rap7110c-341x.dts @@ -0,0 +1,365 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * IPQ5332 AP-MI01.6 board device tree source + * + * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; + +#include +#include +#include +#include "ipq5332.dtsi" +#include "ipq5332-default-memory.dtsi" + +/ { + model = "SONICFI RAP7110C-341X"; + compatible = "sonicfi,rap7110c-341x","qcom,ipq5332-ap-mi01.6", "qcom,ipq5332"; + + aliases { + serial0 = &blsp1_uart0; + ethernet0 = "/soc/dp1"; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + stdout-path = "serial0"; + }; + + soc@0 { + mdio:mdio@90000 { + pinctrl-0 = <&mdio1_pins>; + pinctrl-names = "default"; + phy-reset-gpio = <&tlmm 49 GPIO_ACTIVE_LOW>; + phyaddr_fixup = <0xC90F018>; + uniphyaddr_fixup = <0xC90F014>; + mdio_clk_fixup; /* MDIO clock sequence fix up flag */ + status = "okay"; + + phy0: ethernet-phy@0 { + compatible ="ethernet-phy-ieee802.3-c45"; + reg = <8>; + }; + }; + + ess-instance { + num_devices = <0x1>; + ess-switch@3a000000 { + switch_cpu_bmp = <0x1>; /* cpu port bitmap */ + switch_lan_bmp = <0x2>; /* lan port bitmap */ + switch_wan_bmp = <0x0>; /* wan port bitmap */ + switch_mac_mode = <0xd>; /* mac mode for uniphy instance0*/ + switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ + qcom,port_phyinfo { + port@0 { + port_id = <1>; + phy_address = <8>; + mdiobus = <&mdio>; + ethernet-phy-ieee802.3-c45; + }; + port@1 { + port_id = <2>; + forced-speed = <2500>; + forced-duplex = <1>; + }; + }; + }; + }; + + dp1 { + device_type = "network"; + compatible = "qcom,nss-dp"; + qcom,id = <1>; + reg = <0x3a500000 0x4000>; + qcom,mactype = <1>; + local-mac-address = [000000000000]; + qcom,phy-mdio-addr = <8>; + qcom,link-poll = <1>; + phy-mode = "usxgmii"; + }; + + /* EDMA host driver configuration for the board */ + edma@3ab00000 { + qcom,txdesc-ring-start = <4>; /* Tx desc ring start ID */ + qcom,txdesc-rings = <12>; /* Total number of Tx desc rings to be provisioned */ + qcom,mht-txdesc-rings = <8>; /* Extra Tx desc rings to be provisioned for MHT SW ports. */ + qcom,txcmpl-ring-start = <4>; /* Tx complete ring start ID */ + qcom,txcmpl-rings = <12>; /* Total number of Tx complete rings to be provisioned */ + qcom,mht-txcmpl-rings = <8>; /* Extra Tx complete rings to be provisioned for mht sw ports. */ + qcom,rxfill-ring-start = <4>; /* Rx fill ring start ID */ + qcom,rxfill-rings = <4>; /* Total number of Rx fill rings to be provisioned */ + qcom,rxdesc-ring-start = <12>; /* Rx desc ring start ID */ + qcom,rxdesc-rings = <4>; /* Total number of Rx desc rings to be provisioned */ + qcom,rx-page-mode = <0>; /* Rx fill ring page mode */ + qcom,tx-map-priority-level = <1>; /* Tx priority level per port */ + qcom,rx-map-priority-level = <1>; /* Rx priority level per core */ + qcom,ppeds-num = <2>; /* Number of PPEDS nodes */ + /* PPE-DS node format: */ + qcom,ppeds-map = <1 1 1 1 32 8>, /* PPEDS Node#0 ring and queue map */ + <2 2 2 2 40 8>; /* PPEDS Node#1 ring and queue map */ + qcom,txdesc-map = <8 9 10 11>, /* Port0 per-core Tx ring map */ + <12 13 14 15>, /* MHT-Port1 per-core Tx ring map */ + <4 5 6 7>, /* MHT-Port2 per-core Tx ring map/packets from vp*/ + <16 17 18 19>, /* MHT-Port3 per-core Tx ring map */ + <20 21 22 23>; /* MHT-Port4 per-core Tx ring map */ + qcom,txdesc-fc-grp-map = <1 2 3 4 5>; /* Per GMAC flow control group map */ + qcom,rxfill-map = <4 5 6 7>; /* Per-core Rx fill ring map */ + qcom,rxdesc-map = <12 13 14 15>; /* Per-core Rx desc ring map */ + qcom,rx-queue-start = <0>; /* Rx queue start */ + qcom,rx-ring-queue-map = <0 8 16 24>, /* Priority 0 queues per-core Rx ring map */ + <1 9 17 25>, /* Priority 1 queues per-core Rx ring map */ + <2 10 18 26>, /* Priority 2 queues per-core Rx ring map */ + <3 11 19 27>, /* Priority 3 queues per-core Rx ring map */ + <4 12 20 28>, /* Priority 4 queues per-core Rx ring map */ + <5 13 21 29>, /* Priority 5 queues per-core Rx ring map */ + <6 14 22 30>, /* Priority 6 queues per-core Rx ring map */ + <7 15 23 31>; /* Priority 7 queues per-core Rx ring map */ + interrupts = <0 163 4>, /* Tx complete ring id #4 IRQ info */ + <0 164 4>, /* Tx complete ring id #5 IRQ info */ + <0 165 4>, /* Tx complete ring id #6 IRQ info */ + <0 166 4>, /* Tx complete ring id #7 IRQ info */ + <0 167 4>, /* Tx complete ring id #8 IRQ info */ + <0 168 4>, /* Tx complete ring id #9 IRQ info */ + <0 169 4>, /* Tx complete ring id #10 IRQ info */ + <0 170 4>, /* Tx complete ring id #11 IRQ info */ + <0 171 4>, /* Tx complete ring id #12 IRQ info */ + <0 172 4>, /* Tx complete ring id #13 IRQ info */ + <0 173 4>, /* Tx complete ring id #14 IRQ info */ + <0 174 4>, /* Tx complete ring id #15 IRQ info */ + <0 139 4>, /* Rx desc ring id #12 IRQ info */ + <0 140 4>, /* Rx desc ring id #13 IRQ info */ + <0 141 4>, /* Rx desc ring id #14 IRQ info */ + <0 142 4>, /* Rx desc ring id #15 IRQ info */ + <0 191 4>, /* Misc error IRQ info */ + <0 160 4>, /* PPEDS Node #1(TxComp ring id #1) TxComplete IRQ info */ + <0 128 4>, /* PPEDS Node #1(Rx Desc ring id #1) Rx Desc IRQ info */ + <0 152 4>, /* PPEDS Node #1(RxFill Desc ring id #1) Rx Fill IRQ info */ + <0 161 4>, /* PPEDS Node #2(TxComp ring id #2) TxComplete IRQ info */ + <0 129 4>, /* PPEDS Node #2(Rx Desc ring id #2) Rx Desc IRQ info */ + <0 153 4>, /* PPEDS Node #2(RxFill Desc ring id #2) Rx Fill IRQ info */ + <0 175 4>, /* MHT port Tx complete ring id #16 IRQ info */ + <0 176 4>, /* MHT port Tx complete ring id #17 IRQ info */ + <0 177 4>, /* MHT port Tx complete ring id #18 IRQ info */ + <0 178 4>, /* MHT port Tx complete ring id #19 IRQ info */ + <0 179 4>, /* MHT port Tx complete ring id #20 IRQ info */ + <0 180 4>, /* MHT port Tx complete ring id #21 IRQ info */ + <0 181 4>, /* MHT port Tx complete ring id #22 IRQ info */ + <0 182 4>; /* MHT port Tx complete ring id #23 IRQ info */ + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + button@1 { + label = "reset"; + linux,code = ; + gpios = <&tlmm 24 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + debounce-interval = <60>; + }; + }; + + pwmleds { + compatible = "pwm-leds"; + + red { + label = "pwm:red"; + pwms = <&pwm 0 1250000>; + max-brightness = <160>; + linux,default-trigger = "none"; + }; + + green { + label = "pwm:green"; + pwms = <&pwm 2 1250000>; + max-brightness = <160>; + linux,default-trigger = "none"; + }; + + led_power: blue { + label = "pwm:blue"; + pwms = <&pwm 1 1250000>; + max-brightness = <160>; + linux,default-trigger = "none"; + }; + }; + + wsi: wsi { + id = <0>; + num_chip = <2>; + }; + }; +}; + +&tlmm { + button_pins: button-state { + pins = "gpio24"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + sdc_default_state: sdc-default-state { + clk-pins { + pins = "gpio13"; + function = "sdc_clk"; + drive-strength = <8>; + bias-disable; + }; + + cmd-pins { + pins = "gpio12"; + function = "sdc_cmd"; + drive-strength = <8>; + bias-pull-up; + }; + + data-pins { + pins = "gpio8", "gpio9", "gpio10", "gpio11"; + function = "sdc_data"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + pwm_pins: pwm_pinmux { + /* PWM LED GREEN */ + mux_1 { + pins = "gpio30"; + function = "pwm1"; + drive-strength = <8>; + }; + /* PWM LED BLUE */ + mux_2 { + pins = "gpio31"; + function = "pwm1"; + drive-strength = <8>; + }; + /* PWM LED RED */ + mux_3 { + pins = "gpio32"; + function = "pwm1"; + drive-strength = <8>; + }; + }; + + pcie1_default_state: pcie1-default-state { + pins = "gpio47"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-low; + }; +}; + +&wifi0 { + qcom,rproc = <&q6_wcss_pd1>; + qcom,rproc_rpd = <&q6v5_wcss>; + qcom,multipd_arch; + qcom,userpd-subsys-name = "q6v5_wcss_userpd1"; +#if defined(__CNSS2__) + mem-region = <&q6_region>; +#else + memory-region = <&q6_region>; + qcom,wsi = <&wsi>; +#endif + qcom,board_id = <0x12>; + status = "okay"; +}; + +/* QCN9224 5G+6G */ +/* +&wifi2 { + hremote_node = <&qcn9224_pcie1>; + board_id = <0x1015>; + status = "okay"; +}; */ + +&qcn9224_pcie1 { + status = "okay"; +}; + +&blsp1_uart0 { + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&sdhc { + bus-width = <4>; + max-frequency = <192000000>; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + pinctrl-0 = <&sdc_default_state>; + pinctrl-names = "default"; + status = "okay"; +}; + +&sleep_clk { + clock-frequency = <32000>; +}; + +&xo_board { + clock-frequency = <24000000>; +}; + +&qpic_bam { + status = "okay"; +}; + +&pcie1_phy_x2 { + status = "okay"; +}; + +&pcie1 { + pinctrl-0 = <&pcie1_default_state>; + pinctrl-names = "default"; + perst-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; + status = "okay"; + + pcie1_rp { + reg = <0 0 0 0 0>; + + qcom,mhi@1 { + reg = <0 0 0 0 0>; + boot-args = <0x2 0x4 0x34 0x3 0x0 0x0 /* MX Rail, GPIO52, Drive strength 0x3 */ + 0x4 0x4 0x18 0x3 0x0 0x0 /* RFA1p2 Rail, GPIO24, Drive strength 0x3 */ + 0x0 0x4 0x0 0x0 0x0 0x0>; /* End of arguments */ + memory-region = <&qcn9224_pcie1>; + qcom,wsi = <&wsi>; + qcom,board_id = <0x1019>; + }; + }; +}; + +&license_manager { + status = "okay"; +}; + +&usb3 { + qcom,multiplexed-phy; + status = "disabled"; +}; + +&pwm { + pinctrl-0 = <&pwm_pins>; + used-pwm-indices = <1>, <1>, <1>, <0>; + pinctrl-names = "default"; + status = "okay"; +}; + +&hs_m31phy_0 { + status = "okay"; +}; + +&ssuniphy_0 { + status = "okay"; +}; diff --git a/feeds/qca/ipq53xx/image/ipq53xx.mk b/feeds/qca/ipq53xx/image/ipq53xx.mk old mode 100644 new mode 100755 index 1f79cff0a..f25c6d32f --- a/feeds/qca/ipq53xx/image/ipq53xx.mk +++ b/feeds/qca/ipq53xx/image/ipq53xx.mk @@ -37,3 +37,16 @@ define Device/edgecore_eap105 DEVICE_PACKAGES := ath12k-wifi-edgecore-eap105 ath12k-firmware-qcn92xx-split-phy ath12k-firmware-ipq53xx endef TARGET_DEVICES += edgecore_eap105 + +define Device/sonicfi_rap7110c_341x + DEVICE_TITLE := SONICFI RAP7110C-341X + DEVICE_DTS := ipq5332-sonicfi-rap7110c-341x + DEVICE_DTS_DIR := ../dts + DEVICE_DTS_CONFIG := config@mi01.6 + SUPPORTED_DEVICES := sonicfi,rap7110c-341x + IMAGES := sysupgrade.tar mmc-factory.bin + IMAGE/mmc-factory.bin := append-ubi | qsdk-ipq-factory-mmc + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata + DEVICE_PACKAGES := ath12k-wifi-sonicfi-rap7110c-341x ath12k-firmware-qcn92xx-split-phy ath12k-firmware-ipq53xx +endef +TARGET_DEVICES += sonicfi_rap7110c_341x \ No newline at end of file diff --git a/feeds/tip/certificates/files/usr/bin/mount_certs b/feeds/tip/certificates/files/usr/bin/mount_certs index 70f6252b0..80a9c591e 100755 --- a/feeds/tip/certificates/files/usr/bin/mount_certs +++ b/feeds/tip/certificates/files/usr/bin/mount_certs @@ -25,6 +25,10 @@ cig,wf660a) mmc_dev=$(echo $(find_mmc_part "0:ETHPHYFW") | sed 's/^.\{5\}//') [ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates ;; +sonicfi,rap7110c-341x) + mmc_dev=$(echo $(find_mmc_part "certificates") | sed 's/^.\{5\}//') + [ -n "$mmc_dev" ] && mount -t squashfs /dev/$mmc_dev /certificates + ;; esac check_certificates diff --git a/patches/0085-ipq53xx-increase-rootfs-size-to-500M.patch b/patches/0085-ipq53xx-increase-rootfs-size-to-500M.patch new file mode 100755 index 000000000..8cc2ce870 --- /dev/null +++ b/patches/0085-ipq53xx-increase-rootfs-size-to-500M.patch @@ -0,0 +1,42 @@ +From 78f51448bd3d09ccb6c3559bae299a8d2edde21c Mon Sep 17 00:00:00 2001 +From: "wingate.chi" +Date: Tue, 4 Feb 2025 06:32:17 +0000 +Subject: [PATCH] ipq53xx: increase rootfs size to 500M + +Signed-off-by: wingate.chi +--- + .../0001-change-rootfs-size-to-500m.patch | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + create mode 100644 package/system/fstools/patches/0001-change-rootfs-size-to-500m.patch + +diff --git a/package/system/fstools/patches/0001-change-rootfs-size-to-500m.patch b/package/system/fstools/patches/0001-change-rootfs-size-to-500m.patch +new file mode 100644 +index 0000000000..3aa16258d2 +--- /dev/null ++++ b/package/system/fstools/patches/0001-change-rootfs-size-to-500m.patch +@@ -0,0 +1,22 @@ ++--- a/libfstools/common.h +++++ b/libfstools/common.h ++@@ -19,7 +19,7 @@ ++ #include "libfstools.h" ++ #include "volume.h" ++ ++-#define F2FS_MINSIZE (100ULL * 1024ULL * 1024ULL) +++#define F2FS_MINSIZE (500ULL * 1024ULL * 1024ULL) //change rootfs size to 500M ++ ++ int read_uint_from_file(char *dirname, char *filename, unsigned int *i); ++ char *read_string_from_file(const char *dirname, const char *filename, char *buf, size_t bufsz); ++--- a/libfstools/rootdisk.c +++++ b/libfstools/rootdisk.c ++@@ -16,7 +16,7 @@ ++ #include ++ ++ #define ROOTDEV_OVERLAY_ALIGN (64ULL * 1024ULL) ++-#define F2FS_MINSIZE (100ULL * 1024ULL * 1024ULL) +++#define F2FS_MINSIZE (500ULL * 1024ULL * 1024ULL) //change rootfs size to 500M ++ ++ struct squashfs_super_block { ++ uint32_t s_magic; +-- +2.17.1 + diff --git a/profiles/sonicfi_rap7110c-341x.yml b/profiles/sonicfi_rap7110c-341x.yml new file mode 100755 index 000000000..93b1dce37 --- /dev/null +++ b/profiles/sonicfi_rap7110c-341x.yml @@ -0,0 +1,15 @@ +--- +profile: sonicfi_rap7110c_341x +target: ipq53xx +subtarget: generic +description: Build image for the SONICFI RAP7110C-341X +image: bin/targets/ipq53xx/generic/openwrt-ipq53xx-sonicfi_rap7110c_341x-squashfs-sysupgrade.tar +feeds: + - name: qca + path: ../../feeds/qca +include: + - ucentral-ap +packages: + - ipq53xx + - qca-ssdk-shell + - e2fsprogs