diff --git a/include/kernel-6.1 b/include/kernel-6.1 index dcdebfc6cb..ebec105b22 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/include/kernel-6.6 b/include/kernel-6.6 index a736da59cb..24fff19d3b 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .40 -LINUX_KERNEL_HASH-6.6.40 = 5c3a3c03c055b8d601a6d7f80d1465ada6b83a12299f6ace2027b47f0baff538 +LINUX_VERSION-6.6 = .41 +LINUX_KERNEL_HASH-6.6.41 = 9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh index ae7a5c9598..871a49ed6e 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/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index 0a6fd8432d..e868ba9537 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -57,11 +57,11 @@ nand_find_ubi() { } nand_get_magic_long() { - (${3}cat "$1" | dd bs=4 "skip=${2:-0}" count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null + ($2 < "$1" | dd bs=4 "skip=${3:-0}" count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null } get_magic_long_tar() { - (tar xO${3}f "$1" "$2" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null + ($2 < "$1" | tar xOf - "$3" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null } identify() { @@ -73,7 +73,7 @@ identify_tar() { } identify_if_gzip() { - if [ "$(identify "$1")" = gzip ]; then echo -n z; fi + if [ "$(identify "$1" "cat")" = gzip ]; then echo -n z; fi } nand_restore_config() { @@ -259,64 +259,64 @@ nand_upgrade_prepare_ubi() { # Write the UBI image to MTD ubi partition nand_upgrade_ubinized() { local ubi_file="$1" - local gz="$2" + local cmd="$2" - local ubi_length=$( (${gz}cat "$ubi_file" | wc -c) 2> /dev/null) + local ubi_length=$( ($cmd < "$ubi_file" | wc -c) 2> /dev/null) nand_detach_ubi "$CI_UBIPART" || return 1 local mtdnum="$( find_mtd_index "$CI_UBIPART" )" - ${gz}cat "$ubi_file" | ubiformat "/dev/mtd$mtdnum" -S "$ubi_length" -y -f - && ubiattach -m "$mtdnum" + $cmd < "$ubi_file" | ubiformat "/dev/mtd$mtdnum" -S "$ubi_length" -y -f - && ubiattach -m "$mtdnum" } # Write the UBIFS image to UBI rootfs volume nand_upgrade_ubifs() { local ubifs_file="$1" - local gz="$2" + local cmd="$2" - local ubifs_length=$( (${gz}cat "$ubifs_file" | wc -c) 2> /dev/null) + local ubifs_length=$( ($cmd < "$ubifs_file" | wc -c) 2> /dev/null) nand_upgrade_prepare_ubi "$ubifs_length" "ubifs" "" "" || return 1 local ubidev="$( nand_find_ubi "$CI_UBIPART" )" local root_ubivol="$(nand_find_volume $ubidev "$CI_ROOTPART")" - ${gz}cat "$ubifs_file" | ubiupdatevol /dev/$root_ubivol -s "$ubifs_length" - + $cmd < "$ubifs_file" | ubiupdatevol /dev/$root_ubivol -s "$ubifs_length" - } # Write the FIT image to UBI kernel volume nand_upgrade_fit() { local fit_file="$1" - local gz="$2" + local cmd="$2" - local fit_length=$( (${gz}cat "$fit_file" | wc -c) 2> /dev/null) + local fit_length=$( ($cmd < "$fit_file" | wc -c) 2> /dev/null) nand_upgrade_prepare_ubi "" "" "$fit_length" "1" || return 1 local fit_ubidev="$(nand_find_ubi "$CI_UBIPART")" local fit_ubivol="$(nand_find_volume $fit_ubidev "$CI_KERNPART")" - ${gz}cat "$fit_file" | ubiupdatevol /dev/$fit_ubivol -s "$fit_length" - + $cmd < "$fit_file" | ubiupdatevol /dev/$fit_ubivol -s "$fit_length" - } # Write images in the TAR file to MTD partitions and/or UBI volumes as required nand_upgrade_tar() { local tar_file="$1" - local gz="$2" + local cmd="$2" local jffs2_markers="${CI_JFFS2_CLEAN_MARKERS:-0}" # WARNING: This fails if tar contains more than one 'sysupgrade-*' directory. - local board_dir="$(tar t${gz}f "$tar_file" | grep -m 1 '^sysupgrade-.*/$')" + local board_dir="$($cmd < "$tar_file" | tar tf - | grep -m 1 '^sysupgrade-.*/$')" board_dir="${board_dir%/}" local kernel_mtd kernel_length if [ "$CI_KERNPART" != "none" ]; then kernel_mtd="$(find_mtd_index "$CI_KERNPART")" - kernel_length=$( (tar xO${gz}f "$tar_file" "$board_dir/kernel" | wc -c) 2> /dev/null) + kernel_length=$( ($cmd < "$tar_file" | tar xOf - "$board_dir/kernel" | wc -c) 2> /dev/null) [ "$kernel_length" = 0 ] && kernel_length= fi - local rootfs_length=$( (tar xO${gz}f "$tar_file" "$board_dir/root" | wc -c) 2> /dev/null) + local rootfs_length=$( ($cmd < "$tar_file" | tar xOf - "$board_dir/root" | wc -c) 2> /dev/null) [ "$rootfs_length" = 0 ] && rootfs_length= local rootfs_type - [ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$board_dir/root" "$gz")" + [ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$cmd" "$board_dir/root")" local ubi_kernel_length if [ "$kernel_length" ]; then @@ -337,23 +337,23 @@ nand_upgrade_tar() { if [ "$rootfs_length" ]; then local ubidev="$( nand_find_ubi "${CI_ROOT_UBIPART:-$CI_UBIPART}" )" local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )" - tar xO${gz}f "$tar_file" "$board_dir/root" | \ + $cmd < "$tar_file" | tar xOf - "$board_dir/root" | \ ubiupdatevol /dev/$root_ubivol -s "$rootfs_length" - fi if [ "$kernel_length" ]; then if [ "$kernel_mtd" ]; then if [ "$jffs2_markers" = 1 ]; then flash_erase -j "/dev/mtd${kernel_mtd}" 0 0 - tar xO${gz}f "$tar_file" "$board_dir/kernel" | \ + $cmd < "$tar_file" | tar xOf - "$board_dir/kernel" | \ nandwrite "/dev/mtd${kernel_mtd}" - else - tar xO${gz}f "$tar_file" "$board_dir/kernel" | \ + $cmd < "$tar_file" | tar xOf - "$board_dir/kernel" | \ mtd write - "$CI_KERNPART" fi else local ubidev="$( nand_find_ubi "${CI_KERN_UBIPART:-$CI_UBIPART}" )" local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )" - tar xO${gz}f "$tar_file" "$board_dir/kernel" | \ + $cmd < "$tar_file" | tar xOf - "$board_dir/kernel" | \ ubiupdatevol /dev/$kern_ubivol -s "$kernel_length" - fi fi @@ -363,9 +363,9 @@ nand_upgrade_tar() { nand_verify_if_gzip_file() { local file="$1" - local gz="$2" + local cmd="$2" - if [ "$gz" = z ]; then + if [ "$cmd" = zcat ]; then echo "verifying compressed sysupgrade file integrity" if ! gzip -t "$file"; then echo "corrupted compressed sysupgrade file" @@ -376,10 +376,10 @@ nand_verify_if_gzip_file() { nand_verify_tar_file() { local file="$1" - local gz="$2" + local cmd="$2" echo "verifying sysupgrade tar file integrity" - if ! tar xO${gz}f "$file" > /dev/null; then + if ! $cmd < "$file" | tar xOf - > /dev/null; then echo "corrupted sysupgrade tar file" return 1 fi @@ -388,27 +388,27 @@ nand_verify_tar_file() { nand_do_flash_file() { local file="$1" - local gz="$(identify_if_gzip "$file")" - local file_type="$(identify "$file" "" "$gz")" + local cmd="$(identify_if_gzip "$file")cat" + local file_type="$(identify "$file" "$cmd" "")" [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART=rootfs case "$file_type" in "fit") - nand_verify_if_gzip_file "$file" "$gz" || return 1 - nand_upgrade_fit "$file" "$gz" + nand_verify_if_gzip_file "$file" "$cmd" || return 1 + nand_upgrade_fit "$file" "$cmd" ;; "ubi") - nand_verify_if_gzip_file "$file" "$gz" || return 1 - nand_upgrade_ubinized "$file" "$gz" + nand_verify_if_gzip_file "$file" "$cmd" || return 1 + nand_upgrade_ubinized "$file" "$cmd" ;; "ubifs") - nand_verify_if_gzip_file "$file" "$gz" || return 1 - nand_upgrade_ubifs "$file" "$gz" + nand_verify_if_gzip_file "$file" "$cmd" || return 1 + nand_upgrade_ubifs "$file" "$cmd" ;; *) - nand_verify_tar_file "$file" "$gz" || return 1 - nand_upgrade_tar "$file" "$gz" + nand_verify_tar_file "$file" "$cmd" || return 1 + nand_upgrade_tar "$file" "$cmd" ;; esac } @@ -419,6 +419,16 @@ nand_do_restore_config() { } # Recognize type of passed file and start the upgrade process +# +# Supported firmware containers: +# 1. Raw file +# 2. Gzip +# +# Supported data formats: +# 1. Tar with kernel/rootfs +# 2. UBI image (built using "ubinized") +# 3. UBIFS image (to update UBI volume with) +# 4. FIT image (to update UBI volume with) nand_do_upgrade() { local file="$1" @@ -460,18 +470,18 @@ nand_do_platform_check() { local board_name="$1" local file="$2" - local gz="$(identify_if_gzip "$file")" - local file_type="$(identify "$file" "" "$gz")" - local control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//,/_}/CONTROL" | wc -c) 2> /dev/null) + local cmd="$(identify_if_gzip "$file")cat" + local file_type="$(identify "$file" "$cmd" "")" + local control_length=$( ($cmd < "$file" | tar xOf - "sysupgrade-${board_name//,/_}/CONTROL" | wc -c) 2> /dev/null) if [ "$control_length" = 0 ]; then - control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//_/,}/CONTROL" | wc -c) 2> /dev/null) + control_length=$( ($cmd < "$file" | tar xOf - "sysupgrade-${board_name//_/,}/CONTROL" | wc -c) 2> /dev/null) fi if [ "$control_length" != 0 ]; then - nand_verify_tar_file "$file" "$gz" || return 1 + nand_verify_tar_file "$file" "$cmd" || return 1 else - nand_verify_if_gzip_file "$file" "$gz" || return 1 + nand_verify_if_gzip_file "$file" "$cmd" || return 1 if [ "$file_type" != "fit" -a "$file_type" != "ubi" -a "$file_type" != "ubifs" ]; then echo "invalid sysupgrade file" return 1 diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 099aebcfa2..55fcec2661 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 940b63a0ae..d2aa1a4937 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -85,6 +85,9 @@ zbtlink,zbt-z8103ax) comfast,cf-e393ax) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000" ;; +dlink,aquila-pro-ai-m30-a1) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" + ;; glinet,gl-mt2500|\ glinet,gl-mt6000) local envdev=$(find_mmc_part "u-boot-env") @@ -93,9 +96,6 @@ glinet,gl-mt6000) glinet,gl-mt3000) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000" ;; -dlink,aquila-pro-ai-m30-a1) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" - ;; imou,lc-hx3001-ubootmod) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000" "1" ;; diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 4410d25492..49a6b1ba1b 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -148,6 +148,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/patches/455-add-abt_asr3000.patch b/package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch similarity index 99% rename from package/boot/uboot-mediatek/patches/455-add-abt_asr3000.patch rename to package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch index 3bbbc9d0e6..e64f5c12b1 100644 --- a/package/boot/uboot-mediatek/patches/455-add-abt_asr3000.patch +++ b/package/boot/uboot-mediatek/patches/444-add-abt_asr3000.patch @@ -267,7 +267,7 @@ + + partition@380000 { + label = "fip"; -+ reg = <0x380000 0x0200000>; ++ reg = <0x380000 0x200000>; + }; + + partition@580000 { 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 0000000000..777edb0e75 --- /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 0000000000..6b2361ec10 --- /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 0000000000..4c50521fbe --- /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 0fa6011cfc..99d6e35376 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 b6477b19d6..7518080a80 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 b05fb4bb63..a5718d9d5b 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 953d9c26c3..13805aa81b 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -873,6 +873,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/kernel/mac80211/patches/build/005-fix-kconf-warnings.patch b/package/kernel/mac80211/patches/build/005-fix-kconf-warnings.patch new file mode 100644 index 0000000000..00e94003f2 --- /dev/null +++ b/package/kernel/mac80211/patches/build/005-fix-kconf-warnings.patch @@ -0,0 +1,76 @@ +--- a/kconf/conf.c ++++ b/kconf/conf.c +@@ -86,7 +86,7 @@ static int conf_askvalue(struct symbol * + enum symbol_type type = sym_get_type(sym); + + if (!sym_has_value(sym)) +- printf(_("(NEW) ")); ++ printf("%s", _("(NEW) ")); + + line[0] = '\n'; + line[1] = 0; +@@ -282,7 +282,7 @@ static int conf_choice(struct menu *menu + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) +- printf(_(" (NEW)")); ++ printf("%s", _(" (NEW)")); + printf("\n"); + } + printf(_("%*schoice"), indent - 1, ""); +@@ -437,7 +437,7 @@ static void check_conf(struct menu *menu + } + } else { + if (!conf_cnt++) +- printf(_("*\n* Restart config...\n*\n")); ++ printf("%s", _("*\n* Restart config...\n*\n")); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } +@@ -614,7 +614,7 @@ int main(int ac, char **av) + name = getenv("KCONFIG_NOSILENTUPDATE"); + if (name && *name) { + fprintf(stderr, +- _("\n*** The configuration requires explicit update.\n\n")); ++ "%s", _("\n*** The configuration requires explicit update.\n\n")); + return 1; + } + } +@@ -666,22 +666,22 @@ int main(int ac, char **av) + * All other commands are only used to generate a config. + */ + if (conf_get_changed() && conf_write(NULL)) { +- fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); ++ fprintf(stderr, "%s", _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + if (conf_write_autoconf()) { +- fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); ++ fprintf(stderr, "%s", _("\n*** Error during update of the configuration.\n\n")); + return 1; + } + } else if (input_mode == savedefconfig) { + if (conf_write_defconfig(defconfig_file)) { +- fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), ++ fprintf(stderr, _("\n*** Error while saving defconfig to: %s\n\n"), + defconfig_file); + return 1; + } + } else if (input_mode != listnewconfig) { + if (conf_write(NULL)) { +- fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); ++ fprintf(stderr, "%s", _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + } +--- a/kconf/Makefile ++++ b/kconf/Makefile +@@ -17,7 +17,7 @@ clean: + zconf.tab.c: zconf.lex.c + + %.tab.c: %.y +- $(YACC) -o$@ -t -l $< ++ $(YACC) -Wno-yacc -o$@ -t -l $< + + %.lex.c: %.l + $(LEX) -o$@ -L $< diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile index 3b732e37bb..a6fe9831d7 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 0000000000..2f2e6e2331 --- /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 7905d6e496..ccb296a62a 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 076a785cbf..c61c48b00e 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 e22a243c80..05a5719f39 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 6feaba49e7..12fb6937c7 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1807,6 +1807,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 e7d7683973..9dc7c0f817 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 13926e9b1e..04aa348b1f 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 df672946d8..acc2379611 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 73baf3312b..a5352c6c48 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 957ed42407..1e5bb6059d 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 01400fd490..9eec0bc48f 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 454d3bf0ed..84ee69b815 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 8f996eab34..b20c500e7c 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 711ce229b2..df4a02b8c5 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 e1791e5c83..1b4a3f3ef3 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 94cd23c18a..77d2af7269 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 6fa7b6382d..40ce320b6e 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 b9341666f9..13712d76c6 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 53628cd4e4..50f3504132 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 32990148c8..1b77992a2b 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 eac202b882..e6f4be261c 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 46b30a2ed9..b39626f6e7 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 eeb407e9bb..a1ebd53d07 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 59b2f9fa2c..3b4654822a 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 f9532f39c3..990ce8ecf1 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 28d8bba194..4ebf229695 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 b62a0e18da..6803397d60 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 be293e6f2a..547122ae48 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 7d80ad37f1..1ed7c43332 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 bd5ceaabf7..65b8878310 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 2093fac8a1..59175c8051 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 db2d8c1b46..1f39dfea2f 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 65aa37f834..c2968f2c67 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 1881332340..9a19dc4452 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 89872bec2e..07e44d7b21 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 1bf3ba35b6..400004c617 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 514b5f2de5..510f3dd841 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 aa0bbaa0c5..ccdcc09736 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/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch b/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch index 39be82d4bf..36d15248b8 100644 --- a/target/linux/generic/backport-6.6/816-v6.7-0004-Revert-nvmem-add-new-config-option.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -941,7 +941,7 @@ struct nvmem_device *nvmem_register(cons +@@ -940,7 +940,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.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch b/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch index 59175c8051..7ca426e87a 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -847,14 +847,6 @@ static int nvmem_add_cells_from_layout(s +@@ -846,14 +846,6 @@ static int nvmem_add_cells_from_layout(s } #if IS_ENABLED(CONFIG_OF) diff --git a/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch b/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch index 1f39dfea2f..dac691e117 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -816,7 +816,7 @@ static int nvmem_add_cells_from_layout(s +@@ -815,7 +815,7 @@ static int nvmem_add_cells_from_layout(s int ret; if (layout && layout->add_cells) { diff --git a/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch b/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch index d2c274033e..0a614fc13d 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -675,7 +675,6 @@ static int nvmem_validate_keepouts(struc +@@ -674,7 +674,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; -@@ -705,8 +704,8 @@ static int nvmem_add_cells_from_dt(struc +@@ -704,8 +703,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); -@@ -895,6 +894,7 @@ struct nvmem_device *nvmem_register(cons +@@ -894,6 +893,7 @@ struct nvmem_device *nvmem_register(cons kref_init(&nvmem->refcnt); INIT_LIST_HEAD(&nvmem->cells); diff --git a/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch b/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch index ce33b52328..1a41050d08 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch +++ b/target/linux/generic/backport-6.6/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) { -@@ -740,97 +737,22 @@ static int nvmem_add_cells_from_fixed_la +@@ -739,97 +736,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) { -@@ -838,7 +760,7 @@ const void *nvmem_layout_get_match_data( +@@ -837,7 +759,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; } -@@ -950,19 +872,6 @@ struct nvmem_device *nvmem_register(cons +@@ -949,19 +871,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) -@@ -983,24 +892,24 @@ struct nvmem_device *nvmem_register(cons +@@ -982,24 +891,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: -@@ -1022,7 +931,7 @@ static void nvmem_device_release(struct +@@ -1021,7 +930,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); } -@@ -1324,6 +1233,12 @@ nvmem_cell_get_from_lookup(struct device +@@ -1323,6 +1232,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) -@@ -1342,6 +1257,18 @@ nvmem_find_cell_entry_by_node(struct nvm +@@ -1341,6 +1256,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 * -@@ -1404,16 +1331,29 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1403,16 +1330,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; } -@@ -1527,6 +1467,7 @@ void nvmem_cell_put(struct nvmem_cell *c +@@ -1526,6 +1466,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); -@@ -2104,11 +2045,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); +@@ -2103,11 +2044,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name); static int __init nvmem_init(void) { diff --git a/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch b/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch index 4a1f9aefc8..8442636b09 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch +++ b/target/linux/generic/backport-6.6/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", -@@ -380,6 +427,68 @@ static void nvmem_sysfs_remove_compat(st +@@ -379,6 +426,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, -@@ -739,11 +848,25 @@ static int nvmem_add_cells_from_fixed_la +@@ -738,11 +847,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); -@@ -902,10 +1025,20 @@ struct nvmem_device *nvmem_register(cons +@@ -901,10 +1024,20 @@ struct nvmem_device *nvmem_register(cons if (rval) goto err_remove_dev; diff --git a/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch b/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch index 400004c617..a95770a059 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -854,7 +854,7 @@ int nvmem_layout_register(struct nvmem_l +@@ -853,7 +853,7 @@ int nvmem_layout_register(struct nvmem_l return -EINVAL; /* Populate the cells */ diff --git a/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch b/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch index 510f3dd841..291854bcb5 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -876,19 +876,6 @@ void nvmem_layout_unregister(struct nvme +@@ -875,19 +875,6 @@ void nvmem_layout_unregister(struct nvme } EXPORT_SYMBOL_GPL(nvmem_layout_unregister); diff --git a/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch b/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch index ccdcc09736..93fd1ce6ad 100644 --- a/target/linux/generic/backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch +++ b/target/linux/generic/backport-6.6/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 -@@ -2163,6 +2163,19 @@ const char *nvmem_dev_name(struct nvmem_ +@@ -2162,6 +2162,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 105eb3da4b..0a73146d02 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/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch index eda0f45b72..559d403242 100644 --- a/target/linux/generic/hack-6.6/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch @@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau if (!pe) --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -4447,6 +4447,8 @@ static const struct seq_operations vmall +@@ -4455,6 +4455,8 @@ static const struct seq_operations vmall static int __init proc_vmalloc_init(void) { diff --git a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch index 8fdaab5ad6..4d2ea46212 100644 --- a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-6.6/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 -@@ -4487,6 +4487,7 @@ int wake_up_state(struct task_struct *p, +@@ -4486,6 +4486,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 9bb94a28b5..da25b39ae9 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/generic/pending-6.6/804-nvmem-core-support-mac-base-fixed-layout-cells.patch b/target/linux/generic/pending-6.6/804-nvmem-core-support-mac-base-fixed-layout-cells.patch index d08ed63eaa..44b9862654 100644 --- a/target/linux/generic/pending-6.6/804-nvmem-core-support-mac-base-fixed-layout-cells.patch +++ b/target/linux/generic/pending-6.6/804-nvmem-core-support-mac-base-fixed-layout-cells.patch @@ -33,7 +33,7 @@ string. #include #include #include -@@ -779,6 +782,62 @@ static int nvmem_validate_keepouts(struc +@@ -778,6 +781,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; -@@ -813,6 +872,25 @@ static int nvmem_add_cells_from_dt(struc +@@ -812,6 +871,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 3d5b7afe8c..eab26ccb11 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 0000000000..abaef6c3a8 --- /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 8ac1097267..788a34d61a 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 b06c5ab47c..3e349d4c32 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 19c027b9f8..d80cdb0872 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 index 50772e7d30..b0d63975da 100644 --- a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts +++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts @@ -24,7 +24,7 @@ stdout-path = "serial0:115200n8"; }; - memory { + memory@40000000 { reg = <0 0x40000000 0 0x10000000>; }; @@ -156,7 +156,7 @@ spi-tx-bus-width = <4>; spi-rx-bus-width = <4>; - partitions: partitions { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index ae4acd8adb..0707800348 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -517,7 +517,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 0000000000..1a12005c92 --- /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 0000000000..5a647d75e8 --- /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 0000000000..a9597119fa --- /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 528d7da1e4..7ddcc92baf 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1232,7 +1232,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 @@ -1361,6 +1361,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 @@ -1617,7 +1627,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 53f7b5aaaf..814431448b 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -605,7 +605,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 @@ -619,7 +619,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 @@ -1662,6 +1662,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) @@ -2126,6 +2139,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 f0cb7f5ce7..41b78794f2 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 98c354ff17..63a3c82cf3 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 @@ -258,6 +258,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" @@ -432,6 +436,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 e68e56871e..2d091ac4c2 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 @@ -48,6 +48,7 @@ ramips_setup_interfaces() mikrotik,routerboard-m11g|\ netgear,eax12|\ netgear,ex6150|\ + netgear,wax214v2|\ sercomm,na502|\ sercomm,na502s|\ thunder,timecloud|\ @@ -67,6 +68,7 @@ ramips_setup_interfaces() ;; asiarf,ap7621-001|\ humax,e10|\ + keenetic,kn-3510|\ openfi,5pro|\ wavlink,ws-wn572hp3-4g|\ winstars,ws-wn583a6) @@ -327,6 +329,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 9350d67466..91c17f8a77 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 6e2f612147..74a1040ded 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 707588c3a6..94a189c5c5 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -239,7 +239,7 @@ define Device/radxa_e25 UBOOT_DEVICE_NAME := radxa-e25-rk3568 BOOT_FLOW := pine64-img BOOT_SCRIPT := radxa-e25 - DEVICE_PACKAGES := kmod-r8125 kmod-ata-ahci-platform + DEVICE_PACKAGES := kmod-r8125 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 0000000000..c17d28c691 --- /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; ++};