diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index aff24b8aef12b7..150bd703938c4d 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -26,8 +26,25 @@ jobs: fetch-depth: 1 - name: PR Review - uses: hauke/claude-code-action@95d07da986168a9998e8e4713ec29b7c162b4dd9 # v1.0.77-fixed + uses: hauke/claude-code-action@0ca689a0ca61147a6e7ee99f8453f2c73b8a6b40 # v1.0.93.2 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} trigger_phrase: "/claude" + track_progress: true + include_fix_links: false + claude_args: >- + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(grep:*)" + --disallowedTools "Bash(git add:*),Bash(git commit:*),Bash(git rm:*),Bash(git push:*)" + env: + APPEND_SYSTEM_PROMPT: >- + IMPORTANT: For any issue tied to a specific file and line number, + you MUST call mcp__github_inline_comment__create_inline_comment to + post it as an inline comment on the diff. This is a separate + channel from mcp__github_comment__update_claude_comment and does + NOT violate the "only update your tracking comment" rule — both + tools should be used. Do NOT put line-specific issues in the + top-level tracking comment. Only use the top-level tracking + comment for a brief overall verdict. Never describe or summarize + what the PR does. Only report actual problems, concerns, or + suggestions. If nothing is wrong, say so in one short sentence. diff --git a/include/image-commands.mk b/include/image-commands.mk index feeeb5b0745f39..443c870a8ec32e 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -324,7 +324,7 @@ define Build/copy-file endef # Create a header for a D-Link AI series recovery image and add it at the beginning of the image -# Currently supported: AQUILA M30, EAGLE M32 and R32 +# Currently supported: AQUILA E30 and M30, EAGLE M32 and R32 # Arguments: # 1: Start string of the header # 2: Firmware version diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 88e154e39efa88..12575e0b1fad49 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -201,12 +201,17 @@ build_list_of_backup_overlay_files() { # do not backup files from packages, except those listed # in conffiles and keep.d - { + if [ -f /usr/lib/opkg/status ]; then find /usr/lib/opkg/info -type f -name "*.list" -exec cat {} \; find /usr/lib/opkg/info -type f -name "*.control" -exec sed \ -ne '/^Alternatives/{s/^Alternatives: //;s/, /\n/g;p}' {} \; | cut -f2 -d: - } | grep -v -x -F -f $conffiles | + elif [ -d /lib/apk/packages ]; then + find /lib/apk/packages -type f -name "*.list" -exec cat {} \; + find /lib/apk/packages -type f -name "*.alternatives" -exec cat {} \; | + tr ' ' '\n' | + cut -f2 -d: + fi | grep -v -x -F -f $conffiles | grep -v -x -F -f $keepfiles | sort -u > "$packagesfiles" rm -f "$keepfiles" "$conffiles" fi @@ -217,10 +222,14 @@ build_list_of_backup_overlay_files() { ( cd /overlay/upper/; find .$SAVE_OVERLAY_PATH \( -type f -o -type l \) $find_filter | sed \ -e 's,^\.,,' \ -e '\,^/etc/board.json$,d' \ + -e '\,^/etc/luci-uploads/\.placeholder,d' \ -e '\,/[^/]*-opkg$,d' \ -e '\,^/etc/urandom.seed$,d' \ + -e '\,^/etc/apk/world$,d' \ -e "\,^$INSTALLED_PACKAGES$,d" \ -e '\,^/usr/lib/opkg/.*,d' \ + -e '\,^/lib/apk/.*,d' \ + -e '\,^/run$,d' \ ) | grep -v -x -F -f $packagesfiles > "$file" rm -f "$packagesfiles" @@ -298,6 +307,9 @@ create_backup_archive() { \( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \ \( -exec echo {} unknown \; \) \ \) | sed -e 's,.*/,,;s/\.list /\t/')" || ret=1 + else + echo "Failed to detect installed packages metadata files." >&2 + ret=1 fi fi fi @@ -395,7 +407,7 @@ json_get_var forceable "forceable" } if [ -n "$CONF_IMAGE" ]; then - case "$(get_magic_word $CONF_IMAGE cat)" in + case "$(get_magic_word "$CONF_IMAGE" cat)" in # .gz files 1f8b) ;; *) diff --git a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic index 0d7339e2972d29..439ea5c2fda95f 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic @@ -118,6 +118,7 @@ comfast,cf-e393ax|\ iptime,ax3000m) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000" ;; +dlink,aquila-pro-ai-e30-a1|\ dlink,aquila-pro-ai-m30-a1|\ dlink,aquila-pro-ai-m60-a1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" diff --git a/package/boot/uboot-tools/uboot-envtools/files/ramips b/package/boot/uboot-tools/uboot-envtools/files/ramips index b5f7858f133bfc..b4b1ad4a651391 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/ramips +++ b/package/boot/uboot-tools/uboot-envtools/files/ramips @@ -48,6 +48,7 @@ asus,rt-ax53u|\ asus,rt-ax54|\ asus,4g-ax56|\ belkin,rt1800|\ +edup,ep-rt2983|\ elecom,wrc-x1800gs|\ h3c,tx1800-plus|\ h3c,tx1801-plus|\ diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index 30f8b4ffd9de28..5c03507dbe87f0 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-atm -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index f488aea7331537..1ba2dfb3cb806c 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -1756,20 +1756,12 @@ MODULE_DEVICE_TABLE(of, ltq_atm_match); static int ltq_atm_probe(struct platform_device *pdev) { - const struct of_device_id *match; - struct ltq_atm_ops *ops = NULL; + const struct ltq_atm_ops *ops; int ret; int port_num; struct port_cell_info port_cell = {0}; char ver_str[256]; - match = of_match_device(ltq_atm_match, &pdev->dev); - if (!match) { - dev_err(&pdev->dev, "failed to find matching device\n"); - return -ENOENT; - } - ops = (struct ltq_atm_ops *) match->data; - check_parameters(); ret = init_priv_data(); @@ -1778,6 +1770,7 @@ static int ltq_atm_probe(struct platform_device *pdev) goto INIT_PRIV_DATA_FAIL; } + ops = of_device_get_match_data(&pdev->dev); ret = ops->init(pdev); if (ret) return ret; diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 3fb94ea13986db..baf936a3c14846 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -145,7 +145,7 @@ define KernelPackage/crypto-crc32 HIDDEN:=1 FILES:=$(LINUX_DIR)/crypto/crc32_generic.ko@lt6.18 \ $(LINUX_DIR)/crypto/crc32-cryptoapi.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,04,LINUX_6_12:crc32_generic !LINUX_6_12:crc32-cryptoapi,1) + AUTOLOAD:=$(call AutoLoad,04,crc32_generic@lt6.18 crc32-cryptoapi@ge6.18,1) $(call AddDepends/crypto) endef @@ -158,7 +158,7 @@ define KernelPackage/crypto-crc32c KCONFIG:=CONFIG_CRYPTO_CRC32C FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko@lt6.18 \ $(LINUX_DIR)/crypto/crc32c-cryptoapi.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,04,LINUX_6_12:crc32c_generic !LINUX_6_12:crc32c-cryptoapi,1) + AUTOLOAD:=$(call AutoLoad,04,crc32c_generic@lt6.18 crc32c-cryptoapi@ge6.18,1) $(call AddDepends/crypto) endef @@ -744,7 +744,7 @@ define KernelPackage/crypto-md5 CONFIG_CRYPTO_MD5_PPC FILES:=$(LINUX_DIR)/crypto/md5.ko \ $(LINUX_DIR)/lib/crypto/libmd5.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,09,md5 !LINUX_6_12:libmd5) + AUTOLOAD:=$(call AutoLoad,09,md5 libmd5@ge6.18) $(call AddDepends/crypto) endef @@ -838,7 +838,7 @@ ifndef CONFIG_TARGET_x86_64 $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \ $(LINUX_DIR)/crypto/cryptd.ko@lt6.18 \ $(LINUX_DIR)/crypto/crypto_simd.ko@lt6.18 - AUTOLOAD+= $(call AutoLoad,10,LINUX_6_12:cryptd \ + AUTOLOAD+= $(call AutoLoad,10,cryptd@lt6.18 \ serpent-sse2-i586 twofish-i586 blowfish_generic) endef endif @@ -983,7 +983,7 @@ define KernelPackage/crypto-sha1 CONFIG_CRYPTO_SHA1_SSSE3@lt6.18 FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko@lt6.18 \ $(LINUX_DIR)/crypto/sha1.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha1_generic !LINUX_6_12:sha1) + AUTOLOAD:=$(call AutoLoad,09,sha1_generic@lt6.18 sha1@ge6.18) $(call AddDepends/crypto) endef @@ -1069,7 +1069,7 @@ define KernelPackage/crypto-sha256 $(LINUX_DIR)/crypto/sha256_generic.ko@lt6.18 \ $(LINUX_DIR)/crypto/sha256.ko@ge6.18 \ $(LINUX_DIR)/lib/crypto/libsha256.ko - AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha256_generic !LINUX_6_12:sha256) + AUTOLOAD:=$(call AutoLoad,09,sha256_generic@lt6.18 sha256@ge6.18) $(call AddDepends/crypto) endef @@ -1130,7 +1130,7 @@ define KernelPackage/crypto-sha512 FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko@lt6.18 \ $(LINUX_DIR)/crypto/sha512.ko@ge6.18 \ $(LINUX_DIR)/lib/crypto/libsha512.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha512_generic !LINUX_6_12:sha512) + AUTOLOAD:=$(call AutoLoad,09,sha512_generic@lt6.18 sha512@ge6.18) $(call AddDepends/crypto) endef diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 75aa1a1558be51..c96c52f713d781 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -191,7 +191,7 @@ define KernelPackage/libphy CONFIG_MDIO_BUS FILES:=$(LINUX_DIR)/drivers/net/phy/libphy.ko \ $(LINUX_DIR)/drivers/net/phy/mdio-bus.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,15,libphy !LINUX_6_12:mdio-bus,1) + AUTOLOAD:=$(call AutoLoad,15,libphy mdio-bus@ge6.18,1) endef define KernelPackage/libphy/description diff --git a/package/kernel/linux/modules/pse-pd.mk b/package/kernel/linux/modules/pse-pd.mk index 44adb182973c15..a9dccfe3256e55 100644 --- a/package/kernel/linux/modules/pse-pd.mk +++ b/package/kernel/linux/modules/pse-pd.mk @@ -42,6 +42,24 @@ endef $(eval $(call KernelPackage,pse-regulator)) + +define KernelPackage/pse-hasivo-hs104 + SUBMENU:=$(PSE_MENU) + TITLE:=Hasivo HS104 PSE controller support + KCONFIG:=CONFIG_PSE_HASIVO_HS104 + DEPENDS:=+kmod-i2c-core @TARGET_realtek + FILES:=$(LINUX_DIR)/drivers/net/pse-pd/hasivo_hs104.ko + AUTOLOAD:=$(call AutoProbe,hasivo_hs104) + $(call AddDepends/pse-pd) +endef + +define KernelPackage/pse-hasivo-hs104/description + Kernel module for Hasivo HS104 PSE-PD chips +endef + +$(eval $(call KernelPackage,pse-hasivo-hs104)) + + define KernelPackage/pse-pd692x0 SUBMENU:=$(PSE_MENU) TITLE:=PD692X0 PSE controller support diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index f206e5cf687963..4ddab00bc082f9 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -584,7 +584,7 @@ define KernelPackage/usb-dwc3-qcom FILES:= \ $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko \ $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom-legacy.ko@ge6.18 - AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom !LINUX_6_12:dwc3-qcom-legacy,1) + AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom dwc3-qcom-legacy@ge6.18,1) $(call AddDepends/usb) endef diff --git a/package/kernel/ntfs/Makefile b/package/kernel/ntfs/Makefile new file mode 100644 index 00000000000000..52556c2b31bfe7 --- /dev/null +++ b/package/kernel/ntfs/Makefile @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=linux-ntfs +PKG_RELEASE:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_SOURCE_DATE:=2026-03-03 +PKG_SOURCE_URL:=https://github.com/namjaejeon/linux-ntfs +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=6f6beff9ac623c691e8da7455a0e9b14bf957108 +PKG_MIRROR_HASH:=b11f051e41e9993421753961bf948380bdf705a043a83f9b55dcbd7dc664fae2 + +PKG_LICENSE:=GPL-2.0-or-later + +PKG_MAINTAINER:=Qingfang Deng + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/fs-ntfs + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Filesystems + TITLE:=NTFS file system support + DEPENDS:=+kmod-nls-base + URL:=$(PKG_SOURCE_URL) + FILES:=$(PKG_BUILD_DIR)/ntfs.ko + AUTOLOAD:=$(call AutoProbe,ntfs) +endef + +define KernelPackage/fs-ntfs/description + NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003. + + This allows you to mount devices formatted with the ntfs file system. +endef + +NOSTDINC_FLAGS += \ + $(KERNEL_NOSTDINC_FLAGS) \ + -DCONFIG_NTFS_FS_POSIX_ACL + +EXTRA_KCONFIG:= \ + CONFIG_NTFS_FS=m + +MAKE_OPTS:= \ + M="$(PKG_BUILD_DIR)" \ + NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ + $(EXTRA_KCONFIG) + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules +endef + +$(eval $(call KernelPackage,fs-ntfs)) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc index 1104f10a126616..c5183c14431311 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc @@ -16,20 +16,22 @@ function set_fixed_freq(data, config) { set_default(config, 'fixed_freq', 1); set_default(config, 'frequency', data.frequency); - if (data.htmode in [ 'VHT80', 'HE80' ]) + if (data.htmode in [ 'VHT80', 'HE80', 'EHT80' ]) set_default(config, 'max_oper_chwidth', 1); - else if (data.htmode in [ 'VHT160', 'HE160' ]) + else if (data.htmode in [ 'VHT160', 'HE160', 'EHT160' ]) set_default(config, 'max_oper_chwidth', 2); - else if (data.htmode in [ 'VHT20', 'VHT40', 'HE20', 'HE40' ]) + else if (data.htmode in [ 'EHT320' ]) + set_default(config, 'max_oper_chwidth', 9); + else if (data.htmode in [ 'VHT20', 'VHT40', 'HE20', 'HE40', 'EHT20', 'EHT40' ]) set_default(config, 'max_oper_chwidth', 0); else set_default(config, 'disable_vht', true); if (data.htmode in [ 'NOHT' ]) set_default(config, 'disable_ht', true); - else if (data.htmode in [ 'HT20', 'VHT20', 'HE20' ]) + else if (data.htmode in [ 'HT20', 'VHT20', 'HE20', 'EHT20' ]) set_default(config, 'disable_ht40', true); - else if (data.htmode in [ 'VHT40', 'VHT80', 'VHT160', 'HE40', 'HE80', 'HE160' ]) + else if (data.htmode in [ 'VHT40', 'VHT80', 'VHT160', 'HE40', 'HE80', 'HE160', 'EHT40', 'EHT80', 'EHT160', 'EHT320' ]) set_default(config, 'ht40', true); if (wildcard(data.htmode, 'VHT*')) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 139503147fce7f..cf730a3c0a3708 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=8bd86938479609045e1ceebed904e4f5cb96fdb38220d41c3579b7e764fbb05b -PKG_SOURCE_DATE:=2026-03-13 -PKG_SOURCE_VERSION:=58eb263d5abe03f8c1280bdfa65a3b052614215d +PKG_MIRROR_HASH:=cad2707975d99c861065516f250029c872c95441eb85da36024368f601f77b99 +PKG_SOURCE_DATE:=2026-03-25 +PKG_SOURCE_VERSION:=cd7a4e5f8b8e4e7ce38f7e2be577802b7ec4ff3e CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/scripts/ext-tools.sh b/scripts/ext-tools.sh index b58296be10163c..f290ae0c4835e0 100755 --- a/scripts/ext-tools.sh +++ b/scripts/ext-tools.sh @@ -4,10 +4,6 @@ TOOLS_TAR="" HOST_BUILD_DIR=$(pwd)/"build_dir/host" HOST_STAGING_DIR_STAMP=$(pwd)/"staging_dir/host/stamp" -refresh_timestamps() { - find -H "$1" -not -type l -print0 | xargs -0 touch -} - extract_prebuilt_tar() { tar -xf "$1" } @@ -18,15 +14,15 @@ refresh_prebuilt_tools() { exit 1 fi - refresh_timestamps "$HOST_BUILD_DIR" - sleep 1 - if [ ! -d "$HOST_STAGING_DIR_STAMP" ]; then echo "Can't find Host Staging Dir Stamp "$HOST_STAGING_DIR_STAMP"" >&2 exit 1 fi - refresh_timestamps "$HOST_STAGING_DIR_STAMP" + local now + now=$(date +%Y%m%d%H%M.%S) + find -H "$HOST_BUILD_DIR" "$HOST_STAGING_DIR_STAMP" \ + -type f -empty -print0 | xargs -0 touch -t "$now" return 0 } diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi index fae95afed64c3f..6cc20afaf6deb0 100644 --- a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi +++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi @@ -75,6 +75,16 @@ &pcie0 { status = "okay"; + + wifi@11,0 { /* 2.4 GHz */ + compatible = "pci168c,0027"; + reg = <0x8800 0 0 0 0>; + }; + + wifi@12,0 { /* 5 GHz */ + compatible = "pci168c,0027"; + reg = <0x9000 0 0 0 0>; + }; }; &spi { diff --git a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts index a8ee7df0da3e9e..27ac6c977b15b2 100644 --- a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts +++ b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts @@ -69,6 +69,16 @@ &pcie0 { status = "okay"; + + wifi@11,0 { /* 2.4 GHz */ + compatible = "pci168c,0027"; + reg = <0x8800 0 0 0 0>; + }; + + wifi@12,0 { /* 5 GHz */ + compatible = "pci168c,0027"; + reg = <0x9000 0 0 0 0>; + }; }; &mdio0 { diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile index 1e5c4531d2d531..aa3607a72098e1 100644 --- a/target/linux/gemini/Makefile +++ b/target/linux/gemini/Makefile @@ -12,6 +12,7 @@ CPU_TYPE:=fa526 SUBTARGETS:=generic KERNEL_PATCHVER:=6.12 +KERNEL_TESTING_PATCHVER:=6.18 define Target/Description Build firmware images for the StorLink/Cortina Gemini CS351x ARM FA526 CPU diff --git a/target/linux/gemini/config-6.18 b/target/linux/gemini/config-6.18 new file mode 100644 index 00000000000000..c0d76d82738dfa --- /dev/null +++ b/target/linux/gemini/config-6.18 @@ -0,0 +1,439 @@ +CONFIG_ALIGNMENT_TRAP=y +CONFIG_AMBA_PL08X=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_GEMINI=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +# CONFIG_ARCH_MOXART is not set +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_V4=y +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_MULTI_V4_V5=y +# CONFIG_ARCH_MULTI_V5 is not set +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_STACKWALK=y +CONFIG_ARM=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_APPENDED_DTB=y +# CONFIG_ARM_ATAG_DTB_COMPAT is not set +CONFIG_ARM_HAS_GROUP_RELOCS=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_UNWIND=y +CONFIG_ATA=y +CONFIG_ATAGS=y +CONFIG_ATA_FORCE=y +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BOUNCE=y +CONFIG_BUFFER_HEAD=y +CONFIG_CACHESTAT_SYSCALL=y +CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMA=y +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_SIZE_PERCENTAGE=10 +# CONFIG_CMA_SIZE_SEL_MAX is not set +# CONFIG_CMA_SIZE_SEL_MBYTES is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +CONFIG_CMA_SIZE_SEL_PERCENTAGE=y +# CONFIG_CMA_SYSFS is not set +CONFIG_COMMON_CLK=y +CONFIG_COMMON_CLK_GEMINI=y +CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_CONTIG_ALLOC=y +CONFIG_COREDUMP=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_FA=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_FA=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +CONFIG_CPU_FA526=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_THERMAL=y +CONFIG_CPU_TLB_FA=y +CONFIG_CPU_USE_DOMAINS=y +CONFIG_CRC16=y +CONFIG_CRC_CCITT=y +CONFIG_CRC_ITU_T=y +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_SL3516=y +# CONFIG_CRYPTO_DEV_SL3516_DEBUG is not set +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_DRBG_HMAC=y +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_GENIV=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_JITTERENTROPY=y +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64 +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32 +CONFIG_CRYPTO_JITTERENTROPY_OSR=1 +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_GF128MUL=y +CONFIG_CRYPTO_LIB_SHA256=y +CONFIG_CRYPTO_LIB_UTILS=y +# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set +# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA3=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_USER=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_LZ4=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DMADEVICES=y +CONFIG_DMATEST=y +CONFIG_DMA_CMA=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_ENGINE_RAID=y +CONFIG_DMA_NEED_SYNC=y +CONFIG_DMA_OF=y +CONFIG_DMA_OPS_HELPERS=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_DMA_VIRTUAL_CHANNELS=y +CONFIG_DRM=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_FBDEV_EMULATION=y +CONFIG_DRM_FBDEV_OVERALLOC=100 +CONFIG_DRM_GEM_DMA_HELPER=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_PANEL=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_PANEL_ILITEK_IL9322=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_DRM_TVE200=y +CONFIG_DTC=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EEPROM_93CX6=y +CONFIG_ELF_CORE=y +CONFIG_EXCLUSIVE_SYSTEM_RAM=y +# CONFIG_EXPERT is not set +CONFIG_EXT4_FS=y +CONFIG_EXTCON=y +CONFIG_FARADAY_FTINTC010=y +CONFIG_FB=y +CONFIG_FB_CORE=y +CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_DMAMEM_HELPERS=y +CONFIG_FB_DMAMEM_HELPERS_DEFERRED=y +CONFIG_FB_SYSMEM_FOPS=y +CONFIG_FB_SYSMEM_HELPERS=y +CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FHANDLE=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FONT_8x16=y +CONFIG_FONT_8x8=y +CONFIG_FONT_SUPPORT=y +CONFIG_FORCE_NR_CPUS=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FTTMR010_TIMER=y +CONFIG_FTWDT010_WATCHDOG=y +CONFIG_FUNCTION_ALIGNMENT=0 +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_FW_LOADER_SYSFS=y +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_GEMINI_ETHERNET=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_DEVICES=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GLOB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_FTGPIO010=y +CONFIG_GPIO_GENERIC=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HDMI=y +CONFIG_HIGHMEM=y +CONFIG_HIGHPTE=y +CONFIG_HWMON=y +CONFIG_HW_RANDOM=y +CONFIG_HZ_FIXED=0 +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_GPIO=y +CONFIG_I2C_HELPER_AUTO=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INPUT=y +CONFIG_INPUT_KEYBOARD=y +CONFIG_IO_URING=y +CONFIG_IPC_NS=y +CONFIG_IRQCHIP=y +CONFIG_IRQSTACKS=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +# CONFIG_ISDN is not set +CONFIG_JBD2=y +CONFIG_KALLSYMS=y +CONFIG_KCMP=y +CONFIG_KERNEL_LZMA=y +# CONFIG_KERNEL_XZ is not set +CONFIG_KEXEC=y +CONFIG_KEXEC_CORE=y +CONFIG_KEYBOARD_DLINK_DIR685=y +CONFIG_KMAP_LOCAL=y +CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y +# CONFIG_LDM_DEBUG is not set +CONFIG_LDM_PARTITION=y +CONFIG_LEDS_TRIGGER_DISK=y +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_LOGO_LINUX_MONO is not set +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LZ4_DECOMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MARVELL_PHY=y +CONFIG_MDIO_BITBANG=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MDIO_GPIO=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MMU_LAZY_TLB_REFCOUNT=y +CONFIG_MODULES_USE_ELF_REL=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_MQ_IOSCHED_DEADLINE=y +CONFIG_MQ_IOSCHED_KYBER=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_GEMINI=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_OPENWRT_PROLOG=y +CONFIG_MTD_SPLIT_WRGG_FW=y +CONFIG_NAMESPACES=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_NEED_PER_CPU_KM=y +CONFIG_NET_DEVMEM=y +CONFIG_NET_EGRESS=y +CONFIG_NET_INGRESS=y +CONFIG_NET_NS=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_XGRESS=y +CONFIG_NLS=y +CONFIG_NO_HZ_COMMON=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NVMEM=y +CONFIG_NVMEM_LAYOUTS=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_PAGE_BLOCK_MAX_ORDER=10 +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PAGE_POOL=y +CONFIG_PAGE_SIZE_LESS_THAN_256KB=y +CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +CONFIG_PATA_FTIDE010=y +CONFIG_PCI=y +CONFIG_PCIEASPM=y +CONFIG_PCIEASPM_DEFAULT=y +# CONFIG_PCIEASPM_PERFORMANCE is not set +# CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PCI_FTPCI100=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y +CONFIG_PID_NS=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_GEMINI=y +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GEMINI_POWEROFF=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_RANDSTRUCT_NONE=y +CONFIG_RATIONAL=y +CONFIG_RD_BZIP2=y +CONFIG_RD_GZIP=y +CONFIG_RD_LZ4=y +CONFIG_RD_LZMA=y +CONFIG_RD_LZO=y +CONFIG_RD_XZ=y +CONFIG_REALTEK_PHY=y +CONFIG_REALTEK_PHY_HWMON=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_RELAY=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RSEQ=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_FTRTC010=y +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +CONFIG_RTC_NVMEM=y +CONFIG_SATA_GEMINI=y +CONFIG_SATA_HOST=y +CONFIG_SATA_PMP=y +CONFIG_SCSI=y +CONFIG_SCSI_COMMON=y +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_PROC_FS is not set +CONFIG_SENSORS_DRIVETEMP=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_LM75=y +CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y +CONFIG_SERIAL_8250_EXAR=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_PCILIB=y +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIO=y +CONFIG_SERIO_LIBPS2=y +CONFIG_SERIO_SERPORT=y +CONFIG_SGL_ALLOC=y +CONFIG_SG_POOL=y +CONFIG_SLUB_DEBUG=y +CONFIG_SOFTIRQ_ON_OWN_STACK=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_BITBANG=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_MASTER=y +CONFIG_STACKDEPOT=y +CONFIG_STACKTRACE=y +# CONFIG_STRIP_ASM_SYMS is not set +CONFIG_SWPHY=y +CONFIG_SYNC_FILE=y +CONFIG_SYSFS_SYSCALL=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_OF=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TINY_SRCU=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y +CONFIG_USB_COMMON=y +# CONFIG_USB_FOTG210 is not set +CONFIG_USB_GADGET=y +CONFIG_USB_GPIO_VBUS=y +CONFIG_USB_PHY=y +CONFIG_USB_SUPPORT=y +CONFIG_USER_NS=y +CONFIG_USE_OF=y +CONFIG_UTS_NS=y +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=16 +CONFIG_VIDEO=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARM64=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_RISCV=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_X86=y +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/gemini/patches-6.18/0001-ARM-dts-gemini-Fix-partition-offsets.patch b/target/linux/gemini/patches-6.18/0001-ARM-dts-gemini-Fix-partition-offsets.patch new file mode 100644 index 00000000000000..45cf889f8e73c4 --- /dev/null +++ b/target/linux/gemini/patches-6.18/0001-ARM-dts-gemini-Fix-partition-offsets.patch @@ -0,0 +1,41 @@ +From 771db4a77c5fb6da4908825e65f500ad67f86e5f Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Fri, 23 Jan 2026 16:24:49 +0100 +Subject: [PATCH] ARM: dts: gemini: Fix partition offsets + +These FIS partition offsets were never right: the comment clearly +states the FIS index is at 0xfe0000 and 0x7f * 0x200000 is +0xfe0000. + +Tested on the iTian SQ201. + +Fixes: d88b11ef91b1 ("ARM: dts: Fix up SQ201 flash access") +Fixes: b5a923f8c739 ("ARM: dts: gemini: Switch to redboot partition parsing") +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-sl93512r.dts | 2 +- + arch/arm/boot/dts/gemini/gemini-sq201.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-sl93512r.dts ++++ b/arch/arm/boot/dts/gemini/gemini-sl93512r.dts +@@ -146,7 +146,7 @@ + partitions { + compatible = "redboot-fis"; + /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x1fc>; ++ fis-index-block = <0x7f>; + }; + }; + +--- a/arch/arm/boot/dts/gemini/gemini-sq201.dts ++++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts +@@ -134,7 +134,7 @@ + partitions { + compatible = "redboot-fis"; + /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x1fc>; ++ fis-index-block = <0x7f>; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/0002-ARM-dts-Add-a-Verbatim-Gigabit-NAS-DTS.patch b/target/linux/gemini/patches-6.18/0002-ARM-dts-Add-a-Verbatim-Gigabit-NAS-DTS.patch new file mode 100644 index 00000000000000..93a33b722dc6cd --- /dev/null +++ b/target/linux/gemini/patches-6.18/0002-ARM-dts-Add-a-Verbatim-Gigabit-NAS-DTS.patch @@ -0,0 +1,253 @@ +From 46267aeb78cc7aba845da4c17acff1d46b694647 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 14 Jan 2026 09:29:48 +0100 +Subject: [PATCH 1/2] ARM: dts: Add a Verbatim Gigabit NAS DTS + +This adds a device tree for the Verbatim S08V1901-D1 NAS +which also has the product names "Gigabit Network Hard Drive" +"Gigabit NAS" and maybe other names. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/Makefile | 1 + + .../gemini/gemini-verbatim-s08v1901-d1.dts | 225 ++++++++++++++++++ + 2 files changed, 226 insertions(+) + create mode 100644 arch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts + +--- a/arch/arm/boot/dts/gemini/Makefile ++++ b/arch/arm/boot/dts/gemini/Makefile +@@ -8,5 +8,6 @@ dtb-$(CONFIG_ARCH_GEMINI) += \ + gemini-sl93512r.dtb \ + gemini-sq201.dtb \ + gemini-ssi1328.dtb \ ++ gemini-verbatim-s08v1901-d1.dtb \ + gemini-wbd111.dtb \ + gemini-wbd222.dtb +--- /dev/null ++++ b/arch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts +@@ -0,0 +1,225 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Device Tree file for the Verbatim S08V1901-D1 ++ * on product packaging called "Verbatim Gigabit Ethernet Hard Drive" ++ */ ++ ++/dts-v1/; ++ ++#include "gemini.dtsi" ++#include ++#include ++ ++/ { ++ model = "Verbatim Gigabit Ethernet Hard Drive S08V1901-D1"; ++ compatible = "verbatim,s08v1901-d1", "cortina,gemini"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ memory@0 { ++ /* 64MB SDRAM in 2 x Hynix HY5DU561622ETP-D43 */ ++ device_type = "memory"; ++ reg = <0x00000000 0x4000000>; ++ }; ++ ++ chosen { ++ bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait"; ++ stdout-path = &uart0; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ button-reset { ++ debounce-interval = <50>; ++ wakeup-source; ++ linux,code = ; ++ label = "reset"; ++ gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ led-green-harddisk { ++ function = LED_FUNCTION_DISK_ACTIVITY; ++ color = ; ++ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ linux,default-trigger = "disk-activity"; ++ }; ++ }; ++ ++ /* ++ * Fan control candidates: gpio0 10, gpio1 28 ++ */ ++ ++ mdio0: mdio { ++ compatible = "virtual,mdio-gpio"; ++ /* Uses MDC and MDIO */ ++ gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ ++ <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* This is a Realtek RTL8211CL ethernet PHY */ ++ phy0: ethernet-phy@1 { ++ reg = <1>; ++ }; ++ }; ++ ++ /* ++ * I haven't found a way to control the fan, it appears to be ++ * always on. ++ */ ++ thermal-zones { ++ chassis-thermal { ++ /* Poll every 20 seconds */ ++ polling-delay = <20000>; ++ /* Poll every 2nd second when cooling */ ++ polling-delay-passive = <2000>; ++ /* Use the thermal sensor in the hard drive */ ++ thermal-sensors = <&drive0>; ++ ++ /* Tripping points from the fan.script in the rootfs */ ++ trips { ++ alert: chassis-alert { ++ /* At 43 degrees turn on the fan */ ++ temperature = <43000>; ++ hysteresis = <3000>; ++ type = "active"; ++ }; ++ crit: chassis-crit { ++ /* Just shut down at 60 degrees */ ++ temperature = <60000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ }; ++ ++ soc { ++ flash@30000000 { ++ /* ++ * This is a Spansion S29GL128P11TFI01 852FB245 A ++ * 128Mbit (16MB) Flash memory. ++ */ ++ status = "okay"; ++ reg = <0x30000000 0x01000000>; ++ ++ partitions { ++ compatible = "redboot-fis"; ++ /* Eraseblock at 0xfe0000 */ ++ fis-index-block = <0x7f>; ++ }; ++ }; ++ ++ syscon: syscon@40000000 { ++ pinctrl { ++ /* ++ * gpio0agrp cover line 0-4 as line 1 is used for the LED ++ * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY ++ */ ++ gpio0_default_pins: pinctrl-gpio0 { ++ mux { ++ function = "gpio0"; ++ groups = "gpio0agrp", "gpio0hgrp"; ++ }; ++ }; ++ gpio1_default_pins: pinctrl-gpio1 { ++ /* ++ * Free up the TVC pins at GPIO1 offset 28,29,30,31 ++ * line 31 is used for reset key ++ */ ++ mux { ++ function = "gpio1"; ++ groups = "gpio1dgrp"; ++ }; ++ }; ++ pinctrl-gmii { ++ mux { ++ function = "gmii"; ++ groups = "gmii_gmac0_grp"; ++ }; ++ /* TODO: investigate vendor registers on boot */ ++ conf0 { ++ pins = "V8 GMAC0 RXDV"; ++ skew-delay = <0>; ++ }; ++ conf1 { ++ pins = "Y7 GMAC0 RXC"; ++ skew-delay = <15>; ++ }; ++ conf2 { ++ pins = "T8 GMAC0 TXEN"; ++ skew-delay = <7>; ++ }; ++ conf3 { ++ pins = "U8 GMAC0 TXC"; ++ skew-delay = <10>; ++ }; ++ conf4 { ++ /* The data lines all have default skew */ ++ pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1", ++ "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3", ++ "T7 GMAC0 TXD0", "U6 GMAC0 TXD1", ++ "V7 GMAC0 TXD2", "U7 GMAC0 TXD3"; ++ skew-delay = <7>; ++ }; ++ }; ++ }; ++ }; ++ ++ /* Both interfaces brought out on SATA connectors */ ++ sata: sata@46000000 { ++ cortina,gemini-ata-muxmode = <0>; ++ cortina,gemini-enable-sata-bridge; ++ status = "okay"; ++ }; ++ ++ gpio0: gpio@4d000000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio0_default_pins>; ++ }; ++ ++ gpio1: gpio@4e000000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio1_default_pins>; ++ }; ++ ++ ethernet@60000000 { ++ status = "okay"; ++ ++ ethernet-port@0 { ++ phy-mode = "rgmii"; ++ phy-handle = <&phy0>; ++ }; ++ }; ++ ++ ide@63000000 { ++ status = "okay"; ++ /* ++ * This drive may have a temperature sensor with a ++ * thermal zone we can use for thermal control of the ++ * chassis temperature using the fan. ++ */ ++ drive0: ide-port@0 { ++ reg = <0>; ++ #thermal-sensor-cells = <0>; ++ }; ++ }; ++ ++ ide@63400000 { ++ status = "okay"; ++ }; ++ ++ usb@68000000 { ++ status = "okay"; ++ }; ++ ++ usb@69000000 { ++ status = "okay"; ++ }; ++ }; ++}; diff --git a/target/linux/gemini/patches-6.18/0003-ARM-dts-Add-a-Raidsonic-IB-4210-B-DTS.patch b/target/linux/gemini/patches-6.18/0003-ARM-dts-Add-a-Raidsonic-IB-4210-B-DTS.patch new file mode 100644 index 00000000000000..d97e0abc08b994 --- /dev/null +++ b/target/linux/gemini/patches-6.18/0003-ARM-dts-Add-a-Raidsonic-IB-4210-B-DTS.patch @@ -0,0 +1,234 @@ +From e6619c1d068dea0d4d29cf770a85bb8bfcfd104b Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 12 Feb 2026 00:17:53 +0100 +Subject: [PATCH 1/2] ARM: dts: Add a Raidsonic IB-4210-B DTS + +This adds a device tree for the Raidsonic IB-4210-B NAS, a slightly +under-powered version of IB-4220-B with half the memory and +the cheaper version of the SoC. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/Makefile | 1 + + arch/arm/boot/dts/gemini/gemini-nas4210b.dts | 205 +++++++++++++++++++ + 2 files changed, 206 insertions(+) + create mode 100644 arch/arm/boot/dts/gemini/gemini-nas4210b.dts + +--- a/arch/arm/boot/dts/gemini/Makefile ++++ b/arch/arm/boot/dts/gemini/Makefile +@@ -2,6 +2,7 @@ + dtb-$(CONFIG_ARCH_GEMINI) += \ + gemini-dlink-dir-685.dtb \ + gemini-dlink-dns-313.dtb \ ++ gemini-nas4210b.dtb \ + gemini-nas4220b.dtb \ + gemini-ns2502.dtb \ + gemini-rut1xx.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/gemini/gemini-nas4210b.dts +@@ -0,0 +1,205 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Device Tree file for the Gemini-based Raidsonic NAS IB-4210-B ++ * Based on the NAS Forum experiments by user "CptSpock". ++ */ ++ ++/dts-v1/; ++ ++#include "gemini.dtsi" ++#include ++ ++/ { ++ model = "Raidsonic NAS IB-4210-B"; ++ compatible = "raidsonic,ib-4210-b", "cortina,gemini"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ memory@0 { /* 64 MB */ ++ device_type = "memory"; ++ reg = <0x00000000 0x4000000>; ++ }; ++ ++ chosen { ++ bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait"; ++ stdout-path = &uart0; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ button-setup { ++ debounce-interval = <100>; ++ wakeup-source; ++ linux,code = ; ++ label = "Backup button"; ++ /* Conflict with TVC */ ++ gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; ++ }; ++ button-restart { ++ debounce-interval = <100>; ++ wakeup-source; ++ linux,code = ; ++ label = "Softreset button"; ++ /* Conflict with TVC */ ++ gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ led-orange-hdd { ++ label = "nas4220b:orange:hdd"; ++ /* Conflict with TVC */ ++ gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ linux,default-trigger = "disk-activity"; ++ }; ++ led-green-os { ++ label = "nas4220b:green:os"; ++ /* Conflict with TVC */ ++ gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++ mdio0: mdio { ++ compatible = "virtual,mdio-gpio"; ++ gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ ++ <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* Realtek RTL8211B */ ++ phy0: ethernet-phy@1 { ++ reg = <1>; ++ device_type = "ethernet-phy"; ++ }; ++ }; ++ ++ soc { ++ flash@30000000 { ++ status = "okay"; ++ /* 16MB of flash */ ++ reg = <0x30000000 0x01000000>; ++ ++ partitions { ++ compatible = "redboot-fis"; ++ /* Eraseblock at 0xfe0000 */ ++ fis-index-block = <0x7f>; ++ }; ++ }; ++ ++ syscon: syscon@40000000 { ++ pinctrl { ++ gpio0_default_pins: pinctrl-gpio0 { ++ mux { ++ function = "gpio0"; ++ groups = ++ "gpio0egrp", ++ /* Used by MDIO */ ++ "gpio0igrp"; ++ }; ++ }; ++ gpio1_default_pins: pinctrl-gpio1 { ++ mux { ++ function = "gpio1"; ++ /* Lines 28-31 used by LEDs and buttons */ ++ groups = "gpio1dgrp"; ++ }; ++ }; ++ pinctrl-gmii { ++ mux { ++ function = "gmii"; ++ groups = "gmii_gmac0_grp"; ++ }; ++ conf0 { ++ pins = "R8 GMAC0 RXDV", "U11 GMAC1 RXDV"; ++ skew-delay = <0>; ++ }; ++ conf1 { ++ pins = "T8 GMAC0 RXC"; ++ skew-delay = <10>; ++ }; ++ conf2 { ++ pins = "T11 GMAC1 RXC"; ++ skew-delay = <15>; ++ }; ++ conf3 { ++ pins = "P8 GMAC0 TXEN", "V11 GMAC1 TXEN"; ++ skew-delay = <7>; ++ }; ++ conf4 { ++ pins = "V7 GMAC0 TXC", "P10 GMAC1 TXC"; ++ skew-delay = <10>; ++ }; ++ conf5 { ++ /* The data lines all have default skew */ ++ pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1", ++ "P9 GMAC0 RXD2", "R9 GMAC0 RXD3", ++ "R11 GMAC1 RXD0", "P11 GMAC1 RXD1", ++ "V12 GMAC1 RXD2", "U12 GMAC1 RXD3", ++ "R10 GMAC1 TXD0", "T10 GMAC1 TXD1", ++ "U10 GMAC1 TXD2", "V10 GMAC1 TXD3"; ++ skew-delay = <7>; ++ }; ++ conf6 { ++ pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1", ++ "R7 GMAC0 TXD2", "P7 GMAC0 TXD3"; ++ skew-delay = <5>; ++ }; ++ /* Set up drive strength on GMAC0 to 16 mA */ ++ conf7 { ++ groups = "gmii_gmac0_grp"; ++ drive-strength = <16>; ++ }; ++ }; ++ }; ++ }; ++ ++ sata: sata@46000000 { ++ cortina,gemini-ata-muxmode = <0>; ++ cortina,gemini-enable-sata-bridge; ++ status = "okay"; ++ }; ++ ++ gpio0: gpio@4d000000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio0_default_pins>; ++ }; ++ ++ gpio1: gpio@4e000000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio1_default_pins>; ++ }; ++ ++ ethernet@60000000 { ++ status = "okay"; ++ ++ ethernet-port@0 { ++ phy-mode = "rgmii"; ++ phy-handle = <&phy0>; ++ }; ++ ethernet-port@1 { ++ /* Not used in this platform */ ++ }; ++ }; ++ ++ ide@63000000 { ++ status = "okay"; ++ }; ++ ++ ide@63400000 { ++ status = "okay"; ++ }; ++ ++ usb@68000000 { ++ status = "okay"; ++ }; ++ ++ usb@69000000 { ++ status = "okay"; ++ }; ++ }; ++}; diff --git a/target/linux/gemini/patches-6.18/0004-ARM-dts-gemini-Correct-the-RUT1xx.patch b/target/linux/gemini/patches-6.18/0004-ARM-dts-gemini-Correct-the-RUT1xx.patch new file mode 100644 index 00000000000000..f958437c59fb6e --- /dev/null +++ b/target/linux/gemini/patches-6.18/0004-ARM-dts-gemini-Correct-the-RUT1xx.patch @@ -0,0 +1,60 @@ +From 1cf93e2435f0d7a7e8c9fd0d4355e6a521f72fc1 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sat, 14 Feb 2026 00:12:51 +0100 +Subject: [PATCH 1/2] ARM: dts: gemini: Correct the RUT1xx + +Fix two problems with the RUT1xx device tree: +- The memory is 32MB not 128MB +- The console is 19200 BPS +- Activate the PCI +- Disable the unused USB ports + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-rut1xx.dts | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-rut1xx.dts ++++ b/arch/arm/boot/dts/gemini/gemini-rut1xx.dts +@@ -14,13 +14,13 @@ + #address-cells = <1>; + #size-cells = <1>; + +- memory@0 { /* 128 MB */ ++ memory@0 { /* 32 MB */ + device_type = "memory"; +- reg = <0x00000000 0x8000000>; ++ reg = <0x00000000 0x2000000>; + }; + + chosen { +- bootargs = "console=ttyS0,115200n8"; ++ bootargs = "console=ttyS0,19200n8"; + stdout-path = &uart0; + }; + +@@ -113,6 +113,10 @@ + pinctrl-0 = <&gpio1_default_pins>; + }; + ++ pci@50000000 { ++ status = "okay"; ++ }; ++ + ethernet@60000000 { + status = "okay"; + +@@ -124,13 +128,5 @@ + /* Not used in this platform */ + }; + }; +- +- usb@68000000 { +- status = "okay"; +- }; +- +- usb@69000000 { +- status = "okay"; +- }; + }; + }; diff --git a/target/linux/gemini/patches-6.18/300-ARM-dts-Augment-DIR-685-partition-table-for-OpenWrt.patch b/target/linux/gemini/patches-6.18/300-ARM-dts-Augment-DIR-685-partition-table-for-OpenWrt.patch new file mode 100644 index 00000000000000..23a314d326532f --- /dev/null +++ b/target/linux/gemini/patches-6.18/300-ARM-dts-Augment-DIR-685-partition-table-for-OpenWrt.patch @@ -0,0 +1,37 @@ +From 0890faebd0155f57ef34fb1e766fd3ed8a127595 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 11 Mar 2019 15:44:29 +0100 +Subject: [PATCH 2/2] ARM: dts: Augment DIR-685 partition table for OpenWrt + +Rename the firmware partition so that the firmware MTD +splitter will do its job, drop the rootfs arguments as +the MTD splitter will set this up automatically. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts ++++ b/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts +@@ -20,7 +20,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait consoleblank=300"; ++ bootargs = "console=ttyS0,19200n8 consoleblank=300"; + stdout-path = "uart0:19200n8"; + }; + +@@ -317,9 +317,9 @@ + * this is called "upgrade" on the vendor system. + */ + partition@40000 { +- label = "upgrade"; ++ compatible = "wrg"; ++ label = "firmware"; + reg = <0x00040000 0x01f40000>; +- read-only; + }; + /* RGDB, Residental Gateway Database? */ + partition@1f80000 { diff --git a/target/linux/gemini/patches-6.18/302-ARM-dts-gemini-Tag-disk-led-for-disk-activity.patch b/target/linux/gemini/patches-6.18/302-ARM-dts-gemini-Tag-disk-led-for-disk-activity.patch new file mode 100644 index 00000000000000..05caa1f215aaaa --- /dev/null +++ b/target/linux/gemini/patches-6.18/302-ARM-dts-gemini-Tag-disk-led-for-disk-activity.patch @@ -0,0 +1,23 @@ +From a4ea0ccf0f630b5fb0ccd2ddbb237c37ef0fc5a9 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 26 Jan 2026 08:14:22 +0100 +Subject: [PATCH] ARM: dts: gemini: Tag disk led for disk-activity + +Linux now has a trigger specifically for all disk activity +and this is what the LED is used for so tag it like such. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-nas4220b.dts | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/gemini/gemini-nas4220b.dts ++++ b/arch/arm/boot/dts/gemini/gemini-nas4220b.dts +@@ -52,6 +52,7 @@ + /* Conflict with TVC */ + gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + default-state = "on"; ++ linux,default-trigger = "disk-activity"; + }; + led-green-os { + label = "nas4220b:green:os"; diff --git a/target/linux/gemini/patches-6.18/303-gemini-augment-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/303-gemini-augment-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..e007de3acf7301 --- /dev/null +++ b/target/linux/gemini/patches-6.18/303-gemini-augment-DTS-with-botched-partitions.patch @@ -0,0 +1,80 @@ +From 1b5c6be7b6dc6c096e1fd55ce10809d350e3afab Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 26 Jan 2026 08:09:04 +0100 +Subject: [PATCH] gemini: augment DTS with botched partitions + +We override the RedBoot FIS partition table with a custom one +using fixed-partitions. + +Mostly this is a 1-to-1 copy, but the three partitions called +"Kern", "Ramdisk" and "Application" are combined into one +called "firmware" which is optimal for OpenWrt. + +The RedBoot bootloader still sees the three partitions and will +load the first two into memory to boot the system, which +is fine: the kernel will still be there. + +To avoid confusing the MTD partition splitter we also need to +remove any command line root partition arguments. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-nas4220b.dts | 39 ++++++++++++++++++-- + 1 file changed, 35 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-nas4220b.dts ++++ b/arch/arm/boot/dts/gemini/gemini-nas4220b.dts +@@ -20,7 +20,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait"; ++ bootargs = "console=ttyS0,19200n8"; + stdout-path = &uart0; + }; + +@@ -82,10 +82,41 @@ + /* 16MB of flash */ + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00020000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00020000 0x00f00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..79e7d80825949c --- /dev/null +++ b/target/linux/gemini/patches-6.18/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch @@ -0,0 +1,68 @@ +From e0881008b49ecbec1c88f1f96c62a6a37c808df4 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 1 Feb 2026 00:21:08 +0100 +Subject: [PATCH] gemini: augment SQ201 DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-sq201.dts | 39 ++++++++++++++++++++--- + 1 file changed, 35 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-sq201.dts ++++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts +@@ -20,7 +20,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; ++ bootargs = "console=ttyS0,115200n8"; + stdout-path = &uart0; + }; + +@@ -131,10 +131,41 @@ + /* 16MB of flash */ + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00016000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00120000 0x00e00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/305-gemini-augment-SL93512R-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/305-gemini-augment-SL93512R-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..876cbf0a12945f --- /dev/null +++ b/target/linux/gemini/patches-6.18/305-gemini-augment-SL93512R-DTS-with-botched-partitions.patch @@ -0,0 +1,68 @@ +From b5732601a7ff5457cb1e3a9389761aa23a81f54d Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 1 Feb 2026 10:20:56 +0100 +Subject: [PATCH] gemini: augment SL93512R DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-sl93512r.dts | 39 ++++++++++++++++++-- + 1 file changed, 35 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-sl93512r.dts ++++ b/arch/arm/boot/dts/gemini/gemini-sl93512r.dts +@@ -24,7 +24,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait"; ++ bootargs = "console=ttyS0,19200n8"; + stdout-path = &uart0; + }; + +@@ -143,10 +143,41 @@ + /* 16MB of flash */ + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00020000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00020000 0x00f00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/306-gemini-augment-Verbatim-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/306-gemini-augment-Verbatim-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..b303dfed14dc65 --- /dev/null +++ b/target/linux/gemini/patches-6.18/306-gemini-augment-Verbatim-DTS-with-botched-partitions.patch @@ -0,0 +1,68 @@ +From 590d33c31529aae924fc38e356e93beca684e3be Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 1 Feb 2026 23:10:25 +0100 +Subject: [PATCH 2/2] gemini: augment Verbatim DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + .../gemini/gemini-verbatim-s08v1901-d1.dts | 39 +++++++++++++++++-- + 1 file changed, 35 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts ++++ b/arch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts +@@ -23,7 +23,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait"; ++ bootargs = "console=ttyS0,19200n8"; + stdout-path = &uart0; + }; + +@@ -108,10 +108,41 @@ + status = "okay"; + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00020000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00020000 0x00f00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/307-gemini-augment-NAS4210-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/307-gemini-augment-NAS4210-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..c7c2507d683d29 --- /dev/null +++ b/target/linux/gemini/patches-6.18/307-gemini-augment-NAS4210-DTS-with-botched-partitions.patch @@ -0,0 +1,59 @@ +From fdfaeca6b5eed05e446f298c5e597df39b96629a Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 12 Feb 2026 00:22:30 +0100 +Subject: [PATCH 2/2] gemini: augment NAS4210 DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-nas4210b.dts | 37 ++++++++++++++++++-- + 1 file changed, 34 insertions(+), 3 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-nas4210b.dts ++++ b/arch/arm/boot/dts/gemini/gemini-nas4210b.dts +@@ -84,10 +84,41 @@ + /* 16MB of flash */ + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00020000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00020000 0x00f00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; + diff --git a/target/linux/gemini/patches-6.18/308-gemini-augment-RUT1xx-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.18/308-gemini-augment-RUT1xx-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000000..9a6b749f7c5284 --- /dev/null +++ b/target/linux/gemini/patches-6.18/308-gemini-augment-RUT1xx-DTS-with-botched-partitions.patch @@ -0,0 +1,58 @@ +From 0b6bed71689664080e1e9ec95aecf45279dde6ee Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sat, 14 Feb 2026 00:21:13 +0100 +Subject: [PATCH 2/2] gemini: augment RUT1xx DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-rut1xx.dts | 37 +++++++++++++++++++++- + 1 file changed, 36 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/gemini/gemini-rut1xx.dts ++++ b/arch/arm/boot/dts/gemini/gemini-rut1xx.dts +@@ -74,7 +74,42 @@ + status = "okay"; + /* 8MB of flash */ + reg = <0x30000000 0x00800000>; +- /* TODO: add flash partitions here */ ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00020000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00020000 0x007a0000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x007c0000 0x00010000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "cfg"; ++ reg = <0x007d0000 0x00020000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x007f0000 0x00010000>; ++ read-only; ++ }; ++ }; + }; + + syscon: syscon@40000000 { diff --git a/target/linux/generic/config-6.18 b/target/linux/generic/config-6.18 index 093d48af7fc812..429adc04aa67fc 100644 --- a/target/linux/generic/config-6.18 +++ b/target/linux/generic/config-6.18 @@ -1586,6 +1586,7 @@ CONFIG_DQL=y # CONFIG_DRM_I915_GVT_KVMGT is not set # CONFIG_DRM_I915_REPLAY_GPU_HANGS_API is not set # CONFIG_DRM_IMX_LCDIF is not set +# CONFIG_DRM_ITE_IT6263 is not set # CONFIG_DRM_ITE_IT6505 is not set # CONFIG_DRM_ITE_IT66121 is not set # CONFIG_DRM_KOMEDA is not set @@ -1731,6 +1732,7 @@ CONFIG_DQL=y # CONFIG_DRM_SIL_SII8620 is not set # CONFIG_DRM_SIMPLEDRM is not set # CONFIG_DRM_SIMPLE_BRIDGE is not set +# CONFIG_DRM_SOLOMON_SSD2825 is not set # CONFIG_DRM_SSD130X is not set # CONFIG_DRM_ST7571_I2C is not set # CONFIG_DRM_ST7586 is not set @@ -1746,6 +1748,7 @@ CONFIG_DQL=y # CONFIG_DRM_TI_SN65DSI86 is not set # CONFIG_DRM_TI_TFP410 is not set # CONFIG_DRM_TI_TPD12S015 is not set +# CONFIG_DRM_TI_TDP158 is not set # CONFIG_DRM_TOSHIBA_TC358762 is not set # CONFIG_DRM_TOSHIBA_TC358764 is not set # CONFIG_DRM_TOSHIBA_TC358767 is not set diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 33b17cea4f4deb..c1988defcae6fd 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -2757,23 +2757,18 @@ static const struct of_device_id ar8xxx_mdiodev_of_match[] = { static int ar8xxx_mdiodev_probe(struct mdio_device *mdiodev) { - const struct of_device_id *match; struct ar8xxx_priv *priv; struct switch_dev *swdev; struct device_node *mdio_node; int ret; - match = of_match_device(ar8xxx_mdiodev_of_match, &mdiodev->dev); - if (!match) - return -EINVAL; - priv = ar8xxx_create(); if (priv == NULL) return -ENOMEM; priv->mii_bus = mdiodev->bus; priv->pdev = &mdiodev->dev; - priv->chip = (const struct ar8xxx_chip *) match->data; + priv->chip = of_device_get_match_data(&mdiodev->dev); ret = of_property_read_u32(priv->pdev->of_node, "qca,mib-poll-interval", &priv->mib_poll_interval); diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index bf7d7af5b71ae2..ce93bfcd09ee18 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-e30-a1.dts b/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-e30-a1.dts new file mode 100644 index 00000000000000..52d9a36ea07f08 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-e30-a1.dts @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include "mt7981b.dtsi" + +/ { + model = "D-Link AQUILA PRO AI E30 A1"; + compatible = "dlink,aquila-pro-ai-e30-a1", "mediatek,mt7981"; + + aliases { + label-mac-device = &gmac1; + led-boot = &led_status_white; + led-failsafe = &led_status_red; + led-running = &led_status_white; + led-upgrade = &led_status_blue; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + + button-wps { + label = "wps"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + status = "okay"; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + label = "lan"; + + nvmem-cells = <&macaddr_odm 0>; + nvmem-cell-names = "mac-address"; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand@0 { + compatible = "spi-nand"; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x00 0x100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x200000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x3200000>; + }; + + partition@3780000 { + label = "ubi1"; + reg = <0x3780000 0x3200000>; + read-only; + }; + + partition@6980000 { + label = "Odm"; + reg = <0x6980000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_odm: macaddr@8f { + compatible = "mac-base"; + reg = <0x8f 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + + }; + + partition@69c0000 { + label = "Config1"; + reg = <0x69c0000 0x80000>; + read-only; + }; + + partition@6a40000 { + label = "Config2"; + reg = <0x6a40000 0x80000>; + read-only; + }; + + partition@6ac0000 { + label = "Storage"; + reg = <0x6ac0000 0xA00000>; + read-only; + }; + }; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = ; + bias-pull-down = ; + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; + + i2c_pins_g0: i2c-pins-g0 { + mux { + function = "i2c"; + groups = "i2c0_1"; + }; + }; +}; + +&wifi { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_odm 1>; + nvmem-cell-names = "eeprom", "mac-address"; +}; + +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins_g0>; + + gca230718@40 { + compatible = "unknown,gca230718"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x40>; + + led_status_red: led@0 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <0>; + }; + + led@1 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <1>; + }; + + led_status_blue: led@2 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <2>; + }; + + led_status_white: led@3 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <3>; + }; + }; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index dccffdba52c6c0..9bef6ca8b466ed 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -144,6 +144,9 @@ mediatek_setup_interfaces() openwrt,one) ucidef_set_interfaces_lan_wan eth1 eth0 ;; + dlink,aquila-pro-ai-e30-a1) + ucidef_set_interface_lan "lan" + ;; dlink,aquila-pro-ai-m30-a1|\ dlink,aquila-pro-ai-m60-a1) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 76a99aecdc1662..b2e5a6fc52923d 100644 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -178,6 +178,7 @@ platform_do_upgrade() { yuncore,ax835) default_do_upgrade "$1" ;; + dlink,aquila-pro-ai-e30-a1|\ dlink,aquila-pro-ai-m30-a1|\ dlink,aquila-pro-ai-m60-a1) fw_setenv sw_tryactive 0 diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 1081dfbf610cf8..11dedf5a6682db 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1478,6 +1478,26 @@ define Device/cudy_wbr3000uax-v1-ubootmod endef TARGET_DEVICES += cudy_wbr3000uax-v1-ubootmod +define Device/dlink_aquila-pro-ai-e30-a1 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := AQUILA PRO AI E30 + DEVICE_VARIANT := A1 + DEVICE_DTS := mt7981b-dlink-aquila-pro-ai-e30-a1 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-leds-gca230718 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + KERNEL_IN_UBI := 1 + IMAGE_SIZE := 51200k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +ifeq ($(IB),) +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + IMAGES += recovery.bin + IMAGE/recovery.bin := append-image-stage initramfs-kernel.bin | sysupgrade-tar kernel=$$$$@ |\ + pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110002 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E +endif +endif +endef +TARGET_DEVICES += dlink_aquila-pro-ai-e30-a1 + define Device/dlink_aquila-pro-ai-m30-a1 DEVICE_VENDOR := D-Link DEVICE_MODEL := AQUILA PRO AI M30 diff --git a/target/linux/qualcommax/patches-6.12/0805-remoteproc-qcom-Add-Hexagon-based-multipd-rproc-driv.patch b/target/linux/qualcommax/patches-6.12/0805-remoteproc-qcom-Add-Hexagon-based-multipd-rproc-driv.patch index fc80d772384fea..98b49818036df7 100644 --- a/target/linux/qualcommax/patches-6.12/0805-remoteproc-qcom-Add-Hexagon-based-multipd-rproc-driv.patch +++ b/target/linux/qualcommax/patches-6.12/0805-remoteproc-qcom-Add-Hexagon-based-multipd-rproc-driv.patch @@ -96,7 +96,7 @@ Signed-off-by: Manikanta Mylavarapu obj-$(CONFIG_QCOM_Q6V5_WCSS) += qcom_q6v5_wcss.o --- /dev/null +++ b/drivers/remoteproc/qcom_q6v5_mpd.c -@@ -0,0 +1,801 @@ +@@ -0,0 +1,796 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2016-2018 Linaro Ltd. @@ -788,7 +788,6 @@ Signed-off-by: Manikanta Mylavarapu + +static int q6_wcss_probe(struct platform_device *pdev) +{ -+ const struct wcss_data *desc; + struct q6_wcss *wcss; + struct rproc *rproc; + int ret; @@ -796,10 +795,6 @@ Signed-off-by: Manikanta Mylavarapu + struct device_node *userpd_np; + const struct rproc_ops *ops = &q6_wcss_ops; + -+ desc = of_device_get_match_data(&pdev->dev); -+ if (!desc) -+ return -EINVAL; -+ + firmware = devm_kcalloc(&pdev->dev, MAX_FIRMWARE, + sizeof(*firmware), GFP_KERNEL); + if (!firmware) @@ -817,7 +812,7 @@ Signed-off-by: Manikanta Mylavarapu + + wcss = rproc->priv; + wcss->dev = &pdev->dev; -+ wcss->desc = desc; ++ wcss->desc = of_device_get_match_data(&pdev->dev); + wcss->firmware = firmware; + wcss->version = Q6_IPQ; + diff --git a/target/linux/qualcommax/patches-6.12/0806-rproc-qcom_q6v5_mpd-split-q6_wcss-to-rootpd-and-user.patch b/target/linux/qualcommax/patches-6.12/0806-rproc-qcom_q6v5_mpd-split-q6_wcss-to-rootpd-and-user.patch index 4f09717cf5ddf0..5f403585e0e270 100644 --- a/target/linux/qualcommax/patches-6.12/0806-rproc-qcom_q6v5_mpd-split-q6_wcss-to-rootpd-and-user.patch +++ b/target/linux/qualcommax/patches-6.12/0806-rproc-qcom_q6v5_mpd-split-q6_wcss-to-rootpd-and-user.patch @@ -311,9 +311,9 @@ Signed-off-by: George Moussalem return 0; free_rproc: -@@ -720,7 +707,6 @@ static int q6_wcss_probe(struct platform +@@ -715,7 +702,6 @@ static int q6_wcss_probe(struct platform wcss->dev = &pdev->dev; - wcss->desc = desc; + wcss->desc = of_device_get_match_data(&pdev->dev); wcss->firmware = firmware; - wcss->version = Q6_IPQ; diff --git a/target/linux/qualcommax/patches-6.12/0807-remoteproc-qcom_q6v5_mpd-fix-incorrent-use-of-rproc-.patch b/target/linux/qualcommax/patches-6.12/0807-remoteproc-qcom_q6v5_mpd-fix-incorrent-use-of-rproc-.patch index 42ffaab66e5b28..cd73dd0f1ccb00 100644 --- a/target/linux/qualcommax/patches-6.12/0807-remoteproc-qcom_q6v5_mpd-fix-incorrent-use-of-rproc-.patch +++ b/target/linux/qualcommax/patches-6.12/0807-remoteproc-qcom_q6v5_mpd-fix-incorrent-use-of-rproc-.patch @@ -191,7 +191,7 @@ Signed-off-by: Ziyang Huang platform_set_drvdata(userpd_pdev, rproc); qcom_add_ssr_subdev(rproc, &upd->ssr_subdev, userpd_pdev->name); return 0; -@@ -729,10 +736,10 @@ static int q6_wcss_probe(struct platform +@@ -724,10 +731,10 @@ static int q6_wcss_probe(struct platform /* Iterate over userpd child's and register with rproc */ for_each_available_child_of_node(pdev->dev.of_node, userpd_np) { diff --git a/target/linux/qualcommax/patches-6.12/0813-remoteproc-qcom_q6v5_mpd-enable-clocks.patch b/target/linux/qualcommax/patches-6.12/0813-remoteproc-qcom_q6v5_mpd-enable-clocks.patch index 7af2567cdabab1..efa485570f0b89 100644 --- a/target/linux/qualcommax/patches-6.12/0813-remoteproc-qcom_q6v5_mpd-enable-clocks.patch +++ b/target/linux/qualcommax/patches-6.12/0813-remoteproc-qcom_q6v5_mpd-enable-clocks.patch @@ -19,7 +19,7 @@ Signed-off-by: Ziyang Huang const struct wcss_data *desc; const char **firmware; struct userpd *upd[MAX_UPD]; -@@ -719,6 +721,16 @@ static int q6_wcss_probe(struct platform +@@ -714,6 +716,16 @@ static int q6_wcss_probe(struct platform if (ret) goto free_rproc; diff --git a/target/linux/qualcommax/patches-6.12/0814-remoteproc-qcom_q6v5_mpd-support-ipq5018.patch b/target/linux/qualcommax/patches-6.12/0814-remoteproc-qcom_q6v5_mpd-support-ipq5018.patch index 9cdf59ad21d695..e50417fda59f6d 100644 --- a/target/linux/qualcommax/patches-6.12/0814-remoteproc-qcom_q6v5_mpd-support-ipq5018.patch +++ b/target/linux/qualcommax/patches-6.12/0814-remoteproc-qcom_q6v5_mpd-support-ipq5018.patch @@ -88,7 +88,7 @@ Signed-off-by: Ziyang Huang wcss->mem_phys, wcss->mem_size, NULL); } -@@ -776,6 +800,12 @@ static void q6_wcss_remove(struct platfo +@@ -771,6 +795,12 @@ static void q6_wcss_remove(struct platfo rproc_free(rproc); } @@ -101,7 +101,7 @@ Signed-off-by: Ziyang Huang static const struct wcss_data q6_ipq5332_res_init = { .pasid = MPD_WCNSS_PAS_ID, .share_upd_info_to_q6 = true, -@@ -786,6 +816,7 @@ static const struct wcss_data q6_ipq9574 +@@ -781,6 +811,7 @@ static const struct wcss_data q6_ipq9574 }; static const struct of_device_id q6_wcss_of_match[] = { diff --git a/target/linux/qualcommax/patches-6.12/0815-remoteproc-qcom_q6v5_mpd-add-support-for-passing-v1-bootargs.patch b/target/linux/qualcommax/patches-6.12/0815-remoteproc-qcom_q6v5_mpd-add-support-for-passing-v1-bootargs.patch index f601377e474072..2c4a7b12df8b89 100644 --- a/target/linux/qualcommax/patches-6.12/0815-remoteproc-qcom_q6v5_mpd-add-support-for-passing-v1-bootargs.patch +++ b/target/linux/qualcommax/patches-6.12/0815-remoteproc-qcom_q6v5_mpd-add-support-for-passing-v1-bootargs.patch @@ -144,7 +144,7 @@ Signed-off-by: George Moussalem } } -@@ -802,13 +849,15 @@ static void q6_wcss_remove(struct platfo +@@ -797,13 +844,15 @@ static void q6_wcss_remove(struct platfo static const struct wcss_data q6_ipq5018_res_init = { .pasid = MPD_WCNSS_PAS_ID, diff --git a/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch b/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch index f0621919730569..c0744d74e25c39 100644 --- a/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch +++ b/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch @@ -49,7 +49,7 @@ Signed-off-by: Robert Marko +obj-$(CONFIG_QCOM_APM) += apm.o --- /dev/null +++ b/drivers/power/qcom/apm.c -@@ -0,0 +1,941 @@ +@@ -0,0 +1,936 @@ +/* + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. + * @@ -893,7 +893,6 @@ Signed-off-by: Robert Marko +{ + struct device *dev = &pdev->dev; + struct msm_apm_ctrl_dev *ctrl; -+ const struct of_device_id *match; + int ret = 0; + + dev_dbg(dev, "probing MSM Array Power Mux driver\n"); @@ -903,10 +902,6 @@ Signed-off-by: Robert Marko + return -ENODEV; + } + -+ match = of_match_device(msm_apm_match_table, dev); -+ if (!match) -+ return -ENODEV; -+ + ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL); + if (!ctrl) { + dev_err(dev, "MSM APM controller memory allocation failed\n"); @@ -916,7 +911,7 @@ Signed-off-by: Robert Marko + INIT_LIST_HEAD(&ctrl->list); + spin_lock_init(&ctrl->lock); + ctrl->dev = dev; -+ ctrl->msm_id = (uintptr_t)match->data; ++ ctrl->msm_id = (uintptr_t)of_device_get_match_data(dev); + platform_set_drvdata(pdev, ctrl); + + switch (ctrl->msm_id) { diff --git a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch index a6c5c4b1673fe9..dc1b8369b8198a 100644 --- a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch +++ b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch @@ -77,7 +77,7 @@ Signed-off-by: Robert Marko obj-$(CONFIG_REGULATOR_PF8X00) += pf8x00-regulator.o --- /dev/null +++ b/drivers/regulator/cpr3-npu-regulator.c -@@ -0,0 +1,694 @@ +@@ -0,0 +1,689 @@ +/* + * Copyright (c) 2017, The Linux Foundation. All rights reserved. + * @@ -652,8 +652,7 @@ Signed-off-by: Robert Marko + struct device *dev = &pdev->dev; + struct cpr3_controller *ctrl; + int i, rc; -+ const struct of_device_id *match; -+ struct cpr3_reg_data *cpr_data; ++ const struct cpr3_reg_data *cpr_data; + + if (!dev->of_node) { + dev_err(dev, "Device tree node is missing\n"); @@ -665,11 +664,7 @@ Signed-off-by: Robert Marko + return -ENOMEM; + g_ctrl = ctrl; + -+ match = of_match_device(cpr3_regulator_match_table, &pdev->dev); -+ if (!match) -+ return -ENODEV; -+ -+ cpr_data = (struct cpr3_reg_data *)match->data; ++ cpr_data = of_device_get_match_data(&pdev->dev); + g_valid_npu_fuse_count = cpr_data->cpr_valid_fuse_count; + dev_info(dev, "NPU CPR valid fuse count: %d\n", g_valid_npu_fuse_count); + ctrl->cpr_clock_rate = cpr_data->cpr_clk_rate; @@ -9863,7 +9858,7 @@ Signed-off-by: Robert Marko +} --- /dev/null +++ b/drivers/regulator/cpr4-apss-regulator.c -@@ -0,0 +1,1818 @@ +@@ -0,0 +1,1813 @@ +/* + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. + * @@ -11560,8 +11555,7 @@ Signed-off-by: Robert Marko +{ + struct device *dev = &pdev->dev; + struct cpr3_controller *ctrl; -+ const struct of_device_id *match; -+ struct cpr4_reg_data *cpr_data; ++ const struct cpr4_reg_data *cpr_data; + int i, rc; + + if (!dev->of_node) { @@ -11573,11 +11567,7 @@ Signed-off-by: Robert Marko + if (!ctrl) + return -ENOMEM; + -+ match = of_match_device(cpr4_regulator_match_table, &pdev->dev); -+ if (!match) -+ return -ENODEV; -+ -+ cpr_data = (struct cpr4_reg_data *)match->data; ++ cpr_data = of_device_get_match_data(&pdev->dev); + g_valid_fuse_count = cpr_data->cpr_valid_fuse_count; + dev_info(dev, "CPR valid fuse count: %d\n", g_valid_fuse_count); + ctrl->cpr_clock_rate = cpr_data->cpr_clk_rate; diff --git a/target/linux/ramips/dts/mt7621_edup_ep-rt2983.dts b/target/linux/ramips/dts/mt7621_edup_ep-rt2983.dts new file mode 100644 index 00000000000000..8e36d19a96eeb9 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_edup_ep-rt2983.dts @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "edup,ep-rt2983", "mediatek,mt7621-soc"; + model = "EDUP EP-RT2983"; + + aliases { + label-mac-device = &gmac0; + + led-boot = &led_wps; + led-failsafe = &led_system_red; + led-upgrade = &led_system_red; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + key-0 { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + key-1 { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_wps: led-1 { + color = ; + function = LED_FUNCTION_WPS; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_system_red: led-2 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led-3 { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_3fff4 0>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_3fffa 1>; + nvmem-cell-names = "mac-address"; +}; + +ðphy0 { + /delete-property/ interrupts; +}; + +&nand { + status = "okay"; + + mediatek,nmbm; + mediatek,bmt-remap-range = <0x000000 0x580000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + 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>; + }; + + macaddr_factory_3fff4: macaddr@3fff4 { + compatible = "mac-base"; + reg = <0x3fff4 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_3fffa: macaddr@3fffa { + compatible = "mac-base"; + reg = <0x3fffa 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@180000 { + label = "firmware"; + reg = <0x180000 0x7680000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x7280000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + + mediatek,disable-radar-background; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@4 { + status = "okay"; + label = "lan1"; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr2.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr2.dts new file mode 100644 index 00000000000000..eb657ae87b6c8c --- /dev/null +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr2.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_iodata_wn-xx-xr.dtsi" + +/ { + compatible = "iodata,wn-ax2033gr2", "mediatek,mt7621-soc"; + model = "I-O DATA WN-AX2033GR2"; +}; + +&partitions { + partition@6b00000 { + label = "Backup"; + reg = <0x6b00000 0x1480000>; + read-only; + }; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <2400000 2483000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <5000000 5710000>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_keenetic_kn-1510.dts b/target/linux/ramips/dts/mt7628an_keenetic_kn-1510.dts new file mode 100644 index 00000000000000..dbc4db155779db --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_keenetic_kn-1510.dts @@ -0,0 +1,232 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include +#include + +/ { + compatible = "keenetic,kn-1510", "mediatek,mt7628an-soc"; + model = "Keenetic KN-1510"; + + aliases { + label-mac-device = ðernet; + + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + internet { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + wifi2 { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wifi5 { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&firmware1 &firmware2>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x0 0xf20000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2s", "gpio", "refclk", "wdt", "wled_an"; + function = "gpio"; + }; +}; + +&usbphy { + status = "disabled"; +}; + +&ehci { + status = "disabled"; +}; + +&ohci { + status = "disabled"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <32000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-config"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "rf-eeprom"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; + }; + + firmware1: partition@50000 { + label = "firmware_1"; + reg = <0x50000 0x790000>; + }; + + partition@7e0000 { + label = "config_1"; + reg = <0x7e0000 0x10000>; + read-only; + }; + + partition@7f0000 { + label = "dump"; + reg = <0x7f0000 0x10000>; + read-only; + }; + + partition@800000 { + label = "u-state"; + reg = <0x800000 0x30000>; + read-only; + }; + + partition@830000 { + label = "u-config_res"; + reg = <0x830000 0x10000>; + read-only; + }; + + partition@840000 { + label = "rf-eeprom_res"; + reg = <0x840000 0x10000>; + read-only; + }; + + firmware2: partition@850000 { + label = "firmware_2"; + reg = <0x850000 0x790000>; + }; + + partition@fe0000 { + label = "config_2"; + reg = <0xfe0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&esw { + mediatek,portmap = <0x3e>; + mediatek,portdisable = <0x30>; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; diff --git a/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c b/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c index 013fa88a0e63aa..82d6955f8e6cd5 100644 --- a/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c +++ b/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "../virt-dma.h" @@ -644,7 +643,6 @@ static const struct of_device_id mtk_hsdma_of_match[] = { static int mtk_hsdma_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct mtk_hsdma_chan *chan; struct mtk_hsdam_engine *hsdma; struct dma_device *dd; @@ -656,10 +654,6 @@ static int mtk_hsdma_probe(struct platform_device *pdev) if (ret) return ret; - match = of_match_device(mtk_hsdma_of_match, &pdev->dev); - if (!match) - return -EINVAL; - hsdma = devm_kzalloc(&pdev->dev, sizeof(*hsdma), GFP_KERNEL); if (!hsdma) return -EINVAL; diff --git a/target/linux/ramips/files/drivers/dma/ralink-gdma.c b/target/linux/ramips/files/drivers/dma/ralink-gdma.c index b6458967a19893..d92475e48f2a37 100644 --- a/target/linux/ramips/files/drivers/dma/ralink-gdma.c +++ b/target/linux/ramips/files/drivers/dma/ralink-gdma.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "virt-dma.h" @@ -118,7 +117,7 @@ struct gdma_dmaengine_chan { struct gdma_dma_dev { struct dma_device ddev; struct device_dma_parameters dma_parms; - struct gdma_data *data; + const struct gdma_data *data; void __iomem *base; struct tasklet_struct task; volatile unsigned long chan_issued; @@ -789,7 +788,6 @@ MODULE_DEVICE_TABLE(of, gdma_of_match_table); static int gdma_dma_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct gdma_dmaengine_chan *chan; struct gdma_dma_dev *dma_dev; struct dma_device *dd; @@ -797,16 +795,13 @@ static int gdma_dma_probe(struct platform_device *pdev) int ret; int irq; void __iomem *base; - struct gdma_data *data; + const struct gdma_data *data; ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) return ret; - match = of_match_device(gdma_of_match_table, &pdev->dev); - if (!match) - return -EINVAL; - data = (struct gdma_data *)match->data; + data = of_device_get_match_data(&pdev->dev); dma_dev = devm_kzalloc(&pdev->dev, struct_size(dma_dev, chan, data->chancnt), diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c index 3bf2c2e83cebee..75464adf53e867 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c index f45c874eee6554..ebb1d44c0ef717 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c index 9d40dfb520098b..07f092a2f8caee 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index f53746eee830ac..031f0728f69e8e 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1523,7 +1522,6 @@ static void fe_pending_work(struct work_struct *work) static int fe_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct fe_soc_data *soc; struct net_device *netdev; struct fe_priv *priv; @@ -1534,9 +1532,7 @@ static int fe_probe(struct platform_device *pdev) if (err) dev_err(&pdev->dev, "failed to reset device\n"); - match = of_match_device(of_fe_match, &pdev->dev); - soc = (struct fe_soc_data *)match->data; - + soc = (struct fe_soc_data *)of_device_get_match_data(&pdev->dev); if (soc->reg_table) fe_reg_table = soc->reg_table; else diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 4331a532d9b94a..cd595e72c43948 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1250,6 +1250,22 @@ define Device/edup_ep-rt2960s endef TARGET_DEVICES += edup_ep-rt2960s +define Device/edup_ep-rt2983 + $(Device/dsa-migration) + $(Device/nand) + IMAGE_SIZE := 121344k + DEVICE_VENDOR := EDUP + DEVICE_MODEL := EP-RT2983 + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel $(loadaddr-y) | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | \ + append-ubi | check-size + DEVICE_PACKAGES += kmod-mt7915-firmware +endef +TARGET_DEVICES += edup_ep-rt2983 + define Device/elecom_wrc-gs $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -1737,6 +1753,15 @@ define Device/iodata_wn-ax2033gr endef TARGET_DEVICES += iodata_wn-ax2033gr +define Device/iodata_wn-ax2033gr2 + $(Device/iodata_nand) + DEVICE_MODEL := WN-AX2033GR2 + KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ + uImage lzma -M 0x434f4d42 -n '3.10(XBH.0)b50' | iodata-mstc-header + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools +endef +TARGET_DEVICES += iodata_wn-ax2033gr2 + define Device/iodata_wn-deax1800gr $(Device/dsa-migration) DEVICE_VENDOR := I-O DATA diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index a24a95815df54c..01069a5f863b0e 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -484,6 +484,17 @@ define Device/keenetic_kn-1221 endef TARGET_DEVICES += keenetic_kn-1221 +define Device/keenetic_kn-1510 + IMAGE_SIZE := 15488k + DEVICE_VENDOR := Keenetic + DEVICE_MODEL := KN-1510 + DEVICE_PACKAGES := kmod-mt76x0e + IMAGES += factory.bin + IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \ + check-size | zyimage -d 0x801510 -v "KN-1510" +endef +TARGET_DEVICES += keenetic_kn-1510 + define Device/keenetic_kn-1613 IMAGE_SIZE := 15073280 DEVICE_VENDOR := Keenetic diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 65b9aed81e8b0a..eb4de3e03df60d 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -62,6 +62,7 @@ cudy,ap1300-outdoor-v1) ucidef_set_led_netdev "lan" "lan" "green:lan" "lan" ;; confiabits,mt7621-v1|\ +edup,ep-rt2983|\ genexis,pulse-ex400|\ netis,n6) ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx" 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 1f918d50fbfef7..4428868cd40884 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 @@ -15,6 +15,7 @@ ramips_setup_interfaces() confiabits,mt7621-v1|\ dlink,dir-x1860-b1|\ edup,ep-rt2960s|\ + edup,ep-rt2983|\ gehua,ghl-r-001|\ h3c,tx1800-plus|\ h3c,tx1801-plus|\ 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 fdfb199af370df..3ca479e861d866 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 @@ -74,6 +74,15 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress ;; + edup,ep-rt2983|\ + netis,n6) + hw_mac_addr="$(mtd_get_mac_binary Factory 0x4)" + hw_mac_addr=$(macaddr_setbit $hw_mac_addr 28) + hw_mac_2g=$(macaddr_unsetbit $hw_mac_addr 26) + hw_mac_5g=$(macaddr_setbit $hw_mac_addr 27) + [ "$PHYNBR" = "0" ] && echo -n "$hw_mac_2g" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_5g" > /sys${DEVPATH}/macaddress + ;; h3c,tx1800-plus|\ h3c,tx1801-plus|\ h3c,tx1806) @@ -133,14 +142,6 @@ 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 ;; - netis,n6) - hw_mac_addr="$(mtd_get_mac_binary Factory 0x4)" - hw_mac_addr=$(macaddr_setbit $hw_mac_addr 28) - hw_mac_2g=$(macaddr_unsetbit $hw_mac_addr 26) - hw_mac_5g=$(macaddr_setbit $hw_mac_addr 27) - [ "$PHYNBR" = "0" ] && echo -n "$hw_mac_2g" > /sys${DEVPATH}/macaddress - [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_5g" > /sys${DEVPATH}/macaddress - ;; mts,wg430223) hw_mac_addr=$(macaddr_add $(mtd_get_mac_encrypted_arcadyan "board_data") 1) [ "$PHYNBR" = "0" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress 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 49ab14a3dd0920..f80d9d92664084 100644 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -96,6 +96,7 @@ platform_do_upgrade() { dlink,dir-853-a3|\ dlink,dir-x1860-b1|\ edup,ep-rt2960s|\ + edup,ep-rt2983|\ elecom,wmc-x1800gst|\ elecom,wsc-x1800gs|\ etisalat,s3|\ @@ -177,6 +178,7 @@ platform_do_upgrade() { ;; iodata,wn-ax1167gr2|\ iodata,wn-ax2033gr|\ + iodata,wn-ax2033gr2|\ iodata,wn-dx1167r|\ iodata,wn-dx2033gr) iodata_mstc_set_flag "debugflag" "factory" "0xfe75" "0,1" "1" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 0a4b417fbe1459..b245805b72a0fb 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -75,6 +75,7 @@ hiwifi,hc5761a) keenetic,kn-1112|\ keenetic,kn-1212|\ keenetic,kn-1221|\ +keenetic,kn-1510|\ keenetic,kn-1613|\ keenetic,kn-1711|\ keenetic,kn-1713) diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index f292120b326330..fbf5fc52e9488b 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -137,6 +137,7 @@ ramips_setup_interfaces() hongdian,h8850-v20|\ keenetic,kn-1112|\ keenetic,kn-1212|\ + keenetic,kn-1510|\ keenetic,kn-1613|\ keenetic,kn-1713|\ motorola,mwr03) @@ -330,6 +331,7 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory 0x2e) ;; keenetic,kn-1221|\ + keenetic,kn-1510|\ keenetic,kn-1613|\ keenetic,kn-3211|\ zyxel,keenetic-extra-ii) diff --git a/target/linux/ramips/patches-6.12/835-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-6.12/835-asoc-add-mt7620-support.patch index d4027c904ad3f8..08edb5504aee3b 100644 --- a/target/linux/ramips/patches-6.12/835-asoc-add-mt7620-support.patch +++ b/target/linux/ramips/patches-6.12/835-asoc-add-mt7620-support.patch @@ -59,7 +59,7 @@ Signed-off-by: John Crispin +obj-$(CONFIG_SND_RALINK_SOC_I2S) += snd-soc-ralink-i2s.o --- /dev/null +++ b/sound/soc/ralink/ralink-i2s.c -@@ -0,0 +1,921 @@ +@@ -0,0 +1,916 @@ +/* + * Copyright (C) 2010, Lars-Peter Clausen + * Copyright (C) 2016 Michael Lee @@ -81,7 +81,6 @@ Signed-off-by: John Crispin +#include +#include +#include -+#include +#include +#include + @@ -848,14 +847,13 @@ Signed-off-by: John Crispin + +static int ralink_i2s_probe(struct platform_device *pdev) +{ -+ const struct of_device_id *match; + struct device_node *np = pdev->dev.of_node; + struct device *dev = &pdev->dev; + struct resource *res; + struct ralink_i2s *i2s; + int irq, ret; + u32 dma_req; -+ struct rt_i2s_data *data; ++ const struct rt_i2s_data *data; + + i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL); + if (!i2s) @@ -863,10 +861,7 @@ Signed-off-by: John Crispin + + i2s->dev = dev; + -+ match = of_match_device(ralink_i2s_match_table, dev); -+ if (!match) -+ return -EINVAL; -+ data = (struct rt_i2s_data *)match->data; ++ data = of_device_get_match_data(dev); + i2s->flags = data->flags; + /* setup out 12Mhz refclk to codec as mclk */ + if (data->refclk_setup) diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi index c601a5fc1c486a..0d3bbcace1a5ec 100644 --- a/target/linux/realtek/dts/macros.dtsi +++ b/target/linux/realtek/dts/macros.dtsi @@ -74,16 +74,15 @@ phy-mode = #m ; \ }; -#define SWITCH_SFP_PORT(n, s, m) \ - port##n: port@##n { \ - reg = <##n>; \ - label = SWITCH_PORT_LABEL(s) ; \ - phy-handle = <&phy##n>; \ - phy-mode = #m ; \ - fixed-link { \ - speed = <1000>; \ - full-duplex; \ - }; \ +#define SWITCH_PORT_SFP(p, l, s, c, g) \ + port##p: port@##p { \ + reg = <##p>; \ + label = SWITCH_PORT_LABEL(l) ; \ + led-set = <##c>; \ + pcs-handle = <&serdes##s>; \ + phy-mode = "1000base-x"; \ + sfp = <&sfp##g>; \ + managed = "in-band-status"; \ }; // LED Set mode definitions diff --git a/target/linux/realtek/dts/rtl8393_tplink_sg2452p-v4.dts b/target/linux/realtek/dts/rtl8393_tplink_sg2452p-v4.dts index 515c63f60714dd..10526efc5c839c 100644 --- a/target/linux/realtek/dts/rtl8393_tplink_sg2452p-v4.dts +++ b/target/linux/realtek/dts/rtl8393_tplink_sg2452p-v4.dts @@ -277,72 +277,68 @@ ðernet0 { nvmem-cells = <&factory_macaddr>; nvmem-cell-names = "mac-address"; +}; - mdio: mdio-bus { - compatible = "realtek,rtl838x-mdio"; - #address-cells = <1>; - #size-cells = <0>; - - /* External phy RTL8218B #1 */ - PHY_C22(0, 0) - PHY_C22(1, 1) - PHY_C22(2, 2) - PHY_C22(3, 3) - PHY_C22(4, 4) - PHY_C22(5, 5) - PHY_C22(6, 6) - PHY_C22(7, 7) - - /* External phy RTL8218B #2 */ - PHY_C22(8, 8) - PHY_C22(9, 9) - PHY_C22(10, 10) - PHY_C22(11, 11) - PHY_C22(12, 12) - PHY_C22(13, 13) - PHY_C22(14, 14) - PHY_C22(15, 15) - - /* External phy RTL8218B #3 */ - PHY_C22(16, 16) - PHY_C22(17, 17) - PHY_C22(18, 18) - PHY_C22(19, 19) - PHY_C22(20, 20) - PHY_C22(21, 21) - PHY_C22(22, 22) - PHY_C22(23, 23) - - /* External phy RTL8218B #4 */ - PHY_C22(24, 24) - PHY_C22(25, 25) - PHY_C22(26, 26) - PHY_C22(27, 27) - PHY_C22(28, 28) - PHY_C22(29, 29) - PHY_C22(30, 30) - PHY_C22(31, 31) - - /* External phy RTL8218B #5 */ - PHY_C22(32, 32) - PHY_C22(33, 33) - PHY_C22(34, 34) - PHY_C22(35, 35) - PHY_C22(36, 36) - PHY_C22(37, 37) - PHY_C22(38, 38) - PHY_C22(39, 39) - - /* External phy RTL8218B #6 */ - PHY_C22(40, 40) - PHY_C22(41, 41) - PHY_C22(42, 42) - PHY_C22(43, 43) - PHY_C22(44, 44) - PHY_C22(45, 45) - PHY_C22(46, 46) - PHY_C22(47, 47) - }; +&mdio_bus0 { + /* External phy RTL8218B #1 */ + PHY_C22(0, 0) + PHY_C22(1, 1) + PHY_C22(2, 2) + PHY_C22(3, 3) + PHY_C22(4, 4) + PHY_C22(5, 5) + PHY_C22(6, 6) + PHY_C22(7, 7) + + /* External phy RTL8218B #2 */ + PHY_C22(8, 8) + PHY_C22(9, 9) + PHY_C22(10, 10) + PHY_C22(11, 11) + PHY_C22(12, 12) + PHY_C22(13, 13) + PHY_C22(14, 14) + PHY_C22(15, 15) + + /* External phy RTL8218B #3 */ + PHY_C22(16, 16) + PHY_C22(17, 17) + PHY_C22(18, 18) + PHY_C22(19, 19) + PHY_C22(20, 20) + PHY_C22(21, 21) + PHY_C22(22, 22) + PHY_C22(23, 23) + + /* External phy RTL8218B #4 */ + PHY_C22(24, 24) + PHY_C22(25, 25) + PHY_C22(26, 26) + PHY_C22(27, 27) + PHY_C22(28, 28) + PHY_C22(29, 29) + PHY_C22(30, 30) + PHY_C22(31, 31) + + /* External phy RTL8218B #5 */ + PHY_C22(32, 32) + PHY_C22(33, 33) + PHY_C22(34, 34) + PHY_C22(35, 35) + PHY_C22(36, 36) + PHY_C22(37, 37) + PHY_C22(38, 38) + PHY_C22(39, 39) + + /* External phy RTL8218B #6 */ + PHY_C22(40, 40) + PHY_C22(41, 41) + PHY_C22(42, 42) + PHY_C22(43, 43) + PHY_C22(44, 44) + PHY_C22(45, 45) + PHY_C22(46, 46) + PHY_C22(47, 47) }; &switch0 { diff --git a/target/linux/realtek/dts/rtl9302_xikestor_sks8300-12e2t2x.dts b/target/linux/realtek/dts/rtl9302_xikestor_sks8300-12e2t2x.dts index bd0f86c16940f4..37a1ea48976a6c 100644 --- a/target/linux/realtek/dts/rtl9302_xikestor_sks8300-12e2t2x.dts +++ b/target/linux/realtek/dts/rtl9302_xikestor_sks8300-12e2t2x.dts @@ -23,6 +23,13 @@ keys { compatible = "gpio-keys"; + + /* The following sets up the GPIO pin for the HC595 shift registers. + Since there are no LED nodes defined for this switch, do the setup + in the GPIO keys driver. */ + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_enable_led_sync>; + button-reset { label = "reset"; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; @@ -58,6 +65,7 @@ maximum-power-milliwatt = <1500>; mod-def0-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; los-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; #thermal-sensor-cells = <0>; }; @@ -67,6 +75,7 @@ maximum-power-milliwatt = <1500>; mod-def0-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; los-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>; #thermal-sensor-cells = <0>; }; diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi index 68a205d95c7be2..1e1b855dfbb45f 100644 --- a/target/linux/realtek/dts/rtl931x.dtsi +++ b/target/linux/realtek/dts/rtl931x.dtsi @@ -400,7 +400,7 @@ pinctrl-single,bits = <0x0 0x200 0x200>; }; - /* Enable GPIO6 and GPIO7, possibly unknown others */ + /* Enable GPIOs 3-7 */ pinmux_disable_jtag: disable_jtag { pinctrl-single,bits = <0x0 0x0 0x8000>; }; diff --git a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c index 8e690767ccc232..6a401d198e88c8 100644 --- a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c @@ -10,8 +10,9 @@ #include #include -#define RTMDIO_MAX_PHY 57 -#define RTMDIO_MAX_SMI_BUS 4 +#define RTMDIO_MAX_PORTS 57 +#define RTMDIO_MAX_SMI_BUSSES 4 + #define RTMDIO_PAGE_SELECT 0x1f #define RTMDIO_PHY_AQR113C_A 0x31c31c12 @@ -109,7 +110,7 @@ #define RTMDIO_931X_SMI_10GPHY_POLLING_SEL4 (0x0D00) #define for_each_port(ctrl, pn) \ - for_each_set_bit(pn, ctrl->valid_ports, RTMDIO_MAX_PHY) + for_each_set_bit(pn, ctrl->valid_ports, RTMDIO_MAX_PORTS) #define rtmdio_ctrl_from_bus(bus) \ (((struct rtmdio_chan *)(bus)->priv)->ctrl) @@ -192,9 +193,9 @@ struct rtmdio_ctrl { struct mutex lock; struct regmap *map; const struct rtmdio_config *cfg; - struct rtmdio_port port[RTMDIO_MAX_PHY]; - struct rtmdio_bus bus[RTMDIO_MAX_SMI_BUS]; - DECLARE_BITMAP(valid_ports, RTMDIO_MAX_PHY); + struct rtmdio_port port[RTMDIO_MAX_PORTS]; + struct rtmdio_bus bus[RTMDIO_MAX_SMI_BUSSES]; + DECLARE_BITMAP(valid_ports, RTMDIO_MAX_PORTS); }; struct rtmdio_chan { @@ -246,9 +247,9 @@ static int rtmdio_run_cmd(struct mii_bus *bus, int cmd, int mask, int regnum, in ret = regmap_update_bits(ctrl->map, regnum, mask, cmd | RTMDIO_RUN); ret = regmap_read_poll_timeout(ctrl->map, regnum, val, !(val & RTMDIO_RUN), 20, 500000); if (ret) - WARN_ONCE(1, "mdio bus access timed out\n"); + dev_warn_once(&bus->dev, "access timed out\n"); else if (val & fail) { - WARN_ONCE(1, "mdio bus access failed\n"); + dev_warn_once(&bus->dev, "access failed\n"); ret = -EIO; } @@ -744,7 +745,7 @@ static int rtmdio_930x_setup_ctrl(struct rtmdio_ctrl *ctrl) unsigned int mask, val; /* Define C22/C45 bus feature set */ - for (int smi_bus = 0; smi_bus < RTMDIO_MAX_SMI_BUS; smi_bus++) { + for (int smi_bus = 0; smi_bus < RTMDIO_MAX_SMI_BUSSES; smi_bus++) { mask = BIT(16 + smi_bus); val = ctrl->bus[smi_bus].is_c45 ? mask : 0; regmap_update_bits(ctrl->map, RTMDIO_930X_SMI_GLB_CTRL, mask, val); @@ -800,7 +801,7 @@ static int rtmdio_931x_setup_ctrl(struct rtmdio_ctrl *ctrl) msleep(100); /* Define C22/C45 bus feature set */ - for (int smi_bus = 0; smi_bus < RTMDIO_MAX_SMI_BUS; smi_bus++) { + for (int smi_bus = 0; smi_bus < RTMDIO_MAX_SMI_BUSSES; smi_bus++) { if (ctrl->bus[smi_bus].is_c45) c45_mask |= 0x2 << (smi_bus * 2); /* Std. C45, non-standard is 0x3 */ } @@ -821,7 +822,7 @@ static void rtmdio_931x_setup_polling(struct rtmdio_ctrl *ctrl) /* Define PHY specific polling parameters */ for_each_port(ctrl, pn) { - u8 smi = ctrl->port[pn].smi_bus; + u8 smi_bus = ctrl->port[pn].smi_bus; unsigned int mask, val; if (rtmdio_get_phy_info(ctrl, pn, &phyinfo)) @@ -835,19 +836,19 @@ static void rtmdio_931x_setup_polling(struct rtmdio_ctrl *ctrl) mask = val = 0; /* PRVTE0 polling */ - mask |= BIT(20 + smi); + mask |= BIT(20 + smi_bus); if (phyinfo.has_res_reg) - val |= BIT(20 + smi); + val |= BIT(20 + smi_bus); /* PRVTE1 polling */ - mask |= BIT(24 + smi); + mask |= BIT(24 + smi_bus); if (phyinfo.force_res) - val |= BIT(24 + smi); + val |= BIT(24 + smi_bus); regmap_update_bits(ctrl->map, RTMDIO_931X_SMI_GLB_CTRL0, mask, val); /* polling std. or proprietary format (bit 0 of SMI_SETX_FMT_SEL) */ - mask = BIT(smi * 2); + mask = BIT(smi_bus * 2); val = phyinfo.force_res ? mask : 0; regmap_update_bits(ctrl->map, RTMDIO_931X_SMI_GLB_CTRL1, mask, val); @@ -907,7 +908,7 @@ static int rtmdio_map_ports(struct device *dev) return dev_err_probe(dev, -EINVAL, "%pfwP no bus address\n", of_fwnode_handle(phy->parent)); - if (smi_bus >= RTMDIO_MAX_SMI_BUS) + if (smi_bus >= RTMDIO_MAX_SMI_BUSSES) return dev_err_probe(dev, -EINVAL, "%pfwP illegal bus number\n", of_fwnode_handle(phy->parent)); diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index dc7a907709a268..965657938e96a9 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -162,6 +162,12 @@ define Device/uimage-rt-loader KERNEL_INITRAMFS := $$(KERNEL/rt-loader) | uImage none endef +define Device/rt-loader-bootbase + KERNEL/rt-compress := kernel-bin | append-dtb | rt-compress + KERNEL := $$(KERNEL/rt-compress) | uImage lzma + KERNEL_INITRAMFS := $$(KERNEL/rt-compress) | uImage lzma | rt-loader +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/realtek/image/rtl839x.mk b/target/linux/realtek/image/rtl839x.mk index 78d9eee56a46c0..13e2b6a4d7f1ad 100644 --- a/target/linux/realtek/image/rtl839x.mk +++ b/target/linux/realtek/image/rtl839x.mk @@ -119,16 +119,7 @@ endif DEVICE_MODEL := GS1920-24HP DEVICE_PACKAGES := \ kmod-hwmon-lm85 - KERNEL := \ - kernel-bin | \ - append-dtb | \ - rt-compress | \ - uImage lzma - KERNEL_INITRAMFS := \ - kernel-bin | \ - append-dtb | \ - rt-compress | \ - rt-loader + $(Device/rt-loader-bootbase) endef define Device/zyxel_gs1920-24hp-v1 diff --git a/target/linux/realtek/patches-6.18/811-hasivo-hs104-pse-addition.patch b/target/linux/realtek/patches-6.18/811-hasivo-hs104-pse-addition.patch new file mode 100644 index 00000000000000..3bb82eab003c18 --- /dev/null +++ b/target/linux/realtek/patches-6.18/811-hasivo-hs104-pse-addition.patch @@ -0,0 +1,521 @@ + +--- a/drivers/net/pse-pd/Kconfig ++++ b/drivers/net/pse-pd/Kconfig +@@ -52,4 +52,11 @@ config PSE_TPS23881 + + To compile this driver as a module, choose M here: the + module will be called tps23881. ++ ++config PSE_HASIVO_HS104 ++ tristate "Hasivo HS104 PoE PSE Controller" ++ depends on I2C ++ help ++ Support for the Hasivo HS104 PoE PSE Controller chip. ++ This driver allows control and monitoring of PoE ports via I2C. + endif +--- a/drivers/net/pse-pd/Makefile ++++ b/drivers/net/pse-pd/Makefile +@@ -7,3 +7,4 @@ obj-$(CONFIG_PSE_REGULATOR) += pse_regul + obj-$(CONFIG_PSE_PD692X0) += pd692x0.o + obj-$(CONFIG_PSE_SI3474) += si3474.o + obj-$(CONFIG_PSE_TPS23881) += tps23881.o ++obj-$(CONFIG_PSE_HASIVO_HS104) += hasivo_hs104.o +--- /dev/null ++++ b/Documentation/devicetree/bindings/net/pse-pd/hasivo,hs104.yaml +@@ -0,0 +1,48 @@ ++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/net/pse-pd/hasivo,hs104.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Hasivo HS104 Power Sourcing Equipment controller ++ ++maintainers: ++ - Bevan Weiss ++ ++allOf: ++ - $ref: pse-controller.yaml# ++ ++properties: ++ compatible: ++ description: Device compatible string. ++ enum: ++ - hasivo,hs104pti ++ - hasivo,hs104pbi ++ ++ reg: ++ maxItems: 1 ++ ++ hasivo,port-enable-delay-ms: ++ $ref: /schemas/types.yaml#/definitions/uint32 ++ description: Delay in milliseconds after enabling a port before proceeding. ++ minimum: 0 ++ maximum: 65535 ++ ++unevaluatedProperties: false ++ ++required: ++ - compatible ++ - reg ++ ++examples: ++ - | ++ i2c { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ethernet-pse@15 { ++ compatible = "hasivo,hs104pti"; ++ reg = <0x15>; ++ hasivo,port-enable-delay-ms = <300>; ++ }; ++ }; +--- /dev/null ++++ b/drivers/net/pse-pd/hasivo_hs104.c +@@ -0,0 +1,445 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Hasivo HS104 PoE PSE controller (I2C) ++ * ++ * Copyright (c) 2025 Bevan Weiss ++ * ++ * The HS104PTI/HS104PBI are single-chip PoE PSE controllers managing 4 ++ * delivery channels. Allowing them to supply 4 ports of 802.3af/at/bt ++ * power. ++ * The HS104PTI can have 1x 802.3bt port and 3x 802.3at ports. ++ * The HS104PBI can have 4x 802.3bt ports. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define HS104_MAX_PORTS 4 ++ ++/* Registers */ ++#define HS104_REG_PW_STATUS 0x01 ++#define HS104_PORT_BIT(port) (0x08 >> port) ++#define HS104_REG_INPUT_V 0x02 /* 16-bit, 0.01V */ ++#define HS104_REG_PORT0_A 0x04 /* 16-bit, 1mA */ ++#define HS104_REG_DEVID 0x0C ++#define HS104_REG_PORT0_CLASS 0x0D ++#define HS104_REG_PW_EN 0x14 ++#define HS104_REG_PROTOCOL 0x19 ++#define HS104_REG_TOTAL_POWER 0x1D /* 16-bit, 0.01W */ ++#define HS104_REG_PORT0_POWER 0x21 /* 16-bit, 0.01W */ ++ ++#define HS104_DEVICE_ID 0x91 ++ ++/* Command execute */ ++#define HS104_EXECUTE 0x40 ++ ++/* Protocol encoding */ ++#define HS104_PROTO_MASK 0x3 ++#define HS104_PROTO_BT 0 ++#define HS104_PROTO_HIPO 1 ++#define HS104_PROTO_AT 2 ++#define HS104_PROTO_AF 3 ++ ++/* Power limits (mW) */ ++#define HS104_AF_MW 15400 ++#define HS104_AT_MW 30000 ++#define HS104_BT_MW 60000 ++#define HS104_HIPO_MW 90000 ++ ++#define HS104_uV_STEP 10000 ++#define HS104_uA_STEP 1000 ++#define HS104_mW_STEP 10 ++ ++struct hs104_port_desc { ++ struct led_trigger delivering_trig; ++ struct led_trigger enabled_trig; ++ bool delivering; ++ bool enabled; ++}; ++ ++struct hs104_priv { ++ struct i2c_client *client; ++ struct pse_controller_dev pcdev; ++ struct device_node *np; ++ struct hs104_port_desc port[HS104_MAX_PORTS]; ++ unsigned int port_enable_delay_ms; ++}; ++ ++static struct hs104_priv *to_hs104(struct pse_controller_dev *pcdev) ++{ ++ return container_of(pcdev, struct hs104_priv, pcdev); ++} ++ ++static int hs104_read_be16(struct hs104_priv *priv, ++ unsigned int reg, unsigned int step) ++{ ++ int ret; ++ __be16 val; ++ ++ ret = i2c_smbus_read_i2c_block_data(priv->client, reg, 2, (u8 *)&val); ++ if (ret < 0) ++ return ret; ++ ++ return (be16_to_cpu(val) & 0x3fff) * step; ++} ++ ++static void ++hs104_update_led(struct led_trigger *trig, bool *state, bool new) ++{ ++ if (*state == new) ++ return; ++ ++ *state = new; ++ ++ if (new) ++ led_trigger_event(trig, LED_FULL); ++ else ++ led_trigger_event(trig, LED_OFF); ++} ++ ++ ++/* --- PSE ops --- */ ++static int hs104_pi_enable(struct pse_controller_dev *pcdev, int id) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int ret, val; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PW_EN); ++ if (ret) ++ return ret; ++ ++ val = ret | HS104_EXECUTE | HS104_PORT_BIT(id); ++ ++ ret = i2c_smbus_write_byte_data(priv->client, HS104_REG_PW_EN, val); ++ if (ret) ++ return ret; ++ ++ if (priv->port_enable_delay_ms) ++ msleep(priv->port_enable_delay_ms); ++ ++ return 0; ++} ++ ++static int hs104_pi_disable(struct pse_controller_dev *pcdev, int id) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int ret, val; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PW_EN); ++ if (ret) ++ return ret; ++ ++ val = (ret & ~HS104_PORT_BIT(id)) | HS104_EXECUTE; ++ ++ ret = i2c_smbus_write_byte_data(priv->client, HS104_REG_PW_EN, val); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int ++hs104_pi_get_admin_state(struct pse_controller_dev *pcdev, int id, ++ struct pse_admin_state *admin_state) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int ret; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PW_EN); ++ if (ret < 0) { ++ admin_state->c33_admin_state = ++ ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN; ++ return ret; ++ } ++ ++ bool enabled = ret & HS104_PORT_BIT(id); ++ ++ admin_state->c33_admin_state = ++ enabled ? ++ ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED : ++ ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED; ++ ++ hs104_update_led(&priv->port[id].enabled_trig, ++ &priv->port[id].enabled, ++ enabled); ++ ++ return 0; ++} ++ ++static int ++hs104_pi_get_pw_status(struct pse_controller_dev *pcdev, int id, ++ struct pse_pw_status *pw_status) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int ret; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PW_STATUS); ++ if (ret < 0) { ++ pw_status->c33_pw_status = ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN; ++ return ret; ++ } ++ ++ bool delivering = ret & HS104_PORT_BIT(id); ++ pw_status->c33_pw_status = delivering ? ++ ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING : ++ ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED; ++ ++ hs104_update_led(&priv->port[id].delivering_trig, ++ &priv->port[id].delivering, ++ delivering); ++ ++ return 0; ++} ++ ++static int ++hs104_pi_get_voltage(struct pse_controller_dev *pcdev, ++ int /*port*/) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int uV; ++ ++ uV = hs104_read_be16(priv, HS104_REG_INPUT_V, HS104_uV_STEP); ++ return uV; ++} ++ ++static int ++hs104_pi_get_actual_pw(struct pse_controller_dev *pcdev, ++ int id) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int mW; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ mW = hs104_read_be16(priv, ++ HS104_REG_PORT0_POWER + 2*id, ++ HS104_mW_STEP); ++ return mW; ++} ++ ++static int ++hs104_pi_get_pw_class(struct pse_controller_dev *pcdev, int id) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int ret; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, ++ HS104_REG_PORT0_CLASS + id); ++ if (ret < 0) ++ return ret; ++ ++ return ret; ++} ++ ++static int ++hs104_pi_get_pw_limit(struct pse_controller_dev *pcdev, ++ int id) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ unsigned int proto; ++ int ret; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PROTOCOL); ++ if (ret < 0) ++ return ret; ++ ++ proto = (ret >> (id * 2)) & HS104_PROTO_MASK; ++ switch (proto) { ++ case HS104_PROTO_AF: return HS104_AF_MW; ++ case HS104_PROTO_AT: return HS104_AT_MW; ++ case HS104_PROTO_BT: return HS104_BT_MW; ++ case HS104_PROTO_HIPO: return HS104_HIPO_MW; ++ default: ++ return -ENODATA; ++ } ++ ++ return 0; ++} ++ ++static int ++hs104_pi_set_pw_limit(struct pse_controller_dev *pcdev, ++ int id, int max_mw) ++{ ++ struct hs104_priv *priv = to_hs104(pcdev); ++ int proto, mask; ++ int ret; ++ ++ if (id < 0 || id >= HS104_MAX_PORTS) ++ return -EINVAL; ++ ++ if (max_mw <= HS104_AF_MW) ++ proto = HS104_PROTO_AF; ++ else if (max_mw <= HS104_AT_MW) ++ proto = HS104_PROTO_AT; ++ else if (max_mw <= HS104_BT_MW) ++ proto = HS104_PROTO_BT; ++ else if (max_mw <= HS104_HIPO_MW) ++ proto = HS104_PROTO_HIPO; ++ else ++ return -EINVAL; ++ ++ mask = HS104_PROTO_MASK << (id * 2); ++ proto = proto << (id * 2); ++ ++ ret = i2c_smbus_read_byte_data(priv->client, HS104_REG_PROTOCOL); ++ if (ret < 0) ++ return ret; ++ ++ ret = ret & ~mask; ++ ret = ret | proto; ++ ++ return i2c_smbus_write_byte_data(priv->client, HS104_REG_PROTOCOL, ret); ++} ++ ++static const struct ethtool_c33_pse_pw_limit_range hs104_pw_ranges[] = { ++ { .max = HS104_AF_MW }, ++ { .max = HS104_AT_MW }, ++ { .max = HS104_BT_MW }, ++ { .max = HS104_HIPO_MW }, ++}; ++ ++static int ++hs104_pi_get_pw_limit_ranges(struct pse_controller_dev *pcdev, int id, ++ struct pse_pw_limit_ranges *pw_limit_ranges) ++{ ++ struct ethtool_c33_pse_pw_limit_range *c33_pw_limit_ranges; ++ ++ c33_pw_limit_ranges = kzalloc_objs(*c33_pw_limit_ranges, ++ ARRAY_SIZE(hs104_pw_ranges)); ++ if (!c33_pw_limit_ranges) ++ return -ENOMEM; ++ ++ for (int i = 0; i < ARRAY_SIZE(hs104_pw_ranges); i++) { ++ c33_pw_limit_ranges[i] = hs104_pw_ranges[i]; ++ } ++ ++ pw_limit_ranges->c33_pw_limit_ranges = c33_pw_limit_ranges; ++ return ARRAY_SIZE(hs104_pw_ranges); ++} ++ ++static const struct pse_controller_ops hs104_ops = { ++ .pi_enable = hs104_pi_enable, ++ .pi_disable = hs104_pi_disable, ++ .pi_get_admin_state = hs104_pi_get_admin_state, ++ .pi_get_pw_status = hs104_pi_get_pw_status, ++ .pi_get_voltage = hs104_pi_get_voltage, ++ .pi_get_actual_pw = hs104_pi_get_actual_pw, ++ .pi_get_pw_class = hs104_pi_get_pw_class, ++ .pi_get_pw_limit = hs104_pi_get_pw_limit, ++ .pi_set_pw_limit = hs104_pi_set_pw_limit, ++ .pi_get_pw_limit_ranges = hs104_pi_get_pw_limit_ranges, ++}; ++ ++static int hs104_i2c_probe(struct i2c_client *client) ++{ ++ struct device *dev = &client->dev; ++ struct hs104_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->client = client; ++ ++ ret = i2c_smbus_read_byte_data(client, HS104_REG_DEVID); ++ if (ret < 0) ++ return ret; ++ ++ if ((ret & 0xff) != HS104_DEVICE_ID) { ++ dev_err(dev, "Wrong device ID: 0x%x\n", ret & 0xff); ++ return -ENXIO; ++ } ++ ++ if (dev->of_node) ++ of_property_read_u32(dev->of_node, "hasivo,port-enable-delay-ms", ++ &priv->port_enable_delay_ms); ++ ++ for (int i = 0; i < HS104_MAX_PORTS; i++) { ++ struct hs104_port_desc *pled = &priv->port[i]; ++ ++ pled->delivering = false; ++ pled->delivering_trig.name = devm_kasprintf(dev, GFP_KERNEL, ++ "%s:port%ddelivering", ++ dev->of_node ? dev->of_node->name : dev_name(dev), ++ i); ++ if (!pled->delivering_trig.name) ++ return -ENOMEM; ++ ++ ret = devm_led_trigger_register(dev, &pled->delivering_trig); ++ if (ret) ++ return ret; ++ ++ pled->enabled = false; ++ pled->enabled_trig.name = devm_kasprintf(dev, GFP_KERNEL, ++ "%s:port%denabled", ++ dev->of_node ? dev->of_node->name : dev_name(dev), ++ i); ++ if (!pled->enabled_trig.name) ++ return -ENOMEM; ++ ++ ret = devm_led_trigger_register(dev, &pled->enabled_trig); ++ if (ret) ++ return ret; ++ } ++ ++ priv->np = dev->of_node; ++ priv->pcdev.owner = THIS_MODULE; ++ priv->pcdev.ops = &hs104_ops; ++ priv->pcdev.dev = dev; ++ priv->pcdev.types = ETHTOOL_PSE_C33; ++ priv->pcdev.nr_lines = HS104_MAX_PORTS; ++ priv->pcdev.of_pse_n_cells = 1; ++ ++ ret = devm_pse_controller_register(dev, &priv->pcdev); ++ if (ret) { ++ dev_err(dev, "Failed to register PSE controller: 0x%x\n", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static const struct of_device_id hs104_of_match[] = { ++ { .compatible = "hasivo,hs104pti", }, ++ { .compatible = "hasivo,hs104pbi", }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(of, hs104_of_match); ++ ++static struct i2c_driver hs104_driver = { ++ .probe = hs104_i2c_probe, ++ .driver = { ++ .name = "hasivo_hs104", ++ .of_match_table = hs104_of_match, ++ }, ++}; ++module_i2c_driver(hs104_driver); ++ ++MODULE_AUTHOR("Bevan Weiss "); ++MODULE_DESCRIPTION("Hasivo HS104 PoE PSE Controller driver"); ++MODULE_LICENSE("GPL"); diff --git a/target/linux/starfive/patches-6.12/0003-pwm-opencores-Add-PWM-driver-support.patch b/target/linux/starfive/patches-6.12/0003-pwm-opencores-Add-PWM-driver-support.patch index 4c0f046dc0e601..0cb700409e6e56 100644 --- a/target/linux/starfive/patches-6.12/0003-pwm-opencores-Add-PWM-driver-support.patch +++ b/target/linux/starfive/patches-6.12/0003-pwm-opencores-Add-PWM-driver-support.patch @@ -49,7 +49,7 @@ Signed-off-by: William Qiu obj-$(CONFIG_PWM_PXA) += pwm-pxa.o --- /dev/null +++ b/drivers/pwm/pwm-ocores.c -@@ -0,0 +1,230 @@ +@@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * OpenCores PWM Driver @@ -213,16 +213,11 @@ Signed-off-by: William Qiu + +static int ocores_pwm_probe(struct platform_device *pdev) +{ -+ const struct of_device_id *id; + struct device *dev = &pdev->dev; + struct ocores_pwm_device *ddata; + struct pwm_chip *chip; + int ret; + -+ id = of_match_device(ocores_pwm_of_match, dev); -+ if (!id) -+ return -EINVAL; -+ + chip = devm_pwmchip_alloc(dev, 8, sizeof(*ddata)); + if (IS_ERR(chip)) + return PTR_ERR(chip); @@ -230,7 +225,7 @@ Signed-off-by: William Qiu + chip->ops = &ocores_pwm_ops; + + ddata = chip_to_ocores(chip); -+ ddata->data = id->data; ++ ddata->data = of_device_get_match_data(dev); + + ddata->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(ddata->regs)) diff --git a/target/linux/starfive/patches-6.12/0018-driver-e24-add-e24-driver.patch b/target/linux/starfive/patches-6.12/0018-driver-e24-add-e24-driver.patch index 511e80e9ae1813..ca61b4652fcfe5 100644 --- a/target/linux/starfive/patches-6.12/0018-driver-e24-add-e24-driver.patch +++ b/target/linux/starfive/patches-6.12/0018-driver-e24-add-e24-driver.patch @@ -373,7 +373,7 @@ Signed-off-by: shanlong.li +#endif --- /dev/null +++ b/drivers/e24/starfive_e24.c -@@ -0,0 +1,1524 @@ +@@ -0,0 +1,1522 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * e24 driver for StarFive JH7110 SoC @@ -1863,11 +1863,9 @@ Signed-off-by: shanlong.li +static int e24_probe(struct platform_device *pdev) +{ + long ret = -EINVAL; -+ const struct of_device_id *match; -+ e24_init_function *init; ++ const e24_init_function *init; + -+ match = of_match_device(e24_of_match, &pdev->dev); -+ init = match->data; ++ init = of_device_get_match_data(&pdev->dev); + ret = init(pdev); + + return IS_ERR_VALUE(ret) ? ret : 0; diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 7658185c74cf79..815dbb6ede2c30 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git -PKG_SOURCE_DATE:=2026-03-05 -PKG_SOURCE_VERSION:=6a87eaf434cb89d4eba0b811a4b5d158fd9c519f -PKG_MIRROR_HASH:=b40d6b02dc896359e413dd2ae9d0d616b5c1270dd1eb825b317d27fa531582e2 +PKG_SOURCE_DATE:=2026-04-09 +PKG_SOURCE_VERSION:=f3b02a2f2e39f580b5334efbc382b4b9afe61f0b +PKG_MIRROR_HASH:=919afcde55baee1ded81ee4e5738a928451a5fe21425ffd40b9e1a2a5930134d include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk