diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 6fa4d14814a74f..0c9741397a7cd5 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT +PKG_SOURCE_URL:=https://github.com/CodingMarco/FritzBox-4040-UBOOT PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de -PKG_SOURCE_DATE:=2022-05-01 -PKG_MIRROR_HASH:=4e8106a7877ae6aa8da44bf95401b860d11f7d51417cc5a61ce59a353d4ee866 +PKG_SOURCE_VERSION:=a4946e81775cb3242e3a9b69ff8169bf5990f850 +PKG_SOURCE_DATE:=2025-04-21 +PKG_MIRROR_HASH:=4e1cd8e32294193c924915d2b44effa6e3b49a9ee2823ceb5a6a2aa0f73a4edf -PKG_RELEASE:=5 +PKG_RELEASE:=6 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk @@ -26,6 +26,8 @@ define U-Boot/Default UBOOT_IMAGE:=uboot-$(1).bin endef +UBOOT_CREATOR := $(if $(filter huawei_ap4050dn,$(UBOOT_BOARD)),huaweicreator.sh,fritz/fritzcreator.sh) + define U-Boot/fritz1200 NAME:=FritzRepeater 1200 BUILD_DEVICES:=avm_fritzrepeater-1200 @@ -51,6 +53,12 @@ define U-Boot/fritz7530 BUILD_DEVICES:=avm_fritzbox-7530 endef +define U-Boot/huawei_ap4050dn + NAME:=Huawei AP4050DN + BUILD_DEVICES:=huawei_ap4050dn + UBOOT_IMAGE:=uImage +endef + UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes export DTC @@ -64,7 +72,14 @@ endef define Build/Compile $(Build/Compile/U-Boot) - (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);) + @( \ + cd $(PKG_BUILD_DIR) ; \ + if [ "$(UBOOT_BOARD)" = "huawei_ap4050dn" ]; then \ + ./huaweicreator.sh $(UBOOT_BOARD) ; \ + else \ + ./fritz/fritzcreator.sh $(UBOOT_BOARD) ; \ + fi \ + ) endef define Build/InstallDev @@ -77,6 +92,6 @@ define Package/u-boot/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/ endef -UBOOT_TARGETS := fritz1200 fritz3000 fritz4040 fritz7520 fritz7530 +UBOOT_TARGETS := fritz1200 fritz3000 fritz4040 fritz7520 fritz7530 huawei_ap4050dn $(eval $(call BuildPackage/U-Boot)) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 72e397443888c9..1457d8276a580a 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \ edimax_cax1800 \ glinet_gl-ax1800 \ glinet_gl-axt1800 \ + huawei_ap4050dn \ linksys_homewrk \ linksys_mr5500 \ linksys_mr7350 \ @@ -189,6 +190,7 @@ $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102)) $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800)) $(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800)) $(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800)) +$(eval $(call generate-ipq-wifi-package,huawei_ap4050dn,Huawei AP4050DN)) $(eval $(call generate-ipq-wifi-package,linksys_homewrk,Linksys HomeWRK)) $(eval $(call generate-ipq-wifi-package,linksys_mr5500,Linksys MR5500)) $(eval $(call generate-ipq-wifi-package,linksys_mr7350,Linksys MR7350)) 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 57dca0e1a2a93a..49c2c4aa711fdc 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -54,6 +54,7 @@ ipq40xx_setup_interfaces() dlink,dap-2610|\ engenius,eap1300|\ extreme-networks,ws-ap3915i|\ + huawei,ap4050dn|\ meraki,mr33|\ meraki,mr74|\ mikrotik,lhgg-60ad|\ 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 4a1a0ff31118a3..57a0839e92d43c 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 @@ -102,6 +102,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR0) ;; + huawei,ap4050dn) + caldata_extract "0:ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) + ;; linksys,ea8300 |\ linksys,mr8300) caldata_extract "ART" 0x1000 0x2f20 @@ -201,6 +205,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR1) ;; + huawei,ap4050dn) + caldata_extract "0:ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) + ;; linksys,ea8300 |\ linksys,mr8300) caldata_extract "ART" 0x5000 0x2f20 diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 53a95611487b50..d709db0d36bcf3 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -168,6 +168,16 @@ platform_do_upgrade() { CI_ROOTPART="rootfs" emmc_do_upgrade "$1" ;; + huawei,ap4050dn) + # Store beginning address of the "uboot" partition + # as KernelA address and KernelB address, each to ResultA & ResultB + # This is the address from which the bootloader will try to load the u-boot that we use as loader. + export HUAWEI_AP4050DN_LOADADDR="\x00\x00\x70\x00\x00\x00\x70\x00" + echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultA) bs=1 seek=$((0x4264)) conv=notrunc + echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultA) bs=1 seek=$((0x40264)) conv=notrunc + echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultB) bs=1 seek=$((0x4264)) conv=notrunc + default_do_upgrade "$1" + ;; linksys,ea6350v3 |\ linksys,ea8300 |\ linksys,mr8300 |\ diff --git a/target/linux/ipq40xx/config-6.6 b/target/linux/ipq40xx/config-6.6 index f975e256932ebf..58e5903728843a 100644 --- a/target/linux/ipq40xx/config-6.6 +++ b/target/linux/ipq40xx/config-6.6 @@ -15,12 +15,12 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MULTIPLATFORM=y CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y CONFIG_ARCH_QCOM=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_STACKWALK=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARM=y CONFIG_ARM_AMBA=y @@ -72,7 +72,6 @@ CONFIG_CPU_COPY_V6=y CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y @@ -88,6 +87,7 @@ CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y @@ -97,8 +97,6 @@ CONFIG_CPU_THUMB_CAPABLE=y CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y -# CONFIG_CRC32_SARWATE is not set -CONFIG_CRC32_SLICEBY8=y CONFIG_CRC8=y CONFIG_CRYPTO_AES_ARM=y CONFIG_CRYPTO_AES_ARM_BS=y @@ -120,11 +118,12 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_GENIV=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_GF128MUL=y CONFIG_CRYPTO_LIB_SHA1=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LIB_UTILS=y @@ -136,6 +135,7 @@ CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA256_ARM=y +CONFIG_CRYPTO_SHA3=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SIMD=y CONFIG_CRYPTO_XTS=y @@ -160,6 +160,8 @@ CONFIG_EXCLUSIVE_SYSTEM_RAM=y CONFIG_EXTCON=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FS_IOMAP=y +CONFIG_FUNCTION_ALIGNMENT=0 CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y @@ -178,7 +180,6 @@ CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_PHY=y CONFIG_GENERIC_PINCONF=y @@ -201,6 +202,7 @@ CONFIG_GRO_CELLS=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAVE_SMP=y CONFIG_HIGHMEM=y @@ -257,8 +259,6 @@ CONFIG_MDIO_DEVRES=y CONFIG_MDIO_GPIO=y CONFIG_MDIO_IPQ4019=y # CONFIG_MDM_GCC_9615 is not set -# CONFIG_MDM_LCC_9615 is not set -CONFIG_MEMFD_CREATE=y # CONFIG_MFD_HI6421_SPMI is not set # CONFIG_MFD_QCOM_RPM is not set # CONFIG_MFD_SPMI_PMIC is not set @@ -273,6 +273,7 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_MSM=y # CONFIG_MMC_SDHCI_PCI is not set CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMU_LAZY_TLB_REFCOUNT=y CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MSM_GCC_8660 is not set # CONFIG_MSM_GCC_8909 is not set @@ -303,22 +304,30 @@ CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y CONFIG_MTD_SPLIT_WRGG_FW=y +CONFIG_MTD_VIRT_CONCAT=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_SRCU_NMI_SAFE=y CONFIG_NEON=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y CONFIG_NET_DSA_QCA8K_IPQ4019=y CONFIG_NET_DSA_TAG_OOB=y +CONFIG_NET_EGRESS=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_INGRESS=y CONFIG_NET_PTP_CLASSIFY=y CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NET_XGRESS=y CONFIG_NLS=y CONFIG_NO_HZ=y CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y +CONFIG_NVMEM_LAYOUTS=y +CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y CONFIG_NVMEM_QCOM_QFPROM=y # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set # CONFIG_NVMEM_SPMI_SDAM is not set @@ -340,6 +349,7 @@ CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_PAGE_POOL=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y @@ -350,10 +360,10 @@ CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS_GENERIC=y CONFIG_PCI_MSI=y -CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PHYLINK=y # CONFIG_PHY_QCOM_APQ8064_SATA is not set # CONFIG_PHY_QCOM_EDP is not set @@ -411,6 +421,7 @@ CONFIG_QCOM_BAM_DMA=y # CONFIG_QCOM_IOMMU is not set CONFIG_QCOM_IPQ4019_ESS_EDMA=y # CONFIG_QCOM_LLCC is not set +CONFIG_QCOM_NET_PHYLIB=y # CONFIG_QCOM_OCMEM is not set # CONFIG_QCOM_PDC is not set # CONFIG_QCOM_RAMP_CTRL is not set @@ -456,23 +467,6 @@ CONFIG_RTC_MC146818_LIB=y CONFIG_RWSEM_SPIN_ON_OWNER=y # CONFIG_SA_GCC_8775P is not set # CONFIG_SA_GPUCC_8775P is not set -# CONFIG_SC_CAMCC_7280 is not set -# CONFIG_SC_DISPCC_7180 is not set -# CONFIG_SC_GCC_7180 is not set -# CONFIG_SC_GCC_8280XP is not set -# CONFIG_SC_GPUCC_7180 is not set -# CONFIG_SC_LPASSCC_7280 is not set -# CONFIG_SC_LPASS_CORECC_7180 is not set -# CONFIG_SC_LPASS_CORECC_7280 is not set -# CONFIG_SC_MSS_7180 is not set -# CONFIG_SC_VIDEOCC_7180 is not set -# CONFIG_SDM_CAMCC_845 is not set -# CONFIG_SDM_DISPCC_845 is not set -# CONFIG_SDM_GCC_660 is not set -# CONFIG_SDM_GCC_845 is not set -# CONFIG_SDM_GPUCC_845 is not set -# CONFIG_SDM_LPASSCC_845 is not set -# CONFIG_SDM_VIDEOCC_845 is not set # CONFIG_SDX_GCC_65 is not set # CONFIG_SDX_GCC_75 is not set CONFIG_SERIAL_8250_FSL=y @@ -483,17 +477,7 @@ CONFIG_SGL_ALLOC=y CONFIG_SKB_EXTENSIONS=y CONFIG_SMP=y CONFIG_SMP_ON_UP=y -# CONFIG_SM_CAMCC_8450 is not set # CONFIG_SM_GCC_7150 is not set -# CONFIG_SM_GCC_8150 is not set -# CONFIG_SM_GCC_8250 is not set -# CONFIG_SM_GCC_8450 is not set -# CONFIG_SM_GPUCC_6350 is not set -# CONFIG_SM_GPUCC_8150 is not set -# CONFIG_SM_GPUCC_8250 is not set -# CONFIG_SM_GPUCC_8350 is not set -# CONFIG_SM_VIDEOCC_8150 is not set -# CONFIG_SM_VIDEOCC_8250 is not set CONFIG_SOCK_RX_QUEUE_MAPPING=y CONFIG_SOFTIRQ_ON_OWN_STACK=y CONFIG_SPARSE_IRQ=y @@ -508,7 +492,7 @@ CONFIG_SPMI=y # CONFIG_SPMI_HISI3670 is not set CONFIG_SPMI_MSM_PMIC_ARB=y # CONFIG_SPMI_PMIC_CLKDIV is not set -CONFIG_SRCU=y +CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_SWPHY=y CONFIG_SWP_EMULATE=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap4050dn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap4050dn.dts new file mode 100644 index 00000000000000..2f6b62aea14523 --- /dev/null +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap4050dn.dts @@ -0,0 +1,381 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include +#include +#include + +/ { + model = "Huawei AP4050DN"; + compatible = "huawei,ap4050dn", "qcom,ipq40xx"; + + chosen { + bootargs = "console=ttyMSM0,9600n8"; + }; + + aliases { + ethernet0 = &gmac; + led-boot = &led_function_red; + led-failsafe = &led_function_red; + led-running = &led_function_green; + led-upgrade = &led_function_red; + label-mac-device = &gmac; + }; + + soc { + rng@22000 { + status = "okay"; + }; + + counter@4a1000 { + compatible = "qcom,qca-gcnt"; + reg = <0x4a1000 0x4>; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + }; + + keys { + compatible = "gpio-keys"; + + restart { + label = "reset"; + linux,code = ; + gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_function_green: led-status-green { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + }; + + led_function_red: led-status-red { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <2>; + always-running; + }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&fwconcat0 &fwconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x3200000>; + compatible = "denx,fit"; + }; + }; + }; +}; + +&tlmm { + serial_pins: serial_pinmux { + mux { + pins = "gpio60", "gpio61"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + spi_0_pins: spi_0_pinmux { + pin { + function = "blsp_spi0"; + pins = "gpio55", "gpio56", "gpio57"; + drive-strength = <12>; + bias-disable; + }; + pin_cs { + function = "gpio"; + pins = "gpio54"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + status = "okay"; + cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition-flash-all@0 { + label = "flash-all"; + reg = <0x00000000 0x4000000>; + read-only; + }; + + partition@0 { + label = "0:SBL1"; + reg = <0x00 0x40000>; + read-only; + }; + + partition@40000 { + label = "0:MIBIB"; + reg = <0x40000 0x40000>; + read-only; + }; + + partition@80000 { + label = "0:QSEE"; + reg = <0x80000 0x80000>; + read-only; + }; + + partition@100000 { + label = "0:CDT"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "0:DDRPARAMS"; + reg = <0x140000 0x40000>; + read-only; + }; + + partition@180000 { + label = "0:APPSBL"; + reg = <0x180000 0x100000>; + read-only; + }; + + partition@280000 { + label = "0:ART"; + reg = <0x280000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_1000: precal@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + + precal_art_9000: precal@9000 { + reg = <0x9000 0x2f20>; + }; + }; + }; + + partition@2c0000 { + label = "0:APPSBLENV"; + reg = <0x2c0000 0x40000>; + read-only; + }; + + partition@300000 { + label = "ResultA"; + reg = <0x300000 0x80000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_resulta_10190: macaddr@10190 { + reg = <0x10190 0x6>; + }; + }; + }; + + partition@380000 { + label = "configA"; + reg = <0x380000 0x280000>; + read-only; + }; + + partition@600000 { + label = "bootimageA"; + reg = <0x600000 0x100000>; + read-only; + }; + + // In the vendor layout, the partion "SysImageA" lies here + // which encompassed the space of "uboot" and "fwconcat0" + partition@700000 { + label = "uboot"; + reg = <0x700000 0x80000>; + }; + + fwconcat0: partition@780000 { + label = "fwconcat0"; + reg = <0x780000 0x1880000>; + }; + + partition@2000000 { + label = "1:SBL1"; + reg = <0x2000000 0x40000>; + read-only; + }; + + partition@2040000 { + label = "1:MIBIB"; + reg = <0x2040000 0x40000>; + read-only; + }; + + partition@2080000 { + label = "1:QSEE"; + reg = <0x2080000 0x80000>; + read-only; + }; + + partition@2100000 { + label = "1:CDT"; + reg = <0x2100000 0x40000>; + read-only; + }; + + partition@2140000 { + label = "1:DDRPARAMS"; + reg = <0x2140000 0x40000>; + read-only; + }; + + partition@2180000 { + label = "1:APPSBL"; + reg = <0x2180000 0x100000>; + read-only; + }; + + partition@2280000 { + label = "Reservel"; + reg = <0x2280000 0x80000>; + read-only; + }; + + partition@2300000 { + label = "ResultB"; + reg = <0x2300000 0x80000>; + }; + + partition@2380000 { + label = "configB"; + reg = <0x2380000 0x280000>; + read-only; + }; + + partition@2600000 { + label = "bootimageB"; + reg = <0x2600000 0x100000>; + read-only; + }; + + // In the vendor layout, the partion "SysImageB" lies here + fwconcat1: partition@2700000 { + label = "fwconcat1"; + reg = <0x2700000 0x1900000>; + }; + }; + }; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "Huawei-AP4050DN"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "Huawei-AP4050DN"; +}; + +&cryptobam { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + +&gmac { + status = "okay"; + + nvmem-cells = <&macaddr_resulta_10190 0>; + nvmem-cell-names = "mac-address"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "lan"; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 393bb991f11e6a..d741131e97f58f 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -644,6 +644,17 @@ define Device/glinet_gl-s1300 endef TARGET_DEVICES += glinet_gl-s1300 +define Device/huawei_ap4050dn + $(call Device/FitImageLzma) + DEVICE_VENDOR := Huawei + DEVICE_MODEL := AP4050DN + SOC := qcom-ipq4018 + DEVICE_PACKAGES := ipq-wifi-huawei_ap4050dn + KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += huawei_ap4050dn + define Device/kernel-size-6350-8300 DEVICE_COMPAT_VERSION := 2.0 DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \