diff --git a/include/kernel-6.1 b/include/kernel-6.1 index dcdebfc6cba..ebec105b22d 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .99 -LINUX_KERNEL_HASH-6.1.99 = c086ee9ce2b1eeba6e085d569bc97ae764a5d15f6322847f0ebc9f787ae34dd3 +LINUX_VERSION-6.1 = .100 +LINUX_KERNEL_HASH-6.1.100 = b9aa6ec1a00f234d6c6f2d428fbb0a6bf459606c259263df978f86685b65a8b9 diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh index ae7a5c95988..871a49ed6e7 100755 --- a/package/base-files/files/bin/ipcalc.sh +++ b/package/base-files/files/bin/ipcalc.sh @@ -96,6 +96,7 @@ echo "COUNT=$count" # if there's no range, we're done [ $# -eq 0 ] && exit 0 +[ -z "$1$2" ] && exit 0 if [ "$prefix" -le 30 ]; then lower=$((network + 1)) diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 099aebcfa25..55fcec26617 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -118,7 +118,8 @@ domywifi,dw33d) glinet,gl-ar150) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000" ;; -huawei,ap5030dn) +huawei,ap5030dn|\ +huawei,ap6010dn) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000" ;; netgear,wndr3700|\ diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 67d37931c29..c6d914eb70f 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -33,6 +33,21 @@ ubootenv_add_ubi_default() { } case "$board" in +abt,asr3000|\ +h3c,magic-nx30-pro|\ +jcg,q30-pro|\ +netcore,n60|\ +nokia,ea0326gmp|\ +qihoo,360t7|\ +tplink,tl-xdr4288|\ +tplink,tl-xdr6086|\ +tplink,tl-xdr6088|\ +xiaomi,mi-router-ax3000t-ubootmod|\ +xiaomi,mi-router-wr30u-ubootmod|\ +xiaomi,redmi-router-ax6000-ubootmod|\ +zyxel,ex5601-t0-ubootmod) + ubootenv_add_ubi_default + ;; asus,rt-ax59u) ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000" ;; @@ -70,20 +85,6 @@ zbtlink,zbt-z8103ax) dlink,aquila-pro-ai-m30-a1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" ;; -h3c,magic-nx30-pro|\ -jcg,q30-pro|\ -netcore,n60|\ -nokia,ea0326gmp|\ -qihoo,360t7|\ -tplink,tl-xdr4288|\ -tplink,tl-xdr6086|\ -tplink,tl-xdr6088|\ -xiaomi,mi-router-ax3000t-ubootmod|\ -xiaomi,mi-router-wr30u-ubootmod|\ -xiaomi,redmi-router-ax6000-ubootmod|\ -zyxel,ex5601-t0-ubootmod) - ubootenv_add_ubi_default - ;; glinet,gl-mt2500|\ glinet,gl-mt6000) local envdev=$(find_mmc_part "u-boot-env") diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 3deb46c2957..cca394a03b0 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -146,6 +146,10 @@ xiaomi,mi-router-cr6608|\ xiaomi,mi-router-cr6609) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000" ;; +netgear,wax214v2) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" + ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000" + ;; esac config_load ubootenv diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 71b72ba018f..d3363ea7130 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -219,6 +219,18 @@ define U-Boot/mt7629_rfb UBOOT_CONFIG:=mt7629_rfb endef +define U-Boot/mt7981_abt_asr3000 + NAME:=ABT ASR3000 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=abt_asr3000 + UBOOT_CONFIG:=mt7981_abt_asr3000 + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand + BL2_SOC:=mt7981 + BL2_DDRTYPE:=ddr3 + DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3 +endef + define U-Boot/mt7981_cmcc_rax3000m-emmc NAME:=CMCC RAX3000M BUILD_SUBTARGET:=filogic @@ -734,6 +746,7 @@ UBOOT_TARGETS := \ mt7628_rfb \ mt7628_ravpower_rp-wd009 \ mt7629_rfb \ + mt7981_abt_asr3000 \ mt7981_cmcc_rax3000m-emmc \ mt7981_cmcc_rax3000m-nand \ mt7981_h3c_magic-nx30-pro \ diff --git a/package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch b/package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch new file mode 100644 index 00000000000..162e502f1ad --- /dev/null +++ b/package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch @@ -0,0 +1,347 @@ +--- /dev/null ++++ b/configs/mt7981_abt_asr3000_defconfig +@@ -0,0 +1,107 @@ ++CONFIG_ARM=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7981-abt-asr3000" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_TARGET_MT7981=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-abt-asr3000.dtb" ++CONFIG_LOGLEVEL=7 ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_LOG=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_PROMPT="MT7981> " ++CONFIG_CMD_CPU=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_LINK_LOCAL=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_UUID=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_UBI_VOLUME="ubootenv" ++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2" ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_DEFAULT_ENV_FILE="abt_asr3000_env" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_NETCONSOLE=y ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_CLK=y ++CONFIG_GPIO_HOG=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++# CONFIG_MMC is not set ++CONFIG_MTD=y ++CONFIG_DM_MTD=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_PHY_FIXED=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PHY=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7981=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPIM=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_LMB_MAX_REGIONS=64 +--- /dev/null ++++ b/arch/arm/dts/mt7981-abt-asr3000.dts +@@ -0,0 +1,176 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++ ++/dts-v1/; ++#include "mt7981.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "ABT ASR3000"; ++ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x10000000>; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ ++ button-reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-wps { ++ label = "mesh"; ++ linux,code = ; ++ linux,input-type = ; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-leds { ++ compatible = "gpio-leds"; ++ ++ led-0 { ++ label = "red:wan"; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ ++ led-1 { ++ label = "green:wan"; ++ gpios = <&gpio 8 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ ++ mesh_led: led-2 { ++ label = "green:mesh"; ++ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ led-3 { ++ label = "green:wlan2g"; ++ gpios = <&gpio 34 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ ++ led-4 { ++ label = "green:wlan5g"; ++ gpios = <&gpio 35 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ }; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; ++ ++&pinctrl { ++ spi_flash_pins: spi0-pins-func-1 { ++ mux { ++ function = "flash"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ ++ conf-pu { ++ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++}; ++ ++&spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_flash_pins>; ++ status = "okay"; ++ must_tx; ++ enhance_timing; ++ dma_ext; ++ ipm_design; ++ support_quad; ++ tick_dly = <2>; ++ sample_sel = <0>; ++ ++ spi_nand@0 { ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <52000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ label = "u-boot-env"; ++ reg = <0x100000 0x80000>; ++ }; ++ ++ partition@180000 { ++ label = "art"; ++ reg = <0x180000 0x100000>; ++ }; ++ ++ partition@280000 { ++ label = "factory"; ++ reg = <0x280000 0x100000>; ++ }; ++ ++ partition@380000 { ++ label = "fip"; ++ reg = <0x380000 0x200000>; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ reg = <0x580000 0x7a80000>; ++ compatible = "linux,ubi"; ++ }; ++ }; ++ }; ++}; ++ ++&uart0 { ++ mediatek,force-highspeed; ++ status = "okay"; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/abt_asr3000_env +@@ -0,0 +1,55 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootargs=root=/dev/fit0 rootwait ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-abt_asr3000-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-abt_asr3000-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-abt_asr3000-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-abt_asr3000-squashfs-sysupgrade.itb ++bootled_pwr=green:mesh ++bootled_rec=green:mesh ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_8=Reboot.=reset ++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2 ++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800 ++mtd_write_fip=mtd erase fip && mtd write fip $loadaddr ++mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr ++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize ++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" diff --git a/package/firmware/lantiq/dsl_vr11_firmware_xdsl/Makefile b/package/firmware/lantiq/dsl_vr11_firmware_xdsl/Makefile new file mode 100644 index 00000000000..777edb0e751 --- /dev/null +++ b/package/firmware/lantiq/dsl_vr11_firmware_xdsl/Makefile @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dsl_vr11_firmware_xdsl +PKG_VERSION:=8.13.1.5.0.7 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/dsl_vr11_firmware_xdsl.git +PKG_SOURCE_VERSION:=99cf1fe7a1711b9aa128eeb8419eab698448df9f +PKG_MIRROR_HASH:=7fb37723f8db2558d774ba972f011598d2399609158c5dbc287eca0873b040f1 + +PKG_LICENSE:=MaxLinear-Software-License-Agreement +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +ANNEX_A_VER:=8D1507_8D0901 + +define Package/$(PKG_NAME) + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=VRX518 / VR11 CPE xDSL Annex A firmware + URL:=http://www.intel.com + DEPENDS:=@TARGET_ipq40xx +endef + +define Package/$(PKG_NAME)/description + VRX518 / VR11 CPE VDSL and ADSL Annex A firmware +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/lib/firmware/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/lib/firmware/xcpe_$(ANNEX_A_VER).bin.LICENSE + $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/ + ln -s xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/vdsl.bin +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/firmware/lantiq/vrx518_aca_fw/Makefile b/package/firmware/lantiq/vrx518_aca_fw/Makefile new file mode 100644 index 00000000000..6b2361ec106 --- /dev/null +++ b/package/firmware/lantiq/vrx518_aca_fw/Makefile @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vrx518_aca_fw +PKG_VERSION:=1.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/vrx518_aca_fw.git +PKG_SOURCE_VERSION:=c509b89c77c26a7df0f0999aabf78b82ca9c9ff0 +PKG_MIRROR_HASH:=fba91071f18599617434d93e78c67dad91b3e4c5811b77c15961e3a13b506d2e + +PKG_LICENSE:=MaxLinear-Software-License-Agreement +PKG_LICENSE_FILES:=platform/xrx500/LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=VRX518 ACA firmware + URL:=http://www.intel.com + DEPENDS:=@TARGET_ipq40xx +endef + +define Package/$(PKG_NAME)/description + VRX518 ACA firmware +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/lib/firmware/09a9 + $(INSTALL_DATA) $(PKG_BUILD_DIR)/platform/xrx500/LICENSE $(1)/lib/firmware/09a9/aca_fw.bin.LICENSE + $(INSTALL_DATA) $(PKG_BUILD_DIR)/platform/xrx500/aca_fw.bin $(1)/lib/firmware/09a9 +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/firmware/lantiq/vrx518_ppe_fw/Makefile b/package/firmware/lantiq/vrx518_ppe_fw/Makefile new file mode 100644 index 00000000000..4c50521fbe5 --- /dev/null +++ b/package/firmware/lantiq/vrx518_ppe_fw/Makefile @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vrx518_ppe_fw +PKG_VERSION:=1.3.7 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/vrx518_ppe_fw.git +PKG_SOURCE_VERSION:=47c48d52ba59df733ab21fd0c18f6d1a7b0e7229 +PKG_MIRROR_HASH:=33dd15b6c6205b5031498aac9a5a4876f8217aefea06dc511ac60ca1343b50d1 + +PKG_LICENSE:=MaxLinear-Software-License-Agreement +PKG_LICENSE_FILES:=platform/xrx500/LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=VRX518 PPE firmware + URL:=http://www.intel.com + DEPENDS:=@TARGET_ipq40xx +endef + +define Package/$(PKG_NAME)/description + VRX518 PPE firmware +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/platform/xrx500/LICENSE $(1)/lib/firmware/ppe_fw.bin.LICENSE + $(INSTALL_DATA) $(PKG_BUILD_DIR)/platform/xrx500/ppe_fw.bin $(1)/lib/firmware/ +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile index 0fa6011cfc6..99d6e353761 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile @@ -27,13 +27,11 @@ PKG_BUILD_FLAGS:=no-mold include $(INCLUDE_DIR)/package.mk -# TODO this driver depends on the vrx518 dsl firmware, add this dependency if -# that ever gets a compatible license define KernelPackage/ltq-vdsl-vr11 TITLE:=vdsl driver SECTION:=sys SUBMENU:=Network Devices - DEPENDS:=@TARGET_ipq40xx +kmod-ltq-vdsl-vr11-mei + DEPENDS:=@TARGET_ipq40xx +kmod-ltq-vdsl-vr11-mei +dsl_vr11_firmware_xdsl FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api) endef diff --git a/package/kernel/lantiq/vrx518_ep/Makefile b/package/kernel/lantiq/vrx518_ep/Makefile index b6477b19d6d..7518080a807 100644 --- a/package/kernel/lantiq/vrx518_ep/Makefile +++ b/package/kernel/lantiq/vrx518_ep/Makefile @@ -15,14 +15,12 @@ PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk -# TODO this driver depends on the vrx518 aca firmware, add this dependency if -# that ever gets a compatible license define KernelPackage/vrx518_ep SECTION:=sys CATEGORY:=Kernel modules SUBMENU:=Network Devices TITLE:=VRX518 EP Support - DEPENDS:=@TARGET_ipq40xx + DEPENDS:=@TARGET_ipq40xx +vrx518_aca_fw AUTOLOAD:=$(call AutoLoad,26,vrx518) FILES:=$(PKG_BUILD_DIR)/vrx518.ko endef diff --git a/package/kernel/lantiq/vrx518_tc/Makefile b/package/kernel/lantiq/vrx518_tc/Makefile index b05fb4bb637..a5718d9d5b2 100644 --- a/package/kernel/lantiq/vrx518_tc/Makefile +++ b/package/kernel/lantiq/vrx518_tc/Makefile @@ -28,8 +28,6 @@ include $(INCLUDE_DIR)/package.mk PLAT_DIR:=dcdp PKG_EXTMOD_SUBDIRS:=$(PLAT_DIR) -# TODO this driver depends on the vrx518 ppe firmware, add this dependency if -# that ever gets a compatible license define KernelPackage/$(PKG_NAME) SECTION:=sys CATEGORY:=Kernel modules @@ -39,7 +37,7 @@ define KernelPackage/$(PKG_NAME) CONFIG_ATM_LANE=m \ CONFIG_ATM_MPOA=m \ CONFIG_ATM_MPOA_INTEL_DSL_PHY_SUPPORT=y - DEPENDS:=@TARGET_ipq40xx +kmod-vrx518_ep +kmod-crypto-md5 +kmod-atm +kmod-ipoa +br2684ctl + DEPENDS:=@TARGET_ipq40xx +kmod-vrx518_ep +vrx518_ppe_fw +kmod-crypto-md5 +kmod-atm +kmod-ipoa +br2684ctl AUTOLOAD:=$(call AutoLoad,27,vrx518_tc) FILES:=$(PKG_BUILD_DIR)/$(PLAT_DIR)/$(PKG_NAME).ko endef diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index b59907c643f..bbfceb691b5 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -780,6 +780,21 @@ endef $(eval $(call KernelPackage,video-gspca-pac207)) +define KernelPackage/video-gspca-pac7302 + TITLE:=pac7302 webcam support + KCONFIG:=CONFIG_USB_GSPCA_PAC7302 + FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_pac7302.ko + AUTOLOAD:=$(call AutoProbe,gspca_pac7302) + $(call AddDepends/camera-gspca) +endef + +define KernelPackage/video-gspca-pac7302/description + The Pixart PAC7302 USB Camera Driver (pac7302) kernel module +endef + +$(eval $(call KernelPackage,video-gspca-pac7302)) + + define KernelPackage/video-gspca-pac7311 TITLE:=pac7311 webcam support KCONFIG:=CONFIG_USB_GSPCA_PAC7311 diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile index 3b732e37bbd..a6fe9831d73 100644 --- a/package/libs/libbpf/Makefile +++ b/package/libs/libbpf/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libbpf -PKG_VERSION:=1.4.3 +PKG_VERSION:=1.4.5 PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf -PKG_MIRROR_HASH:=53f2f290fced9663da309e9e03ddcb0b176a47d39d61639c74dbc555d6b979a8 +PKG_MIRROR_HASH:=09ad44597d170c12f9f710f7ac4bacfa2b01d110c45810ac0f16c6a3f5d51a0d PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION))) diff --git a/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts b/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts new file mode 100644 index 00000000000..2f2e6e23317 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344.dtsi" + +#include +#include +#include + +/ { + model = "Huawei AP6010DN"; + compatible = "huawei,ap6010dn", "qca,ar9344"; + + chosen { + bootargs = "console=ttyS0,9600n8"; + }; + + aliases { + led-boot = &led_function_green; + led-failsafe = &led_function_red; + led-running = &led_function_green; + led-upgrade = &led_function_red; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + led_function_green: led-status-green { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + led_function_red: led-status-red { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + }; + + keys { + compatible = "gpio-keys"; + + restart { + label = "reset"; + linux,code = ; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + watchdog { + pinctrl-names = "default"; + pinctrl-0 = <&wdt_gpio15>; + + compatible = "linux,wdt-gpio"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <100>; + 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 0x1e00000>; + compatible = "openwrt,uimage", "denx,uimage"; + }; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot-a"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "BootupA"; + reg = <0x80000 0x20000>; + }; + + partition@a0000 { + label = "BootupB"; + reg = <0xa0000 0x20000>; + }; + + partition@c0000 { + label = "u-boot-env"; + reg = <0xc0000 0x20000>; + read-only; + }; + + partition@e0000 { + label = "BoardData"; + reg = <0xe0000 0x20000>; + read-only; + }; + + // In the vendor layout, there are the "SysImageA" (12 MiB) + // and the "ConfigA" (3 MiB) partitions here. + fwconcat0: partition@100000 { + label = "fwconcat0"; + reg = <0x100000 0xf00000>; + }; + + partition@1000000 { + label = "u-boot-b"; + reg = <0x1000000 0x80000>; + read-only; + }; + + partition@1080000 { + label = "ResultA"; + reg = <0x1080000 0x20000>; + read-only; + }; + + partition@10a0000 { + label = "ResultB"; + reg = <0x10a0000 0x20000>; + read-only; + }; + + // In the vendor layout, there are the "SysImageB" (12 MiB) + // and the "ConfigB" (3 MiB) partitions here. + fwconcat1: partition@10c0000 { + label = "fwconcat1"; + reg = <0x10c0000 0xf00000>; + }; + + art: partition@1fc0000 { + label = "art"; + reg = <0x1fc0000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_2005b: macaddr@2005b { + compatible = "mac-base"; + reg = <0x2005b 0x6>; + #nvmem-cell-cells = <1>; + }; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + cal_art_5000: cal@5000 { + reg = <0x5000 0x844>; + }; + }; + }; + }; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&macaddr_art_2005b 1>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0033"; + reg = <0x0000 0 0 0 0>; + gpio-controller; + #gpio-cells = <2>; + + nvmem-cells = <&macaddr_art_2005b 2>, <&cal_art_5000>; + nvmem-cell-names = "mac-address", "calibration"; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +ð0 { + status = "okay"; + + nvmem-cells = <&macaddr_art_2005b 0>; + nvmem-cell-names = "mac-address"; + + pll-data = <0x06000000 0x04000101 0x0c001313>; + phy-mode = "rgmii-id"; + phy-handle = <&phy>; + + gmac-config { + device = <&gmac>; + rgmii-gmac0 = <1>; + rxdv-delay = <3>; + rxd-delay = <3>; + }; +}; + +&mdio0 { + status = "okay"; + + phy: ethernet-phy@18 { + reg = <0x4>; + }; +}; + +&pinmux { + wdt_gpio15: pinmux_wdt_gpio15 { + pinctrl-single,bits = <0xc 0x0 0xFF000000>; + }; +}; + +&wdt { + status = "disabled"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 7905d6e4962..ccb296a62af 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -52,6 +52,7 @@ ath79_setup_interfaces() glinet,gl-ar300m-lite|\ glinet,gl-usb150|\ hak5,wifi-pineapple-nano|\ + huawei,ap6010dn|\ meraki,mr16|\ netgear,ex7300|\ netgear,ex7300-v2|\ diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh index 076a785cbf3..c61c48b00e9 100644 --- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh @@ -68,7 +68,8 @@ platform_do_upgrade() { ROOTFS_FILE="root.squashfs" platform_do_upgrade_failsafe_datachk "$1" ;; - huawei,ap5030dn) + huawei,ap5030dn|\ + huawei,ap6010dn) # Store beginning address of the "firmware" partition # as KernelA address and KernelB address, each to BootupA & BootupB # This is the address from which the bootloader will try to load the kernel. diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index f7bab4b6977..2faf51949ac 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -24,6 +24,7 @@ define Device/ubnt_amplifi-router-hd UBNT_TYPE := AFi-R UBNT_VERSION := 3.6.3 SOC := qca9563 + DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := AmpliFi Router HD UBNT_CHIP := qca956x DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct kmod-usb2 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index f6dba8604d0..00aa6881567 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1806,6 +1806,21 @@ define Device/huawei_ap5030dn endef TARGET_DEVICES += huawei_ap5030dn +define Device/huawei_ap6010dn + SOC := ar9344 + DEVICE_VENDOR := Huawei + DEVICE_MODEL := AP6010DN + LOADER_TYPE := bin + LOADER_FLASH_OFFS := 0x111DC0 + KERNEL_SIZE := 15360k + IMAGE_SIZE := 30720k + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile | pad-to 64k | uImage none + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128 + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none +endef +TARGET_DEVICES += huawei_ap6010dn + define Device/iodata_etg3-r SOC := ar9342 DEVICE_VENDOR := I-O DATA diff --git a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h index e7d76839739..9dc7c0f817e 100644 --- a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h +++ b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h @@ -670,6 +670,7 @@ #define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13) #define AR934X_GPIO_OUT_GPIO 0x00 +#define AR934X_GPIO_OUTSEL_CLK_OBS4 0x14 #define QCA955X_GPIO_OUTSEL_CLK_OBS5 0x54 diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c index 13926e9b1e6..04aa348b1f2 100644 --- a/target/linux/ath79/image/lzma-loader/src/board.c +++ b/target/linux/ath79/image/lzma-loader/src/board.c @@ -182,34 +182,40 @@ static inline void mr18_init(void) static inline void mr18_init(void) { } #endif -#ifdef CONFIG_BOARD_HUAWEI_AP5030DN -static inline void ap5030dn_init(void) +#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) || defined(CONFIG_BOARD_HUAWEI_AP6010DN) +static inline void huawei_ap_init(void) { - const unsigned int ap5030dn_watchdog_gpio = 15; + const unsigned int watchdog_gpio = 15; unsigned int gpiobase, reg; gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE); - printf("Huawei AP5030DN\n"); + printf("Huawei AP\n"); reg = READREG(gpiobase + AR71XX_GPIO_REG_OE); WRITEREG(gpiobase + AR71XX_GPIO_REG_OE, - reg & ~(1 << ap5030dn_watchdog_gpio)); + reg & ~(1 << watchdog_gpio)); /* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4) - * to keep the watchdog happy until wdt-gpio takes over + * or CLK_OBS4 (= AHB_CLK/2) to keep the watchdog happy + * until wdt-gpio takes over */ reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3); +#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3, reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24)); +#else if defined(CONFIG_BOARD_HUAWEI_AP6010DN) + WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3, + reg | (AR934X_GPIO_OUTSEL_CLK_OBS4 << 24)); +#endif } #else -static inline void ap5030dn_init(void) { } +static inline void huawei_ap_init(void) {} #endif void board_init(void) { tlwr1043nd_init(); mr18_init(); - ap5030dn_init(); + huawei_ap_init(); } diff --git a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch index df672946d85..acc23796119 100644 --- a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch @@ -751,7 +751,7 @@ SVN-Revision: 35130 EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4205,14 +4205,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4214,14 +4214,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 73baf3312b5..a5352c6c482 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1487,6 +1487,109 @@ command_cleanup: +@@ -1497,6 +1497,109 @@ command_cleanup: } /* @@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5316,6 +5419,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5326,6 +5429,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-6.6/950-0163-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch b/target/linux/bcm27xx/patches-6.6/950-0163-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch index 957ed424079..1e5bb6059d2 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0163-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0163-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch @@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1576,7 +1576,7 @@ static void xhci_fixup_endpoint(struct u +@@ -1586,7 +1586,7 @@ static void xhci_fixup_endpoint(struct u return; } ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index); diff --git a/target/linux/generic/backport-6.1/809-v6.3-0001-nvmem-core-remove-spurious-white-space.patch b/target/linux/generic/backport-6.1/809-v6.3-0001-nvmem-core-remove-spurious-white-space.patch index 01400fd490d..9eec0bc48fe 100644 --- a/target/linux/generic/backport-6.1/809-v6.3-0001-nvmem-core-remove-spurious-white-space.patch +++ b/target/linux/generic/backport-6.1/809-v6.3-0001-nvmem-core-remove-spurious-white-space.patch @@ -15,7 +15,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -764,7 +764,7 @@ struct nvmem_device *nvmem_register(cons +@@ -763,7 +763,7 @@ struct nvmem_device *nvmem_register(cons if (!nvmem) return ERR_PTR(-ENOMEM); diff --git a/target/linux/generic/backport-6.1/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch b/target/linux/generic/backport-6.1/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch index 454d3bf0ed1..84ee69b8151 100644 --- a/target/linux/generic/backport-6.1/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch +++ b/target/linux/generic/backport-6.1/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman }; static DEFINE_MUTEX(nvmem_mutex); -@@ -1122,7 +1123,8 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1121,7 +1122,8 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_cell *cell; const char *name = NULL; -@@ -1141,6 +1143,7 @@ static struct nvmem_cell *nvmem_create_c +@@ -1140,6 +1142,7 @@ static struct nvmem_cell *nvmem_create_c cell->id = name; cell->entry = entry; @@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1179,7 +1182,7 @@ nvmem_cell_get_from_lookup(struct device +@@ -1178,7 +1181,7 @@ nvmem_cell_get_from_lookup(struct device __nvmem_device_put(nvmem); cell = ERR_PTR(-ENOENT); } else { @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); } -@@ -1227,15 +1230,27 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1226,15 +1229,27 @@ struct nvmem_cell *of_nvmem_cell_get(str struct nvmem_device *nvmem; struct nvmem_cell_entry *cell_entry; struct nvmem_cell *cell; @@ -105,7 +105,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem_np = of_get_parent(cell_np); if (!nvmem_np) { -@@ -1257,7 +1272,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1256,7 +1271,7 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_PTR(-ENOENT); } @@ -114,7 +114,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); -@@ -1410,8 +1425,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1409,8 +1424,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1425,7 +1440,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1424,7 +1439,7 @@ static int __nvmem_cell_read(struct nvme nvmem_shift_read_buffer_in_place(cell, buf); if (nvmem->cell_post_process) { @@ -134,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman cell->offset, buf, cell->bytes); if (rc) return rc; -@@ -1460,7 +1475,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1459,7 +1474,7 @@ void *nvmem_cell_read(struct nvmem_cell if (!buf) return ERR_PTR(-ENOMEM); @@ -143,7 +143,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1773,7 +1788,7 @@ ssize_t nvmem_device_cell_read(struct nv +@@ -1772,7 +1787,7 @@ ssize_t nvmem_device_cell_read(struct nv if (rc) return rc; diff --git a/target/linux/generic/backport-6.1/809-v6.3-0004-nvmem-core-drop-the-removal-of-the-cells-in-nvmem_ad.patch b/target/linux/generic/backport-6.1/809-v6.3-0004-nvmem-core-drop-the-removal-of-the-cells-in-nvmem_ad.patch index 8f996eab348..b20c500e7ce 100644 --- a/target/linux/generic/backport-6.1/809-v6.3-0004-nvmem-core-drop-the-removal-of-the-cells-in-nvmem_ad.patch +++ b/target/linux/generic/backport-6.1/809-v6.3-0004-nvmem-core-drop-the-removal-of-the-cells-in-nvmem_ad.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -515,7 +515,7 @@ static int nvmem_add_cells(struct nvmem_ +@@ -514,7 +514,7 @@ static int nvmem_add_cells(struct nvmem_ int ncells) { struct nvmem_cell_entry **cells; @@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman cells = kcalloc(ncells, sizeof(*cells), GFP_KERNEL); if (!cells) -@@ -525,28 +525,22 @@ static int nvmem_add_cells(struct nvmem_ +@@ -524,28 +524,22 @@ static int nvmem_add_cells(struct nvmem_ cells[i] = kzalloc(sizeof(**cells), GFP_KERNEL); if (!cells[i]) { rval = -ENOMEM; diff --git a/target/linux/generic/backport-6.1/809-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch b/target/linux/generic/backport-6.1/809-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch index 711ce229b2c..df4a02b8c50 100644 --- a/target/linux/generic/backport-6.1/809-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch +++ b/target/linux/generic/backport-6.1/809-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -502,6 +502,36 @@ static int nvmem_cell_info_to_nvmem_cell +@@ -501,6 +501,36 @@ static int nvmem_cell_info_to_nvmem_cell } /** @@ -56,7 +56,7 @@ Signed-off-by: Greg Kroah-Hartman * nvmem_add_cells() - Add cell information to an nvmem device * * @nvmem: nvmem device to add cells to. -@@ -514,34 +544,15 @@ static int nvmem_add_cells(struct nvmem_ +@@ -513,34 +543,15 @@ static int nvmem_add_cells(struct nvmem_ const struct nvmem_cell_info *info, int ncells) { diff --git a/target/linux/generic/backport-6.1/809-v6.3-0006-nvmem-core-use-nvmem_add_one_cell-in-nvmem_add_cells.patch b/target/linux/generic/backport-6.1/809-v6.3-0006-nvmem-core-use-nvmem_add_one_cell-in-nvmem_add_cells.patch index e1791e5c83c..1b4a3f3ef31 100644 --- a/target/linux/generic/backport-6.1/809-v6.3-0006-nvmem-core-use-nvmem_add_one_cell-in-nvmem_add_cells.patch +++ b/target/linux/generic/backport-6.1/809-v6.3-0006-nvmem-core-use-nvmem_add_one_cell-in-nvmem_add_cells.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -688,15 +688,14 @@ static int nvmem_validate_keepouts(struc +@@ -687,15 +687,14 @@ static int nvmem_validate_keepouts(struc static int nvmem_add_cells_from_of(struct nvmem_device *nvmem) { @@ -39,7 +39,7 @@ Signed-off-by: Greg Kroah-Hartman addr = of_get_property(child, "reg", &len); if (!addr) continue; -@@ -706,40 +705,24 @@ static int nvmem_add_cells_from_of(struc +@@ -705,40 +704,24 @@ static int nvmem_add_cells_from_of(struc return -EINVAL; } diff --git a/target/linux/generic/backport-6.1/811-v6.4-0002-nvmem-core-introduce-NVMEM-layouts.patch b/target/linux/generic/backport-6.1/811-v6.4-0002-nvmem-core-introduce-NVMEM-layouts.patch index 94cd23c18ac..77d2af7269c 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0002-nvmem-core-introduce-NVMEM-layouts.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0002-nvmem-core-introduce-NVMEM-layouts.patch @@ -103,7 +103,7 @@ Signed-off-by: Greg Kroah-Hartman static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) { -@@ -728,6 +732,101 @@ static int nvmem_add_cells_from_of(struc +@@ -727,6 +731,101 @@ static int nvmem_add_cells_from_of(struc return 0; } @@ -205,7 +205,7 @@ Signed-off-by: Greg Kroah-Hartman /** * nvmem_register() - Register a nvmem device for given nvmem_config. * Also creates a binary entry in /sys/bus/nvmem/devices/dev-name/nvmem -@@ -834,6 +933,12 @@ struct nvmem_device *nvmem_register(cons +@@ -833,6 +932,12 @@ struct nvmem_device *nvmem_register(cons goto err_put_device; } @@ -218,7 +218,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->cells) { rval = nvmem_add_cells(nvmem, config->cells, config->ncells); if (rval) -@@ -854,12 +959,17 @@ struct nvmem_device *nvmem_register(cons +@@ -853,12 +958,17 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -236,7 +236,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->compat) nvmem_sysfs_remove_compat(nvmem, config); err_put_device: -@@ -881,6 +991,7 @@ static void nvmem_device_release(struct +@@ -880,6 +990,7 @@ static void nvmem_device_release(struct device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom); nvmem_device_remove_all_cells(nvmem); @@ -244,7 +244,7 @@ Signed-off-by: Greg Kroah-Hartman device_unregister(&nvmem->dev); } -@@ -1246,6 +1357,15 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1245,6 +1356,15 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_PTR(-EINVAL); } diff --git a/target/linux/generic/backport-6.1/811-v6.4-0003-nvmem-core-handle-the-absence-of-expected-layouts.patch b/target/linux/generic/backport-6.1/811-v6.4-0003-nvmem-core-handle-the-absence-of-expected-layouts.patch index 6fa7b6382d8..40ce320b6e3 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0003-nvmem-core-handle-the-absence-of-expected-layouts.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0003-nvmem-core-handle-the-absence-of-expected-layouts.patch @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -755,7 +755,7 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregiste +@@ -754,7 +754,7 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregiste static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem) { struct device_node *layout_np, *np = nvmem->dev.of_node; @@ -37,7 +37,7 @@ Signed-off-by: Greg Kroah-Hartman layout_np = of_get_child_by_name(np, "nvmem-layout"); if (!layout_np) -@@ -938,6 +938,13 @@ struct nvmem_device *nvmem_register(cons +@@ -937,6 +937,13 @@ struct nvmem_device *nvmem_register(cons * pointer will be NULL and nvmem_layout_put() will be a noop. */ nvmem->layout = config->layout ?: nvmem_layout_get(nvmem); @@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->cells) { rval = nvmem_add_cells(nvmem, config->cells, config->ncells); -@@ -970,6 +977,7 @@ struct nvmem_device *nvmem_register(cons +@@ -969,6 +976,7 @@ struct nvmem_device *nvmem_register(cons err_remove_cells: nvmem_device_remove_all_cells(nvmem); nvmem_layout_put(nvmem->layout); diff --git a/target/linux/generic/backport-6.1/811-v6.4-0004-nvmem-core-request-layout-modules-loading.patch b/target/linux/generic/backport-6.1/811-v6.4-0004-nvmem-core-request-layout-modules-loading.patch index b9341666f91..13712d76c65 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0004-nvmem-core-request-layout-modules-loading.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0004-nvmem-core-request-layout-modules-loading.patch @@ -36,7 +36,7 @@ Signed-off-by: Greg Kroah-Hartman #include struct nvmem_device { -@@ -761,6 +762,13 @@ static struct nvmem_layout *nvmem_layout +@@ -760,6 +761,13 @@ static struct nvmem_layout *nvmem_layout if (!layout_np) return NULL; diff --git a/target/linux/generic/backport-6.1/811-v6.4-0005-nvmem-core-add-per-cell-post-processing.patch b/target/linux/generic/backport-6.1/811-v6.4-0005-nvmem-core-add-per-cell-post-processing.patch index 53628cd4e4f..50f3504132b 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0005-nvmem-core-add-per-cell-post-processing.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0005-nvmem-core-add-per-cell-post-processing.patch @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman struct device_node *np; struct nvmem_device *nvmem; struct list_head node; -@@ -470,6 +471,7 @@ static int nvmem_cell_info_to_nvmem_cell +@@ -469,6 +470,7 @@ static int nvmem_cell_info_to_nvmem_cell cell->offset = info->offset; cell->bytes = info->bytes; cell->name = info->name; @@ -36,7 +36,7 @@ Signed-off-by: Greg Kroah-Hartman cell->bit_offset = info->bit_offset; cell->nbits = info->nbits; -@@ -1563,6 +1565,13 @@ static int __nvmem_cell_read(struct nvme +@@ -1562,6 +1564,13 @@ static int __nvmem_cell_read(struct nvme if (cell->bit_offset || cell->nbits) nvmem_shift_read_buffer_in_place(cell, buf); @@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman if (nvmem->cell_post_process) { rc = nvmem->cell_post_process(nvmem->priv, id, index, cell->offset, buf, cell->bytes); -@@ -1671,6 +1680,14 @@ static int __nvmem_cell_entry_write(stru +@@ -1670,6 +1679,14 @@ static int __nvmem_cell_entry_write(stru (cell->bit_offset == 0 && len != cell->bytes)) return -EINVAL; diff --git a/target/linux/generic/backport-6.1/811-v6.4-0006-nvmem-core-allow-to-modify-a-cell-before-adding-it.patch b/target/linux/generic/backport-6.1/811-v6.4-0006-nvmem-core-allow-to-modify-a-cell-before-adding-it.patch index 32990148c80..1b77992a2bf 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0006-nvmem-core-allow-to-modify-a-cell-before-adding-it.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0006-nvmem-core-allow-to-modify-a-cell-before-adding-it.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -695,6 +695,7 @@ static int nvmem_validate_keepouts(struc +@@ -694,6 +694,7 @@ static int nvmem_validate_keepouts(struc static int nvmem_add_cells_from_of(struct nvmem_device *nvmem) { @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman struct device *dev = &nvmem->dev; struct device_node *child; const __be32 *addr; -@@ -724,6 +725,9 @@ static int nvmem_add_cells_from_of(struc +@@ -723,6 +724,9 @@ static int nvmem_add_cells_from_of(struc info.np = of_node_get(child); diff --git a/target/linux/generic/backport-6.1/811-v6.4-0008-nvmem-cell-drop-global-cell_post_process.patch b/target/linux/generic/backport-6.1/811-v6.4-0008-nvmem-cell-drop-global-cell_post_process.patch index eac202b8829..e6f4be261cd 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0008-nvmem-cell-drop-global-cell_post_process.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0008-nvmem-cell-drop-global-cell_post_process.patch @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman struct gpio_desc *wp_gpio; struct nvmem_layout *layout; void *priv; -@@ -903,7 +902,6 @@ struct nvmem_device *nvmem_register(cons +@@ -902,7 +901,6 @@ struct nvmem_device *nvmem_register(cons nvmem->type = config->type; nvmem->reg_read = config->reg_read; nvmem->reg_write = config->reg_write; @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem->keepout = config->keepout; nvmem->nkeepout = config->nkeepout; if (config->of_node) -@@ -1575,13 +1573,6 @@ static int __nvmem_cell_read(struct nvme +@@ -1574,13 +1572,6 @@ static int __nvmem_cell_read(struct nvme if (rc) return rc; } diff --git a/target/linux/generic/backport-6.1/811-v6.4-0009-nvmem-core-provide-own-priv-pointer-in-post-process-.patch b/target/linux/generic/backport-6.1/811-v6.4-0009-nvmem-core-provide-own-priv-pointer-in-post-process-.patch index 46b30a2ed90..b39626f6e78 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0009-nvmem-core-provide-own-priv-pointer-in-post-process-.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0009-nvmem-core-provide-own-priv-pointer-in-post-process-.patch @@ -29,7 +29,7 @@ Signed-off-by: Greg Kroah-Hartman struct device_node *np; struct nvmem_device *nvmem; struct list_head node; -@@ -471,6 +472,7 @@ static int nvmem_cell_info_to_nvmem_cell +@@ -470,6 +471,7 @@ static int nvmem_cell_info_to_nvmem_cell cell->bytes = info->bytes; cell->name = info->name; cell->read_post_process = info->read_post_process; @@ -37,7 +37,7 @@ Signed-off-by: Greg Kroah-Hartman cell->bit_offset = info->bit_offset; cell->nbits = info->nbits; -@@ -1568,7 +1570,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1567,7 +1569,7 @@ static int __nvmem_cell_read(struct nvme nvmem_shift_read_buffer_in_place(cell, buf); if (cell->read_post_process) { diff --git a/target/linux/generic/backport-6.1/811-v6.4-0017-nvmem-core-support-specifying-both-cell-raw-data-pos.patch b/target/linux/generic/backport-6.1/811-v6.4-0017-nvmem-core-support-specifying-both-cell-raw-data-pos.patch index eeb407e9bb6..a1ebd53d074 100644 --- a/target/linux/generic/backport-6.1/811-v6.4-0017-nvmem-core-support-specifying-both-cell-raw-data-pos.patch +++ b/target/linux/generic/backport-6.1/811-v6.4-0017-nvmem-core-support-specifying-both-cell-raw-data-pos.patch @@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman int bytes; int bit_offset; int nbits; -@@ -469,6 +470,7 @@ static int nvmem_cell_info_to_nvmem_cell +@@ -468,6 +469,7 @@ static int nvmem_cell_info_to_nvmem_cell { cell->nvmem = nvmem; cell->offset = info->offset; @@ -59,7 +59,7 @@ Signed-off-by: Greg Kroah-Hartman cell->bytes = info->bytes; cell->name = info->name; cell->read_post_process = info->read_post_process; -@@ -1560,7 +1562,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1559,7 +1561,7 @@ static int __nvmem_cell_read(struct nvme { int rc; @@ -68,7 +68,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) return rc; -@@ -1571,7 +1573,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1570,7 +1572,7 @@ static int __nvmem_cell_read(struct nvme if (cell->read_post_process) { rc = cell->read_post_process(cell->priv, id, index, @@ -77,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) return rc; } -@@ -1594,14 +1596,15 @@ static int __nvmem_cell_read(struct nvme +@@ -1593,14 +1595,15 @@ static int __nvmem_cell_read(struct nvme */ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { diff --git a/target/linux/generic/backport-6.1/813-v6.5-0011-nvmem-core-add-support-for-fixed-cells-layout.patch b/target/linux/generic/backport-6.1/813-v6.5-0011-nvmem-core-add-support-for-fixed-cells-layout.patch index 59b2f9fa2c6..3b4654822a4 100644 --- a/target/linux/generic/backport-6.1/813-v6.5-0011-nvmem-core-add-support-for-fixed-cells-layout.patch +++ b/target/linux/generic/backport-6.1/813-v6.5-0011-nvmem-core-add-support-for-fixed-cells-layout.patch @@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -696,7 +696,7 @@ static int nvmem_validate_keepouts(struc +@@ -695,7 +695,7 @@ static int nvmem_validate_keepouts(struc return 0; } @@ -36,7 +36,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_layout *layout = nvmem->layout; struct device *dev = &nvmem->dev; -@@ -704,7 +704,7 @@ static int nvmem_add_cells_from_of(struc +@@ -703,7 +703,7 @@ static int nvmem_add_cells_from_of(struc const __be32 *addr; int len, ret; @@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell_info info = {0}; addr = of_get_property(child, "reg", &len); -@@ -742,6 +742,28 @@ static int nvmem_add_cells_from_of(struc +@@ -741,6 +741,28 @@ static int nvmem_add_cells_from_of(struc return 0; } @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman int __nvmem_layout_register(struct nvmem_layout *layout, struct module *owner) { layout->owner = owner; -@@ -972,7 +994,7 @@ struct nvmem_device *nvmem_register(cons +@@ -971,7 +993,7 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -83,7 +83,7 @@ Signed-off-by: Greg Kroah-Hartman if (rval) goto err_remove_cells; -@@ -982,6 +1004,10 @@ struct nvmem_device *nvmem_register(cons +@@ -981,6 +1003,10 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; diff --git a/target/linux/generic/backport-6.1/814-v6.6-0014-nvmem-core-Create-all-cells-before-adding-the-nvmem-.patch b/target/linux/generic/backport-6.1/814-v6.6-0014-nvmem-core-Create-all-cells-before-adding-the-nvmem-.patch index f9532f39c35..990ce8ecf1c 100644 --- a/target/linux/generic/backport-6.1/814-v6.6-0014-nvmem-core-Create-all-cells-before-adding-the-nvmem-.patch +++ b/target/linux/generic/backport-6.1/814-v6.6-0014-nvmem-core-Create-all-cells-before-adding-the-nvmem-.patch @@ -15,7 +15,7 @@ Signed-off-by: Srinivas Kandagatla --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -998,17 +998,17 @@ struct nvmem_device *nvmem_register(cons +@@ -997,17 +997,17 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; diff --git a/target/linux/generic/backport-6.1/814-v6.6-0016-nvmem-core-Do-not-open-code-existing-functions.patch b/target/linux/generic/backport-6.1/814-v6.6-0016-nvmem-core-Do-not-open-code-existing-functions.patch index 28d8bba1949..4ebf229695d 100644 --- a/target/linux/generic/backport-6.1/814-v6.6-0016-nvmem-core-Do-not-open-code-existing-functions.patch +++ b/target/linux/generic/backport-6.1/814-v6.6-0016-nvmem-core-Do-not-open-code-existing-functions.patch @@ -14,7 +14,7 @@ Signed-off-by: Srinivas Kandagatla --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -786,10 +786,10 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregiste +@@ -785,10 +785,10 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregiste static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem) { diff --git a/target/linux/generic/backport-6.1/814-v6.6-0017-nvmem-core-Notify-when-a-new-layout-is-registered.patch b/target/linux/generic/backport-6.1/814-v6.6-0017-nvmem-core-Notify-when-a-new-layout-is-registered.patch index b62a0e18daa..6803397d60b 100644 --- a/target/linux/generic/backport-6.1/814-v6.6-0017-nvmem-core-Notify-when-a-new-layout-is-registered.patch +++ b/target/linux/generic/backport-6.1/814-v6.6-0017-nvmem-core-Notify-when-a-new-layout-is-registered.patch @@ -14,7 +14,7 @@ Signed-off-by: Srinivas Kandagatla --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -772,12 +772,16 @@ int __nvmem_layout_register(struct nvmem +@@ -771,12 +771,16 @@ int __nvmem_layout_register(struct nvmem list_add(&layout->node, &nvmem_layouts); spin_unlock(&nvmem_layout_lock); diff --git a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch index be293e6f2a3..547122ae48b 100644 --- a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch +++ b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch @@ -95,7 +95,7 @@ Signed-off-by: Greg Kroah-Hartman .stride = sizeof(u32), --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -998,9 +998,11 @@ struct nvmem_device *nvmem_register(cons +@@ -997,9 +997,11 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman imx_ocotp_nvmem_config.priv = priv; --- a/drivers/nvmem/meson-efuse.c +++ b/drivers/nvmem/meson-efuse.c -@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat +@@ -80,6 +80,7 @@ static int meson_efuse_probe(struct plat econfig->dev = dev; econfig->name = dev_name(dev); diff --git a/target/linux/generic/backport-6.1/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch b/target/linux/generic/backport-6.1/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch index 7d80ad37f18..1ed7c433322 100644 --- a/target/linux/generic/backport-6.1/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch +++ b/target/linux/generic/backport-6.1/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman mtd->nvmem = nvmem_register(&config); --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -936,7 +936,7 @@ struct nvmem_device *nvmem_register(cons +@@ -935,7 +935,7 @@ struct nvmem_device *nvmem_register(cons nvmem->nkeepout = config->nkeepout; if (config->of_node) nvmem->dev.of_node = config->of_node; diff --git a/target/linux/generic/backport-6.1/816-v6.7-0005-nvmem-Do-not-expect-fixed-layouts-to-grab-a-layout-d.patch b/target/linux/generic/backport-6.1/816-v6.7-0005-nvmem-Do-not-expect-fixed-layouts-to-grab-a-layout-d.patch index bd5ceaabf7d..65b8878310e 100644 --- a/target/linux/generic/backport-6.1/816-v6.7-0005-nvmem-Do-not-expect-fixed-layouts-to-grab-a-layout-d.patch +++ b/target/linux/generic/backport-6.1/816-v6.7-0005-nvmem-Do-not-expect-fixed-layouts-to-grab-a-layout-d.patch @@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -797,6 +797,12 @@ static struct nvmem_layout *nvmem_layout +@@ -796,6 +796,12 @@ static struct nvmem_layout *nvmem_layout if (!layout_np) return NULL; diff --git a/target/linux/generic/backport-6.1/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch b/target/linux/generic/backport-6.1/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch index 2093fac8a12..59175c8051d 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -848,14 +848,6 @@ static int nvmem_add_cells_from_layout(s +@@ -847,14 +847,6 @@ static int nvmem_add_cells_from_layout(s } #if IS_ENABLED(CONFIG_OF) diff --git a/target/linux/generic/backport-6.1/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch b/target/linux/generic/backport-6.1/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch index db2d8c1b46e..1f39dfea2f9 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -817,7 +817,7 @@ static int nvmem_add_cells_from_layout(s +@@ -816,7 +816,7 @@ static int nvmem_add_cells_from_layout(s int ret; if (layout && layout->add_cells) { diff --git a/target/linux/generic/backport-6.1/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch b/target/linux/generic/backport-6.1/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch index 65aa37f8344..c2968f2c675 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -676,7 +676,6 @@ static int nvmem_validate_keepouts(struc +@@ -675,7 +675,6 @@ static int nvmem_validate_keepouts(struc static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np) { @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman struct device *dev = &nvmem->dev; struct device_node *child; const __be32 *addr; -@@ -706,8 +705,8 @@ static int nvmem_add_cells_from_dt(struc +@@ -705,8 +704,8 @@ static int nvmem_add_cells_from_dt(struc info.np = of_node_get(child); @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman ret = nvmem_add_one_cell(nvmem, &info); kfree(info.name); -@@ -896,6 +895,7 @@ struct nvmem_device *nvmem_register(cons +@@ -895,6 +894,7 @@ struct nvmem_device *nvmem_register(cons kref_init(&nvmem->refcnt); INIT_LIST_HEAD(&nvmem->cells); diff --git a/target/linux/generic/backport-6.1/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch b/target/linux/generic/backport-6.1/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch index 18813323408..9a19dc44524 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch @@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) { -@@ -741,97 +738,22 @@ static int nvmem_add_cells_from_fixed_la +@@ -740,97 +737,22 @@ static int nvmem_add_cells_from_fixed_la return err; } @@ -189,7 +189,7 @@ Signed-off-by: Greg Kroah-Hartman const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem, struct nvmem_layout *layout) { -@@ -839,7 +761,7 @@ const void *nvmem_layout_get_match_data( +@@ -838,7 +760,7 @@ const void *nvmem_layout_get_match_data( const struct of_device_id *match; layout_np = of_nvmem_layout_get_container(nvmem); @@ -198,7 +198,7 @@ Signed-off-by: Greg Kroah-Hartman return match ? match->data : NULL; } -@@ -951,19 +873,6 @@ struct nvmem_device *nvmem_register(cons +@@ -950,19 +872,6 @@ struct nvmem_device *nvmem_register(cons goto err_put_device; } @@ -218,7 +218,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->cells) { rval = nvmem_add_cells(nvmem, config->cells, config->ncells); if (rval) -@@ -984,24 +893,24 @@ struct nvmem_device *nvmem_register(cons +@@ -983,24 +892,24 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_cells; @@ -249,7 +249,7 @@ Signed-off-by: Greg Kroah-Hartman if (config->compat) nvmem_sysfs_remove_compat(nvmem, config); err_put_device: -@@ -1023,7 +932,7 @@ static void nvmem_device_release(struct +@@ -1022,7 +931,7 @@ static void nvmem_device_release(struct device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom); nvmem_device_remove_all_cells(nvmem); @@ -258,7 +258,7 @@ Signed-off-by: Greg Kroah-Hartman device_unregister(&nvmem->dev); } -@@ -1325,6 +1234,12 @@ nvmem_cell_get_from_lookup(struct device +@@ -1324,6 +1233,12 @@ nvmem_cell_get_from_lookup(struct device return cell; } @@ -271,7 +271,7 @@ Signed-off-by: Greg Kroah-Hartman #if IS_ENABLED(CONFIG_OF) static struct nvmem_cell_entry * nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np) -@@ -1343,6 +1258,18 @@ nvmem_find_cell_entry_by_node(struct nvm +@@ -1342,6 +1257,18 @@ nvmem_find_cell_entry_by_node(struct nvm return cell; } @@ -290,7 +290,7 @@ Signed-off-by: Greg Kroah-Hartman /** * of_nvmem_cell_get() - Get a nvmem cell from given device node and cell id * -@@ -1405,16 +1332,29 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1404,16 +1331,29 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_CAST(nvmem); } @@ -322,7 +322,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1528,6 +1468,7 @@ void nvmem_cell_put(struct nvmem_cell *c +@@ -1527,6 +1467,7 @@ void nvmem_cell_put(struct nvmem_cell *c kfree(cell); __nvmem_device_put(nvmem); @@ -330,7 +330,7 @@ Signed-off-by: Greg Kroah-Hartman } EXPORT_SYMBOL_GPL(nvmem_cell_put); -@@ -2105,11 +2046,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); +@@ -2104,11 +2045,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); static int __init nvmem_init(void) { diff --git a/target/linux/generic/backport-6.1/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch b/target/linux/generic/backport-6.1/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch index 89872bec2e5..07e44d7b21c 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch @@ -111,7 +111,7 @@ Signed-off-by: Greg Kroah-Hartman static struct bin_attribute bin_attr_nvmem_eeprom_compat = { .attr = { .name = "eeprom", -@@ -381,6 +428,68 @@ static void nvmem_sysfs_remove_compat(st +@@ -380,6 +427,68 @@ static void nvmem_sysfs_remove_compat(st device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom); } @@ -180,7 +180,7 @@ Signed-off-by: Greg Kroah-Hartman #else /* CONFIG_NVMEM_SYSFS */ static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, -@@ -740,11 +849,25 @@ static int nvmem_add_cells_from_fixed_la +@@ -739,11 +848,25 @@ static int nvmem_add_cells_from_fixed_la int nvmem_layout_register(struct nvmem_layout *layout) { @@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman } EXPORT_SYMBOL_GPL(nvmem_layout_register); -@@ -903,10 +1026,20 @@ struct nvmem_device *nvmem_register(cons +@@ -902,10 +1025,20 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_dev; diff --git a/target/linux/generic/backport-6.1/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch b/target/linux/generic/backport-6.1/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch index 1bf3ba35b6d..400004c617c 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -855,7 +855,7 @@ int nvmem_layout_register(struct nvmem_l +@@ -854,7 +854,7 @@ int nvmem_layout_register(struct nvmem_l return -EINVAL; /* Populate the cells */ diff --git a/target/linux/generic/backport-6.1/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch b/target/linux/generic/backport-6.1/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch index 514b5f2de5c..510f3dd8417 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch @@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -877,19 +877,6 @@ void nvmem_layout_unregister(struct nvme +@@ -876,19 +876,6 @@ void nvmem_layout_unregister(struct nvme } EXPORT_SYMBOL_GPL(nvmem_layout_unregister); diff --git a/target/linux/generic/backport-6.1/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch b/target/linux/generic/backport-6.1/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch index aa0bbaa0c55..ccdcc09736d 100644 --- a/target/linux/generic/backport-6.1/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch +++ b/target/linux/generic/backport-6.1/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -2164,6 +2164,19 @@ const char *nvmem_dev_name(struct nvmem_ +@@ -2163,6 +2163,19 @@ const char *nvmem_dev_name(struct nvmem_ } EXPORT_SYMBOL_GPL(nvmem_dev_name); diff --git a/target/linux/generic/hack-6.1/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.1/904-debloat_dma_buf.patch index 105eb3da4bb..0a73146d022 100644 --- a/target/linux/generic/hack-6.1/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-6.1/904-debloat_dma_buf.patch @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4367,6 +4367,7 @@ int wake_up_state(struct task_struct *p, +@@ -4366,6 +4366,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-6.1/804-nvmem-core-support-mac-base-fixed-layout-cells.patch b/target/linux/generic/pending-6.1/804-nvmem-core-support-mac-base-fixed-layout-cells.patch index 9bb94a28b54..da25b39ae9c 100644 --- a/target/linux/generic/pending-6.1/804-nvmem-core-support-mac-base-fixed-layout-cells.patch +++ b/target/linux/generic/pending-6.1/804-nvmem-core-support-mac-base-fixed-layout-cells.patch @@ -33,7 +33,7 @@ string. #include #include #include -@@ -780,6 +783,62 @@ static int nvmem_validate_keepouts(struc +@@ -779,6 +782,62 @@ static int nvmem_validate_keepouts(struc return 0; } @@ -96,7 +96,7 @@ string. static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np) { struct device *dev = &nvmem->dev; -@@ -814,6 +873,25 @@ static int nvmem_add_cells_from_dt(struc +@@ -813,6 +872,25 @@ static int nvmem_add_cells_from_dt(struc if (nvmem->fixup_dt_cell_info) nvmem->fixup_dt_cell_info(nvmem, &info); diff --git a/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch index 3d5b7afe8c2..eab26ccb11d 100644 --- a/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch +++ b/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch @@ -4,7 +4,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c -@@ -2953,6 +2953,22 @@ char *ppp_dev_name(struct ppp_channel *c +@@ -2968,6 +2968,22 @@ char *ppp_dev_name(struct ppp_channel *c return name; } @@ -27,7 +27,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support /* * Disconnect a channel from the generic layer. -@@ -3599,6 +3615,7 @@ EXPORT_SYMBOL(ppp_unregister_channel); +@@ -3614,6 +3630,7 @@ EXPORT_SYMBOL(ppp_unregister_channel); EXPORT_SYMBOL(ppp_channel_index); EXPORT_SYMBOL(ppp_unit_number); EXPORT_SYMBOL(ppp_dev_name); diff --git a/target/linux/lantiq/patches-6.6/0027-v6.11-net-ethernet-lantiq_etop-remove-redundant-device-nam.patch b/target/linux/lantiq/patches-6.6/0027-v6.11-net-ethernet-lantiq_etop-remove-redundant-device-nam.patch new file mode 100644 index 00000000000..abaef6c3a80 --- /dev/null +++ b/target/linux/lantiq/patches-6.6/0027-v6.11-net-ethernet-lantiq_etop-remove-redundant-device-nam.patch @@ -0,0 +1,31 @@ +From 9283477e28913c1e7625c0a8d6959745e2431533 Mon Sep 17 00:00:00 2001 +From: Aleksander Jan Bajkowski +Date: Sat, 13 Jul 2024 19:09:20 +0200 +Subject: [PATCH] net: ethernet: lantiq_etop: remove redundant device name + setup + +The same name is set when allocating the netdevice structure in the +alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there +is no need to manually set it. + +This fixes CheckPatch warnings: +WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 + strcpy(dev->name, "eth%d"); + +Signed-off-by: Aleksander Jan Bajkowski +Link: https://patch.msgid.link/20240713170920.863171-1-olek2@wp.pl +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/lantiq_etop.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -675,7 +675,6 @@ ltq_etop_probe(struct platform_device *p + err = -ENOMEM; + goto err_out; + } +- strcpy(dev->name, "eth%d"); + dev->netdev_ops = <q_eth_netdev_ops; + dev->ethtool_ops = <q_etop_ethtool_ops; + priv = netdev_priv(dev); diff --git a/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch index 8ac10972679..788a34d61ab 100644 --- a/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch +++ b/target/linux/lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch @@ -5,8 +5,8 @@ Subject: [PATCH 28/36] NET: lantiq: various etop fixes Signed-off-by: John Crispin --- - drivers/net/ethernet/lantiq_etop.c | 555 +++++++++++++++++++++++++----------- - 1 file changed, 389 insertions(+), 166 deletions(-) + drivers/net/ethernet/lantiq_etop.c | 530 ++++++++++++++++++++--------- + 1 file changed, 375 insertions(+), 155 deletions(-) --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -66,10 +66,10 @@ Signed-off-by: John Crispin -#define LTQ_ETOP_IGPLEN 0x16080 + +#define MAC_CFG_MASK 0xfff -+#define MAC_CFG_CGEN (1 << 11) -+#define MAC_CFG_DUPLEX (1 << 2) -+#define MAC_CFG_SPEED (1 << 1) -+#define MAC_CFG_LINK (1 << 0) ++#define MAC_CFG_CGEN BIT(11) ++#define MAC_CFG_DUPLEX BIT(2) ++#define MAC_CFG_SPEED BIT(1) ++#define MAC_CFG_LINK BIT(0) #define MAX_DMA_CHAN 0x8 #define MAX_DMA_CRC_LEN 0x4 @@ -89,11 +89,11 @@ Signed-off-by: John Crispin -#define IS_TX(x) ((x) == LTQ_ETOP_TX_CHANNEL) -#define IS_RX(x) ((x) == LTQ_ETOP_RX_CHANNEL) +#define ETOP_CFG_MASK 0xfff -+#define ETOP_CFG_FEN0 (1 << 8) -+#define ETOP_CFG_SEN0 (1 << 6) -+#define ETOP_CFG_OFF1 (1 << 3) -+#define ETOP_CFG_REMII0 (1 << 1) -+#define ETOP_CFG_OFF0 (1 << 0) ++#define ETOP_CFG_FEN0 BIT(8) ++#define ETOP_CFG_SEN0 BIT(6) ++#define ETOP_CFG_OFF1 BIT(3) ++#define ETOP_CFG_REMII0 BIT(1) ++#define ETOP_CFG_OFF0 BIT(0) + +#define LTQ_GBIT_MDIO_CTL 0xCC +#define LTQ_GBIT_MDIO_DATA 0xd0 @@ -103,8 +103,8 @@ Signed-off-by: John Crispin +#define LTQ_GBIT_PMAC_RX_IPG 0xa8 +#define LTQ_GBIT_RGMII_CTL 0x78 + -+#define PMAC_HD_CTL_AS (1 << 19) -+#define PMAC_HD_CTL_RXSH (1 << 22) ++#define PMAC_HD_CTL_AS BIT(19) ++#define PMAC_HD_CTL_RXSH BIT(22) + +/* Switch Enable (0=disable, 1=enable) */ +#define GCTL0_SE 0x80000000 @@ -170,14 +170,13 @@ Signed-off-by: John Crispin int tx_burst_len; int rx_burst_len; -- spinlock_t lock; + int tx_irq; + int rx_irq; + + unsigned char mac[6]; + phy_interface_t mii_mode; -+ -+ spinlock_t lock; ++ + spinlock_t lock; + + struct clk *clk_ppe; + struct clk *clk_switch; @@ -186,7 +185,7 @@ Signed-off-by: John Crispin }; +static int ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, -+ int phy_reg, u16 phy_data); ++ int phy_reg, u16 phy_data); + static int ltq_etop_alloc_skb(struct ltq_etop_chan *ch) @@ -256,12 +255,12 @@ Signed-off-by: John Crispin return 1; } -@@ -202,9 +278,10 @@ static irqreturn_t +@@ -202,9 +278,11 @@ static irqreturn_t ltq_etop_dma_irq(int irq, void *_priv) { struct ltq_etop_priv *priv = _priv; - int ch = irq - LTQ_DMA_CH0_INT; -- + - napi_schedule(&priv->ch[ch].napi); + if (irq == priv->txch.dma.irq) + napi_schedule(&priv->txch.napi); @@ -270,16 +269,16 @@ Signed-off-by: John Crispin return IRQ_HANDLED; } -@@ -216,7 +293,7 @@ ltq_etop_free_channel(struct net_device +@@ -216,7 +294,7 @@ ltq_etop_free_channel(struct net_device ltq_dma_free(&ch->dma); if (ch->dma.irq) free_irq(ch->dma.irq, priv); - if (IS_RX(ch->idx)) { -+ if (ch == &priv->txch) { - int desc; ++ if (ch == &priv->rxch) { + struct ltq_dma_channel *dma = &ch->dma; - for (desc = 0; desc < LTQ_DESC_NUM; desc++) -@@ -228,80 +305,135 @@ static void + for (dma->desc = 0; dma->desc < LTQ_DESC_NUM; dma->desc++) +@@ -228,80 +306,137 @@ static void ltq_etop_hw_exit(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -320,13 +319,14 @@ Signed-off-by: John Crispin + ltq_gbit_w32_mask(0x300, 0, LTQ_GBIT_GCTL0); + /* disable pmac & dmac headers */ + ltq_gbit_w32_mask(PMAC_HD_CTL_AS | PMAC_HD_CTL_RXSH, 0, -+ LTQ_GBIT_PMAC_HD_CTL); ++ LTQ_GBIT_PMAC_HD_CTL); + /* Due to traffic halt when burst length 8, -+ replace default IPG value with 0x3B */ ++ *replace default IPG value with 0x3B ++ */ + ltq_gbit_w32(0x3B, LTQ_GBIT_PMAC_RX_IPG); + /* set mdc clock to 2.5 MHz */ + ltq_gbit_w32_mask(MDC_CLOCK_MASK, 4 << MDC_CLOCK_OFFSET, -+ LTQ_GBIT_RGMII_CTL); ++ LTQ_GBIT_RGMII_CTL); } static int @@ -336,11 +336,10 @@ Signed-off-by: John Crispin - int i; - int err; + phy_interface_t mii_mode = priv->mii_mode; - -- ltq_pmu_enable(PMU_PPE); ++ + clk_enable(priv->clk_ppe); -- switch (priv->pldata->mii_mode) { +- ltq_pmu_enable(PMU_PPE); + if (of_machine_is_compatible("lantiq,ar9")) { + ltq_etop_gbit_init(dev); + /* force the etops link to the gbit to MII */ @@ -349,7 +348,8 @@ Signed-off-by: John Crispin + ltq_etop_w32_mask(MDIO_CFG_MASK, 0, LTQ_ETOP_MDIO_CFG); + ltq_etop_w32_mask(MAC_CFG_MASK, MAC_CFG_CGEN | MAC_CFG_DUPLEX | + MAC_CFG_SPEED | MAC_CFG_LINK, LTQ_ETOP_MAC_CFG); -+ + +- switch (priv->pldata->mii_mode) { + switch (mii_mode) { case PHY_INTERFACE_MODE_RMII: - ltq_etop_w32_mask(ETOP_MII_MASK, ETOP_MII_REVERSE, @@ -373,7 +373,8 @@ Signed-off-by: John Crispin + /* enable clock for internal PHY */ + clk_enable(priv->clk_ephycgu); + /* we need to write this magic to the internal phy to -+ make it work */ ++ * make it work ++ */ + ltq_etop_mdio_wr(NULL, 0x8, 0x12, 0xC020); + pr_info("Selected EPHY mode\n"); + break; @@ -464,12 +465,12 @@ Signed-off-by: John Crispin } static void -@@ -320,6 +452,39 @@ static const struct ethtool_ops ltq_etop +@@ -320,6 +455,39 @@ static const struct ethtool_ops ltq_etop }; static int +ltq_etop_mdio_wr_xr9(struct mii_bus *bus, int phy_addr, -+ int phy_reg, u16 phy_data) ++ int phy_reg, u16 phy_data) +{ + u32 val = MDIO_XR9_REQUEST | MDIO_XR9_WRITE | + (phy_data << MDIO_XR9_WR_OFFSET) | @@ -504,7 +505,7 @@ Signed-off-by: John Crispin ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) { u32 val = MDIO_REQUEST | -@@ -327,9 +492,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in +@@ -327,9 +495,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) | phy_data; @@ -516,7 +517,7 @@ Signed-off-by: John Crispin return 0; } -@@ -340,12 +505,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in +@@ -340,12 +508,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in ((phy_addr & MDIO_ADDR_MASK) << MDIO_ADDR_OFFSET) | ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET); @@ -533,7 +534,7 @@ Signed-off-by: John Crispin return val; } -@@ -361,7 +526,10 @@ ltq_etop_mdio_probe(struct net_device *d +@@ -361,7 +529,10 @@ ltq_etop_mdio_probe(struct net_device *d struct ltq_etop_priv *priv = netdev_priv(dev); struct phy_device *phydev; @@ -545,7 +546,7 @@ Signed-off-by: John Crispin if (!phydev) { netdev_err(dev, "no PHY found\n"); -@@ -369,14 +537,17 @@ ltq_etop_mdio_probe(struct net_device *d +@@ -369,14 +540,17 @@ ltq_etop_mdio_probe(struct net_device *d } phydev = phy_connect(dev, phydev_name(phydev), @@ -565,7 +566,7 @@ Signed-off-by: John Crispin phy_attached_info(phydev); -@@ -397,8 +568,13 @@ ltq_etop_mdio_init(struct net_device *de +@@ -397,8 +571,13 @@ ltq_etop_mdio_init(struct net_device *de } priv->mii_bus->priv = dev; @@ -581,7 +582,7 @@ Signed-off-by: John Crispin priv->mii_bus->name = "ltq_mii"; snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", priv->pdev->name, priv->pdev->id); -@@ -435,18 +611,21 @@ static int +@@ -435,18 +614,21 @@ static int ltq_etop_open(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -613,7 +614,7 @@ Signed-off-by: John Crispin netif_tx_start_all_queues(dev); return 0; } -@@ -455,18 +634,19 @@ static int +@@ -455,18 +637,19 @@ static int ltq_etop_stop(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -643,7 +644,7 @@ Signed-off-by: John Crispin return 0; } -@@ -476,15 +656,16 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -476,15 +659,16 @@ ltq_etop_tx(struct sk_buff *skb, struct int queue = skb_get_queue_mapping(skb); struct netdev_queue *txq = netdev_get_tx_queue(dev, queue); struct ltq_etop_priv *priv = netdev_priv(dev); @@ -660,11 +661,11 @@ Signed-off-by: John Crispin - if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) { + if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || -+ priv->txch.skb[priv->txch.dma.desc]) { ++ priv->txch.skb[priv->txch.dma.desc]) { netdev_err(dev, "tx ring full\n"); netif_tx_stop_queue(txq); return NETDEV_TX_BUSY; -@@ -492,7 +673,7 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -492,7 +676,7 @@ ltq_etop_tx(struct sk_buff *skb, struct /* dma needs to start on a burst length value aligned address */ byte_offset = CPHYSADDR(skb->data) % (priv->tx_burst_len * 4); @@ -673,7 +674,7 @@ Signed-off-by: John Crispin netif_trans_update(dev); -@@ -503,11 +684,11 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -503,11 +687,11 @@ ltq_etop_tx(struct sk_buff *skb, struct wmb(); desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP | LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK); @@ -688,7 +689,7 @@ Signed-off-by: John Crispin netif_tx_stop_queue(txq); return NETDEV_TX_OK; -@@ -518,11 +699,14 @@ ltq_etop_change_mtu(struct net_device *d +@@ -518,11 +702,14 @@ ltq_etop_change_mtu(struct net_device *d { struct ltq_etop_priv *priv = netdev_priv(dev); unsigned long flags; @@ -704,7 +705,7 @@ Signed-off-by: John Crispin spin_unlock_irqrestore(&priv->lock, flags); return 0; -@@ -575,6 +759,9 @@ ltq_etop_init(struct net_device *dev) +@@ -575,6 +762,9 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; ltq_etop_change_mtu(dev, 1500); @@ -714,7 +715,7 @@ Signed-off-by: John Crispin memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); if (!is_valid_ether_addr(mac.sa_data)) { -@@ -592,9 +779,10 @@ ltq_etop_init(struct net_device *dev) +@@ -592,9 +782,10 @@ ltq_etop_init(struct net_device *dev) dev->addr_assign_type = NET_ADDR_RANDOM; ltq_etop_set_multicast_list(dev); @@ -724,11 +725,11 @@ Signed-off-by: John Crispin + if (!ltq_etop_mdio_init(dev)) + dev->ethtool_ops = <q_etop_ethtool_ops; + else -+ pr_warn("etop: mdio probe failed\n");; ++ pr_warn("etop: mdio probe failed\n"); return 0; err_netdev: -@@ -614,6 +802,9 @@ ltq_etop_tx_timeout(struct net_device *d +@@ -614,6 +805,9 @@ ltq_etop_tx_timeout(struct net_device *d err = ltq_etop_hw_init(dev); if (err) goto err_hw; @@ -738,7 +739,7 @@ Signed-off-by: John Crispin netif_trans_update(dev); netif_wake_queue(dev); return; -@@ -637,14 +828,18 @@ static const struct net_device_ops ltq_e +@@ -637,14 +831,18 @@ static const struct net_device_ops ltq_e .ndo_tx_timeout = ltq_etop_tx_timeout, }; @@ -761,7 +762,7 @@ Signed-off-by: John Crispin res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -@@ -670,19 +865,55 @@ ltq_etop_probe(struct platform_device *p +@@ -670,18 +868,54 @@ ltq_etop_probe(struct platform_device *p goto err_out; } @@ -777,7 +778,7 @@ Signed-off-by: John Crispin + goto err_out; + } + ltq_gbit_membase = devm_ioremap(&pdev->dev, -+ gbit_res->start, resource_size(gbit_res)); ++ gbit_res->start, resource_size(gbit_res)); + if (!ltq_gbit_membase) { + dev_err(&pdev->dev, "failed to remap gigabit switch %d\n", + pdev->id); @@ -787,7 +788,6 @@ Signed-off-by: John Crispin } + + dev = alloc_etherdev_mq(sizeof(struct ltq_etop_priv), 4); - strcpy(dev->name, "eth%d"); dev->netdev_ops = <q_eth_netdev_ops; - dev->ethtool_ops = <q_etop_ethtool_ops; priv = netdev_priv(dev); @@ -823,7 +823,7 @@ Signed-off-by: John Crispin spin_lock_init(&priv->lock); SET_NETDEV_DEV(dev, &pdev->dev); -@@ -698,15 +929,10 @@ ltq_etop_probe(struct platform_device *p +@@ -697,15 +931,10 @@ ltq_etop_probe(struct platform_device *p goto err_free; } @@ -843,7 +843,7 @@ Signed-off-by: John Crispin err = register_netdev(dev); if (err) -@@ -735,31 +961,22 @@ ltq_etop_remove(struct platform_device * +@@ -734,31 +963,22 @@ ltq_etop_remove(struct platform_device * return 0; } diff --git a/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index b06c5ab47ce..3e349d4c32c 100644 --- a/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -203,7 +203,7 @@ Signed-off-by: John Crispin +early_param("ethaddr", setup_ethaddr); --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c -@@ -763,7 +763,11 @@ ltq_etop_init(struct net_device *dev) +@@ -766,7 +766,11 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; diff --git a/target/linux/lantiq/patches-6.6/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-6.6/0701-NET-lantiq-etop-of-mido.patch index 19c027b9f85..d80cdb08723 100644 --- a/target/linux/lantiq/patches-6.6/0701-NET-lantiq-etop-of-mido.patch +++ b/target/linux/lantiq/patches-6.6/0701-NET-lantiq-etop-of-mido.patch @@ -18,7 +18,7 @@ Signed-off-by: Johann Neuhauser #include -@@ -558,7 +559,8 @@ static int +@@ -561,7 +562,8 @@ static int ltq_etop_mdio_init(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -28,7 +28,7 @@ Signed-off-by: Johann Neuhauser priv->mii_bus = mdiobus_alloc(); if (!priv->mii_bus) { -@@ -578,7 +580,15 @@ ltq_etop_mdio_init(struct net_device *de +@@ -581,7 +583,15 @@ ltq_etop_mdio_init(struct net_device *de priv->mii_bus->name = "ltq_mii"; snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", priv->pdev->name, priv->pdev->id); diff --git a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts new file mode 100644 index 00000000000..dd07def3033 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include +#include +#include "mt7981.dtsi" + +/ { + model = "ABT ASR3000"; + compatible = "abt,asr3000", "mediatek,mt7981"; + + aliases { + led-boot = &mesh_led; + led-failsafe = &mesh_led; + led-upgrade = &mesh_led; + label-mac-device = &gmac1; + serial0 = &uart0; + }; + + chosen { + rootdisk = <&ubi_rootdisk>; + stdout-path = "serial0:115200n8"; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x10000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + button-mesh { + label = "mesh"; + linux,code = ; + linux,input-type = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led-0 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&pio 4 GPIO_ACTIVE_LOW>; + }; + + led-1 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + mesh_led: led-2 { + label = "green:mesh"; + gpios = <&pio 15 GPIO_ACTIVE_HIGH>; + }; + + led-3 { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&pio 34 GPIO_ACTIVE_LOW>; + }; + + led-4 { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + gpios = <&pio 35 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_art_0 0>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + + nvmem-cells = <&macaddr_art_0 0>; + nvmem-cell-names = "mac-address"; + }; +}; + +&mdio_bus { + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand: flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x0 0x100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "art"; + reg = <0x180000 0x100000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + compatible = "mac-base"; + reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@280000 { + label = "factory"; + reg = <0x280000 0x100000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + + partition@380000 { + label = "fip"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + compatible = "linux,ubi"; + label = "ubi"; + reg = <0x580000 0x7a80000>; + + volumes { + ubi_rootdisk: ubi-volume-fit { + volname = "fit"; + }; + }; + }; + }; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan3"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@2 { + reg = <2>; + label = "lan1"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 16d8617c54e..82f61dd5d9b 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -6,6 +6,11 @@ board=$(board_name) board_config_update case $board in +abt,asr3000) + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan-2ghz" "phy0-ap0" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan-5ghz" "phy1-ap0" + ;; confiabits,mt7981) ucidef_set_led_netdev "lan1" "lan1" "blue:lan-1" "lan1" "link tx rx" ucidef_set_led_netdev "lan2" "lan2" "blue:lan-2" "lan2" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index c9c8a87f54b..8246a3b0041 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -11,6 +11,13 @@ mediatek_setup_interfaces() acelink,ew-7886cax) ucidef_set_interface_lan "eth0" "dhcp" ;; + abt,asr3000|\ + cmcc,rax3000m|\ + h3c,magic-nx30-pro|\ + nokia,ea0326gmp|\ + zbtlink,zbt-z8103ax) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 + ;; acer,predator-w6) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 game" eth1 ;; @@ -46,12 +53,6 @@ mediatek_setup_interfaces() bananapi,bpi-r4-poe) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2" ;; - cmcc,rax3000m|\ - h3c,magic-nx30-pro|\ - nokia,ea0326gmp|\ - zbtlink,zbt-z8103ax) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 - ;; comfast,cf-e393ax) ucidef_set_interfaces_lan_wan "lan1" eth1 ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 98b1023e3ee..a16f5e7eb45 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -10,6 +10,13 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in + abt,asr3000) + # Originally, phy1 is phy0 mac with LA bit set. However, this would conflict + # addresses on multiple VIFs with the other radio. Use label mac to set LA bit. + addr=$(cat /sys/class/net/eth1/address) + [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_setbit_la $addr > /sys${DEVPATH}/macaddress + ;; acer,predator-w6) key_path="/var/qcidata/data" [ "$PHYNBR" = "0" ] && cat $key_path/2gMAC > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 3b1b2f7fa69..4005154db23 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -64,6 +64,22 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + abt,asr3000|\ + bananapi,bpi-r3|\ + bananapi,bpi-r3-mini|\ + bananapi,bpi-r4|\ + bananapi,bpi-r4-poe|\ + cmcc,rax3000m|\ + jdcloud,re-cp-03|\ + mediatek,mt7988a-rfb|\ + nokia,ea0326gmp|\ + openwrt,one|\ + tplink,tl-xdr4288|\ + tplink,tl-xdr6086|\ + tplink,tl-xdr6088|\ + xiaomi,redmi-router-ax6000-ubootmod) + fit_do_upgrade "$1" + ;; acer,predator-w6|\ smartrg,sdg-8612|\ smartrg,sdg-8614|\ @@ -82,21 +98,6 @@ platform_do_upgrade() { CI_KERNPART="linux" nand_do_upgrade "$1" ;; - bananapi,bpi-r3|\ - bananapi,bpi-r3-mini|\ - bananapi,bpi-r4|\ - bananapi,bpi-r4-poe|\ - cmcc,rax3000m|\ - jdcloud,re-cp-03|\ - mediatek,mt7988a-rfb|\ - nokia,ea0326gmp|\ - openwrt,one|\ - tplink,tl-xdr4288|\ - tplink,tl-xdr6086|\ - tplink,tl-xdr6088|\ - xiaomi,redmi-router-ax6000-ubootmod) - fit_do_upgrade "$1" - ;; cudy,re3000-v1|\ cudy,wr3000-v1|\ yuncore,ax835) diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 94b3098b3d1..74eaf06ea95 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -105,6 +105,30 @@ define Build/cetron-header rm $@.tmp endef +define Device/abt_asr3000 + DEVICE_VENDOR := ABT + DEVICE_MODEL := ASR3000 + DEVICE_DTS := mt7981b-abt-asr3000 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGES := sysupgrade.itb + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + ARTIFACTS := preloader.bin bl31-uboot.fip + ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 + ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot abt_asr3000 +endef +TARGET_DEVICES += abt_asr3000 + define Device/acelink_ew-7886cax DEVICE_VENDOR := Acelink DEVICE_MODEL := EW-7886CAX @@ -444,7 +468,7 @@ endef TARGET_DEVICES += cmcc_rax3000m define Device/comfast_cf-e393ax - DEVICE_VENDOR := Comfast + DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E393AX DEVICE_DTS := mt7981a-comfast-cf-e393ax DEVICE_DTS_DIR := ../dts diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3-a2.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3-a2.dts new file mode 100644 index 00000000000..1a12005c923 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3-a2.dts @@ -0,0 +1,201 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7620a.dtsi" +#include +#include +#include + +/ { + compatible = "wavlink,wl-wn531g3", "ralink,mt7620a-soc"; + model = "Wavlink WL-WN531G3"; + + aliases { + led-boot = &led_status_blue; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_red; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + turbo { + label = "turbo"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + touchlink { + label = "touchlink"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_blue: led_status_blue { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: led_status_red { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins>, <&rgmii2_pins>, <&mdio_pins>; + + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; + + mediatek,portmap = "llllw"; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; + + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; + }; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_radio_8000>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gsw { + mediatek,port4-gmac; +}; + +&wmac { + nvmem-cells = <&eeprom_radio_0>; + nvmem-cell-names = "eeprom"; +}; + +&state_default { + gpio { + groups = "i2c", "uartf"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3510.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3510.dts new file mode 100644 index 00000000000..5a647d75e82 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3510.dts @@ -0,0 +1,247 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "keenetic,kn-3510", "mediatek,mt7621-soc"; + model = "Keenetic KN-3510"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_green; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + function = LED_FUNCTION_WPS; + color = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_status_green: led-1 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + fn1 { + label = "fn1"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&firmware1 &storage1 &firmware2 &storage2>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x0>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "uart3", "jtag"; + function = "gpio"; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "u-config"; + reg = <0x80000 0x80000>; + read-only; + }; + + partition@100000 { + label = "rf-eeprom"; + reg = <0x100000 0x80000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_a: macaddr@a { + reg = <0xa 0x6>; + }; + + precal_factory_e10: precal@e10 { + reg = <0xe10 0x19c10>; + }; + }; + }; + + firmware1: partition@180000 { + label = "firmware_1"; + reg = <0x180000 0x1a40000>; + }; + + partition@1bc0000 { + label = "config_1"; + reg = <0x1bc0000 0x20000>; + read-only; + }; + + partition@1dc0000 { + label = "storage_legacy"; + reg = <0x1dc0000 0x20000>; + read-only; + }; + + partition@1fc0000 { + label = "dump"; + reg = <0x1fc0000 0x40000>; + read-only; + }; + + storage1: partition@2000000 { + label = "storage_a"; + reg = <0x2000000 0x1fc0000>; + }; + + partition@3fc0000 { + label = "u-state"; + reg = <0x3fc0000 0x80000>; + read-only; + }; + + partition@4040000 { + label = "u-config_res"; + reg = <0x4040000 0x80000>; + read-only; + }; + + partition@40c0000 { + label = "rf-eeprom_res"; + reg = <0x40c0000 0x80000>; + read-only; + }; + + firmware2: partition@4140000 { + label = "firmware_2"; + reg = <0x4140000 0x1a40000>; + }; + + partition@5b80000 { + label = "config_2"; + reg = <0x5d00000 0x20000>; + read-only; + }; + + storage2: partition@5d80000 { + label = "storage_b"; + reg = <0x5d80000 0x2200000>; + }; + }; +}; + +ðphy0 { + /delete-property/ interrupts; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_a>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@3 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>; + nvmem-cell-names = "eeprom", "precal"; + mediatek,disable-radar-background; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax214v2.dts b/target/linux/ramips/dts/mt7621_netgear_wax214v2.dts new file mode 100644 index 00000000000..a9597119fa0 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_netgear_wax214v2.dts @@ -0,0 +1,228 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "netgear,wax214v2", "mediatek,mt7621-soc"; + model = "Netgear WAX214v2"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_amber; + led-running = &led_power_green; + led-upgrade = &led_power_blue; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_green { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_power_blue: power_blue { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_power_amber: power_amber { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + wifin_green { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + + wifia_green { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + }; + + partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + precal_factory_e10: precal@e10 { + reg = <0xe10 0x19c10>; + }; + }; + }; + + partition@180000 { + label = "firmware"; + reg = <0x180000 0x2600000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x2200000>; + }; + }; + + partition@2780000 { + label = "firmware_backup"; + reg = <0x2780000 0x2600000>; + read-only; + }; + + partition@4d80000 { + label = "CFG"; + reg = <0x4d80000 0x800000>; + read-only; + }; + + partition@5580000 { + label = "RAE"; + reg = <0x5580000 0x400000>; + read-only; + }; + + partition@5980000 { + label = "POT"; + reg = <0x5980000 0x100000>; + read-only; + }; + + partition@5a80000 { + label = "Language"; + reg = <0x5a80000 0x400000>; + read-only; + }; + + partition@5e80000 { + label = "Traffic"; + reg = <0x5e80000 0x200000>; + read-only; + }; + + partition@6080000 { + label = "Cert"; + reg = <0x6080000 0x100000>; + read-only; + }; + + partition@6180000 { + label = "NTGRcryptK"; + reg = <0x6180000 0x100000>; + read-only; + }; + + partition@6280000 { + label = "NTGRcryptD"; + reg = <0x6280000 0x500000>; + read-only; + }; + + partition@6780000 { + label = "LOG"; + reg = <0x6780000 0x100000>; + read-only; + }; + + partition@6880000 { + label = "User_data"; + reg = <0x6880000 0x640000>; + read-only; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>; + nvmem-cell-names = "eeprom", "precal"; + }; +}; + +&state_default { + gpio { + groups = "uart3", "uart2", "jtag"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index da1c3e69e6a..51811a86ea0 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1220,7 +1220,7 @@ define Device/tplink_archer-c2-v1 DEVICE_MODEL := Archer C2 DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci \ - kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b + kmod-usb-ledtrig-usbport kmod-switch-rtl8367b endef TARGET_DEVICES += tplink_archer-c2-v1 @@ -1349,6 +1349,16 @@ define Device/wavlink_wl-wn531g3 endef TARGET_DEVICES += wavlink_wl-wn531g3 + +define Device/wavlink_wl-wn531g3-a2 + SOC := mt7620a + IMAGE_SIZE := 7872k + DEVICE_VENDOR := Wavlink + DEVICE_MODEL := WL-WN531G3-A2 + DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += wavlink_wl-wn531g3-a2 + define Device/wavlink_wl-wn535k1 SOC := mt7620a IMAGE_SIZE := 7360k @@ -1605,7 +1615,7 @@ define Device/zyxel_keenetic-viva DEVICE_VENDOR := ZyXEL DEVICE_MODEL := Keenetic Viva DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ - kmod-switch-rtl8366-smi kmod-switch-rtl8367b + kmod-switch-rtl8367b IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | check-size | \ zyimage -d 8997 -v "ZyXEL Keenetic Viva" diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 44672a95429..e5275bfeb7c 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -604,7 +604,7 @@ define Device/comfast_cf-e390ax $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 15808k - DEVICE_VENDOR := ComFast + DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-E390AX DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools IMAGES += factory.bin @@ -618,7 +618,7 @@ define Device/comfast_cf-ew72-v2 $(Device/dsa-migration) $(Device/uimage-lzma-loader) IMAGE_SIZE := 15808k - DEVICE_VENDOR := ComFast + DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-EW72 V2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ -uboot-envtools @@ -1650,6 +1650,19 @@ define Device/keenetic_kn-3010 endef TARGET_DEVICES += keenetic_kn-3010 +define Device/keenetic_kn-3510 + $(Device/nand) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 121088k + DEVICE_VENDOR := Keenetic + DEVICE_MODEL := KN-3510 + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ + check-size | zyimage -d 0x803510 -v "KN-3510" +endef +TARGET_DEVICES += keenetic_kn-3510 + define Device/lenovo_newifi-d1 $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -2113,6 +2126,24 @@ define Device/netgear_wax202 endef TARGET_DEVICES += netgear_wax202 +define Device/netgear_wax214v2 + $(Device/nand) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := WAX214v2 + DEVICE_PACKAGES := kmod-mt7915-firmware + NETGEAR_ENC_MODEL := WAX214v2 + NETGEAR_ENC_REGION := US + IMAGE_SIZE := 38912k + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \ + append-squashfs4-fakeroot + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \ + append-ubi | check-size | netgear-encrypted-factory +endef +TARGET_DEVICES += netgear_wax214v2 + define Device/netgear_wndr3700-v5 $(Device/dsa-migration) $(Device/netgear_sercomm_nor) diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 2ea948a5f9a..7b360c6088f 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -135,7 +135,7 @@ TARGET_DEVICES += buffalo_wcr-1166ds define Device/comfast_cf-wr617ac IMAGE_SIZE := 7872k DTS := CF-WR617AC - DEVICE_VENDOR := Comfast + DEVICE_VENDOR := COMFAST DEVICE_MODEL := CF-WR617AC DEVICE_PACKAGES := kmod-mt76x2 kmod-rt2800-pci endef diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index d23ec763272..577f77cb933 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -257,6 +257,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "5:lan:1" "4:wan" "6@eth0" ;; + wavlink,wl-wn531g3-a2) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "5:lan:1" "4:wan" "6@eth0" + ;; wavlink,wl-wn535k1) ucidef_add_switch "switch0" \ "2:lan:2" "5:lan:1" "4:wan" "6@eth0" @@ -431,6 +435,7 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1) ;; wavlink,wl-wn531g3|\ + wavlink,wl-wn531g3-a2|\ zbtlink,zbt-we1026-5g-16m) label_mac=$(mtd_get_mac_binary factory 0x4) ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 386a3bb41d8..accee97fb61 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -47,6 +47,7 @@ ramips_setup_interfaces() mikrotik,routerboard-m11g|\ netgear,eax12|\ netgear,ex6150|\ + netgear,wax214v2|\ sercomm,na502|\ sercomm,na502s|\ thunder,timecloud|\ @@ -66,6 +67,7 @@ ramips_setup_interfaces() ;; asiarf,ap7621-001|\ humax,e10|\ + keenetic,kn-3510|\ openfi,5pro|\ wavlink,ws-wn572hp3-4g|\ winstars,ws-wn583a6) @@ -325,6 +327,10 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) label_mac=$lan_mac ;; + netgear,wax214v2) + lan_mac=$(mtd_get_mac_ascii Config ethaddr) + label_mac=$lan_mac + ;; yuncore,ax820) label_mac=$(mtd_get_mac_binary Factory 0x4) ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 9350d67466a..91c17f8a778 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -126,6 +126,10 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress ;; + keenetic,kn-3510) + [ "$PHYNBR" = "1" ] && \ + macaddr_setbit_la "$(mtd_get_mac_binary rf-eeprom 0x4)" > /sys${DEVPATH}/macaddress + ;; linksys,e5600|\ linksys,ea6350-v4|\ linksys,ea7300-v1|\ @@ -153,6 +157,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress ;; + netgear,wax214v2) + hw_mac_addr=$(mtd_get_mac_ascii Config ethaddr) + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress + ;; mercusys,mr70x-v1|\ tplink,archer-ax23-v1) hw_mac_addr="$(mtd_get_mac_binary config 0x8)" diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 32dad729446..bad7e30ca65 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -100,6 +100,7 @@ platform_do_upgrade() { iptime,ax2004m|\ iptime,t5004|\ jcg,q20|\ + keenetic,kn-3510|\ linksys,e5600|\ linksys,e7350|\ linksys,ea6350-v4|\ @@ -122,6 +123,7 @@ platform_do_upgrade() { netgear,wac104|\ netgear,wac124|\ netgear,wax202|\ + netgear,wax214v2|\ netis,wf2881|\ raisecom,msg1500-x-00|\ rostelecom,rt-fe-1a|\ diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 3f1e6934d10..2405c07d9c1 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -111,7 +111,7 @@ define Device/radxa_e25 DEVICE_DTS := rockchip/rk3568-radxa-e25 BOOT_SCRIPT := radxa-e25 UBOOT_DEVICE_NAME := radxa-e25-rk3568 - DEVICE_PACKAGES := kmod-r8169 kmod-ata-ahci-platform + DEVICE_PACKAGES := kmod-r8169 kmod-ata-ahci-dwc endef TARGET_DEVICES += radxa_e25 diff --git a/target/linux/sunxi/patches-6.6/451-sunxi-add-csi-video-support-for-nanopi-neo-air.patch b/target/linux/sunxi/patches-6.6/451-sunxi-add-csi-video-support-for-nanopi-neo-air.patch new file mode 100644 index 00000000000..c17d28c691d --- /dev/null +++ b/target/linux/sunxi/patches-6.6/451-sunxi-add-csi-video-support-for-nanopi-neo-air.patch @@ -0,0 +1,107 @@ +From 4c3a3af679bd59660ac80889b560bddaf475ba81 Mon Sep 17 00:00:00 2001 +From: Michel Promonet +Date: Sun, 21 Jul 2024 19:04:19 +0200 +Subject: [PATCH] sunxi: add csi video support for nanopi-neo-air + +--- + .../dts/allwinner/sun8i-h3-nanopi-neo-air.dts | 85 +++++++++++++++++++ + 1 file changed, 85 insertions(+) + +--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts ++++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts +@@ -77,6 +77,39 @@ + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; ++ ++ cam_xclk: cam-xclk { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <24000000>; ++ clock-output-names = "cam-xclk"; ++ }; ++ ++ reg_cam_avdd: cam-avdd { ++ compatible = "regulator-fixed"; ++ regulator-name = "cam-avdd"; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ vin-supply = <®_vcc3v3>; ++ }; ++ ++ reg_cam_dovdd: cam-dovdd { ++ compatible = "regulator-fixed"; ++ regulator-name = "cam-dovdd"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <®_vcc3v3>; ++ }; ++ ++ reg_cam_dvdd: cam-dvdd { ++ compatible = "regulator-fixed"; ++ regulator-name = "cam-dvdd"; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ vin-supply = <®_vcc3v3>; ++ }; ++ ++ + }; + + &mmc0 { +@@ -141,3 +174,55 @@ + /* USB VBUS is always on */ + status = "okay"; + }; ++ ++&csi { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* Parallel bus endpoint */ ++ csi_from_ov5640: endpoint { ++ remote-endpoint = <&ov5640_to_csi>; ++ bus-width = <8>; ++ data-shift = <2>; ++ hsync-active = <1>; /* Active high */ ++ vsync-active = <0>; /* Active low */ ++ data-active = <1>; /* Active high */ ++ pclk-sample = <1>; /* Rising */ ++ }; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++ ++ ov5640: camera@3c { ++ compatible = "ovti,ov5640"; ++ reg = <0x3c>; ++ clocks = <&cam_xclk>; ++ clock-names = "xclk"; ++ ++ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; ++ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; ++ AVDD-supply = <®_cam_avdd>; ++ DOVDD-supply = <®_cam_dovdd>; ++ DVDD-supply = <®_cam_dvdd>; ++ ++ port { ++ ov5640_to_csi: endpoint { ++ remote-endpoint = <&csi_from_ov5640>; ++ bus-width = <8>; ++ data-shift = <2>; ++ hsync-active = <1>; /* Active high */ ++ vsync-active = <0>; /* Active low */ ++ data-active = <1>; /* Active high */ ++ pclk-sample = <1>; /* Rising */ ++ }; ++ }; ++ }; ++}; ++&i2c2_pins { ++ bias-pull-up; ++};