diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index ac853c2facd3..4fffbb69e19c 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -69,15 +69,13 @@ jobs: elif [ ${{matrix.target}} == "x86_generic" ]; then echo "ARCH=linux/amd32" >> $GITHUB_ENV echo "MTARGET=x86_generic" >> $GITHUB_ENV - elif [[ ${{matrix.target}} =~ (armsr_armv8|qualcommax_ipq807x|mediatek_mt7622|mediatek_mt7981|mediatek_filogic|bcm27xx_bcm2710|qualcommax_ipq60xx|bcm4908_generic|sunxi_cortexa53) ]]; then + elif [[ ${{matrix.target}} =~ (armsr_armv8|ipq807x_generic|mediatek_mt7622|mediatek_mt7981|mediatek_filogic|bcm27xx_bcm2710|qualcommax_ipq60xx|bcm4908_generic|sunxi_cortexa53) ]]; then echo "MTARGET=aarch64_cortex-a53" >> $GITHUB_ENV elif [[ ${{matrix.target}} =~ (ramips_mt7621|ramips_mt7620|ramips_mt76x8) ]]; then echo "MTARGET=mipsel_24kc" >> $GITHUB_ENV elif [[ ${{matrix.target}} == "ath79_nand" ]]; then echo "MTARGET=mips_24kc" >> $GITHUB_ENV - elif [[ ${{matrix.target}} == "ipq50xx_arm" ]]; then - echo "MTARGET=arm_cortex-a7" >> $GITHUB_ENV - elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7) ]]; then + elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7|ipq50xx_arm) ]]; then echo "MTARGET=arm_cortex-a7_neon-vfpv4" >> $GITHUB_ENV elif [[ ${{matrix.target}} == "amlogic_meson8b" ]]; then echo "MTARGET=arm_cortex-a5_vfpv4" >> $GITHUB_ENV @@ -117,7 +115,7 @@ jobs: sudo -E apt-get -qq install build-essential clang llvm flex g++ gawk gcc-multilib gettext \ git libncurses5-dev libssl-dev python3-distutils python3-pyelftools python3-setuptools \ libpython3-dev rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename \ - libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev + libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev gcc-multilib sudo -E apt-get -qq purge azure-cli ghc* zulu* firefox powershell openjdk* dotnet* google* mysql* php* android* sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc sudo -E apt-get -qq autoremove --purge @@ -203,8 +201,8 @@ jobs: if [ -n "$(ls -A devices/${{matrix.target}}/*.bin.patch 2>/dev/null)" ]; then git apply devices/${{matrix.target}}/patches/*.bin.patch fi - find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.revert.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -R -B --merge -p1 -E --forward" - find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.patch' ! -name '*.revert.patch' ! -name '*.bin.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 -E --forward" + find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.revert.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -R -B --merge -p1 --forward" + find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.patch' ! -name '*.revert.patch' ! -name '*.bin.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 --forward" sed -i '$a \ CONFIG_CPU_FREQ_GOV_POWERSAVE=y \ CONFIG_CPU_FREQ_GOV_USERSPACE=y \ diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index a1c1d9372397..16eac7d3cd9a 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -142,7 +142,7 @@ jobs: -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \ - -d '{"event_type": "qualcommax_ipq807x ${{ github.event.inputs.param }}", "client_payload": {"target": "qualcommax_ipq807x"}}' + -d '{"event_type": "ipq807x_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq807x_generic"}}' curl \ -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ diff --git a/devices/bcm27xx_bcm2712/diy.sh b/devices/bcm27xx_bcm2712/diy.sh index 466e5d93a448..b1c2b620cb0b 100644 --- a/devices/bcm27xx_bcm2712/diy.sh +++ b/devices/bcm27xx_bcm2712/diy.sh @@ -2,6 +2,8 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) -bash $SHELL_FOLDER/../common/kernel_6.1.sh +bash $SHELL_FOLDER/../common/kernel_6.6.sh + +rm -rf package/devel/kselftests-bpf sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile diff --git a/devices/common/.config b/devices/common/.config index 6c4d9d62abc5..e22496caf5cb 100644 --- a/devices/common/.config +++ b/devices/common/.config @@ -66,12 +66,6 @@ CONFIG_PACKAGE_kmod-lib-lz4=y CONFIG_PACKAGE_kmod-lib-zstd=y CONFIG_NODEJS_14=y -CONFIG_OPENSSL_OPTIMIZE_SPEED=y -CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y -CONFIG_OPENSSL_ENGINE_BUILTIN=y -CONFIG_OPENSSL_ENGINE_BUILTIN_AFALG=y -CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO=y - CONFIG_BUSYBOX_CUSTOM=y CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y @@ -92,6 +86,7 @@ CONFIG_KERNEL_EXT4_FS_POSIX_ACL=y CONFIG_KERNEL_EXT4_FS_SECURITY=y CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y + CONFIG_PACKAGE_kmod-sprd_pcie=n CONFIG_PACKAGE_kmod-drm-nouveau=n @@ -106,4 +101,5 @@ CONFIG_VERSION_MANUFACTURER="Kiddin'" CONFIG_VERSION_FILENAMES=n CONFIG_VERSION_CODE_FILENAMES=n - +CONFIG_BPF_TOOLCHAIN_HOST=y +CONFIG_BPF_TOOLCHAIN_NONE=n diff --git a/devices/common/diy.sh b/devices/common/diy.sh index 0c397c827941..059d63dc2a18 100644 --- a/devices/common/diy.sh +++ b/devices/common/diy.sh @@ -15,10 +15,9 @@ sed -i '/ refresh_config();/d' scripts/feeds echo "$(date +"%s")" >version.date sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' package/Makefile -sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite --force-depends/' package/Makefile sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-opkg luci-app-upnp luci-app-autoreboot \ luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs \ -coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan luci-app-filebrowser /" include/target.mk +coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan luci-app-fileassistant /" include/target.mk sed -i "s/procd-ujail//" include/target.mk sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk @@ -31,6 +30,7 @@ while [[ "$status" == "in_progress" || "$status" == "queued" ]];do status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status') done +rm -rf package/feeds/packages/v4l2loopback mv -f feeds/kiddin9/r81* tmp/ @@ -53,18 +53,11 @@ mkdir package/kernel/mt76/patches curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -o package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch } -cd feeds/packages -rm -rf libs/libpfring -git_clone_path master https://github.com/openwrt/packages libs/libpfring -cd ../../ - -rm -rf package/network/utils/xdp-tools package/feeds/kiddin9/fibocom_MHI package/feeds/packages/v4l2loopback - grep -q 'PKG_RELEASE:=9' package/libs/openssl/Makefile && { sh -c "curl -sfL https://github.com/openwrt/openwrt/commit/a48d0bdb77eb93f7fba6e055dace125c72755b6a.patch | patch -d './' -p1 --forward" } -sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh || sed -i "/wireless.\${name}.disabled/d" package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh +sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh sed -i 's/Os/O2/g' include/target.mk sed -i "/mediaurlbase/d" package/feeds/*/luci-theme*/root/etc/uci-defaults/* diff --git a/devices/common/kernel_6.1.sh b/devices/common/kernel_6.1.sh index f9e09f6da536..dcd69778831a 100644 --- a/devices/common/kernel_6.1.sh +++ b/devices/common/kernel_6.1.sh @@ -2,21 +2,22 @@ shopt -s extglob -rm -rf target/linux package/kernel package/boot package/firmware package/network/config/wifi-scripts +rm -rf target/linux package/kernel package/boot package/firmware mkdir new; cp -rf .git new/.git cd new git reset --hard origin/master -cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* package/network/config/wifi-scripts config/Config-images.in include/image*.mk include/trusted-firmware-a.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf ../ +cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* config/Config-images.in config/Config-kernel.in include/image*.mk include/trusted-firmware-a.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf ../ cd - sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk #sed -i "s/\$(PKG_VERSION)-\$(PKG_RELEASE)/\$(PKG_VERSION)-r\$(PKG_RELEASE)/" include/package-defaults.mk -cp -rf devices/common/patches/rootfstargz.patch.b devices/common/patches/rootfstargz.patch -cp -rf devices/common/patches/kernel6.1.patch.b devices/common/patches/kernel6.1.patch +cp -rf devices/common/patches/rootfstargz.patch.main devices/common/patches/rootfstargz.patch +cp -rf devices/common/patches/qca-ssdk.patch.main devices/common/patches/qca-ssdk.patch +cp -rf devices/common/patches/ebpf.patch.main devices/common/patches/ebpf.patch git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1 @@ -32,11 +33,13 @@ mkdir package/kernel/mt76/patches curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -o package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch cd feeds/packages -rm -rf libs/!(pcre) net/coova-chilli net/xtables-addons net/jool kernel -git_clone_path master https://github.com/openwrt/packages libs net/coova-chilli net/xtables-addons net/jool kernel +rm -rf kernel libs/libpfring libs/xr_usb_serial_common +git_clone_path master https://github.com/openwrt/packages kernel libs/libpfring libs/xr_usb_serial_common cd ../../ -rm -rf package/feeds/kiddin9/quectel_Gobinet package/feeds/kiddin9/fibocom_MHI package/feeds/packages/libpfring +curl -sfL https://raw.githubusercontent.com/openwrt/packages/master/net/xtables-addons/patches/201-fix-lua-packetscript.patch -o package/feeds/packages/xtables-addons/patches/201-fix-lua-packetscript.patch + +curl -sfL https://raw.githubusercontent.com/openwrt/packages/master/net/coova-chilli/patches/011-kernel517.patch -o package/feeds/packages/coova-chilli/patches/011-kernel517.patch sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf diff --git a/devices/common/kernel_6.6.sh b/devices/common/kernel_6.6.sh index 295c1a81fbca..2d99b3cc7df8 100644 --- a/devices/common/kernel_6.6.sh +++ b/devices/common/kernel_6.6.sh @@ -9,4 +9,10 @@ git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/ curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch +curl -sfL https://raw.githubusercontent.com/openwrt/packages/master/libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch -o package/feeds/packages/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch + +curl -sfL https://raw.githubusercontent.com/openwrt/packages/master/libs/libpfring/patches/102-remove-sendpage.patch -o package/feeds/packages/libpfring/patches/102-remove-sendpage.patch + +curl -sfL https://raw.githubusercontent.com/openwrt/openwrt/main/package/devel/kselftests-bpf/Makefile -o package/devel/kselftests-bpf/Makefile + rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} diff --git a/devices/common/patches/ebpf.patch b/devices/common/patches/ebpf.patch new file mode 100644 index 000000000000..c3471d59d785 --- /dev/null +++ b/devices/common/patches/ebpf.patch @@ -0,0 +1,69 @@ +--- a/config/Config-kernel.in ++++ b/config/Config-kernel.in +@@ -364,6 +364,7 @@ config KERNEL_DEBUG_INFO + config KERNEL_DEBUG_INFO_BTF + + bool "Enable additional BTF type information" ++ default y if (TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_ipq807x || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64) + depends on !HOST_OS_MACOS + depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED + select DWARVES +@@ -374,9 +375,20 @@ config KERNEL_DEBUG_INFO_BTF + + Required to run BPF CO-RE applications. + ++config KERNEL_MODULE_ALLOW_BTF_MISMATCH ++ bool "Allow loading modules with non-matching BTF type info" ++ depends on KERNEL_DEBUG_INFO_BTF ++ default y ++ help ++ For modules whose split BTF does not match vmlinux, load without ++ BTF rather than refusing to load. The default behavior with ++ module BTF enabled is to reject modules with such mismatches; ++ this option will still load module BTF where possible but ignore ++ it when a mismatch is found. ++ + config KERNEL_DEBUG_INFO_REDUCED + bool "Reduce debugging information" +- default y ++ default y if !(TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_ipq807x || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64) + depends on KERNEL_DEBUG_INFO + help + If you say Y here gcc is instructed to generate less debugging +@@ -464,17 +476,28 @@ config KERNEL_KPROBE_EVENTS + config KERNEL_BPF_EVENTS + bool "Compile the kernel with BPF event support" + select KERNEL_KPROBES ++ default y if KERNEL_DEBUG_INFO_BTF + help + Allows to attach BPF programs to kprobe, uprobe and tracepoint events. + This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY + for sending data from BPF programs to user-space for post-processing + or logging. + ++config KERNEL_PROBE_EVENTS_BTF_ARGS ++ bool ++ depends on KERNEL_KPROBE_EVENTS && KERNEL_DEBUG_INFO_BTF ++ default n ++ + config KERNEL_BPF_KPROBE_OVERRIDE + bool + depends on KERNEL_KPROBES + default n + ++config KERNEL_BPF_STREAM_PARSER ++ bool "Allow a TCP stream parser to be used with BPF_MAP_TYPE_SOCKMAP" ++ depends on KERNEL_CGROUP_BPF ++ default y if KERNEL_DEBUG_INFO_BTF ++ + config KERNEL_AIO + bool "Compile the kernel with asynchronous IO support" + default y if !SMALL_FLASH +@@ -1100,6 +1123,7 @@ config KERNEL_NET_L3_MASTER_DEV + + config KERNEL_XDP_SOCKETS + bool "XDP sockets support" ++ default y if KERNEL_DEBUG_INFO_BTF + help + XDP sockets allows a channel between XDP programs and + userspace applications. \ No newline at end of file diff --git a/devices/common/patches/ebpf.patch.main b/devices/common/patches/ebpf.patch.main new file mode 100644 index 000000000000..78aec11d036f --- /dev/null +++ b/devices/common/patches/ebpf.patch.main @@ -0,0 +1,64 @@ +--- a/config/Config-kernel.in ++++ b/config/Config-kernel.in +@@ -426,6 +426,7 @@ config KERNEL_DEBUG_INFO + + config KERNEL_DEBUG_INFO_BTF + bool "Enable additional BTF type information" ++ default y if (TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64) + depends on !HOST_OS_MACOS + depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED + select DWARVES +@@ -443,6 +444,7 @@ config KERNEL_DEBUG_INFO_BTF_MODULES + config KERNEL_MODULE_ALLOW_BTF_MISMATCH + bool "Allow loading modules with non-matching BTF type info" + depends on KERNEL_DEBUG_INFO_BTF_MODULES ++ default y + help + For modules whose split BTF does not match vmlinux, load without + BTF rather than refusing to load. The default behavior with +@@ -452,7 +454,7 @@ config KERNEL_MODULE_ALLOW_BTF_MISMATCH + + config KERNEL_DEBUG_INFO_REDUCED + bool "Reduce debugging information" +- default y ++ default y if !(TARGET_armsr || TARGET_bcm27xx || TARGET_ipq806x_chromium || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86_64) + depends on KERNEL_DEBUG_INFO + help + If you say Y here gcc is instructed to generate less debugging +@@ -540,17 +542,28 @@ config KERNEL_KPROBE_EVENTS + config KERNEL_BPF_EVENTS + bool "Compile the kernel with BPF event support" + select KERNEL_KPROBES ++ default y if KERNEL_DEBUG_INFO_BTF + help + Allows to attach BPF programs to kprobe, uprobe and tracepoint events. + This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY + for sending data from BPF programs to user-space for post-processing + or logging. + ++config KERNEL_PROBE_EVENTS_BTF_ARGS ++ bool ++ depends on KERNEL_KPROBE_EVENTS && KERNEL_DEBUG_INFO_BTF ++ default n ++ + config KERNEL_BPF_KPROBE_OVERRIDE + bool + depends on KERNEL_KPROBES + default n + ++config KERNEL_BPF_STREAM_PARSER ++ bool "Allow a TCP stream parser to be used with BPF_MAP_TYPE_SOCKMAP" ++ depends on KERNEL_CGROUP_BPF ++ default y if KERNEL_DEBUG_INFO_BTF ++ + config KERNEL_AIO + bool "Compile the kernel with asynchronous IO support" + default y if !SMALL_FLASH +@@ -1189,6 +1202,7 @@ config KERNEL_NET_L3_MASTER_DEV + + config KERNEL_XDP_SOCKETS + bool "XDP sockets support" ++ default y if KERNEL_DEBUG_INFO_BTF + help + XDP sockets allows a channel between XDP programs and + userspace applications. \ No newline at end of file diff --git a/devices/common/patches/openssl.patch b/devices/common/patches/openssl.patch new file mode 100644 index 000000000000..415b43591f6d --- /dev/null +++ b/devices/common/patches/openssl.patch @@ -0,0 +1,32 @@ +--- a/package/libs/openssl/Config.in ++++ b/package/libs/openssl/Config.in +@@ -4,7 +4,7 @@ comment "Build Options" + + config OPENSSL_OPTIMIZE_SPEED + bool +- default y if x86_64 || i386 ++ default y + prompt "Enable optimization for speed instead of size" + select OPENSSL_WITH_ASM + help +@@ -38,9 +38,9 @@ config OPENSSL_WITH_ASM + + config OPENSSL_WITH_SSE2 + bool +- default y if !TARGET_x86_legacy && !TARGET_x86_geode ++ default y if x86_64 || i386 && !TARGET_x86_legacy + prompt "Enable use of x86 SSE2 instructions" +- depends on OPENSSL_WITH_ASM && i386 ++ depends on OPENSSL_WITH_ASM && x86_64 || i386 + help + Use of SSE2 instructions greatly increase performance with a + minimum increase in package size, but it will bring no benefit +@@ -133,7 +133,7 @@ config OPENSSL_WITH_CHACHA_POLY1305 + + config OPENSSL_PREFER_CHACHA_OVER_GCM + bool +- default y if !x86_64 && !aarch64 ++ default y if !x86_64 + prompt "Prefer ChaCha20-Poly1305 over AES-GCM by default" + depends on OPENSSL_WITH_CHACHA_POLY1305 + help diff --git a/devices/common/patches/kernel6.1.patch.b b/devices/common/patches/qca-ssdk.patch.main similarity index 96% rename from devices/common/patches/kernel6.1.patch.b rename to devices/common/patches/qca-ssdk.patch.main index 9c5c7dea067a..1ce1fe9d8caf 100644 --- a/devices/common/patches/kernel6.1.patch.b +++ b/devices/common/patches/qca-ssdk.patch.main @@ -18,4 +18,4 @@ + TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \ SYS_PATH=$(LINUX_DIR) \ TOOLPREFIX=$(TARGET_CROSS) \ - KVER=$(LINUX_VERSION) \ \ No newline at end of file + KVER=$(LINUX_VERSION) \ diff --git a/devices/common/patches/rootfstargz.patch.b b/devices/common/patches/rootfstargz.patch.main similarity index 100% rename from devices/common/patches/rootfstargz.patch.b rename to devices/common/patches/rootfstargz.patch.main diff --git a/devices/ipq50xx_arm/.config b/devices/ipq50xx_arm/.config index 274c049ec543..d1b967583cfa 100644 --- a/devices/ipq50xx_arm/.config +++ b/devices/ipq50xx_arm/.config @@ -1,8 +1,6 @@ - CONFIG_TARGET_ipq50xx=y CONFIG_TARGET_ipq50xx_arm=y CONFIG_TARGET_MULTI_PROFILE=y CONFIG_TARGET_ALL_PROFILES=y -CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 - +CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 \ No newline at end of file diff --git a/devices/ipq50xx_arm/diy.sh b/devices/ipq50xx_arm/diy.sh index 62ddfcdb49bc..5e96955aae14 100644 --- a/devices/ipq50xx_arm/diy.sh +++ b/devices/ipq50xx_arm/diy.sh @@ -4,6 +4,8 @@ shopt -s extglob SHELL_FOLDER=$(dirname $(readlink -f "$0")) -sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/network/config/netifd/Makefile +rm -rf package/kernel/qca- package/boot/uboot-envtools package/firmware/ipq-wifi package/firmware/ath11k-firmware package/kernel/mac80211 -rm -rf package/kernel/mt76 devices/common/patches/mt7922.patch \ No newline at end of file +git_clone_path ipq50xx-mainline-kernel-5.15-openwrt-23.05 https://github.com/hzyitc/openwrt-redmi-ax3000 target/linux/ipq50xx package/firmware/ipq-wifi package/firmware/ath11k-firmware package/kernel/mac80211 package/boot/uboot-envtools package/kernel/qca-nss-dp package/kernel/qca-ssdk + +sed -i "s/wpad-basic-wolfssl/wpad-basic-mbedtls/" target/linux/ipq50xx/Makefile \ No newline at end of file diff --git a/devices/ipq50xx_arm/patches/ipq50xx.patch b/devices/ipq50xx_arm/patches/ipq50xx.patch new file mode 100644 index 000000000000..2ab4a472c07d --- /dev/null +++ b/devices/ipq50xx_arm/patches/ipq50xx.patch @@ -0,0 +1,24 @@ +--- a/package/kernel/linux/modules/netsupport.mk ++++ b/package/kernel/linux/modules/netsupport.mk +@@ -1535,7 +1535,7 @@ $(eval $(call KernelPackage,qrtr-tun)) + define KernelPackage/qrtr-smd + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=SMD IPC Router channels +- DEPENDS:=+kmod-qrtr @TARGET_ipq807x ++ DEPENDS:=+kmod-qrtr @(TARGET_ipq50xx||TARGET_ipq807x) + KCONFIG:=CONFIG_QRTR_SMD + FILES:= $(LINUX_DIR)/net/qrtr/qrtr-smd.ko + AUTOLOAD:=$(call AutoProbe,qrtr-smd) + +--- a/target/linux/generic/files/include/linux/switch.h ++++ b/target/linux/generic/files/include/linux/switch.h +@@ -45,6 +45,9 @@ enum switch_port_speed { + SWITCH_PORT_SPEED_10 = 10, + SWITCH_PORT_SPEED_100 = 100, + SWITCH_PORT_SPEED_1000 = 1000, ++ SWITCH_PORT_SPEED_2500 = 2500, ++ SWITCH_PORT_SPEED_5000 = 5000, ++ SWITCH_PORT_SPEED_10000 = 10000 + }; + + struct switch_port_link { \ No newline at end of file diff --git a/devices/ipq50xx_arm/settings.ini b/devices/ipq50xx_arm/settings.ini deleted file mode 100644 index aa5a5015ca72..000000000000 --- a/devices/ipq50xx_arm/settings.ini +++ /dev/null @@ -1,2 +0,0 @@ -REPO_URL="https://github.com/hzyitc/openwrt-redmi-ax3000" -REPO_BRANCH="ipq50xx-mainline-kernel-5.15-openwrt-23.05" diff --git a/devices/ipq807x_generic/.config b/devices/ipq807x_generic/.config new file mode 100644 index 000000000000..466a10e6f9a4 --- /dev/null +++ b/devices/ipq807x_generic/.config @@ -0,0 +1,12 @@ +CONFIG_TARGET_ipq807x=y +CONFIG_TARGET_ipq807x_generic=y +CONFIG_TARGET_MULTI_PROFILE=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_redmi_ax6=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_xiaomi_ax3600=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_xiaomi_ax9000=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_qnap_301w=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_zte_mf269=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_zyxel_nbg7815=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_buffalo_wxr-5950ax12=y +CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_cmcc_rm2-6=y +CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/ipq807x_generic/diy.sh b/devices/ipq807x_generic/diy.sh new file mode 100644 index 000000000000..bb8e6bcb8cec --- /dev/null +++ b/devices/ipq807x_generic/diy.sh @@ -0,0 +1,2 @@ +#!/bin/bash +shopt -s extglob \ No newline at end of file diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/devices/ipq807x_generic/diy/target/linux/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac new file mode 100644 index 000000000000..80c07b85423c --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -0,0 +1,26 @@ +[ "$ACTION" == "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(board_name) + +case "$board" in + arcadyan,aw1000) + [ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress + ;; + buffalo,wxr-5950ax12) + [ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 8 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 16 > /sys${DEVPATH}/macaddress + ;; + cmcc,rm2-6|\ + zte,mf269) + [ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress + ;; +esac diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-rm2-6.dts b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-rm2-6.dts new file mode 100644 index 000000000000..67fc0eb746bc --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-rm2-6.dts @@ -0,0 +1,310 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "ipq8074-512m.dtsi" +#include "ipq8074-ac-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include +#include + +/ { + model = "CMCC RM2-6"; + compatible = "cmcc,rm2-6", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + serial1 = &blsp1_uart3; + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_amber; + /* + * Aliases as required by u-boot + * to patch MAC addresses + */ + ethernet0 = &dp4; + ethernet1 = &dp2; + ethernet2 = &dp5; + label-mac-device = &dp4; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 27 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 30 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_amber: status-amber { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: status-blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: status-red { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; + }; + }; + + fan: gpio-fan { + #cooling-cells = <2>; + compatible = "gpio-fan"; + gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = <0 0>, <1 1>; + }; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + +&blsp1_uart3 { + status = "okay"; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + nand@0 { + reg = <0>; + nand-ecc-strength = <8>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "qcom,smem-part"; + }; + }; +}; + +&cpu0_thermal { + trips { + cpu0_trip_active: cpu-active { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cpu-active { + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&cpu0_trip_active>; + }; + }; +}; + +&cpu1_thermal { + trips { + cpu1_trip_active: cpu-active { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cpu-active { + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&cpu1_trip_active>; + }; + }; +}; + +&cpu2_thermal { + trips { + cpu2_trip_active: cpu-active { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cpu-active { + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&cpu2_trip_active>; + }; + }; +}; + +&cpu3_thermal { + trips { + cpu3_trip_active: cpu-active { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cpu-active { + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&cpu3_trip_active>; + }; + }; +}; + +&cluster_thermal { + trips { + cluster_active: cluster-active { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cluster-active { + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&cluster_active>; + }; + }; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + + ethernet-phy-package@0 { + compatible = "qcom,qca8075-package"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; + + qca8075_4: ethernet-phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + }; + }; +}; + +&switch { + status = "okay"; + + switch_lan_bmp = <(0x4 | 0x10)>; + switch_wan_bmp = <0x20>; + switch_mac_mode = <0x0>; + + qcom,port_phyinfo { + port@2 { + port_id = <2>; + phy_address = <1>; + }; + port@4 { + port_id = <4>; + phy_address = <3>; + }; + port@5 { + port_id = <5>; + phy_address = <4>; + }; + }; +}; + +&edma { + status = "okay"; +}; + +/* + * Directly connect to the Hi5630 + * PLC (Power Line Communication) + */ +&dp2 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "plc"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8075_4>; + label = "wan"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "CMCC-RM2-6"; + qcom,ath11k-fw-memory-mode = <1>; +}; diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dts b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dts new file mode 100644 index 000000000000..6ce59689c28e --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dts @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2021, Robert Marko */ + +/dts-v1/; + +#include "ipq8071-ax3600.dtsi" + +/ { + model = "Xiaomi AX3600"; + compatible = "xiaomi,ax3600", "qcom,ipq8074"; + + aliases { + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + ethernet4 = &dp5; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + leds { + compatible = "gpio-leds"; + + led_system_blue: system-blue { + label = "blue:system"; + gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; + }; + + led_system_yellow: system-yellow { + label = "yellow:system"; + gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>; + }; + + network-yellow { + label = "yellow:network"; + gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>; + }; + + network-blue { + label = "blue:network"; + gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + }; + + aiot { + label = "blue:aiot"; + gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&pcie_qmp0 { + status = "okay"; +}; + +&pcie0 { + status = "okay"; + + perst-gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>; + + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi0: wifi@1,0 { + status = "okay"; + + compatible = "qcom,ath10k"; + reg = <0x00010000 0 0 0 0>; + + qcom,ath10k-calibration-variant = "Xiaomi-AX3600"; + nvmem-cell-names = "calibration"; + nvmem-cells = <&caldata_qca9889>; + }; + }; +}; + +&wifi { + qcom,ath11k-calibration-variant = "Xiaomi-AX3600"; +}; + +&qpic_nand { + /delete-node/ partitions; + + nand@0 { + /delete-node/ partitions; + + partitions { + compatible = "qcom,smem-part"; + }; + }; +}; + +&dp2 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp3 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp4 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp5 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&wifi0 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; \ No newline at end of file diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax6.dts b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax6.dts new file mode 100644 index 000000000000..6ae96b7e4219 --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-ax6.dts @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2021, Zhijun You */ + +/dts-v1/; + +#include "ipq8071-ax3600.dtsi" + +/ { + model = "Redmi AX6"; + compatible = "redmi,ax6", "qcom,ipq8074"; + + aliases { + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + ethernet4 = &dp5; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + leds { + compatible = "gpio-leds"; + + led_system_blue: system-blue { + label = "blue:system"; + gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + }; + + led_system_yellow: system-yellow { + label = "yellow:system"; + gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>; + }; + + network-blue { + label = "blue:network"; + gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; + }; + + network-yellow { + label = "yellow:network"; + gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +/* AX6 can both have NAND of 256MiB or 128MiB. + * To be on the safe side, assume 128MiB of NAND. + */ +&rootfs { + reg = <0x2dc0000 0x5220000>; +}; + +&wifi { + qcom,ath11k-calibration-variant = "Redmi-AX6"; +}; + +&qpic_nand { + /delete-node/ partitions; + + nand@0 { + /delete-node/ partitions; + + partitions { + compatible = "qcom,smem-part"; + }; + }; +}; + +&dp2 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp3 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp4 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp5 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-mf269.dts b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-mf269.dts new file mode 100644 index 000000000000..8b1cf92fdbb3 --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-mf269.dts @@ -0,0 +1,452 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "ipq8074-512m.dtsi" +#include "ipq8074-ac-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include +#include + +/ { + model = "ZTE MF269"; + compatible = "zte,mf269", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &dp6_syn; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_0"; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&tlmm { + button_pins: button_pins { + mux { + pins = "gpio37", "gpio46"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + i2c_pins: i2c-pins { + pins = "gpio21", "gpio22"; + function = "blsp4_i2c1"; + drive-strength = <8>; + bias-disable; + }; + + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + usb_pwr_pins: usb_pwr_pins { + mux { + pins = "gpio29"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + output-high; + }; + }; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + cs-select = <0>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:sbl1"; + reg = <0x0 0x50000>; + read-only; + }; + + partition@50000 { + label = "0:mibib"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "0:bootconfig"; + reg = <0x60000 0x20000>; + read-only; + }; + + partition@80000 { + label = "0:bootconfig1"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition@a0000 { + label = "0:qsee"; + reg = <0xa0000 0x180000>; + read-only; + }; + + partition@220000 { + label = "0:qsee_1"; + reg = <0x220000 0x180000>; + read-only; + }; + + partition@3a0000 { + label = "0:devcfg"; + reg = <0x3a0000 0x10000>; + read-only; + }; + + partition@3b0000 { + label = "0:devcfg_1"; + reg = <0x3b0000 0x10000>; + read-only; + }; + + partition@3c0000 { + label = "0:apdp"; + reg = <0x3c0000 0x10000>; + read-only; + }; + + partition@3d0000 { + label = "0:apdp_1"; + reg = <0x3d0000 0x10000>; + read-only; + }; + + partition@3e0000 { + label = "0:rpm"; + reg = <0x3e0000 0x40000>; + read-only; + }; + + partition@420000 { + label = "0:rpm_1"; + reg = <0x420000 0x40000>; + read-only; + }; + + partition@460000 { + label = "0:cdt"; + reg = <0x460000 0x10000>; + read-only; + }; + + partition@470000 { + label = "0:cdt_1"; + reg = <0x470000 0x10000>; + read-only; + }; + + partition@480000 { + label = "0:appsblenv"; + reg = <0x480000 0x10000>; + }; + + partition@490000 { + label = "0:appsbl"; + reg = <0x490000 0xc0000>; + read-only; + }; + + partition@550000 { + label = "0:appsbl_1"; + reg = <0x550000 0xc0000>; + read-only; + }; + + partition@610000 { + label = "0:art"; + reg = <0x610000 0x40000>; + read-only; + }; + + partition@650000 { + label = "0:ethphyfw"; + reg = <0x650000 0x80000>; + read-only; + }; + }; + }; +}; + +&blsp1_i2c5 { + pinctrl-0 = <&i2c_pins>; + pinctrl-names = "default"; + status = "okay"; + + /* No driver exists */ + aw9106: gpio-expander@5b { + reg = <0x5b>; + reset-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; + }; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + /* + * Bootloader will find the NAND DT node by the compatible and + * then "fixup" it by adding the partitions from the SMEM table + * using the legacy bindings thus making it impossible for us + * to change the partition table or utilize NVMEM for calibration. + * So add a dummy partitions node that bootloader will populate + * and set it as disabled so the kernel ignores it instead of + * printing warnings due to the broken way bootloader adds the + * partitions. + */ + partitions { + status = "disabled"; + }; + + nand@0 { + reg = <0>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "fota-flag"; + reg = <0x0000000 0x00a0000>; + read-only; + }; + + partition@a0000 { + label = "mac"; + reg = <0x00a0000 0x0080000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mac_0: macaddr@0 { + compatible = "mac-base"; + reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@120000 { + label = "cfg-param"; + reg = <0x0120000 0x1400000>; + read-only; + }; + + partition@1520000 { + label = "log"; + reg = <0x1520000 0x0600000>; + read-only; + }; + + partition@1b20000 { + label = "oops"; + reg = <0x1b20000 0x00a0000>; + read-only; + }; + + partition@1bc0000 { + label = "web"; + reg = <0x1bc0000 0x0800000>; + read-only; + }; + + partition@23c0000 { + label = "ubi_kernel"; + reg = <0x23c0000 0x3400000>; + }; + + partition@57c0000 { + label = "0:wififw"; + reg = <0x57c0000 0x0800000>; + read-only; + }; + + /* rootfs partition is the result of squashing + * consecutive stock partitions: + * - openwrt_data (25 MiB) + * - data (30 MiB) + * - fota (99 MiB) + */ + partition@5fc0000 { + label = "rootfs"; + reg = <0x5fc0000 0x9a00000>; + }; + }; + }; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_0 { + status = "okay"; +}; + +&usb_0 { + pinctrl-0 = <&usb_pwr_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + + qca8081_24: ethernet-phy@24 { + compatible = "ethernet-phy-id004d.d101"; + reg = <24>; + reset-deassert-us = <10000>; + reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; + }; + + qca8081_28: ethernet-phy@28 { + compatible = "ethernet-phy-id004d.d101"; + reg = <28>; + reset-deassert-us = <10000>; + reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_lan_bmp = <0x20>; /* lan port bitmap */ + switch_wan_bmp = <0x40>; /* wan port bitmap */ + switch_mac_mode1 = <0xc>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xc>; /* mac mode for uniphy instance2*/ + + qcom,port_phyinfo { + port@5 { + port_id = <5>; + phy_address = <24>; + port_mac_sel = "QGMAC_PORT"; + }; + port@6 { + port_id = <6>; + phy_address = <28>; + port_mac_sel = "QGMAC_PORT"; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp5_syn { + status = "okay"; + phy-handle = <&qca8081_24>; + label = "lan"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_mac_0 1>; +}; + +&dp6_syn { + status = "okay"; + phy-handle = <&qca8081_28>; + label = "wan"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_mac_0 0>; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "ZTE-MF269"; + qcom,ath11k-fw-memory-mode = <1>; +}; diff --git a/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts new file mode 100644 index 000000000000..608e2fe98aef --- /dev/null +++ b/devices/ipq807x_generic/diy/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts @@ -0,0 +1,568 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2021, Robert Marko */ + +/dts-v1/; + +#include "ipq8074.dtsi" +#include "ipq8074-hk-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include +#include + +/ { + model = "Xiaomi AX9000"; + compatible = "xiaomi,ax9000", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + led-boot = &led_system_yellow; + led-failsafe = &led_system_yellow; + led-running = &led_system_blue; + led-upgrade = &led_system_yellow; + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet0 = &dp1; + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + ethernet4 = &dp5; + label-mac-device = &dp5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; /* Labeled Mesh on the device */ + gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system_blue: system-blue { + label = "blue:system"; + gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led_system_yellow: system-yellow { + label = "yellow:system"; + gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>; + color = ; + }; + + network-yellow { + label = "yellow:network"; + gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + color = ; + }; + + network-blue { + label = "blue:network"; + gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; + color = ; + }; + + top-red { + label = "red:top"; + gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "keep"; + }; + + top-green { + label = "green:top"; + gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "keep"; + }; + + top-blue { + label = "blue:top"; + gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "keep"; + }; + }; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + i2c_pins: i2c-pins { + pins = "gpio0", "gpio2"; + function = "blsp5_i2c"; + drive-strength = <8>; + bias-disable; + }; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&blsp1_i2c6 { + status = "okay"; + + pinctrl-0 = <&i2c_pins>; + pinctrl-names = "default"; +}; + +&prng { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + /* + * Bootloader will find the NAND DT node by the compatible and + * then "fixup" it by adding the partitions from the SMEM table + * using the legacy bindings thus making it impossible for us + * to change the partition table or utilize NVMEM for calibration. + * So add a dummy partitions node that bootloader will populate + * and set it as disabled so the kernel ignores it instead of + * printing warnings due to the broken way bootloader adds the + * partitions. + */ + partitions { + status = "disabled"; + }; + + nand@0 { + reg = <0>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:sbl1"; + reg = <0x0 0x100000>; + read-only; + }; + + partition@100000 { + label = "0:mibib"; + reg = <0x100000 0x100000>; + read-only; + }; + + partition@200000 { + label = "0:bootconfig"; + reg = <0x200000 0x80000>; + read-only; + }; + + partition@280000 { + label = "0:bootconfig1"; + reg = <0x280000 0x80000>; + read-only; + }; + + partition@300000 { + label = "0:qsee"; + reg = <0x300000 0x300000>; + read-only; + }; + + partition@600000 { + label = "0:qsee_1"; + reg = <0x600000 0x300000>; + read-only; + }; + + partition@900000 { + label = "0:devcfg"; + reg = <0x900000 0x80000>; + read-only; + }; + + partition@980000 { + label = "0:devcfg_1"; + reg = <0x980000 0x80000>; + read-only; + }; + + partition@a00000 { + label = "0:apdp"; + reg = <0xa00000 0x80000>; + read-only; + }; + + partition@a80000 { + label = "0:apdp_1"; + reg = <0xa80000 0x80000>; + read-only; + }; + + partition@b00000 { + label = "0:rpm"; + reg = <0xb00000 0x80000>; + read-only; + }; + + partition@b80000 { + label = "0:rpm_1"; + reg = <0xb80000 0x80000>; + read-only; + }; + + partition@c00000 { + label = "0:cdt"; + reg = <0xc00000 0x80000>; + read-only; + }; + + partition@c80000 { + label = "0:cdt_1"; + reg = <0xc80000 0x80000>; + read-only; + }; + + partition@d00000 { + label = "0:appsblenv"; + reg = <0xd00000 0x80000>; + }; + + partition@d80000 { + label = "0:appsbl"; + reg = <0xd80000 0x100000>; + read-only; + }; + + partition@e80000 { + label = "0:appsbl_1"; + reg = <0xe80000 0x100000>; + read-only; + }; + + partition@f80000 { + label = "0:art"; + reg = <0xf80000 0x80000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_dp1: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_dp2: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_dp3: macaddr@c { + reg = <0xc 0x6>; + }; + + macaddr_dp4: macaddr@12 { + reg = <0x12 0x6>; + }; + + macaddr_dp5: macaddr@18 { + reg = <0x18 0x6>; + }; + + caldata_qca9889: caldata@4d000 { + reg = <0x4d000 0x844>; + }; + }; + + partition@1000000 { + label = "bdata"; + reg = <0x1000000 0x80000>; + }; + + partition@1080000 { + /* This is crash + crash_syslog parts combined */ + label = "pstore"; + reg = <0x1080000 0x100000>; + }; + + partition@1180000 { + label = "ubi_kernel"; + reg = <0x1180000 0x3800000>; + }; + + partition@4980000 { + label = "rootfs"; + reg = <0x4980000 0xb680000>; + }; + }; + }; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_0 { + status = "okay"; +}; + +&usb_0 { + status = "okay"; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + + qca8075_0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_2: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; + + qca8081: ethernet-phy@24 { + compatible = "ethernet-phy-id004d.d101"; + reg = <24>; + reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; /* cpu port bitmap */ + switch_lan_bmp = <0x1e>; /* lan port bitmap */ + switch_wan_bmp = <0x20>; /* wan port bitmap */ + switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/ + switch_mac_mode1 = <0xc>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ + bm_tick_mode = <0>; /* bm tick mode */ + tm_tick_mode = <0>; /* tm tick mode */ + + qcom,port_phyinfo { + port@0 { + port_id = <1>; + phy_address = <0>; + }; + port@1 { + port_id = <2>; + phy_address = <1>; + }; + port@2 { + port_id = <3>; + phy_address = <2>; + }; + port@3 { + port_id = <4>; + phy_address = <3>; + }; + port@4 { + port_id = <5>; + phy_address = <24>; + port_mac_sel = "QGMAC_PORT"; + }; + }; +}; + +&dp1 { + status = "okay"; + phy-handle = <&qca8075_0>; + label = "lan4"; + nvmem-cells = <&macaddr_dp1>; + nvmem-cell-names = "mac-address"; +}; + +&dp2 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "lan3"; + nvmem-cells = <&macaddr_dp2>; + nvmem-cell-names = "mac-address"; +}; + +&dp3 { + status = "okay"; + phy-handle = <&qca8075_2>; + label = "lan2"; + nvmem-cells = <&macaddr_dp3>; + nvmem-cell-names = "mac-address"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan1"; + nvmem-cells = <&macaddr_dp4>; + nvmem-cell-names = "mac-address"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8081>; + label = "wan"; + nvmem-cells = <&macaddr_dp5>; + nvmem-cell-names = "mac-address"; +}; + +&edma { + status = "okay"; +}; + +&pcie_qmp0 { + status = "okay"; +}; + +&pcie0 { + status = "okay"; + + perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>; + + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi@1,0 { + status = "okay"; + + /* ath11k has no DT compatible for PCI cards */ + compatible = "pci17cb,1104"; + reg = <0x00010000 0 0 0 0>; + + qcom,ath11k-calibration-variant = "Xiaomi-AX9000"; + }; + }; +}; + +&pcie_qmp1 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; + + perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>; + + bridge@1,0 { + reg = <0x00010000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi1: wifi@1,0 { + status = "okay"; + + compatible = "qcom,ath10k"; + reg = <0x00010000 0 0 0 0>; + + qcom,ath10k-calibration-variant = "Xiaomi-AX9000"; + }; + }; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "Xiaomi-AX9000"; +}; + +&qpic_nand { + /delete-node/ partitions; + + nand@0 { + /delete-node/ partitions; + + partitions { + compatible = "qcom,smem-part"; + }; + }; +}; + +&dp1 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp2 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp3 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp4 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&dp5 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; + +&wifi1 { + /delete-property/ nvmem-cells; + /delete-property/ nvmem-cell-names; +}; diff --git a/devices/ipq807x_generic/patches/04-stock.patch b/devices/ipq807x_generic/patches/04-stock.patch new file mode 100644 index 000000000000..13b3107287b5 --- /dev/null +++ b/devices/ipq807x_generic/patches/04-stock.patch @@ -0,0 +1,86 @@ +--- a/target/linux/ipq807x/base-files/etc/init.d/bootcount ++++ b/target/linux/ipq807x/base-files/etc/init.d/bootcount +@@ -9,5 +9,13 @@ boot() { + # Unset changed flag after sysupgrade complete + fw_setenv changed + ;; ++ redmi,ax6|\ ++ xiaomi,ax3600|\ ++ xiaomi,ax9000) ++ # OTA handling should not be used. Reset it just in case. ++ fw_setenv flag_ota_reboot 0 ++ # Not strictly needed but useful to handle partition crash condition ++ fw_setenv flag_boot_success 1 ++ ;; + esac + } + + +--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +@@ -83,20 +83,29 @@ platform_do_upgrade() { + redmi,ax6|\ + xiaomi,ax3600|\ + xiaomi,ax9000) +- # Make sure that UART is enabled +- fw_setenv boot_wait on +- fw_setenv uart_en 1 ++ part_num="$(fw_printenv -n flag_boot_rootfs)" ++ if [ "$part_num" -eq "1" ]; then ++ CI_UBIPART="rootfs_1" ++ target_num=1 ++ # Reset fail flag for the current partition ++ # With both partition set to fail, the partition 2 (bit 1) ++ # is loaded ++ fw_setenv flag_try_sys2_failed 0 ++ else ++ CI_UBIPART="rootfs" ++ target_num=0 ++ # Reset fail flag for the current partition ++ # or uboot will skip the loading of this partition ++ fw_setenv flag_try_sys1_failed 0 ++ fi ++ ++ # Tell uboot to switch partition ++ fw_setenv flag_boot_rootfs "$target_num" ++ fw_setenv flag_last_success "$target_num" + +- # Enforce single partition. +- fw_setenv flag_boot_rootfs 0 +- fw_setenv flag_last_success 0 +- fw_setenv flag_boot_success 1 +- fw_setenv flag_try_sys1_failed 8 +- fw_setenv flag_try_sys2_failed 8 ++ # Reset success flag ++ fw_setenv flag_boot_success 0 + +- # Kernel and rootfs are placed in 2 different UBI +- CI_KERN_UBIPART="ubi_kernel" +- CI_ROOT_UBIPART="rootfs" + nand_do_upgrade "$1" + ;; + *) + +--- /dev/null ++++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -0,0 +1,20 @@ ++#!/bin/sh ++ ++[ -e /lib/firmware/$FIRMWARE ] && exit 0 ++ ++. /lib/functions/caldata.sh ++ ++board=$(board_name) ++ ++case "$FIRMWARE" in ++"ath10k/cal-pci-0000:01:00.0.bin") ++ case "$board" in ++ xiaomi,ax3600) ++ caldata_extract "0:art" 0x33000 0x844 ++ ;; ++ esac ++ ;; ++*) ++ exit 1 ++ ;; ++esac diff --git a/devices/ipq807x_generic/patches/zte_mf269.patch b/devices/ipq807x_generic/patches/zte_mf269.patch new file mode 100644 index 000000000000..b9b7be3d15f0 --- /dev/null +++ b/devices/ipq807x_generic/patches/zte_mf269.patch @@ -0,0 +1,103 @@ +--- a/package/firmware/ipq-wifi/Makefile ++++ b/package/firmware/ipq-wifi/Makefile +@@ -40,6 +40,8 @@ ALLWIFIBOARDS:= \ + wallys_dr40x9 \ + xiaomi_ax3600 \ + xiaomi_ax9000 \ ++ cmcc_rm2-6 \ ++ zte_mf269 \ + zte_mf289f \ + zte_mf287 \ + zte_mf287plus \ +@@ -129,6 +131,8 @@ $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6)) + $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9)) + $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600)) + $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000)) ++$(eval $(call generate-ipq-wifi-package,cmcc_rm2-6,CMCC RM2-6)) ++$(eval $(call generate-ipq-wifi-package,zte_mf269,ZTE MF269)) + $(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F)) + $(eval $(call generate-ipq-wifi-package,zte_mf287,ZTE MF287)) + $(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus)) + +--- a/target/linux/ipq807x/image/generic.mk ++++ b/target/linux/ipq807x/image/generic.mk +@@ -37,6 +37,35 @@ define Device/buffalo_wxr-5950ax12 + endef + TARGET_DEVICES += buffalo_wxr-5950ax12 + ++define Device/cmcc_rm2-6 ++ $(call Device/FitImage) ++ $(call Device/UbiFit) ++ DEVICE_VENDOR := CMCC ++ DEVICE_MODEL := RM2-6 ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ DEVICE_DTS_CONFIG := config@ac02 ++ SOC := ipq8070 ++ IMAGES += factory.bin ++ IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand ++ DEVICE_PACKAGES := ipq-wifi-cmcc_rm2-6 kmod-hwmon-gpiofan ++endef ++TARGET_DEVICES += cmcc_rm2-6 ++ ++define Device/zte_mf269 ++ $(call Device/FitImage) ++ $(call Device/UbiFit) ++ DEVICE_VENDOR := ZTE ++ DEVICE_MODEL := MF269 ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ DEVICE_DTS_CONFIG := config@ac04 ++ SOC := ipq8071 ++ KERNEL_SIZE := 53248k ++ DEVICE_PACKAGES := ipq-wifi-zte_mf269 ++endef ++TARGET_DEVICES += zte_mf269 ++ + define Device/dynalink_dl-wrx36 + $(call Device/FitImage) + $(call Device/UbiFit) + +--- a/target/linux/ipq807x/base-files/etc/board.d/02_network ++++ b/target/linux/ipq807x/base-files/etc/board.d/02_network +@@ -31,6 +31,12 @@ ipq807x_setup_interfaces() + qnap,301w) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 10g-2" "10g-1" + ;; ++ cmcc,rm2-6) ++ ucidef_set_interfaces_lan_wan "lan plc" "wan" ++ ;; ++ zte,mf269) ++ ucidef_set_interfaces_lan_wan "lan" "wan" ++ ;; + redmi,ax6|\ + xiaomi,ax3600) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" + +--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata ++++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +@@ -18,6 +18,8 @@ case "$FIRMWARE" in + redmi,ax6|\ + xiaomi,ax3600|\ + xiaomi,ax9000|\ ++ mcc,rm2-6|\ ++ zte,mf269|\ + zyxel,nbg7815) + caldata_extract "0:art" 0x1000 0x20000 + ;; + +--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +@@ -51,6 +51,12 @@ platform_do_upgrade() { + nand_do_restore_config || nand_do_upgrade_failed + buffalo_upgrade_optvol + ;; ++ zte,mf269) ++ CI_KERN_UBIPART="ubi_kernel" ++ CI_ROOT_UBIPART="rootfs" ++ nand_do_upgrade "$1" ++ ;; ++ cmcc,rm2-6|\ + dynalink,dl-wrx36) + nand_do_upgrade "$1" + ;; diff --git a/devices/mediatek_filogic/diy.sh b/devices/mediatek_filogic/diy.sh index e8d3911b5112..1dc100fd5613 100644 --- a/devices/mediatek_filogic/diy.sh +++ b/devices/mediatek_filogic/diy.sh @@ -5,8 +5,9 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.6.sh -sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" package/boot/uboot-envtools/files/mediatek_filogic -sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" target/linux/mediatek/filogic/base-files/etc/board.d/02_network -sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +sed -i "s/-stock//g" package/boot/uboot-envtools/files/mediatek_filogic +sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/etc/board.d/02_network +sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +sed -i "s/-stock//g" target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface diff --git a/devices/mediatek_filogic/patches/02-ax6000.patch b/devices/mediatek_filogic/patches/02-ax6000.patch index cf29e5c2d3c2..f47ba590d561 100644 --- a/devices/mediatek_filogic/patches/02-ax6000.patch +++ b/devices/mediatek_filogic/patches/02-ax6000.patch @@ -1,30 +1,29 @@ --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk -@@ -442,6 +442,24 @@ endif +@@ -1307,6 +1307,23 @@ endif endef - TARGET_DEVICES += xiaomi_mi-router-wr30u-ubootmod + TARGET_DEVICES += xiaomi_redmi-router-ax6000-ubootmod +define Device/xiaomi_redmi-router-ax6000 + DEVICE_VENDOR := Xiaomi + DEVICE_MODEL := Redmi Router AX6000 + DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000 + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-leds-ws2812b kmod-mt7986-firmware mt7986-wo-firmware -+ SUPPORTED_DEVICES := xiaomi,redmi-router-ax6000 ++ DEVICE_PACKAGES := kmod-leds-ws2812b kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 -+ IMAGE_SIZE := 112640k + KERNEL_IN_UBI := 1 ++ IMAGE_SIZE := 112640k + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += xiaomi_redmi-router-ax6000 + - define Device/xiaomi_redmi-router-ax6000-stock - DEVICE_VENDOR := Xiaomi - DEVICE_MODEL := Redmi Router AX6000 (stock layout) + define Device/yuncore_ax835 + DEVICE_VENDOR := YunCore + DEVICE_MODEL := AX835 new file mode 100644 index 0000000000000..759baae3aeb18 @@ -38,7 +37,7 @@ index 0000000000000..759baae3aeb18 + +/ { + model = "Xiaomi Redmi Router AX6000"; -+ compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a"; ++ compatible = "xiaomi,redmi-router-ax6000", "mediatek,mt7986a"; +}; + +&spi_nand_flash { @@ -63,25 +62,3 @@ index 0000000000000..759baae3aeb18 + reg = <0x600000 0x6e00000>; + }; +}; - ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -@@ -26,6 +26,7 @@ xiaomi,mi-router-wr30u-ubootmod) - ucidef_set_led_netdev "wan" "wan" "blue:network" "wan" - ;; - xiaomi,redmi-router-ax6000-stock|\ -+xiaomi,redmi-router-ax6000|\ - xiaomi,redmi-router-ax6000-ubootmod) - ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan" - ;; - ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -@@ -56,6 +56,7 @@ mediatek_setup_interfaces() - xiaomi,mi-router-wr30u|\ - xiaomi,mi-router-wr30u-ubootmod|\ - xiaomi,redmi-router-ax6000-stock|\ -+ xiaomi,redmi-router-ax6000|\ - xiaomi,redmi-router-ax6000-ubootmod) - ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan - ;; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/16-komi-a31.patch b/devices/mediatek_filogic/patches/16-komi-a31.patch index 1e91df172681..27268b806827 100644 --- a/devices/mediatek_filogic/patches/16-komi-a31.patch +++ b/devices/mediatek_filogic/patches/16-komi-a31.patch @@ -288,21 +288,21 @@ diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11 index 794944d1aa918..2ca44b55c21fa 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -@@ -91,6 +91,17 @@ case "$board" in - jcg,q30-pro) - [ "$PHYNBR" = "1" ] && macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress +@@ -109,6 +109,17 @@ case "$board" in + jdcloud,re-cp-03) + [ "$PHYNBR" = "1" ] && mmc_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress ;; -+ konka,komi-a31) -+ addr=$(cat /sys/class/net/eth0/address) -+ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress -+ [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress -+ ;; + imou,lc-hx3001) + addr=$(mtd_get_mac_ascii u-boot-env mac) + [ -n "$addr" ] || addr=$(macaddr_add $(mtd_get_mac_binary Factory 0x4) -1) + [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress + ;; - mercusys,mr90x-v1) - addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) - [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress ++ konka,komi-a31) ++ addr=$(cat /sys/class/net/eth0/address) ++ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress ++ [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress ++ ;; + mercusys,mr90x-v1|\ + tplink,re6000xd) + addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) \ No newline at end of file diff --git a/devices/qualcommax_ipq60xx/patches/02-jdc_ax1800-pro.patch b/devices/qualcommax_ipq60xx/patches/02-jdc_ax1800-pro.patch deleted file mode 100644 index de50f0b43b6e..000000000000 --- a/devices/qualcommax_ipq60xx/patches/02-jdc_ax1800-pro.patch +++ /dev/null @@ -1,1799 +0,0 @@ -From 222b0208ae8c9ccbae94ff22ba9370c2e72519e5 Mon Sep 17 00:00:00 2001 -From: JiaY-shi -Date: Thu, 21 Sep 2023 18:37:36 +0800 -Subject: [PATCH] QualcommAX: ipq60xx: add support for JD Cloud AX1800 Pro - ---- - .../uboot-envtools/files/qualcommax | 5 + - package/firmware/ipq-wifi/Makefile | 2 + - .../ipq-wifi/src/board-jdc_ax1800-pro.ipq6018 | Bin 0 -> 65644 bytes - .../boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts | 424 ++++++ - target/linux/qualcommax/image/ipq60xx.mk | 24 +- - .../ipq60xx/base-files/etc/board.d/01_leds | 4 +- - .../ipq60xx/base-files/etc/board.d/02_network | 3 + - .../etc/hotplug.d/firmware/11-ath11k-caldata | 3 + - .../ipq60xx/base-files/lib/upgrade/mmc.sh | 83 ++ - .../base-files/lib/upgrade/platform.sh | 5 + - ...ers-pinctrl-qcom-add-ipq6000-support.patch | 1133 +++++++++++++++++ - 11 files changed, 1684 insertions(+), 2 deletions(-) - create mode 100644 package/firmware/ipq-wifi/src/board-jdc_ax1800-pro.ipq6018 - create mode 100644 target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts - create mode 100644 target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh - create mode 100644 target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch - -diff --git a/package/boot/uboot-envtools/files/qualcommax b/package/boot/uboot-envtools/files/qualcommax -index 783073696615c..186c56c152f75 100644 ---- a/package/boot/uboot-envtools/files/qualcommax -+++ b/package/boot/uboot-envtools/files/qualcommax -@@ -20,6 +20,11 @@ glinet,gl-axt1800) - [ -n "$idx" ] && \ - ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2" - ;; -+ jdc,ax1800-pro) -+ mmcpart="$(find_mmc_part 0:APPSBLENV)" -+ [ -n "$mmcpart" ] && \ -+ ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x20000" "2" -+ ;; - esac - - config_load ubootenv -diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile -index 4474977494e4d..4b88911c0e102 100644 ---- a/package/firmware/ipq-wifi/Makefile -+++ b/package/firmware/ipq-wifi/Makefile -@@ -36,6 +36,7 @@ ALLWIFIBOARDS:= \ - edimax_cax1800 \ - glinet_gl-ax1800 \ - glinet_gl-axt1800 \ -+ jdc_ax1800-pro \ - linksys_mr7350 \ - linksys_mx4200 \ - netgear_rax120v2 \ -@@ -141,6 +142,7 @@ $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102)) - $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800)) - $(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800)) - $(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800)) -+$(eval $(call generate-ipq-wifi-package,jdc_ax1800-pro,JD Cloud AX1800 Pro)) - $(eval $(call generate-ipq-wifi-package,linksys_mr7350,Linksys MR7350)) - $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200)) - $(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2)) -diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts -new file mode 100644 -index 0000000000000..85032240a7a83 ---- /dev/null -+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-jdc-ax1800-pro.dts -@@ -0,0 +1,424 @@ -+/dts-v1/; -+/* -+ * Copyright (c) 2019, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include "ipq6018.dtsi" -+#include "ipq6018-512m.dtsi" -+#include "ipq6018-ess.dtsi" -+ -+ -+#include -+#include -+#include -+ -+/ { -+ model = "JDCloud AX1800 Pro"; -+ compatible = "jdc,ax1800-pro", "qcom,ipq6018-cp03", "qcom,ipq6018"; -+ -+ aliases { -+ sdhc1 = &sdhc; -+ serial0 = &blsp1_uart3; -+ led-boot = &led_red_1; -+ led-failsafe = &led_red_1; -+ led-running = &led_green_1; -+ led-upgrade = &led_green_1; -+ ethernet1 = &dp2; -+ ethernet2 = &dp3; -+ ethernet3 = &dp4; -+ ethernet4 = &dp5; -+ }; -+ -+ chosen { -+ bootargs = "console=ttyMSM0,115200,n8"; -+ bootargs-append = " rootfstype=squashfs,ext4 swiotlb=1 coherent_pool=2M"; -+ }; -+ -+ gpio_keys { -+ compatible = "gpio-keys"; -+ status = "okay"; -+ -+ joylink { -+ label = "joylink"; -+ linux,code = <0x211>; -+ gpios = <&tlmm 0x08 GPIO_ACTIVE_LOW>; -+ linux,input-type = <0x01>; -+ debounce-interval = <0x3c>; -+ }; -+ -+ reset { -+ label = "reset"; -+ linux,code = <0x198>; -+ gpios = <&tlmm 0x09 GPIO_ACTIVE_LOW>; -+ linux,input-type = <0x01>; -+ debounce-interval = <0x3c>; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led_blue_1: led@35 { -+ label = "led_b1"; -+ gpio = <&tlmm 0x23 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_red_1: led@37 { -+ label = "led_r1"; -+ gpio = <&tlmm 0x25 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_green_1: led@50 { -+ label = "led_g1"; -+ gpio = <&tlmm 0x32 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_blue_2: led@30 { -+ label = "led_b2"; -+ gpio = <&tlmm 0x1e GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_red_2: led@32 { -+ label = "led_r2"; -+ gpio = <&tlmm 0x20 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_green_2: led@33 { -+ label = "led_g2"; -+ gpio = <&tlmm 0x21 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_blue_3:led@31 { -+ label = "led_b3"; -+ gpio = <&tlmm 0x1f GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_red_3: led@29 { -+ label = "led_r3"; -+ gpio = <&tlmm 0x1d GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led_green_3: led@34 { -+ label = "led_g3"; -+ gpio = <&tlmm 0x22 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+}; -+ -+&tlmm { -+ compatible = "qcom,ipq6000-pinctrl"; -+ -+ spi_1_pins: spi_1_pins { -+ mux { -+ pins = "gpio38","gpio39","gpio40","gpio41"; -+ function = "blsp0_spi"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ }; -+ -+ button_pins: button_pins { -+ joylink_button { -+ pins = "gpio8"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-up; -+ }; -+ -+ reset_button { -+ pins = "gpio9"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-up; -+ }; -+ }; -+ -+ mdio_pinmux: mdio_pinmux { -+ mux_0 { -+ pins = "gpio64"; -+ function = "mdc"; -+ drive-strength = <0x08>; -+ bias-pull-up; -+ }; -+ -+ mux_1 { -+ pins = "gpio65"; -+ function = "mdio"; -+ drive-strength = <0x08>; -+ bias-pull-up; -+ }; -+ -+ mux_2 { -+ pins = "gpio75"; -+ function = "gpio"; -+ bias-pull-up; -+ }; -+ }; -+ -+ leds_pins: leds_pins { -+ led_b1 { -+ pins = "gpio35"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_r1 { -+ pins = "gpio37"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_g1 { -+ pins = "gpio50"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_b2 { -+ pins = "gpio30"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_r2 { -+ pins = "gpio32"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_g2 { -+ pins = "gpio33"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_b3 { -+ pins = "gpio31"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_r3 { -+ pins = "gpio29"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ -+ led_g3 { -+ pins = "gpio34"; -+ function = "gpio"; -+ drive-strength = <0x08>; -+ bias-pull-down; -+ }; -+ }; -+}; -+ -+ -+&blsp1_uart3 { -+ pinctrl-0 = <&serial_3_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+}; -+ -+&blsp1_spi1 { -+ pinctrl-0 = <&spi_1_pins>; -+ pinctrl-names = "default"; -+ cs-select = <0>; -+ status = "okay"; -+ -+ m25p80@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0>; -+ compatible = "n25q128a11"; -+ linux,modalias = "m25p80", "n25q128a11"; -+ spi-max-frequency = <50000000>; -+ use-default-sizes; -+ }; -+}; -+ -+&prng { -+ status = "okay"; -+}; -+ -+&cryptobam { -+ status = "okay"; -+}; -+ -+&crypto { -+ status = "okay"; -+}; -+ -+&qpic_bam { -+ status = "okay"; -+}; -+ -+&qusb_phy_0 { -+ status = "okay"; -+}; -+ -+&qusb_phy_1 { -+ status = "okay"; -+}; -+ -+ -+&ssphy_0 { -+ status = "okay"; -+}; -+ -+&usb3 { -+ status = "okay"; -+}; -+ -+&usb2 { -+ status = "okay"; -+}; -+ -+&edma { -+ status = "okay"; -+}; -+ -+&rpm { -+ status = "disabled"; -+}; -+ -+&mdio { -+ status = "okay"; -+ -+ pinctrl-0 = <&mdio_pinmux>; -+ pinctrl-names = "default"; -+ reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; -+ -+ ethernet_0: ethernet-phy-package@0 { -+ compatible = "qcom,qca8075-package"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0>; -+ qcom,package-mode = "psgmii"; -+ -+ qca8075_1: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+ -+ qca8075_2: ethernet-phy@2 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <2>; -+ }; -+ -+ qca8075_3: ethernet-phy@3 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <3>; -+ }; -+ -+ qca8075_4: ethernet-phy@4 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <4>; -+ }; -+ }; -+}; -+ -+&switch { -+ status = "okay"; -+ -+ switch_lan_bmp = <(0x8 | 0x10 | 0x20)>; /* lan port bitmap */ -+ switch_wan_bmp = <0x4>; /* wan port bitmap */ -+ -+ qcom,port_phyinfo { -+ port@1 { -+ port_id = <2>; -+ phy_address = <1>; -+ }; -+ -+ port@2 { -+ port_id = <3>; -+ phy_address = <2>; -+ }; -+ -+ port@3 { -+ port_id = <4>; -+ phy_address = <3>; -+ }; -+ -+ port@4 { -+ port_id = <5>; -+ phy_address = <4>; -+ }; -+ }; -+}; -+ -+&qpic_bam { -+ status = "okay"; -+}; -+ -+&wifi { -+ status = "okay"; -+ qcom,ath11k-calibration-variant = "JDC-AX1800-Pro"; -+ qcom,ath11k-fw-memory-mode = <1>; -+}; -+ -+ -+&dp2 { -+ phy-handle = <&qca8075_1>; -+ status = "okay"; -+}; -+ -+&dp3 { -+ phy-handle = <&qca8075_2>; -+ status = "okay"; -+}; -+ -+&dp4 { -+ phy-handle = <&qca8075_3>; -+ status = "okay"; -+}; -+ -+&dp5 { -+ phy-handle = <&qca8075_4>; -+ phy-mode = "psgmii"; -+ status = "okay"; -+}; -+ -+&sdhc { -+ status = "okay"; -+ -+ /delete-property/ mmc-hs400-1_8v; -+ mmc-hs200-1_8v; -+ mmc-ddr-1_8v; -+}; -+ -+&CPU0 { -+ /delete-property/ cpu-supply; -+}; -+ -+&CPU1 { -+ /delete-property/ cpu-supply; -+}; -+ -+&CPU2 { -+ /delete-property/ cpu-supply; -+}; -+ -+&CPU3 { -+ /delete-property/ cpu-supply; -+}; -diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk -index 17fd54aa4017b..efc9c8802ad0a 100644 ---- a/target/linux/qualcommax/image/ipq60xx.mk -+++ b/target/linux/qualcommax/image/ipq60xx.mk -@@ -49,6 +49,21 @@ define Device/glinet_gl-axt1800 - endef - TARGET_DEVICES += glinet_gl-axt1800 - -+define Device/jdc_ax1800-pro -+ $(call Device/FitImage) -+ DEVICE_VENDOR := JD Cloud -+ DEVICE_MODEL := JDC AX1800 Pro -+ DEVICE_DTS_CONFIG := config@cp03-c2 -+ DEVICE_DTS := ipq6018-jdc-ax1800-pro -+ SOC := ipq6018 -+ DEVICE_PACKAGES := ipq-wifi-jdc_ax1800-pro kmod-fs-ext4 mkf2fs f2fsck kmod-fs-f2fs -+ BLOCKSIZE := 64k -+ KERNEL_SIZE := 6144k -+ IMAGES += factory.bin -+ IMAGE/factory.bin := append-kernel | pad-to 6144k | append-rootfs | append-metadata -+endef -+TARGET_DEVICES += jdc_ax1800-pro -+ - define Device/linksys_mr7350 - $(call Device/FitImage) - DEVICE_VENDOR := Linksys -diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds -index a75a2f071308a..6976dbabb6411 100644 ---- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds -+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds -@@ -11,6 +11,9 @@ cmiot,ax18) - ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "wlan1" - ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "wlan0" - ;; -+jdc,ax1800-pro) -+ ucidef_set_led_netdev "wan" "WAN" "net_blue" "eth3" -+ ;; - redmi,ax5-*|\ - xiaomi,rm1800) - ucidef_set_led_netdev "internet" "Internet" "blue:network" "wan" -diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network -index ead1fb8f0fa57..cb743fa38c199 100644 ---- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network -+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network -@@ -24,6 +24,9 @@ ipq60xx_setup_interfaces() - glinet,gl-axt1800) - ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" - ;; -+ jdc,ax1800-pro) -+ ucidef_set_interfaces_lan_wan "eth0 eth1 eth2" "eth3" -+ ;; - *) - echo "Unsupported hardware. Network interfaces not initialized" - ;; -diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata -index f148438b3335d..bc30e8cc423db 100644 ---- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata -+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata -@@ -15,6 +15,7 @@ case "$FIRMWARE" in - zn,m2) - caldata_extract "0:art" 0x1000 0x10000 - ;; -+ jdc,ax1800-pro|\ - redmi,ax5-jdcloud) - caldata_extract_mmc "0:ART" 0x1000 0x10000 - ;; -diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh -new file mode 100644 -index 0000000000000..dac9ddd568654 ---- /dev/null -+++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/mmc.sh -@@ -0,0 +1,83 @@ -+# -+# Copyright (C) 2016 lede-project.org -+# -+ -+# this can be used as a generic mmc upgrade script -+# just add a device entry in platform.sh, -+# define "kernelname" and "rootfsname" and call mmc_do_upgrade -+# after the kernel and rootfs flash a loopdev (as overlay) is -+# setup on top of the rootfs partition -+# for the proper function a padded rootfs image is needed, basically -+# append "pad-to 64k" to the image definition -+# this is based on the ipq806x zyxel.sh mmc upgrade -+ -+. /lib/functions.sh -+ -+mmc_do_upgrade() { -+ local tar_file="$1" -+ local rootfs= -+ local kernel= -+ -+ [ -z "$kernel" ] && kernel=$(find_mmc_part ${kernelname}) -+ [ -z "$rootfs" ] && rootfs=$(find_mmc_part ${rootfsname}) -+ -+ [ -z "$kernel" ] && echo "Upgrade failed: kernel partition not found! Rebooting..." && reboot -f -+ [ -z "$rootfs" ] && echo "Upgrade failed: rootfs partition not found! Rebooting..." && reboot -f -+ -+ mmc_do_flash $tar_file $kernel $rootfs -+ -+ return 0 -+} -+ -+mmc_do_flash() { -+ local tar_file=$1 -+ local kernel=$2 -+ local rootfs=$3 -+ -+ # keep sure its unbound -+ losetup --detach-all || { -+ echo Failed to detach all loop devices. Skip this try. -+ reboot -f -+ } -+ -+ # use the first found directory in the tar archive -+ local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') -+ board_dir=${board_dir%/} -+ -+ echo "flashing kernel to $kernel" -+ tar xf $tar_file ${board_dir}/kernel -O >$kernel -+ -+ echo "flashing rootfs to ${rootfs}" -+ tar xf $tar_file ${board_dir}/root -O >"${rootfs}" -+ -+ # a padded rootfs is needed for overlay fs creation -+ local offset=$(tar xf $tar_file ${board_dir}/root -O | wc -c) -+ [ $offset -lt 65536 ] && { -+ echo Wrong size for rootfs: $offset -+ sleep 10 -+ reboot -f -+ } -+ -+ # Mount loop for rootfs_data -+ local loopdev="$(losetup -f)" -+ losetup -o $offset $loopdev $rootfs || { -+ echo "Failed to mount looped rootfs_data." -+ sleep 10 -+ reboot -f -+ } -+ -+ echo "Format new rootfs_data at position ${offset}." -+ mkfs.ext4 -F -L rootfs_data $loopdev -+ mkdir /tmp/new_root -+ mount -t ext4 $loopdev /tmp/new_root && { -+ echo "Saving config to rootfs_data at position ${offset}." -+ cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE" -+ umount /tmp/new_root -+ } -+ -+ # Cleanup -+ losetup -d $loopdev >/dev/null 2>&1 -+ sync -+ umount -a -+ reboot -f -+} -diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh -index 3c01d8dd967c4..d4c5072de7b13 100644 ---- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh -+++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh -@@ -14,6 +14,11 @@ platform_do_upgrade() { - glinet,gl-ax1800) - nand_do_upgrade "$1" - ;; -+ jdc,ax1800-pro) -+ kernelname="0:HLOS" -+ rootfsname="rootfs" -+ mmc_do_upgrade "$1" -+ ;; - *) - default_do_upgrade "$1" - ;; -diff --git a/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch b/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch -new file mode 100644 -index 0000000000000..d856e56fbef64 ---- /dev/null -+++ b/target/linux/qualcommax/patches-6.1/2000-drivers-pinctrl-qcom-add-ipq6000-support.patch -@@ -0,0 +1,1133 @@ -+From 192ce4f2a695c1d6ed72ac1a1b69f125ada9d4c3 Mon Sep 17 00:00:00 2001 -+From: JiaY-shi -+Date: Tue, 28 Nov 2023 23:31:57 +0800 -+Subject: [PATCH] drivers: pinctrl: qcom: add ipq6000 support -+ -+--- -+ drivers/pinctrl/qcom/Makefile | 1 + -+ drivers/pinctrl/qcom/pinctrl-ipq6000.c | 1101 ++++++++++++++++++++++++ -+ 2 files changed, 1102 insertions(+) -+ create mode 100644 drivers/pinctrl/qcom/pinctrl-ipq6000.c -+ -+diff --git a/drivers/pinctrl/qcom/Makefile b/drivers/pinctrl/qcom/Makefile -+index 8269a1db8794..0db75e183ca0 100644 -+--- a/drivers/pinctrl/qcom/Makefile -++++ b/drivers/pinctrl/qcom/Makefile -+@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_APQ8084) += pinctrl-apq8084.o -+ obj-$(CONFIG_PINCTRL_IPQ4019) += pinctrl-ipq4019.o -+ obj-$(CONFIG_PINCTRL_IPQ8064) += pinctrl-ipq8064.o -+ obj-$(CONFIG_PINCTRL_IPQ8074) += pinctrl-ipq8074.o -++obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6000.o -+ obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6018.o -+ obj-$(CONFIG_PINCTRL_MSM8226) += pinctrl-msm8226.o -+ obj-$(CONFIG_PINCTRL_MSM8660) += pinctrl-msm8660.o -+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq6000.c b/drivers/pinctrl/qcom/pinctrl-ipq6000.c -+new file mode 100644 -+index 000000000000..cd7b16ed695d -+--- /dev/null -++++ b/drivers/pinctrl/qcom/pinctrl-ipq6000.c -+@@ -0,0 +1,1101 @@ -++// SPDX-License-Identifier: GPL-2.0 -++/* -++ * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. -++ */ -++ -++#include -++#include -++#include -++#include -++ -++#include "pinctrl-msm.h" -++ -++#define FUNCTION(fname) \ -++ [msm_mux_##fname] = { \ -++ .name = #fname, \ -++ .groups = fname##_groups, \ -++ .ngroups = ARRAY_SIZE(fname##_groups), \ -++ } -++ -++#define REG_SIZE 0x1000 -++#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ -++ { \ -++ .name = "gpio" #id, \ -++ .pins = gpio##id##_pins, \ -++ .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \ -++ .funcs = (int[]){ \ -++ msm_mux_gpio, /* gpio mode */ \ -++ msm_mux_##f1, \ -++ msm_mux_##f2, \ -++ msm_mux_##f3, \ -++ msm_mux_##f4, \ -++ msm_mux_##f5, \ -++ msm_mux_##f6, \ -++ msm_mux_##f7, \ -++ msm_mux_##f8, \ -++ msm_mux_##f9 \ -++ }, \ -++ .nfuncs = 10, \ -++ .ctl_reg = REG_SIZE * id, \ -++ .io_reg = 0x4 + REG_SIZE * id, \ -++ .intr_cfg_reg = 0x8 + REG_SIZE * id, \ -++ .intr_status_reg = 0xc + REG_SIZE * id, \ -++ .intr_target_reg = 0x8 + REG_SIZE * id, \ -++ .mux_bit = 2, \ -++ .pull_bit = 0, \ -++ .drv_bit = 6, \ -++ .oe_bit = 9, \ -++ .in_bit = 0, \ -++ .out_bit = 1, \ -++ .intr_enable_bit = 0, \ -++ .intr_status_bit = 0, \ -++ .intr_target_bit = 5, \ -++ .intr_target_kpss_val = 3, \ -++ .intr_raw_status_bit = 4, \ -++ .intr_polarity_bit = 1, \ -++ .intr_detection_bit = 2, \ -++ .intr_detection_width = 2, \ -++ } -++ -++static const struct pinctrl_pin_desc ipq6018_pins[] = { -++ PINCTRL_PIN(0, "GPIO_0"), -++ PINCTRL_PIN(1, "GPIO_1"), -++ PINCTRL_PIN(2, "GPIO_2"), -++ PINCTRL_PIN(3, "GPIO_3"), -++ PINCTRL_PIN(4, "GPIO_4"), -++ PINCTRL_PIN(5, "GPIO_5"), -++ PINCTRL_PIN(6, "GPIO_6"), -++ PINCTRL_PIN(7, "GPIO_7"), -++ PINCTRL_PIN(8, "GPIO_8"), -++ PINCTRL_PIN(9, "GPIO_9"), -++ PINCTRL_PIN(10, "GPIO_10"), -++ PINCTRL_PIN(11, "GPIO_11"), -++ PINCTRL_PIN(12, "GPIO_12"), -++ PINCTRL_PIN(13, "GPIO_13"), -++ PINCTRL_PIN(14, "GPIO_14"), -++ PINCTRL_PIN(15, "GPIO_15"), -++ PINCTRL_PIN(16, "GPIO_16"), -++ PINCTRL_PIN(17, "GPIO_17"), -++ PINCTRL_PIN(18, "GPIO_18"), -++ PINCTRL_PIN(19, "GPIO_19"), -++ -++ PINCTRL_PIN(21, "GPIO_21"), -++ PINCTRL_PIN(22, "GPIO_22"), -++ PINCTRL_PIN(23, "GPIO_23"), -++ PINCTRL_PIN(24, "GPIO_24"), -++ PINCTRL_PIN(25, "GPIO_25"), -++ PINCTRL_PIN(26, "GPIO_26"), -++ PINCTRL_PIN(27, "GPIO_27"), -++ PINCTRL_PIN(28, "GPIO_28"), -++ PINCTRL_PIN(29, "GPIO_29"), -++ PINCTRL_PIN(30, "GPIO_30"), -++ PINCTRL_PIN(31, "GPIO_31"), -++ PINCTRL_PIN(32, "GPIO_32"), -++ PINCTRL_PIN(33, "GPIO_33"), -++ PINCTRL_PIN(34, "GPIO_34"), -++ PINCTRL_PIN(35, "GPIO_35"), -++ PINCTRL_PIN(36, "GPIO_36"), -++ PINCTRL_PIN(37, "GPIO_37"), -++ PINCTRL_PIN(38, "GPIO_38"), -++ PINCTRL_PIN(39, "GPIO_39"), -++ PINCTRL_PIN(40, "GPIO_40"), -++ PINCTRL_PIN(41, "GPIO_41"), -++ PINCTRL_PIN(42, "GPIO_42"), -++ PINCTRL_PIN(43, "GPIO_43"), -++ PINCTRL_PIN(44, "GPIO_44"), -++ PINCTRL_PIN(45, "GPIO_45"), -++ PINCTRL_PIN(46, "GPIO_46"), -++ PINCTRL_PIN(47, "GPIO_47"), -++ PINCTRL_PIN(48, "GPIO_48"), -++ PINCTRL_PIN(49, "GPIO_49"), -++ PINCTRL_PIN(50, "GPIO_50"), -++ PINCTRL_PIN(51, "GPIO_51"), -++ PINCTRL_PIN(52, "GPIO_52"), -++ PINCTRL_PIN(53, "GPIO_53"), -++ PINCTRL_PIN(54, "GPIO_54"), -++ PINCTRL_PIN(55, "GPIO_55"), -++ PINCTRL_PIN(56, "GPIO_56"), -++ PINCTRL_PIN(57, "GPIO_57"), -++ PINCTRL_PIN(58, "GPIO_58"), -++ PINCTRL_PIN(59, "GPIO_59"), -++ PINCTRL_PIN(60, "GPIO_60"), -++ PINCTRL_PIN(61, "GPIO_61"), -++ PINCTRL_PIN(62, "GPIO_62"), -++ PINCTRL_PIN(63, "GPIO_63"), -++ PINCTRL_PIN(64, "GPIO_64"), -++ PINCTRL_PIN(65, "GPIO_65"), -++ PINCTRL_PIN(66, "GPIO_66"), -++ PINCTRL_PIN(67, "GPIO_67"), -++ PINCTRL_PIN(68, "GPIO_68"), -++ PINCTRL_PIN(69, "GPIO_69"), -++ PINCTRL_PIN(70, "GPIO_70"), -++ PINCTRL_PIN(71, "GPIO_71"), -++ PINCTRL_PIN(72, "GPIO_72"), -++ PINCTRL_PIN(73, "GPIO_73"), -++ PINCTRL_PIN(74, "GPIO_74"), -++ PINCTRL_PIN(75, "GPIO_75"), -++ PINCTRL_PIN(76, "GPIO_76"), -++ PINCTRL_PIN(77, "GPIO_77"), -++ PINCTRL_PIN(78, "GPIO_78"), -++ PINCTRL_PIN(79, "GPIO_79"), -++}; -++ -++#define DECLARE_MSM_GPIO_PINS(pin) \ -++ static const unsigned int gpio##pin##_pins[] = { pin } -++DECLARE_MSM_GPIO_PINS(0); -++DECLARE_MSM_GPIO_PINS(1); -++DECLARE_MSM_GPIO_PINS(2); -++DECLARE_MSM_GPIO_PINS(3); -++DECLARE_MSM_GPIO_PINS(4); -++DECLARE_MSM_GPIO_PINS(5); -++DECLARE_MSM_GPIO_PINS(6); -++DECLARE_MSM_GPIO_PINS(7); -++DECLARE_MSM_GPIO_PINS(8); -++DECLARE_MSM_GPIO_PINS(9); -++DECLARE_MSM_GPIO_PINS(10); -++DECLARE_MSM_GPIO_PINS(11); -++DECLARE_MSM_GPIO_PINS(12); -++DECLARE_MSM_GPIO_PINS(13); -++DECLARE_MSM_GPIO_PINS(14); -++DECLARE_MSM_GPIO_PINS(15); -++DECLARE_MSM_GPIO_PINS(16); -++DECLARE_MSM_GPIO_PINS(17); -++DECLARE_MSM_GPIO_PINS(18); -++DECLARE_MSM_GPIO_PINS(19); -++ -++DECLARE_MSM_GPIO_PINS(21); -++DECLARE_MSM_GPIO_PINS(22); -++DECLARE_MSM_GPIO_PINS(23); -++DECLARE_MSM_GPIO_PINS(24); -++DECLARE_MSM_GPIO_PINS(25); -++DECLARE_MSM_GPIO_PINS(26); -++DECLARE_MSM_GPIO_PINS(27); -++DECLARE_MSM_GPIO_PINS(28); -++DECLARE_MSM_GPIO_PINS(29); -++DECLARE_MSM_GPIO_PINS(30); -++DECLARE_MSM_GPIO_PINS(31); -++DECLARE_MSM_GPIO_PINS(32); -++DECLARE_MSM_GPIO_PINS(33); -++DECLARE_MSM_GPIO_PINS(34); -++DECLARE_MSM_GPIO_PINS(35); -++DECLARE_MSM_GPIO_PINS(36); -++DECLARE_MSM_GPIO_PINS(37); -++DECLARE_MSM_GPIO_PINS(38); -++DECLARE_MSM_GPIO_PINS(39); -++DECLARE_MSM_GPIO_PINS(40); -++DECLARE_MSM_GPIO_PINS(41); -++DECLARE_MSM_GPIO_PINS(42); -++DECLARE_MSM_GPIO_PINS(43); -++DECLARE_MSM_GPIO_PINS(44); -++DECLARE_MSM_GPIO_PINS(45); -++DECLARE_MSM_GPIO_PINS(46); -++DECLARE_MSM_GPIO_PINS(47); -++DECLARE_MSM_GPIO_PINS(48); -++DECLARE_MSM_GPIO_PINS(49); -++DECLARE_MSM_GPIO_PINS(50); -++DECLARE_MSM_GPIO_PINS(51); -++DECLARE_MSM_GPIO_PINS(52); -++DECLARE_MSM_GPIO_PINS(53); -++DECLARE_MSM_GPIO_PINS(54); -++DECLARE_MSM_GPIO_PINS(55); -++DECLARE_MSM_GPIO_PINS(56); -++DECLARE_MSM_GPIO_PINS(57); -++DECLARE_MSM_GPIO_PINS(58); -++DECLARE_MSM_GPIO_PINS(59); -++DECLARE_MSM_GPIO_PINS(60); -++DECLARE_MSM_GPIO_PINS(61); -++DECLARE_MSM_GPIO_PINS(62); -++DECLARE_MSM_GPIO_PINS(63); -++DECLARE_MSM_GPIO_PINS(64); -++DECLARE_MSM_GPIO_PINS(65); -++DECLARE_MSM_GPIO_PINS(66); -++DECLARE_MSM_GPIO_PINS(67); -++DECLARE_MSM_GPIO_PINS(68); -++DECLARE_MSM_GPIO_PINS(69); -++DECLARE_MSM_GPIO_PINS(70); -++DECLARE_MSM_GPIO_PINS(71); -++DECLARE_MSM_GPIO_PINS(72); -++DECLARE_MSM_GPIO_PINS(73); -++DECLARE_MSM_GPIO_PINS(74); -++DECLARE_MSM_GPIO_PINS(75); -++DECLARE_MSM_GPIO_PINS(76); -++DECLARE_MSM_GPIO_PINS(77); -++DECLARE_MSM_GPIO_PINS(78); -++DECLARE_MSM_GPIO_PINS(79); -++ -++enum ipq6018_functions { -++ msm_mux_atest_char, -++ msm_mux_atest_char0, -++ msm_mux_atest_char1, -++ -++ msm_mux_atest_char3, -++ msm_mux_audio0, -++ msm_mux_audio1, -++ msm_mux_audio2, -++ msm_mux_audio3, -++ msm_mux_audio_rxbclk, -++ msm_mux_audio_rxfsync, -++ msm_mux_audio_rxmclk, -++ msm_mux_audio_rxmclkin, -++ msm_mux_audio_txbclk, -++ msm_mux_audio_txfsync, -++ msm_mux_audio_txmclk, -++ msm_mux_audio_txmclkin, -++ msm_mux_blsp0_i2c, -++ msm_mux_blsp0_spi, -++ msm_mux_blsp0_uart, -++ msm_mux_blsp1_i2c, -++ msm_mux_blsp1_spi, -++ msm_mux_blsp1_uart, -++ msm_mux_blsp2_i2c, -++ msm_mux_blsp2_spi, -++ msm_mux_blsp2_uart, -++ msm_mux_blsp3_i2c, -++ msm_mux_blsp3_spi, -++ msm_mux_blsp3_uart, -++ msm_mux_blsp4_i2c, -++ msm_mux_blsp4_spi, -++ msm_mux_blsp4_uart, -++ msm_mux_blsp5_i2c, -++ msm_mux_blsp5_uart, -++ msm_mux_burn0, -++ msm_mux_burn1, -++ msm_mux_cri_trng, -++ msm_mux_cri_trng0, -++ msm_mux_cri_trng1, -++ msm_mux_cxc0, -++ msm_mux_cxc1, -++ msm_mux_dbg_out, -++ msm_mux_gcc_plltest, -++ msm_mux_gcc_tlmm, -++ msm_mux_gpio, -++ msm_mux_lpass_aud, -++ msm_mux_lpass_aud0, -++ msm_mux_lpass_aud1, -++ msm_mux_lpass_aud2, -++ msm_mux_lpass_pcm, -++ msm_mux_lpass_pdm, -++ msm_mux_mac00, -++ msm_mux_mac01, -++ msm_mux_mac10, -++ msm_mux_mac11, -++ msm_mux_mac12, -++ msm_mux_mac13, -++ msm_mux_mac20, -++ msm_mux_mac21, -++ msm_mux_mdc, -++ msm_mux_mdio, -++ msm_mux_pcie0_clk, -++ msm_mux_pcie0_rst, -++ msm_mux_pcie0_wake, -++ msm_mux_prng_rosc, -++ msm_mux_pta1_0, -++ msm_mux_pta1_1, -++ msm_mux_pta1_2, -++ msm_mux_pta2_0, -++ msm_mux_pta2_1, -++ msm_mux_pta2_2, -++ msm_mux_pwm00, -++ msm_mux_pwm01, -++ msm_mux_pwm02, -++ msm_mux_pwm03, -++ msm_mux_pwm04, -++ msm_mux_pwm10, -++ msm_mux_pwm11, -++ msm_mux_pwm12, -++ msm_mux_pwm13, -++ msm_mux_pwm14, -++ -++ msm_mux_pwm21, -++ msm_mux_pwm22, -++ msm_mux_pwm23, -++ msm_mux_pwm24, -++ msm_mux_pwm30, -++ msm_mux_pwm31, -++ msm_mux_pwm32, -++ msm_mux_pwm33, -++ msm_mux_qdss_cti_trig_in_a0, -++ msm_mux_qdss_cti_trig_in_a1, -++ msm_mux_qdss_cti_trig_out_a0, -++ msm_mux_qdss_cti_trig_out_a1, -++ msm_mux_qdss_cti_trig_in_b0, -++ msm_mux_qdss_cti_trig_in_b1, -++ msm_mux_qdss_cti_trig_out_b0, -++ msm_mux_qdss_cti_trig_out_b1, -++ msm_mux_qdss_traceclk_a, -++ msm_mux_qdss_tracectl_a, -++ msm_mux_qdss_tracedata_a, -++ msm_mux_qdss_traceclk_b, -++ msm_mux_qdss_tracectl_b, -++ msm_mux_qdss_tracedata_b, -++ msm_mux_qpic_pad, -++ msm_mux_rx0, -++ msm_mux_rx1, -++ msm_mux_rx_swrm, -++ msm_mux_rx_swrm0, -++ msm_mux_rx_swrm1, -++ msm_mux_sd_card, -++ msm_mux_sd_write, -++ msm_mux_tsens_max, -++ msm_mux_tx_swrm, -++ msm_mux_tx_swrm0, -++ msm_mux_tx_swrm1, -++ msm_mux_tx_swrm2, -++ msm_mux_wci20, -++ msm_mux_wci21, -++ msm_mux_wci22, -++ msm_mux_wci23, -++ msm_mux_wsa_swrm, -++ msm_mux__, -++}; -++ -++static const char * const blsp3_uart_groups[] = { -++ "gpio73", "gpio74", "gpio75", "gpio76", -++}; -++ -++static const char * const blsp3_i2c_groups[] = { -++ "gpio73", "gpio74", -++}; -++ -++static const char * const blsp3_spi_groups[] = { -++ "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", "gpio78", "gpio79", -++}; -++ -++static const char * const wci20_groups[] = { -++ "gpio0", "gpio2", -++}; -++ -++static const char * const qpic_pad_groups[] = { -++ "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio9", "gpio10", -++ "gpio11", "gpio17", "gpio15", "gpio12", "gpio13", "gpio14", "gpio5", -++ "gpio6", "gpio7", "gpio8", -++}; -++ -++static const char * const burn0_groups[] = { -++ "gpio0", -++}; -++ -++static const char * const mac12_groups[] = { -++ "gpio1", "gpio11", -++}; -++ -++static const char * const qdss_tracectl_b_groups[] = { -++ "gpio1", -++}; -++ -++static const char * const burn1_groups[] = { -++ "gpio1", -++}; -++ -++static const char * const qdss_traceclk_b_groups[] = { -++ "gpio0", -++}; -++ -++static const char * const qdss_tracedata_b_groups[] = { -++ "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio8", "gpio9", -++ "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", -++ "gpio17", -++}; -++ -++static const char * const mac01_groups[] = { -++ "gpio3", "gpio4", -++}; -++ -++static const char * const mac21_groups[] = { -++ "gpio5", "gpio6", -++}; -++ -++static const char * const atest_char_groups[] = { -++ "gpio9", -++}; -++ -++static const char * const cxc0_groups[] = { -++ "gpio9", "gpio16", -++}; -++ -++static const char * const mac13_groups[] = { -++ "gpio9", "gpio16", -++}; -++ -++static const char * const dbg_out_groups[] = { -++ "gpio9", -++}; -++ -++static const char * const wci22_groups[] = { -++ "gpio11", "gpio17", -++}; -++ -++static const char * const pwm00_groups[] = { -++ "gpio18", -++}; -++ -++static const char * const atest_char0_groups[] = { -++ "gpio18", -++}; -++ -++static const char * const wci23_groups[] = { -++ "gpio18", "gpio19", -++}; -++ -++static const char * const mac11_groups[] = { -++ "gpio18", "gpio19", -++}; -++ -++static const char * const pwm10_groups[] = { -++ "gpio19", -++}; -++ -++static const char * const atest_char1_groups[] = { -++ "gpio19", -++}; -++ -++ -++static const char * const pwm30_groups[] = { -++ "gpio21", -++}; -++ -++static const char * const atest_char3_groups[] = { -++ "gpio21", -++}; -++ -++static const char * const audio_txmclk_groups[] = { -++ "gpio22", -++}; -++ -++static const char * const audio_txmclkin_groups[] = { -++ "gpio22", -++}; -++ -++static const char * const pwm02_groups[] = { -++ "gpio22", -++}; -++ -++static const char * const tx_swrm0_groups[] = { -++ "gpio22", -++}; -++ -++static const char * const qdss_cti_trig_out_b0_groups[] = { -++ "gpio22", -++}; -++ -++static const char * const audio_txbclk_groups[] = { -++ "gpio23", -++}; -++ -++static const char * const pwm12_groups[] = { -++ "gpio23", -++}; -++ -++static const char * const wsa_swrm_groups[] = { -++ "gpio23", "gpio24", -++}; -++ -++static const char * const tx_swrm1_groups[] = { -++ "gpio23", -++}; -++ -++static const char * const qdss_cti_trig_in_b0_groups[] = { -++ "gpio23", -++}; -++ -++static const char * const audio_txfsync_groups[] = { -++ "gpio24", -++}; -++ -++static const char * const pwm22_groups[] = { -++ "gpio24", -++}; -++ -++static const char * const tx_swrm2_groups[] = { -++ "gpio24", -++}; -++ -++static const char * const qdss_cti_trig_out_b1_groups[] = { -++ "gpio24", -++}; -++ -++static const char * const audio0_groups[] = { -++ "gpio25", "gpio32", -++}; -++ -++static const char * const pwm32_groups[] = { -++ "gpio25", -++}; -++ -++static const char * const tx_swrm_groups[] = { -++ "gpio25", -++}; -++ -++static const char * const qdss_cti_trig_in_b1_groups[] = { -++ "gpio25", -++}; -++ -++static const char * const audio1_groups[] = { -++ "gpio26", "gpio33", -++}; -++ -++static const char * const pwm04_groups[] = { -++ "gpio26", -++}; -++ -++static const char * const audio2_groups[] = { -++ "gpio27", -++}; -++ -++static const char * const pwm14_groups[] = { -++ "gpio27", -++}; -++ -++static const char * const audio3_groups[] = { -++ "gpio28", -++}; -++ -++static const char * const pwm24_groups[] = { -++ "gpio28", -++}; -++ -++static const char * const audio_rxmclk_groups[] = { -++ "gpio29", -++}; -++ -++static const char * const audio_rxmclkin_groups[] = { -++ "gpio29", -++}; -++ -++static const char * const pwm03_groups[] = { -++ "gpio29", -++}; -++ -++static const char * const lpass_pdm_groups[] = { -++ "gpio29", "gpio30", "gpio31", "gpio32", -++}; -++ -++static const char * const lpass_aud_groups[] = { -++ "gpio29", -++}; -++ -++static const char * const qdss_cti_trig_in_a1_groups[] = { -++ "gpio29", -++}; -++ -++static const char * const audio_rxbclk_groups[] = { -++ "gpio30", -++}; -++ -++static const char * const pwm13_groups[] = { -++ "gpio30", -++}; -++ -++static const char * const lpass_aud0_groups[] = { -++ "gpio30", -++}; -++ -++static const char * const rx_swrm_groups[] = { -++ "gpio30", -++}; -++ -++static const char * const qdss_cti_trig_out_a1_groups[] = { -++ "gpio30", -++}; -++ -++static const char * const audio_rxfsync_groups[] = { -++ "gpio31", -++}; -++ -++static const char * const pwm23_groups[] = { -++ "gpio31", -++}; -++ -++static const char * const lpass_aud1_groups[] = { -++ "gpio31", -++}; -++ -++static const char * const rx_swrm0_groups[] = { -++ "gpio31", -++}; -++ -++static const char * const qdss_cti_trig_in_a0_groups[] = { -++ "gpio31", -++}; -++ -++static const char * const pwm33_groups[] = { -++ "gpio32", -++}; -++ -++static const char * const lpass_aud2_groups[] = { -++ "gpio32", -++}; -++ -++static const char * const rx_swrm1_groups[] = { -++ "gpio32", -++}; -++ -++static const char * const qdss_cti_trig_out_a0_groups[] = { -++ "gpio32", -++}; -++ -++static const char * const lpass_pcm_groups[] = { -++ "gpio34", "gpio35", "gpio36", "gpio37", -++}; -++ -++static const char * const mac10_groups[] = { -++ "gpio34", "gpio35", -++}; -++ -++static const char * const mac00_groups[] = { -++ "gpio34", "gpio35", -++}; -++ -++static const char * const mac20_groups[] = { -++ "gpio36", "gpio37", -++}; -++ -++static const char * const blsp0_uart_groups[] = { -++ "gpio38", "gpio39", "gpio40", "gpio41", -++}; -++ -++static const char * const blsp0_i2c_groups[] = { -++ "gpio38", "gpio39", -++}; -++ -++static const char * const blsp0_spi_groups[] = { -++ "gpio38", "gpio39", "gpio40", "gpio41", -++}; -++ -++static const char * const blsp2_uart_groups[] = { -++ "gpio42", "gpio43", "gpio44", "gpio45", -++}; -++ -++static const char * const blsp2_i2c_groups[] = { -++ "gpio42", "gpio43", -++}; -++ -++static const char * const blsp2_spi_groups[] = { -++ "gpio42", "gpio43", "gpio44", "gpio45", -++}; -++ -++static const char * const blsp5_i2c_groups[] = { -++ "gpio46", "gpio47", -++}; -++ -++static const char * const blsp5_uart_groups[] = { -++ "gpio48", "gpio49", -++}; -++ -++static const char * const qdss_traceclk_a_groups[] = { -++ "gpio48", -++}; -++ -++static const char * const qdss_tracectl_a_groups[] = { -++ "gpio49", -++}; -++ -++static const char * const pwm01_groups[] = { -++ "gpio50", -++}; -++ -++static const char * const pta1_1_groups[] = { -++ "gpio51", -++}; -++ -++static const char * const pwm11_groups[] = { -++ "gpio51", -++}; -++ -++static const char * const rx1_groups[] = { -++ "gpio51", -++}; -++ -++static const char * const pta1_2_groups[] = { -++ "gpio52", -++}; -++ -++static const char * const pwm21_groups[] = { -++ "gpio52", -++}; -++ -++static const char * const pta1_0_groups[] = { -++ "gpio53", -++}; -++ -++static const char * const pwm31_groups[] = { -++ "gpio53", -++}; -++ -++static const char * const prng_rosc_groups[] = { -++ "gpio53", -++}; -++ -++static const char * const blsp4_uart_groups[] = { -++ "gpio55", "gpio56", "gpio57", "gpio58", -++}; -++ -++static const char * const blsp4_i2c_groups[] = { -++ "gpio55", "gpio56", -++}; -++ -++static const char * const blsp4_spi_groups[] = { -++ "gpio55", "gpio56", "gpio57", "gpio58", -++}; -++ -++static const char * const pcie0_clk_groups[] = { -++ "gpio59", -++}; -++ -++static const char * const cri_trng0_groups[] = { -++ "gpio59", -++}; -++ -++static const char * const pcie0_rst_groups[] = { -++ "gpio60", -++}; -++ -++static const char * const cri_trng1_groups[] = { -++ "gpio60", -++}; -++ -++static const char * const pcie0_wake_groups[] = { -++ "gpio61", -++}; -++ -++static const char * const cri_trng_groups[] = { -++ "gpio61", -++}; -++ -++static const char * const sd_card_groups[] = { -++ "gpio62", -++}; -++ -++static const char * const sd_write_groups[] = { -++ "gpio63", -++}; -++ -++static const char * const rx0_groups[] = { -++ "gpio63", -++}; -++ -++static const char * const tsens_max_groups[] = { -++ "gpio63", -++}; -++ -++static const char * const mdc_groups[] = { -++ "gpio64", -++}; -++ -++static const char * const qdss_tracedata_a_groups[] = { -++ "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", -++ "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", -++ "gpio78", "gpio79", -++}; -++ -++static const char * const mdio_groups[] = { -++ "gpio65", -++}; -++ -++static const char * const pta2_0_groups[] = { -++ "gpio66", -++}; -++ -++static const char * const wci21_groups[] = { -++ "gpio66", "gpio68", -++}; -++ -++static const char * const cxc1_groups[] = { -++ "gpio66", "gpio68", -++}; -++ -++static const char * const pta2_1_groups[] = { -++ "gpio67", -++}; -++ -++static const char * const pta2_2_groups[] = { -++ "gpio68", -++}; -++ -++static const char * const blsp1_uart_groups[] = { -++ "gpio69", "gpio70", "gpio71", "gpio72", -++}; -++ -++static const char * const blsp1_i2c_groups[] = { -++ "gpio69", "gpio70", -++}; -++ -++static const char * const blsp1_spi_groups[] = { -++ "gpio69", "gpio70", "gpio71", "gpio72", -++}; -++ -++static const char * const gcc_plltest_groups[] = { -++ "gpio69", "gpio71", -++}; -++ -++static const char * const gcc_tlmm_groups[] = { -++ "gpio70", -++}; -++ -++static const char * const gpio_groups[] = { -++ "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", -++ "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", -++ "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", -++ "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", -++ "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", -++ "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", -++ "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", -++ "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", -++ "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", -++ "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", -++ "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", -++ "gpio78", "gpio79", -++}; -++ -++static const struct msm_function ipq6018_functions[] = { -++ FUNCTION(atest_char), -++ FUNCTION(atest_char0), -++ FUNCTION(atest_char1), -++ -++ FUNCTION(atest_char3), -++ FUNCTION(audio0), -++ FUNCTION(audio1), -++ FUNCTION(audio2), -++ FUNCTION(audio3), -++ FUNCTION(audio_rxbclk), -++ FUNCTION(audio_rxfsync), -++ FUNCTION(audio_rxmclk), -++ FUNCTION(audio_rxmclkin), -++ FUNCTION(audio_txbclk), -++ FUNCTION(audio_txfsync), -++ FUNCTION(audio_txmclk), -++ FUNCTION(audio_txmclkin), -++ FUNCTION(blsp0_i2c), -++ FUNCTION(blsp0_spi), -++ FUNCTION(blsp0_uart), -++ FUNCTION(blsp1_i2c), -++ FUNCTION(blsp1_spi), -++ FUNCTION(blsp1_uart), -++ FUNCTION(blsp2_i2c), -++ FUNCTION(blsp2_spi), -++ FUNCTION(blsp2_uart), -++ FUNCTION(blsp3_i2c), -++ FUNCTION(blsp3_spi), -++ FUNCTION(blsp3_uart), -++ FUNCTION(blsp4_i2c), -++ FUNCTION(blsp4_spi), -++ FUNCTION(blsp4_uart), -++ FUNCTION(blsp5_i2c), -++ FUNCTION(blsp5_uart), -++ FUNCTION(burn0), -++ FUNCTION(burn1), -++ FUNCTION(cri_trng), -++ FUNCTION(cri_trng0), -++ FUNCTION(cri_trng1), -++ FUNCTION(cxc0), -++ FUNCTION(cxc1), -++ FUNCTION(dbg_out), -++ FUNCTION(gcc_plltest), -++ FUNCTION(gcc_tlmm), -++ FUNCTION(gpio), -++ FUNCTION(lpass_aud), -++ FUNCTION(lpass_aud0), -++ FUNCTION(lpass_aud1), -++ FUNCTION(lpass_aud2), -++ FUNCTION(lpass_pcm), -++ FUNCTION(lpass_pdm), -++ FUNCTION(mac00), -++ FUNCTION(mac01), -++ FUNCTION(mac10), -++ FUNCTION(mac11), -++ FUNCTION(mac12), -++ FUNCTION(mac13), -++ FUNCTION(mac20), -++ FUNCTION(mac21), -++ FUNCTION(mdc), -++ FUNCTION(mdio), -++ FUNCTION(pcie0_clk), -++ FUNCTION(pcie0_rst), -++ FUNCTION(pcie0_wake), -++ FUNCTION(prng_rosc), -++ FUNCTION(pta1_0), -++ FUNCTION(pta1_1), -++ FUNCTION(pta1_2), -++ FUNCTION(pta2_0), -++ FUNCTION(pta2_1), -++ FUNCTION(pta2_2), -++ FUNCTION(pwm00), -++ FUNCTION(pwm01), -++ FUNCTION(pwm02), -++ FUNCTION(pwm03), -++ FUNCTION(pwm04), -++ FUNCTION(pwm10), -++ FUNCTION(pwm11), -++ FUNCTION(pwm12), -++ FUNCTION(pwm13), -++ FUNCTION(pwm14), -++ -++ FUNCTION(pwm21), -++ FUNCTION(pwm22), -++ FUNCTION(pwm23), -++ FUNCTION(pwm24), -++ FUNCTION(pwm30), -++ FUNCTION(pwm31), -++ FUNCTION(pwm32), -++ FUNCTION(pwm33), -++ FUNCTION(qdss_cti_trig_in_a0), -++ FUNCTION(qdss_cti_trig_in_a1), -++ FUNCTION(qdss_cti_trig_out_a0), -++ FUNCTION(qdss_cti_trig_out_a1), -++ FUNCTION(qdss_cti_trig_in_b0), -++ FUNCTION(qdss_cti_trig_in_b1), -++ FUNCTION(qdss_cti_trig_out_b0), -++ FUNCTION(qdss_cti_trig_out_b1), -++ FUNCTION(qdss_traceclk_a), -++ FUNCTION(qdss_tracectl_a), -++ FUNCTION(qdss_tracedata_a), -++ FUNCTION(qdss_traceclk_b), -++ FUNCTION(qdss_tracectl_b), -++ FUNCTION(qdss_tracedata_b), -++ FUNCTION(qpic_pad), -++ FUNCTION(rx0), -++ FUNCTION(rx1), -++ FUNCTION(rx_swrm), -++ FUNCTION(rx_swrm0), -++ FUNCTION(rx_swrm1), -++ FUNCTION(sd_card), -++ FUNCTION(sd_write), -++ FUNCTION(tsens_max), -++ FUNCTION(tx_swrm), -++ FUNCTION(tx_swrm0), -++ FUNCTION(tx_swrm1), -++ FUNCTION(tx_swrm2), -++ FUNCTION(wci20), -++ FUNCTION(wci21), -++ FUNCTION(wci22), -++ FUNCTION(wci23), -++ FUNCTION(wsa_swrm), -++}; -++ -++static const struct msm_pingroup ipq6018_groups[] = { -++ PINGROUP(0, qpic_pad, wci20, qdss_traceclk_b, _, burn0, _, _, _, _), -++ PINGROUP(1, qpic_pad, mac12, qdss_tracectl_b, _, burn1, _, _, _, _), -++ PINGROUP(2, qpic_pad, wci20, qdss_tracedata_b, _, _, _, _, _, _), -++ PINGROUP(3, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _), -++ PINGROUP(4, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _), -++ PINGROUP(5, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _), -++ PINGROUP(6, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _), -++ PINGROUP(7, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(8, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(9, qpic_pad, atest_char, cxc0, mac13, dbg_out, qdss_tracedata_b, _, _, _), -++ PINGROUP(10, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(11, qpic_pad, wci22, mac12, qdss_tracedata_b, _, _, _, _, _), -++ PINGROUP(12, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(13, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(14, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(15, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _), -++ PINGROUP(16, qpic_pad, cxc0, mac13, qdss_tracedata_b, _, _, _, _, _), -++ PINGROUP(17, qpic_pad, qdss_tracedata_b, wci22, _, _, _, _, _, _), -++ PINGROUP(18, pwm00, atest_char0, wci23, mac11, _, _, _, _, _), -++ PINGROUP(19, pwm10, atest_char1, wci23, mac11, _, _, _, _, _), -++ -++ PINGROUP(21, pwm30, atest_char3, _, _, _, _, _, _, _), -++ PINGROUP(22, audio_txmclk, audio_txmclkin, pwm02, tx_swrm0, _, qdss_cti_trig_out_b0, _, _, _), -++ PINGROUP(23, audio_txbclk, pwm12, wsa_swrm, tx_swrm1, _, qdss_cti_trig_in_b0, _, _, _), -++ PINGROUP(24, audio_txfsync, pwm22, wsa_swrm, tx_swrm2, _, qdss_cti_trig_out_b1, _, _, _), -++ PINGROUP(25, audio0, pwm32, tx_swrm, _, qdss_cti_trig_in_b1, _, _, _, _), -++ PINGROUP(26, audio1, pwm04, _, _, _, _, _, _, _), -++ PINGROUP(27, audio2, pwm14, _, _, _, _, _, _, _), -++ PINGROUP(28, audio3, pwm24, _, _, _, _, _, _, _), -++ PINGROUP(29, audio_rxmclk, audio_rxmclkin, pwm03, lpass_pdm, lpass_aud, qdss_cti_trig_in_a1, _, _, _), -++ PINGROUP(30, audio_rxbclk, pwm13, lpass_pdm, lpass_aud0, rx_swrm, _, qdss_cti_trig_out_a1, _, _), -++ PINGROUP(31, audio_rxfsync, pwm23, lpass_pdm, lpass_aud1, rx_swrm0, _, qdss_cti_trig_in_a0, _, _), -++ PINGROUP(32, audio0, pwm33, lpass_pdm, lpass_aud2, rx_swrm1, _, qdss_cti_trig_out_a0, _, _), -++ PINGROUP(33, audio1, _, _, _, _, _, _, _, _), -++ PINGROUP(34, lpass_pcm, mac10, mac00, _, _, _, _, _, _), -++ PINGROUP(35, lpass_pcm, mac10, mac00, _, _, _, _, _, _), -++ PINGROUP(36, lpass_pcm, mac20, _, _, _, _, _, _, _), -++ PINGROUP(37, lpass_pcm, mac20, _, _, _, _, _, _, _), -++ PINGROUP(38, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _), -++ PINGROUP(39, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _), -++ PINGROUP(40, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _), -++ PINGROUP(41, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _), -++ PINGROUP(42, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _), -++ PINGROUP(43, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _), -++ PINGROUP(44, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _), -++ PINGROUP(45, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _), -++ PINGROUP(46, blsp5_i2c, _, _, _, _, _, _, _, _), -++ PINGROUP(47, blsp5_i2c, _, _, _, _, _, _, _, _), -++ PINGROUP(48, blsp5_uart, _, qdss_traceclk_a, _, _, _, _, _, _), -++ PINGROUP(49, blsp5_uart, _, qdss_tracectl_a, _, _, _, _, _, _), -++ PINGROUP(50, pwm01, _, _, _, _, _, _, _, _), -++ PINGROUP(51, pta1_1, pwm11, _, rx1, _, _, _, _, _), -++ PINGROUP(52, pta1_2, pwm21, _, _, _, _, _, _, _), -++ PINGROUP(53, pta1_0, pwm31, prng_rosc, _, _, _, _, _, _), -++ PINGROUP(54, _, _, _, _, _, _, _, _, _), -++ PINGROUP(55, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _), -++ PINGROUP(56, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _), -++ PINGROUP(57, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _), -++ PINGROUP(58, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _), -++ PINGROUP(59, pcie0_clk, _, _, cri_trng0, _, _, _, _, _), -++ PINGROUP(60, pcie0_rst, _, _, cri_trng1, _, _, _, _, _), -++ PINGROUP(61, pcie0_wake, _, _, cri_trng, _, _, _, _, _), -++ PINGROUP(62, sd_card, _, _, _, _, _, _, _, _), -++ PINGROUP(63, sd_write, rx0, _, tsens_max, _, _, _, _, _), -++ PINGROUP(64, mdc, _, qdss_tracedata_a, _, _, _, _, _, _), -++ PINGROUP(65, mdio, _, qdss_tracedata_a, _, _, _, _, _, _), -++ PINGROUP(66, pta2_0, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _), -++ PINGROUP(67, pta2_1, qdss_tracedata_a, _, _, _, _, _, _, _), -++ PINGROUP(68, pta2_2, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _), -++ PINGROUP(69, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _), -++ PINGROUP(70, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_tlmm, qdss_tracedata_a, _, _, _, _), -++ PINGROUP(71, blsp1_uart, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _, _), -++ PINGROUP(72, blsp1_uart, blsp1_spi, qdss_tracedata_a, _, _, _, _, _, _), -++ PINGROUP(73, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _), -++ PINGROUP(74, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _), -++ PINGROUP(75, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _), -++ PINGROUP(76, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _), -++ PINGROUP(77, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _), -++ PINGROUP(78, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _), -++ PINGROUP(79, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _), -++}; -++ -++static const struct msm_pinctrl_soc_data ipq6018_pinctrl = { -++ .pins = ipq6018_pins, -++ .npins = ARRAY_SIZE(ipq6018_pins), -++ .functions = ipq6018_functions, -++ .nfunctions = ARRAY_SIZE(ipq6018_functions), -++ .groups = ipq6018_groups, -++ .ngroups = ARRAY_SIZE(ipq6018_groups), -++ .ngpios = 79, -++}; -++ -++static int ipq6018_pinctrl_probe(struct platform_device *pdev) -++{ -++ return msm_pinctrl_probe(pdev, &ipq6018_pinctrl); -++} -++ -++static const struct of_device_id ipq6018_pinctrl_of_match[] = { -++ { .compatible = "qcom,ipq6000-pinctrl", }, -++ { }, -++}; -++ -++static struct platform_driver ipq6018_pinctrl_driver = { -++ .driver = { -++ .name = "ipq6000-pinctrl", -++ .of_match_table = ipq6018_pinctrl_of_match, -++ }, -++ .probe = ipq6018_pinctrl_probe, -++ .remove = msm_pinctrl_remove, -++}; -++ -++static int __init ipq6018_pinctrl_init(void) -++{ -++ return platform_driver_register(&ipq6018_pinctrl_driver); -++} -++arch_initcall(ipq6018_pinctrl_init); -++ -++static void __exit ipq6018_pinctrl_exit(void) -++{ -++ platform_driver_unregister(&ipq6018_pinctrl_driver); -++} -++module_exit(ipq6018_pinctrl_exit); -++ -++MODULE_DESCRIPTION("QTI ipq6000 pinctrl driver"); -++MODULE_LICENSE("GPL v2"); -++MODULE_DEVICE_TABLE(of, ipq6018_pinctrl_of_match); -+-- -+2.25.1 -+ diff --git a/devices/ramips_mt76x8/.config b/devices/ramips_mt76x8/.config index a0f5b68fd255..70d6986076ba 100644 --- a/devices/ramips_mt76x8/.config +++ b/devices/ramips_mt76x8/.config @@ -11,6 +11,7 @@ CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_hiwifi_hc5661a=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_hiwifi_hc5761a=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_hiwifi_hc5861b=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_hiwifi_hc5611=y +CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_miwifi-3a=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_netgear_r6120=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_miwifi-nano=y diff --git a/devices/ramips_mt76x8/patches/22-miwifi-3a.patch b/devices/ramips_mt76x8/patches/22-miwifi-3a.patch new file mode 100644 index 000000000000..c0e3d7729456 --- /dev/null +++ b/devices/ramips_mt76x8/patches/22-miwifi-3a.patch @@ -0,0 +1,264 @@ +From 47ab63aea17f960cea9e77b78140d7cec8c7bf54 Mon Sep 17 00:00:00 2001 +From: zehao zhang <1452207500@qq.com> +Date: Fri, 14 Jun 2024 13:18:58 +0800 +Subject: [PATCH] ramips: add xiaomi miwifi 3a device support + +Miwifi 3A is a 2.4/5 GHz band router, based on MediaTek MT7628A. + +Processor: MT7628A +ROM: 16MB NorFlash +RAM: 64MB DDR2 +2.4G WiFi 2X2 (support IEEE 802.11N protocol, up to 300Mbps) +5G WiFi 2X2 (supports IEEE 802.11AC protocol, up to 867Mbps) +Antenna: 4 external omnidirectional high-gain antennas (2 for 2.4G maximum gain 5dBi and 2 for 5G maximum gain 6dBi) +Heat dissipation system: Natural heat dissipation + +2 x 10/100M adaptive LAN ports (Auto MDI/MDIX) +1 x 10/100M adaptive WAN port (Auto MDI/MDIX) +1 red/blue/yellow LED indicator +1 system reset button +1 power input port + +Flash instruction using sysupgrade image: +1. Flash "Breed" firmware into device flash memory via the flash programmer. +2. Power off the device, then press and hold the reset button, meanwhile power on the device. +3. When the LED is flashing, access Web UI (192.168.1.1), then select "Firmware upgrade". +4. Upload file "openwrt-ramips-mt76x8-xiaomi_miwifi-3a-squashfs-sysupgrade.bin" via Web UI. +5. confirm the upgrade and wait for the upgrade to complete. + +NOTE: Please backup your partitions and EEPROM data BEFORE you upgrade the firmware. + +Signed-off-by: zehao zhang <1452207500@qq.com> +--- + package/boot/uboot-envtools/files/ramips | 1 + + .../ramips/dts/mt7628an_xiaomi_miwifi-3a.dts | 157 ++++++++++++++++++ + target/linux/ramips/image/mt76x8.mk | 9 + + .../mt76x8/base-files/etc/board.d/02_network | 4 + + .../mt76x8/base-files/etc/init.d/bootcount | 3 +- + 5 files changed, 173 insertions(+), 1 deletion(-) + create mode 100644 target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3a.dts + +diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips +index 3deb46c295704..0ceef961b83b4 100644 +--- a/package/boot/uboot-envtools/files/ramips ++++ b/package/boot/uboot-envtools/files/ramips +@@ -63,6 +63,7 @@ mediatek,linkit-smart-7688|\ + samknows,whitebox-v8|\ + xiaomi,mi-router-4c|\ + xiaomi,miwifi-nano|\ ++xiaomi,miwifi-3a|\ + zbtlink,zbt-wg2626|\ + zte,mf283plus) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" +diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3a.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3a.dts +new file mode 100644 +index 0000000000000..eae39022e8bc7 +--- /dev/null ++++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3a.dts +@@ -0,0 +1,157 @@ ++#include "mt7628an.dtsi" ++ ++#include ++#include ++#include ++ ++/ { ++ compatible = "xiaomi,miwifi-3a", "mediatek,mt7628an-soc"; ++ model = "Xiaomi Router 3A"; ++ ++ aliases { ++ led-boot = &led_status_amber; ++ led-failsafe = &led_status_red; ++ led-running = &led_status_blue; ++ led-upgrade = &led_status_amber; ++ label-mac-device = ðernet; ++ }; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_status_blue: status_blue { ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led_status_red: status_red { ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&gpio 37 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led_status_amber: status_amber { ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&gpio 44 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ gpios = <&gpio 38 GPIO_ACTIVE_LOW>; ++ linux,code = ; ++ }; ++ }; ++}; ++ ++&state_default { ++ gpio { ++ groups = "gpio", "refclk", "wdt", "wled_an"; ++ function = "gpio"; ++ }; ++}; ++ ++&ehci { ++ status = "disabled"; ++}; ++ ++&ohci { ++ status = "disabled"; ++}; ++ ++&esw { ++ mediatek,portmap = <0x2f>; ++ mediatek,portdisable = <0x2a>; ++}; ++ ++&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>; ++ }; ++}; ++ ++ðernet { ++ nvmem-cells = <&macaddr_factory_28>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&spi0 { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x0 0x30000>; ++ read-only; ++ }; ++ ++ partition@30000 { ++ label = "u-boot-env"; ++ reg = <0x30000 0x10000>; ++ }; ++ ++ partition@40000 { ++ label = "factory"; ++ reg = <0x40000 0x10000>; ++ read-only; ++ ++ nvmem-layout { ++ compatible = "fixed-layout"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ eeprom_factory_0: eeprom@0 { ++ reg = <0x0 0x400>; ++ }; ++ ++ macaddr_factory_28: macaddr@28 { ++ reg = <0x28 0x6>; ++ }; ++ ++ eeprom_factory_8000: eeprom@8000 { ++ reg = <0x8000 0x200>; ++ }; ++ }; ++ }; ++ ++ partition@50000 { ++ compatible = "denx,uimage"; ++ label = "firmware"; ++ reg = <0x50000 0xfb0000>; ++ }; ++ }; ++ }; ++}; +diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk +index b33a789398750..6a89ea8fe962a 100644 +--- a/target/linux/ramips/image/mt76x8.mk ++++ b/target/linux/ramips/image/mt76x8.mk +@@ -1097,6 +1097,15 @@ define Device/xiaomi_miwifi-nano + endef + TARGET_DEVICES += xiaomi_miwifi-nano + ++define Device/xiaomi_miwifi-3a ++ IMAGE_SIZE := 16064k ++ DEVICE_VENDOR := Xiaomi ++ DEVICE_MODEL := MiWiFi 3A ++ DEVICE_PACKAGES := uboot-envtools kmod-mt76x2 ++ SUPPORTED_DEVICES += miwifi-3a ++endef ++TARGET_DEVICES += xiaomi_miwifi-3a ++ + define Device/xiaomi_mi-ra75 + IMAGE_SIZE := 14976k + DEVICE_VENDOR := Xiaomi +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 bec8e9e3df173..abb2ee1e9af21 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 +@@ -200,6 +200,10 @@ ramips_setup_interfaces() + ucidef_add_switch "switch0" \ + "0:lan:2" "2:lan:1" "4:wan" "6@eth0" + ;; ++ xiaomi,miwifi-3a) ++ ucidef_add_switch "switch0" \ ++ "0:wan" "2:lan:1" "4:lan:2" "6@eth0" ++ ;; + zbtlink,zbt-we1226) + ucidef_add_switch "switch0" \ + "0:lan:2" "1:lan:1" "4:wan" "6@eth0" +diff --git a/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount b/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount +index 23f1e71b41809..cf160426fa712 100755 +--- a/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount ++++ b/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount +@@ -9,7 +9,8 @@ boot() { + echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s - + ;; + xiaomi,mi-router-4c|\ +- xiaomi,miwifi-nano) ++ xiaomi,miwifi-nano|\ ++ xiaomi,miwifi-3a) + fw_setenv flag_boot_success 1 + ;; + esac diff --git a/devices/ramips_mt76x8/patches/small_flash.patch b/devices/ramips_mt76x8/patches/small_flash.patch deleted file mode 100644 index 3f2706e83b8c..000000000000 --- a/devices/ramips_mt76x8/patches/small_flash.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/target/linux/ramips/Makefile -+++ b/target/linux/ramips/Makefile -@@ -17,6 +17,6 @@ define Target/Description - endef - - include $(INCLUDE_DIR)/target.mk --DEFAULT_PACKAGES += kmod-leds-gpio kmod-gpio-button-hotplug -+DEFAULT_PACKAGES += kmod-leds-gpio kmod-gpio-button-hotplug wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - - $(eval $(call BuildTarget)) \ No newline at end of file diff --git a/devices/rockchip_armv8/.config b/devices/rockchip_armv8/.config index 4cd2a1e52317..46a505490957 100644 --- a/devices/rockchip_armv8/.config +++ b/devices/rockchip_armv8/.config @@ -9,17 +9,6 @@ CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_nlnet_xgp=n CONFIG_TARGET_KERNEL_PARTSIZE=32 -# daed -CONFIG_DEVEL=y -CONFIG_BPF_TOOLCHAIN_HOST=y -# CONFIG_BPF_TOOLCHAIN_NONE is not set -CONFIG_KERNEL_BPF_EVENTS=y -CONFIG_KERNEL_CGROUP_BPF=y -CONFIG_KERNEL_DEBUG_INFO=y -CONFIG_KERNEL_DEBUG_INFO_BTF=y -# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set -CONFIG_KERNEL_XDP_SOCKETS=y - CONFIG_PACKAGE_kmod-pcie_mhi=m CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 diff --git a/devices/rockchip_armv8/diy.sh b/devices/rockchip_armv8/diy.sh index e86a56f8cd78..c8c7b242ba01 100644 --- a/devices/rockchip_armv8/diy.sh +++ b/devices/rockchip_armv8/diy.sh @@ -16,7 +16,9 @@ git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/ curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} +curl -sfL https://github.com/immortalwrt/immortalwrt/raw/master/include/kernel-6.6 -o include/kernel-6.6 + +rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} package/network/utils/xdp-tools sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk diff --git a/devices/rockchip_armv8/patches/01-hinlink.patch b/devices/rockchip_armv8/patches/01-hinlink.patch index 8e4e8e5573bf..0e83c3896e1f 100644 --- a/devices/rockchip_armv8/patches/01-hinlink.patch +++ b/devices/rockchip_armv8/patches/01-hinlink.patch @@ -42,25 +42,39 @@ --- a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch +++ b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -@@ -16,7 +16,7 @@ +@@ -1,10 +1,12 @@ + --- a/arch/arm/dts/Makefile + +++ b/arch/arm/dts/Makefile +-@@ -148,6 +148,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ ++@@ -148,6 +148,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ + rk3399-firefly.dtb \ + rk3399-gru-bob.dtb \ + rk3399-gru-kevin.dtb \ + + rk3399-guangmiao-g4c.dtb \ +++ rk3399-h3399pc.dtb \ +++ rk3399-mpc1903.dtb \ + rk3399-khadas-edge.dtb \ + rk3399-khadas-edge-captain.dtb \ + rk3399-khadas-edge-v.dtb \ +@@ -16,12 +18,17 @@ rk3399-orangepi.dtb \ rk3399-pinebook-pro.dtb \ rk3399-pinephone-pro.dtb \ -@@ -182,12 +184,17 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ -+@@ -182,12 +184,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ ++@@ -182,12 +184,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-soquartz-model-a.dtb \ rk3568-bpi-r2-pro.dtb \ rk3568-evb.dtb \ -@@ -27,6 +27,9 @@ - rk3568-nanopi-r5c.dtb \ - rk3568-nanopi-r5s.dtb \ - rk3568-odroid-m1.dtb \ + + rk3568-fastrhino-r66s.dtb \ + + rk3568-fastrhino-r68s.dtb \ +++ rk3568-lyt-t68m.dtb \ +++ rk3568-xgp.dtb \ ++ rk3568-opc-h66k.dtb \ ++ rk3568-opc-h68k.dtb \ ++ rk3568-opc-h69k.dtb \ - + rk3568-photonicat.dtb \ - rk3568-radxa-e25.dtb \ - + rk3568-roc-pc.dtb \ + rk3568-generic.dtb \ + rk3568-lubancat-2.dtb \ + + rk3568-mrkaio-m68s.dtb \ --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network diff --git a/devices/rockchip_armv8/patches/02-hinlink.revert.patch b/devices/rockchip_armv8/patches/02-hinlink.revert.patch index c8bb78c1c696..f94bd59fe8f2 100644 --- a/devices/rockchip_armv8/patches/02-hinlink.revert.patch +++ b/devices/rockchip_armv8/patches/02-hinlink.revert.patch @@ -8,7 +8,6 @@ Just ask the vendor for firmware. Signed-off-by: Tianling Shen --- package/boot/uboot-rockchip/Makefile | 24 - - .../patches/900-arm-add-dts-files.patch | 5 +- .../arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi | 21 - .../src/arch/arm/dts/rk3568-opc-h66k.dts | 17 - .../src/arch/arm/dts/rk3568-opc-h66k.dtsi | 619 ----------------- diff --git a/devices/rockchip_armv8/patches/22-H3399PC.patch b/devices/rockchip_armv8/patches/22-H3399PC.patch index 0eb3ff1341b7..37064e6cd01f 100644 --- a/devices/rockchip_armv8/patches/22-H3399PC.patch +++ b/devices/rockchip_armv8/patches/22-H3399PC.patch @@ -97,7 +97,7 @@ index 7eb99ade652..92ede0f46e6 100644 + SOC := rk3399 + UBOOT_DEVICE_NAME := rongpin-king3399-rk3399 + BOOT_FLOW := pine64-bin -+ DEVICE_PACKAGES := kmod-r8169 -urngd kmod-brcmfmac cypress-firmware-4356-sdio rongpin-king3399-firmware wpad-basic-mbedtls ++ DEVICE_PACKAGES := kmod-r8168 -urngd kmod-brcmfmac cypress-firmware-4356-sdio rongpin-king3399-firmware wpad-basic-mbedtls +endef +TARGET_DEVICES += rongpin_king3399 + @@ -118,7 +118,7 @@ index 7eb99ade652..92ede0f46e6 100644 + SOC := rk3399 + UBOOT_DEVICE_NAME := sharevdi-h3399pc-rk3399 + BOOT_FLOW := pine64-bin -+ DEVICE_PACKAGES := kmod-r8169 -urngd ++ DEVICE_PACKAGES := kmod-r8168 -urngd +endef +TARGET_DEVICES += sharevdi_h3399pc + @@ -144,21 +144,3 @@ index 231bca2b544..441ce2f4e59 100644 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-hugsun-x99.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-captain.dtb -diff --git a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -index ac01f8bb352..6f08c2d1190 100644 ---- a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -+++ b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -@@ -1,10 +1,12 @@ - --- a/arch/arm/dts/Makefile - +++ b/arch/arm/dts/Makefile --@@ -148,6 +148,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ -+@@ -148,6 +148,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ - rk3399-firefly.dtb \ - rk3399-gru-bob.dtb \ - rk3399-gru-kevin.dtb \ - + rk3399-guangmiao-g4c.dtb \ -++ rk3399-h3399pc.dtb \ -++ rk3399-mpc1903.dtb \ - rk3399-khadas-edge.dtb \ - rk3399-khadas-edge-captain.dtb \ - rk3399-khadas-edge-v.dtb \ \ No newline at end of file diff --git a/devices/rockchip_armv8/patches/33-rk3568.patch b/devices/rockchip_armv8/patches/33-rk3568.patch index e3946ae53c49..c463a0181c43 100644 --- a/devices/rockchip_armv8/patches/33-rk3568.patch +++ b/devices/rockchip_armv8/patches/33-rk3568.patch @@ -184,24 +184,3 @@ index 231bca2b544..0c4b2c55d9a 100644 xunlong,orangepi-r1-plus|\ xunlong,orangepi-r1-plus-lts) set_interface_core 2 "eth0" - ---- a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -+++ b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -@@ -18,7 +18,7 @@ - rk3399-orangepi.dtb \ - rk3399-pinebook-pro.dtb \ - rk3399-pinephone-pro.dtb \ --@@ -182,12 +184,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ -+@@ -182,12 +184,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ - rk3566-soquartz-model-a.dtb \ - rk3568-bpi-r2-pro.dtb \ - rk3568-evb.dtb \ -@@ -26,6 +26,8 @@ - + rk3568-fastrhino-r68s.dtb \ - rk3568-generic.dtb \ - rk3568-lubancat-2.dtb \ -++ rk3568-lyt-t68m.dtb \ -++ rk3568-xgp.dtb \ - + rk3568-mrkaio-m68s.dtb \ - rk3568-nanopi-r5c.dtb \ - rk3568-nanopi-r5s.dtb \ diff --git a/devices/rockchip_armv8/patches/pico3399.patch.b b/devices/rockchip_armv8/patches/pico3399.patch.b index cc3c1647d7d8..53ae1cff565c 100644 --- a/devices/rockchip_armv8/patches/pico3399.patch.b +++ b/devices/rockchip_armv8/patches/pico3399.patch.b @@ -83,7 +83,7 @@ index f15f8f26b..19d1eba72 100644 + SOC := rk3399 + UBOOT_DEVICE_NAME := rockchip-pico3399-rk3399 + IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata -+ DEVICE_PACKAGES := kmod-r8169 kmod-r8125 kmod-nvme -urngd ++ DEVICE_PACKAGES := kmod-r8168 kmod-r8125 kmod-nvme -urngd +endef +TARGET_DEVICES += rockchip_pico3399 + diff --git a/devices/rockchip_armv8/patches/uboot.revert.patch b/devices/rockchip_armv8/patches/uboot.revert.patch new file mode 100644 index 000000000000..13e281742e01 --- /dev/null +++ b/devices/rockchip_armv8/patches/uboot.revert.patch @@ -0,0 +1,2211 @@ +From d2ce50f5bd59695eb588bc878b63077421c89eb6 Mon Sep 17 00:00:00 2001 +From: Tianling Shen +Date: Wed, 3 Jul 2024 17:47:31 +0800 +Subject: [PATCH] uboot-rockchip: Update to 2024.07 + +Refresh patches, dts, defconfigs. + +Signed-off-by: Tianling Shen +--- + package/boot/uboot-rockchip/Makefile | 4 +- + ...llow-rockchip_dnl_key_pressed-in-SPL.patch | 14 +- + ...move-Amlogic-and-Rockchip-compatible.patch | 27 - + ...e-PCI-to-discover-network-controller.patch | 6 +- + .../patches/900-arm-add-dts-files.patch | 54 +- + .../arch/arm/dts/rk3568-fastrhino-r66s.dts | 27 - + .../arch/arm/dts/rk3568-fastrhino-r66s.dtsi | 484 ------------- + .../arch/arm/dts/rk3568-fastrhino-r68s.dts | 112 --- + .../src/arch/arm/dts/rk3568-roc-pc.dts | 643 ------------------ + .../src/arch/arm/dts/rk3588s-nanopi-r6c.dts | 5 +- + .../src/arch/arm/dts/rk3588s-nanopi-r6s.dts | 22 +- + .../configs/fastrhino-r66s-rk3568_defconfig | 18 +- + .../configs/fastrhino-r68s-rk3568_defconfig | 20 +- + .../configs/guangmiao-g4c-rk3399_defconfig | 30 +- + .../src/configs/mrkaio-m68s-rk3568_defconfig | 17 +- + .../src/configs/nanopi-r4se-rk3399_defconfig | 30 +- + .../src/configs/nanopi-r6c-rk3588s_defconfig | 38 +- + .../src/configs/nanopi-r6s-rk3588s_defconfig | 38 +- + .../src/configs/photonicat-rk3568_defconfig | 17 +- + .../src/configs/roc-pc-rk3568_defconfig | 18 +- + 20 files changed, 114 insertions(+), 1510 deletions(-) + delete mode 100644 package/boot/uboot-rockchip/patches/104-usb-dwc3-of-simple-Remove-Amlogic-and-Rockchip-compatible.patch + delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dts + delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dtsi + delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r68s.dts + delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-roc-pc.dts + +diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile +index dec4b427fee..65e0040f406 100644 +--- a/package/boot/uboot-rockchip/Makefile ++++ b/package/boot/uboot-rockchip/Makefile +@@ -5,9 +5,9 @@ + include $(TOPDIR)/rules.mk + include $(INCLUDE_DIR)/kernel.mk + +-PKG_VERSION:=2024.04 ++PKG_VERSION:=2024.07 + PKG_RELEASE:=1 +-PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a ++PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f + + PKG_MAINTAINER:=Tobias Maedel + +diff --git a/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch b/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch +index 9c540d89467..5b7468ee5bb 100644 +--- a/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch ++++ b/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch +@@ -36,8 +36,8 @@ Signed-off-by: Chris Morgan + + + +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) + obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o +- obj-$(CONFIG_MISC_INIT_R) += misc.o + endif ++ + --- a/arch/arm/mach-rockchip/boot_mode.c + +++ b/arch/arm/mach-rockchip/boot_mode.c + @@ -38,6 +38,10 @@ void set_back_to_bootrom_dnl_flag(void) +@@ -50,8 +50,8 @@ Signed-off-by: Chris Morgan + + + __weak int rockchip_dnl_key_pressed(void) + { +- unsigned int val; +-@@ -52,7 +56,8 @@ __weak int rockchip_dnl_key_pressed(void ++ #if CONFIG_IS_ENABLED(ADC) ++@@ -53,7 +57,8 @@ __weak int rockchip_dnl_key_pressed(void + ret = -ENODEV; + uclass_foreach_dev(dev, uc) { + if (!strncmp(dev->name, "saradc", 6)) { +@@ -61,7 +61,7 @@ Signed-off-by: Chris Morgan + break; + } + } +-@@ -73,11 +78,13 @@ __weak int rockchip_dnl_key_pressed(void ++@@ -77,11 +82,13 @@ __weak int rockchip_dnl_key_pressed(void + + void rockchip_dnl_mode_check(void) + { +@@ -75,7 +75,7 @@ Signed-off-by: Chris Morgan + } + + int setup_boot_mode(void) +-@@ -90,6 +97,7 @@ int setup_boot_mode(void) ++@@ -94,6 +101,7 @@ int setup_boot_mode(void) + boot_mode = readl(reg); + debug("%s: boot mode 0x%08x\n", __func__, boot_mode); + +@@ -83,7 +83,7 @@ Signed-off-by: Chris Morgan + /* Clear boot mode */ + writel(BOOT_NORMAL, reg); + +-@@ -103,6 +111,7 @@ int setup_boot_mode(void) ++@@ -107,6 +115,7 @@ int setup_boot_mode(void) + env_set("preboot", "setenv preboot; ums mmc 0"); + break; + } +@@ -93,7 +93,7 @@ Signed-off-by: Chris Morgan + } + --- a/arch/arm/mach-rockchip/rk3568/rk3568.c + +++ b/arch/arm/mach-rockchip/rk3568/rk3568.c +-@@ -135,3 +135,26 @@ int arch_cpu_init(void) ++@@ -134,3 +134,26 @@ int arch_cpu_init(void) + #endif + return 0; + } +diff --git a/package/boot/uboot-rockchip/patches/104-usb-dwc3-of-simple-Remove-Amlogic-and-Rockchip-compatible.patch b/package/boot/uboot-rockchip/patches/104-usb-dwc3-of-simple-Remove-Amlogic-and-Rockchip-compatible.patch +deleted file mode 100644 +index 3939535a94a..00000000000 +--- a/package/boot/uboot-rockchip/patches/104-usb-dwc3-of-simple-Remove-Amlogic-and-Rockchip-compatible.patch ++++ /dev/null +@@ -1,27 +0,0 @@ +-From 6b211613625eb264c22bbf3a53fa8cb1014d6da3 Mon Sep 17 00:00:00 2001 +-From: Jonas Karlman +-Date: Tue, 9 May 2023 01:32:22 +0000 +-Subject: [PATCH] usb: dwc3-of-simple: Remove Amlogic and Rockchip compatible +- +-Remove the rockchip,rk3399-dwc3 compatible from the dwc3-of-simple +-driver now that all boards have changed to use the dwc3-generic driver. +- +-Also remove the amlogic,meson-gxl-dwc3 compatible, it is no longer in +-use by any device tree in mainline linux or U-Boot. +- +-Signed-off-by: Jonas Karlman +---- +- drivers/usb/host/dwc3-of-simple.c | 2 -- +- 1 file changed, 2 deletions(-) +- +---- a/drivers/usb/host/dwc3-of-simple.c +-+++ b/drivers/usb/host/dwc3-of-simple.c +-@@ -90,8 +90,6 @@ static int dwc3_of_simple_remove(struct +- } +- +- static const struct udevice_id dwc3_of_simple_ids[] = { +-- { .compatible = "amlogic,meson-gxl-dwc3" }, +-- { .compatible = "rockchip,rk3399-dwc3" }, +- { .compatible = "ti,dwc3" }, +- { } +- }; +diff --git a/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch b/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch +index 045054a27fc..b92ae14d66c 100644 +--- a/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch ++++ b/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch +@@ -26,15 +26,15 @@ Signed-off-by: Jonas Karlman + + --- a/boot/bootmeth_efi.c + +++ b/boot/bootmeth_efi.c +-@@ -16,6 +16,7 @@ +- #include ++@@ -17,6 +17,7 @@ ++ #include + #include + #include + +#include + #include + #include + #include +-@@ -403,6 +404,14 @@ static int distro_efi_read_bootflow(stru ++@@ -365,6 +366,14 @@ static int distro_efi_read_bootflow(stru + { + int ret; + +diff --git a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch +index b19f5f90176..87f995c2a16 100644 +--- a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch ++++ b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch +@@ -1,47 +1,21 @@ + --- a/arch/arm/dts/Makefile + +++ b/arch/arm/dts/Makefile +-@@ -148,6 +148,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ +- rk3399-firefly.dtb \ +- rk3399-gru-bob.dtb \ +- rk3399-gru-kevin.dtb \ ++@@ -96,6 +96,18 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ ++ rk3368-geekbox.dtb \ ++ rk3368-px5-evb.dtb \ ++ +++dtb-$(CONFIG_ROCKCHIP_RK3399) += \ + + rk3399-guangmiao-g4c.dtb \ +- rk3399-khadas-edge.dtb \ +- rk3399-khadas-edge-captain.dtb \ +- rk3399-khadas-edge-v.dtb \ +-@@ -158,6 +159,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ +- rk3399-nanopi-m4b.dtb \ +- rk3399-nanopi-neo4.dtb \ +- rk3399-nanopi-r4s.dtb \ +-+ rk3399-nanopi-r4se.dtb \ +- rk3399-orangepi.dtb \ +- rk3399-pinebook-pro.dtb \ +- rk3399-pinephone-pro.dtb \ +-@@ -182,12 +184,17 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ +- rk3566-soquartz-model-a.dtb \ +- rk3568-bpi-r2-pro.dtb \ +- rk3568-evb.dtb \ +-+ rk3568-fastrhino-r66s.dtb \ +-+ rk3568-fastrhino-r68s.dtb \ +- rk3568-generic.dtb \ +- rk3568-lubancat-2.dtb \ +++ rk3399-nanopi-r4se.dtb +++ +++dtb-$(CONFIG_ROCKCHIP_RK3568) += \ + + rk3568-mrkaio-m68s.dtb \ +- rk3568-nanopi-r5c.dtb \ +- rk3568-nanopi-r5s.dtb \ +- rk3568-odroid-m1.dtb \ +-+ rk3568-photonicat.dtb \ +- rk3568-radxa-e25.dtb \ +-+ rk3568-roc-pc.dtb \ +- rk3568-rock-3a.dtb +- +- dtb-$(CONFIG_ROCKCHIP_RK3588) += \ +-@@ -200,7 +207,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \ +- rk3588-quartzpro64.dtb \ +- rk3588-turing-rk1.dtb \ +- rk3588s-rock-5a.dtb \ +-- rk3588-rock-5b.dtb +-+ rk3588-rock-5b.dtb \ +++ rk3568-photonicat.dtb +++ +++dtb-$(CONFIG_ROCKCHIP_RK3588) += \ + + rk3588s-nanopi-r6c.dtb \ + + rk3588s-nanopi-r6s.dtb +++ ++ dtb-$(CONFIG_ARCH_S5P4418) += \ ++ s5p4418-nanopi2.dtb + +- dtb-$(CONFIG_ROCKCHIP_RV1108) += \ +- rv1108-elgin-r1.dtb \ +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dts +deleted file mode 100644 +index 58ab7e9971d..00000000000 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dts ++++ /dev/null +@@ -1,27 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "rk3568-fastrhino-r66s.dtsi" +- +-/ { +- model = "Lunzn FastRhino R66S"; +- compatible = "lunzn,fastrhino-r66s", "rockchip,rk3568"; +- +- aliases { +- mmc0 = &sdmmc0; +- }; +-}; +- +-&sdmmc0 { +- bus-width = <4>; +- cap-mmc-highspeed; +- cap-sd-highspeed; +- disable-wp; +- max-frequency = <150000000>; +- no-sdio; +- no-mmc; +- pinctrl-names = "default"; +- pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; +- vmmc-supply = <&vcc3v3_sd>; +- vqmmc-supply = <&vccio_sd>; +- status = "okay"; +-}; +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dtsi b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dtsi +deleted file mode 100644 +index 25e205632a6..00000000000 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r66s.dtsi ++++ /dev/null +@@ -1,484 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-/dts-v1/; +-#include +-#include +-#include +-#include +-#include +-#include "rk3568.dtsi" +- +-/ { +- chosen: chosen { +- stdout-path = "serial2:1500000n8"; +- }; +- +- gpio-keys { +- compatible = "gpio-keys"; +- pinctrl-names = "default"; +- pinctrl-0 = <&reset_button_pin>; +- +- button-reset { +- debounce-interval = <50>; +- gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>; +- label = "reset"; +- linux,code = ; +- }; +- }; +- +- gpio-leds { +- compatible = "gpio-leds"; +- pinctrl-names = "default"; +- pinctrl-0 = <&status_led_pin>; +- +- status_led: led-status { +- color = ; +- function = LED_FUNCTION_STATUS; +- gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "heartbeat"; +- }; +- }; +- +- dc_12v: dc-12v-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "dc_12v"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <12000000>; +- regulator-max-microvolt = <12000000>; +- }; +- +- vcc3v3_pcie: vcc3v3-pcie-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3_pcie"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- vin-supply = <&vcc5v0_sys>; +- }; +- +- vcc3v3_sys: vcc3v3-sys-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3_sys"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- vin-supply = <&dc_12v>; +- }; +- +- vcc5v0_sys: vcc5v0-sys-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_sys"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- vin-supply = <&dc_12v>; +- }; +- +- vcc5v0_usb_host: vcc5v0-usb-host-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_usb_host"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- }; +- +- vcc5v0_usb_otg: vcc5v0-usb-otg-regulator { +- compatible = "regulator-fixed"; +- enable-active-high; +- gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; +- pinctrl-names = "default"; +- pinctrl-0 = <&vcc5v0_usb_otg_en>; +- regulator-name = "vcc5v0_usb_otg"; +- regulator-always-on; +- regulator-boot-on; +- }; +-}; +- +-&combphy0 { +- status = "okay"; +-}; +- +-&combphy1 { +- status = "okay"; +-}; +- +-&cpu0 { +- cpu-supply = <&vdd_cpu>; +-}; +- +-&cpu1 { +- cpu-supply = <&vdd_cpu>; +-}; +- +-&cpu2 { +- cpu-supply = <&vdd_cpu>; +-}; +- +-&cpu3 { +- cpu-supply = <&vdd_cpu>; +-}; +- +-&gpu { +- mali-supply = <&vdd_gpu>; +- status = "okay"; +-}; +- +-&i2c0 { +- status = "okay"; +- +- vdd_cpu: regulator@1c { +- compatible = "tcs,tcs4525"; +- reg = <0x1c>; +- fcs,suspend-voltage-selector = <1>; +- regulator-name = "vdd_cpu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <800000>; +- regulator-max-microvolt = <1150000>; +- regulator-ramp-delay = <2300>; +- vin-supply = <&vcc5v0_sys>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- rk809: pmic@20 { +- compatible = "rockchip,rk809"; +- reg = <0x20>; +- interrupt-parent = <&gpio0>; +- interrupts = ; +- #clock-cells = <1>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pmic_int>; +- rockchip,system-power-controller; +- vcc1-supply = <&vcc3v3_sys>; +- vcc2-supply = <&vcc3v3_sys>; +- vcc3-supply = <&vcc3v3_sys>; +- vcc4-supply = <&vcc3v3_sys>; +- vcc5-supply = <&vcc3v3_sys>; +- vcc6-supply = <&vcc3v3_sys>; +- vcc7-supply = <&vcc3v3_sys>; +- vcc8-supply = <&vcc3v3_sys>; +- vcc9-supply = <&vcc3v3_sys>; +- wakeup-source; +- +- regulators { +- vdd_logic: DCDC_REG1 { +- regulator-name = "vdd_logic"; +- regulator-always-on; +- regulator-boot-on; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdd_gpu: DCDC_REG2 { +- regulator-name = "vdd_gpu"; +- regulator-always-on; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc_ddr: DCDC_REG3 { +- regulator-name = "vcc_ddr"; +- regulator-always-on; +- regulator-boot-on; +- regulator-initial-mode = <0x2>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- }; +- }; +- +- vdd_npu: DCDC_REG4 { +- regulator-name = "vdd_npu"; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc_1v8: DCDC_REG5 { +- regulator-name = "vcc_1v8"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda0v9_image: LDO_REG1 { +- regulator-name = "vdda0v9_image"; +- regulator-min-microvolt = <950000>; +- regulator-max-microvolt = <950000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda_0v9: LDO_REG2 { +- regulator-name = "vdda_0v9"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda0v9_pmu: LDO_REG3 { +- regulator-name = "vdda0v9_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <900000>; +- }; +- }; +- +- vccio_acodec: LDO_REG4 { +- regulator-name = "vccio_acodec"; +- regulator-always-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vccio_sd: LDO_REG5 { +- regulator-name = "vccio_sd"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc3v3_pmu: LDO_REG6 { +- regulator-name = "vcc3v3_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <3300000>; +- }; +- }; +- +- vcca_1v8: LDO_REG7 { +- regulator-name = "vcca_1v8"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcca1v8_pmu: LDO_REG8 { +- regulator-name = "vcca1v8_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <1800000>; +- }; +- }; +- +- vcca1v8_image: LDO_REG9 { +- regulator-name = "vcca1v8_image"; +- regulator-init-microvolt = <950000>; +- regulator-min-microvolt = <950000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- regulator-suspend-microvolt = <950000>; +- }; +- }; +- +- vcc_3v3: SWITCH_REG1 { +- regulator-name = "vcc_3v3"; +- regulator-always-on; +- regulator-boot-on; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc3v3_sd: SWITCH_REG2 { +- regulator-name = "vcc3v3_sd"; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- }; +- }; +-}; +- +-&pcie30phy { +- data-lanes = <1 2>; +- status = "okay"; +-}; +- +-&pcie3x1 { +- num-lanes = <1>; +- reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>; +- vpcie3v3-supply = <&vcc3v3_pcie>; +- status = "okay"; +-}; +- +-&pcie3x2 { +- num-lanes = <1>; +- reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; +- vpcie3v3-supply = <&vcc3v3_pcie>; +- status = "okay"; +-}; +- +-&pinctrl { +- gpio-leds { +- status_led_pin: status-led-pin { +- rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- }; +- +- pmic { +- pmic_int: pmic-int { +- rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; +- }; +- }; +- +- rockchip-key { +- reset_button_pin: reset-button-pin { +- rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>; +- }; +- }; +- +- usb { +- vcc5v0_usb_otg_en: vcc5v0-usb-otg-en { +- rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- }; +-}; +- +-&pmu_io_domains { +- pmuio1-supply = <&vcc3v3_pmu>; +- pmuio2-supply = <&vcc3v3_pmu>; +- vccio1-supply = <&vccio_acodec>; +- vccio3-supply = <&vccio_sd>; +- vccio4-supply = <&vcc_1v8>; +- vccio5-supply = <&vcc_3v3>; +- vccio6-supply = <&vcc_1v8>; +- vccio7-supply = <&vcc_3v3>; +- status = "okay"; +-}; +- +-&saradc { +- vref-supply = <&vcca_1v8>; +- status = "okay"; +-}; +- +-&tsadc { +- rockchip,hw-tshut-mode = <1>; +- rockchip,hw-tshut-polarity = <0>; +- status = "okay"; +-}; +- +-&uart2 { +- status = "okay"; +-}; +- +-&usb_host0_ehci { +- status = "okay"; +-}; +- +-&usb_host0_ohci { +- status = "okay"; +-}; +- +-&usb_host0_xhci { +- dr_mode = "host"; +- extcon = <&usb2phy0>; +- status = "okay"; +-}; +- +-&usb_host1_ehci { +- status = "okay"; +-}; +- +-&usb_host1_ohci { +- status = "okay"; +-}; +- +-&usb_host1_xhci { +- status = "okay"; +-}; +- +-&usb2phy0 { +- status = "okay"; +-}; +- +-&usb2phy0_host { +- phy-supply = <&vcc5v0_usb_host>; +- status = "okay"; +-}; +- +-&usb2phy0_otg { +- phy-supply = <&vcc5v0_usb_otg>; +- status = "okay"; +-}; +- +-&vop { +- assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; +- assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; +- status = "okay"; +-}; +- +-&vop_mmu { +- status = "okay"; +-}; +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r68s.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r68s.dts +deleted file mode 100644 +index e1fe5e44268..00000000000 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-fastrhino-r68s.dts ++++ /dev/null +@@ -1,112 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "rk3568-fastrhino-r66s.dtsi" +- +-/ { +- model = "Lunzn FastRhino R68S"; +- compatible = "lunzn,fastrhino-r68s", "rockchip,rk3568"; +- +- aliases { +- ethernet0 = &gmac0; +- ethernet1 = &gmac1; +- mmc0 = &sdhci; +- }; +- +- adc-keys { +- compatible = "adc-keys"; +- io-channels = <&saradc 0>; +- io-channel-names = "buttons"; +- keyup-threshold-microvolt = <1800000>; +- +- button-recovery { +- label = "Recovery"; +- linux,code = ; +- press-threshold-microvolt = <1750>; +- }; +- }; +-}; +- +-&gmac0 { +- assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; +- assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>; +- assigned-clock-rates = <0>, <125000000>; +- clock_in_out = "output"; +- phy-handle = <&rgmii_phy0>; +- phy-mode = "rgmii-id"; +- pinctrl-names = "default"; +- pinctrl-0 = <&gmac0_miim +- &gmac0_tx_bus2 +- &gmac0_rx_bus2 +- &gmac0_rgmii_clk +- &gmac0_rgmii_bus>; +- snps,reset-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>; +- snps,reset-active-low; +- /* Reset time is 15ms, 50ms for rtl8211f */ +- snps,reset-delays-us = <0 15000 50000>; +- tx_delay = <0x3c>; +- rx_delay = <0x2f>; +- status = "okay"; +-}; +- +-&gmac1 { +- assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; +- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>; +- assigned-clock-rates = <0>, <125000000>; +- clock_in_out = "output"; +- phy-handle = <&rgmii_phy1>; +- phy-mode = "rgmii-id"; +- pinctrl-names = "default"; +- pinctrl-0 = <&gmac1m1_miim +- &gmac1m1_tx_bus2 +- &gmac1m1_rx_bus2 +- &gmac1m1_rgmii_clk +- &gmac1m1_rgmii_bus>; +- snps,reset-gpio = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>; +- snps,reset-active-low; +- /* Reset time is 15ms, 50ms for rtl8211f */ +- snps,reset-delays-us = <0 15000 50000>; +- tx_delay = <0x4f>; +- rx_delay = <0x26>; +- status = "okay"; +-}; +- +-&mdio0 { +- rgmii_phy0: ethernet-phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0>; +- pinctrl-0 = <ð_phy0_reset_pin>; +- pinctrl-names = "default"; +- }; +-}; +- +-&mdio1 { +- rgmii_phy1: ethernet-phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0>; +- pinctrl-0 = <ð_phy1_reset_pin>; +- pinctrl-names = "default"; +- }; +-}; +- +-&pinctrl { +- gmac0 { +- eth_phy0_reset_pin: eth-phy0-reset-pin { +- rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; +- }; +- }; +- +- gmac1 { +- eth_phy1_reset_pin: eth-phy1-reset-pin { +- rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; +- }; +- }; +-}; +- +-&sdhci { +- bus-width = <8>; +- max-frequency = <200000000>; +- non-removable; +- pinctrl-names = "default"; +- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; +- status = "okay"; +-}; +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-roc-pc.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-roc-pc.dts +deleted file mode 100644 +index e333449ead0..00000000000 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-roc-pc.dts ++++ /dev/null +@@ -1,643 +0,0 @@ +-// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +-/* +- * Copyright (c) 2021 Rockchip Electronics Co., Ltd. +- */ +- +-/dts-v1/; +- +-#include +-#include +-#include +-#include "rk3568.dtsi" +- +-/ { +- model = "Firefly Station P2"; +- compatible = "firefly,rk3568-roc-pc", "rockchip,rk3568"; +- +- aliases { +- ethernet0 = &gmac0; +- ethernet1 = &gmac1; +- mmc0 = &sdmmc0; +- mmc1 = &sdhci; +- }; +- +- chosen: chosen { +- stdout-path = "serial2:1500000n8"; +- }; +- +- dc_12v: dc-12v-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "dc_12v"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <12000000>; +- regulator-max-microvolt = <12000000>; +- }; +- +- gmac0_clkin: external-gmac0-clock { +- compatible = "fixed-clock"; +- clock-frequency = <125000000>; +- clock-output-names = "gmac0_clkin"; +- #clock-cells = <0>; +- }; +- +- gmac1_clkin: external-gmac1-clock { +- compatible = "fixed-clock"; +- clock-frequency = <125000000>; +- clock-output-names = "gmac1_clkin"; +- #clock-cells = <0>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- led-user { +- label = "user-led"; +- default-state = "on"; +- gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "heartbeat"; +- pinctrl-names = "default"; +- pinctrl-0 = <&user_led_enable_h>; +- retain-state-suspended; +- }; +- }; +- +- hdmi-con { +- compatible = "hdmi-connector"; +- type = "a"; +- +- port { +- hdmi_con_in: endpoint { +- remote-endpoint = <&hdmi_out_con>; +- }; +- }; +- }; +- +- pcie30_avdd0v9: pcie30-avdd0v9-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "pcie30_avdd0v9"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- vin-supply = <&vcc3v3_sys>; +- }; +- +- pcie30_avdd1v8: pcie30-avdd1v8-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "pcie30_avdd1v8"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- vin-supply = <&vcc3v3_sys>; +- }; +- +- vcc3v3_sys: vcc3v3-sys-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3_sys"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- vin-supply = <&dc_12v>; +- }; +- +- vcc3v3_pcie: vcc3v3-pcie-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3_pcie"; +- enable-active-high; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&vcc3v3_pcie_en_pin>; +- gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; +- startup-delay-us = <5000>; +- vin-supply = <&vcc5v0_sys>; +- }; +- +- vcc5v0_sys: vcc5v0-sys-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_sys"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- vin-supply = <&dc_12v>; +- }; +- +- vcc5v0_usb: vcc5v0-usb-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_usb"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- vin-supply = <&vcc5v0_sys>; +- }; +- +- vcc5v0_host: vcc5v0-host-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_host"; +- enable-active-high; +- gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; +- pinctrl-names = "default"; +- pinctrl-0 = <&vcc5v0_host_en>; +- regulator-always-on; +- vin-supply = <&vcc5v0_usb>; +- }; +- +- vcc5v0_otg: vcc5v0-otg-regulator { +- compatible = "regulator-fixed"; +- regulator-name = "vcc5v0_otg"; +- enable-active-high; +- gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; +- pinctrl-names = "default"; +- pinctrl-0 = <&vcc5v0_otg_en>; +- vin-supply = <&vcc5v0_usb>; +- }; +-}; +- +-&combphy0 { +- /* used for USB3 */ +- status = "okay"; +-}; +- +-&combphy1 { +- /* used for USB3 */ +- status = "okay"; +-}; +- +-&combphy2 { +- /* used for SATA */ +- status = "okay"; +-}; +- +-&gmac0 { +- assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; +- assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&gmac0_clkin>; +- clock_in_out = "input"; +- pinctrl-names = "default"; +- pinctrl-0 = <&gmac0_miim +- &gmac0_tx_bus2 +- &gmac0_rx_bus2 +- &gmac0_rgmii_clk +- &gmac0_rgmii_bus +- &gmac0_clkinout>; +- phy-handle = <&rgmii_phy0>; +- phy-mode = "rgmii"; +- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; +- snps,reset-active-low; +- /* Reset time is 20ms, 100ms for rtl8211f */ +- snps,reset-delays-us = <0 20000 100000>; +- tx_delay = <0x3c>; +- rx_delay = <0x2f>; +- status = "okay"; +-}; +- +-&gmac1 { +- assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; +- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>; +- clock_in_out = "input"; +- pinctrl-names = "default"; +- pinctrl-0 = <&gmac1m1_miim +- &gmac1m1_tx_bus2 +- &gmac1m1_rx_bus2 +- &gmac1m1_rgmii_clk +- &gmac1m1_rgmii_bus +- &gmac1m1_clkinout>; +- phy-handle = <&rgmii_phy1>; +- phy-mode = "rgmii"; +- snps,reset-gpio = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>; +- snps,reset-active-low; +- /* Reset time is 20ms, 100ms for rtl8211f */ +- snps,reset-delays-us = <0 20000 100000>; +- tx_delay = <0x4f>; +- rx_delay = <0x26>; +- status = "okay"; +-}; +- +-&gpu { +- mali-supply = <&vdd_gpu>; +- status = "okay"; +-}; +- +-&hdmi { +- avdd-0v9-supply = <&vdda0v9_image>; +- avdd-1v8-supply = <&vcca1v8_image>; +- status = "okay"; +-}; +- +-&hdmi_in { +- hdmi_in_vp0: endpoint { +- remote-endpoint = <&vp0_out_hdmi>; +- }; +-}; +- +-&hdmi_out { +- hdmi_out_con: endpoint { +- remote-endpoint = <&hdmi_con_in>; +- }; +-}; +- +-&hdmi_sound { +- status = "okay"; +-}; +- +-&i2c0 { +- status = "okay"; +- +- rk809: pmic@20 { +- compatible = "rockchip,rk809"; +- reg = <0x20>; +- interrupt-parent = <&gpio0>; +- interrupts = ; +- #clock-cells = <1>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pmic_int>; +- rockchip,system-power-controller; +- vcc1-supply = <&vcc3v3_sys>; +- vcc2-supply = <&vcc3v3_sys>; +- vcc3-supply = <&vcc3v3_sys>; +- vcc4-supply = <&vcc3v3_sys>; +- vcc5-supply = <&vcc3v3_sys>; +- vcc6-supply = <&vcc3v3_sys>; +- vcc7-supply = <&vcc3v3_sys>; +- vcc8-supply = <&vcc3v3_sys>; +- vcc9-supply = <&vcc3v3_sys>; +- wakeup-source; +- +- regulators { +- vdd_logic: DCDC_REG1 { +- regulator-name = "vdd_logic"; +- regulator-always-on; +- regulator-boot-on; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdd_gpu: DCDC_REG2 { +- regulator-name = "vdd_gpu"; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc_ddr: DCDC_REG3 { +- regulator-name = "vcc_ddr"; +- regulator-always-on; +- regulator-boot-on; +- regulator-initial-mode = <0x2>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- }; +- }; +- +- vdd_npu: DCDC_REG4 { +- regulator-name = "vdd_npu"; +- regulator-init-microvolt = <900000>; +- regulator-initial-mode = <0x2>; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <1350000>; +- regulator-ramp-delay = <6001>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc_1v8: DCDC_REG5 { +- regulator-name = "vcc_1v8"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda0v9_image: LDO_REG1 { +- regulator-name = "vdda0v9_image"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda_0v9: LDO_REG2 { +- regulator-name = "vdda_0v9"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vdda0v9_pmu: LDO_REG3 { +- regulator-name = "vdda0v9_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <900000>; +- }; +- }; +- +- vccio_acodec: LDO_REG4 { +- regulator-name = "vccio_acodec"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vccio_sd: LDO_REG5 { +- regulator-name = "vccio_sd"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc3v3_pmu: LDO_REG6 { +- regulator-name = "vcc3v3_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <3300000>; +- }; +- }; +- +- vcca_1v8: LDO_REG7 { +- regulator-name = "vcca_1v8"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcca1v8_pmu: LDO_REG8 { +- regulator-name = "vcca1v8_pmu"; +- regulator-always-on; +- regulator-boot-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-on-in-suspend; +- regulator-suspend-microvolt = <1800000>; +- }; +- }; +- +- vcca1v8_image: LDO_REG9 { +- regulator-name = "vcca1v8_image"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc_3v3: SWITCH_REG1 { +- regulator-name = "vcc_3v3"; +- regulator-always-on; +- regulator-boot-on; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- +- vcc3v3_sd: SWITCH_REG2 { +- regulator-name = "vcc3v3_sd"; +- regulator-always-on; +- regulator-boot-on; +- +- regulator-state-mem { +- regulator-off-in-suspend; +- }; +- }; +- }; +- }; +-}; +- +-&i2s0_8ch { +- status = "okay"; +-}; +- +-&mdio0 { +- rgmii_phy0: phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0x0>; +- }; +-}; +- +-&mdio1 { +- rgmii_phy1: phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0x0>; +- }; +-}; +- +-&pcie30phy { +- status = "okay"; +-}; +- +-&pcie3x2 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pcie_reset_pin>; +- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; +- vpcie3v3-supply = <&vcc3v3_pcie>; +- status = "okay"; +-}; +- +-&pinctrl { +- leds { +- user_led_enable_h: user-led-enable-h { +- rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- }; +- +- usb { +- vcc5v0_host_en: vcc5v0-host-en { +- rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- +- vcc5v0_otg_en: vcc5v0-otg-en { +- rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- }; +- +- pcie { +- pcie_reset_pin: pcie-reset-pin { +- rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin { +- rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; +- }; +- }; +- +- pmic { +- pmic_int: pmic-int { +- rockchip,pins = +- <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; +- }; +- }; +-}; +- +-&pmu_io_domains { +- pmuio1-supply = <&vcc3v3_pmu>; +- pmuio2-supply = <&vcc3v3_pmu>; +- vccio1-supply = <&vccio_acodec>; +- vccio2-supply = <&vcc_1v8>; +- vccio3-supply = <&vccio_sd>; +- vccio4-supply = <&vcc_1v8>; +- vccio5-supply = <&vcc_3v3>; +- vccio6-supply = <&vcc_1v8>; +- vccio7-supply = <&vcc_3v3>; +- status = "okay"; +-}; +- +-&saradc { +- vref-supply = <&vcca_1v8>; +- status = "okay"; +-}; +- +-&sata2 { +- status = "okay"; +-}; +- +-&sdhci { +- bus-width = <8>; +- max-frequency = <200000000>; +- non-removable; +- pinctrl-names = "default"; +- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; +- status = "okay"; +-}; +- +-&sdmmc0 { +- bus-width = <4>; +- cap-sd-highspeed; +- cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; +- disable-wp; +- pinctrl-names = "default"; +- pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; +- sd-uhs-sdr104; +- vmmc-supply = <&vcc3v3_sd>; +- vqmmc-supply = <&vccio_sd>; +- status = "okay"; +-}; +- +-&tsadc { +- status = "okay"; +-}; +- +-&uart2 { +- status = "okay"; +-}; +- +-&usb2phy0_host { +- phy-supply = <&vcc5v0_host>; +- status = "okay"; +-}; +- +-&usb2phy0 { +- status = "okay"; +-}; +- +-&usb2phy1 { +- status = "okay"; +-}; +- +-&usb2phy0_otg { +- status = "okay"; +-}; +- +-&usb2phy1_host { +- phy-supply = <&vcc5v0_host>; +- status = "okay"; +-}; +- +-&usb2phy1_otg { +- phy-supply = <&vcc5v0_host>; +- status = "okay"; +-}; +- +-&usb_host0_ehci { +- status = "okay"; +-}; +- +-&usb_host0_ohci { +- status = "okay"; +-}; +- +-&usb_host1_ehci { +- status = "okay"; +-}; +- +-&usb_host1_ohci { +- status = "okay"; +-}; +- +-&usb_host0_xhci { +- status = "okay"; +-}; +- +-&usb_host1_xhci { +- status = "okay"; +-}; +- +-&vp0 { +- vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { +- reg = ; +- remote-endpoint = <&hdmi_in_vp0>; +- }; +-}; +- +-&vop { +- assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; +- assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; +- status = "okay"; +-}; +- +-&vop_mmu { +- status = "okay"; +-}; +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6c.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6c.dts +index a49af7da569..16da11eaac8 100644 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6c.dts ++++ b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6c.dts +@@ -9,11 +9,12 @@ + + gpio-leds { + led-lan1 { +- label = "green:lan"; ++ /delete-property/ function-enumerator; + }; + + led-lan2 { +- label = "green:user"; ++ /delete-property/ function-enumerator; ++ function = LED_FUNCTION_PROGRAMMING; + }; + }; + }; +diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts +index 00dd020b8a8..ea3b2b532ab 100644 +--- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts ++++ b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts +@@ -24,7 +24,6 @@ + ethernet0 = &gmac1; + mmc0 = &sdmmc; + mmc1 = &sdhci; +- serial2 = &uart2; + }; + + chosen { +@@ -50,22 +49,28 @@ + pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>; + + led-lan1 { +- label = "green:lan1"; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <1>; + gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; + }; + + led-lan2 { +- label = "green:lan2"; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <2>; + gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>; + }; + + power_led: led-power { +- label = "red:power"; ++ color = ; ++ function = LED_FUNCTION_POWER; + gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>; + }; + + led-wan { +- label = "green:wan"; ++ color = ; ++ function = LED_FUNCTION_WAN; + gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; + }; + }; +@@ -158,17 +163,14 @@ + + &cpu_l0 { + cpu-supply = <&vdd_cpu_lit_s0>; +- mem-supply = <&vdd_cpu_lit_mem_s0>; + }; + + &cpu_b0 { + cpu-supply = <&vdd_cpu_big0_s0>; +- mem-supply = <&vdd_cpu_big0_mem_s0>; + }; + + &cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +- mem-supply = <&vdd_cpu_big1_mem_s0>; + }; + + &gmac1 { +@@ -195,7 +197,7 @@ + pinctrl-0 = <&i2c0m2_xfer>; + status = "okay"; + +- vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: regulator@42 { ++ vdd_cpu_big0_s0: regulator@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; + fcs,suspend-voltage-selector = <1>; +@@ -212,7 +214,7 @@ + }; + }; + +- vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: regulator@43 { ++ vdd_cpu_big1_s0: regulator@43 { + compatible = "rockchip,rk8603", "rockchip,rk8602"; + reg = <0x43>; + fcs,suspend-voltage-selector = <1>; +diff --git a/package/boot/uboot-rockchip/src/configs/fastrhino-r66s-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/fastrhino-r66s-rk3568_defconfig +index cad4f3baa64..d4f62248f1a 100644 +--- a/package/boot/uboot-rockchip/src/configs/fastrhino-r66s-rk3568_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/fastrhino-r66s-rk3568_defconfig +@@ -3,18 +3,9 @@ CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 +-CONFIG_DEFAULT_DEVICE_TREE="rk3568-fastrhino-r66s" ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-fastrhino-r66s" + CONFIG_ROCKCHIP_RK3568=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 +@@ -30,12 +21,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-fastrhino-r66s.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y +@@ -58,8 +44,6 @@ CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y + CONFIG_MISC=y + CONFIG_SUPPORT_EMMC_RPMB=y +-CONFIG_MMC_HS200_SUPPORT=y +-CONFIG_SPL_MMC_HS200_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y +diff --git a/package/boot/uboot-rockchip/src/configs/fastrhino-r68s-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/fastrhino-r68s-rk3568_defconfig +index 7a2322cbda6..be2cab4b62d 100644 +--- a/package/boot/uboot-rockchip/src/configs/fastrhino-r68s-rk3568_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/fastrhino-r68s-rk3568_defconfig +@@ -3,18 +3,10 @@ CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 +-CONFIG_DEFAULT_DEVICE_TREE="rk3568-fastrhino-r68s" ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-fastrhino-r68s" + CONFIG_ROCKCHIP_RK3568=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y ++CONFIG_ROCKCHIP_BOOT_MODE_REG=0x0 + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 +@@ -30,12 +22,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-fastrhino-r68s.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ADC=y + CONFIG_SPL_POWER=y + CONFIG_SPL_I2C=y +@@ -67,8 +54,6 @@ CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y + CONFIG_MISC=y + CONFIG_SUPPORT_EMMC_RPMB=y +-CONFIG_MMC_HS200_SUPPORT=y +-CONFIG_SPL_MMC_HS200_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y +@@ -91,6 +76,7 @@ CONFIG_SPL_RAM=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y ++CONFIG_ROCKCHIP_SPI=y + CONFIG_SYSRESET=y + CONFIG_USB=y + CONFIG_USB_XHCI_HCD=y +diff --git a/package/boot/uboot-rockchip/src/configs/guangmiao-g4c-rk3399_defconfig b/package/boot/uboot-rockchip/src/configs/guangmiao-g4c-rk3399_defconfig +index d0c00476c0c..598ca05db3a 100644 +--- a/package/boot/uboot-rockchip/src/configs/guangmiao-g4c-rk3399_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/guangmiao-g4c-rk3399_defconfig +@@ -2,31 +2,22 @@ CONFIG_ARM=y + CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00200000 ++CONFIG_SPL_GPIO=y + CONFIG_NR_DRAM_BANKS=1 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 + CONFIG_ENV_OFFSET=0x3F8000 + CONFIG_DEFAULT_DEVICE_TREE="rk3399-guangmiao-g4c" ++CONFIG_DM_RESET=y + CONFIG_ROCKCHIP_RK3399=y + CONFIG_TARGET_EVB_RK3399=y +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0x800800 + CONFIG_DEBUG_UART=y + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-guangmiao-g4c.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y +-CONFIG_MISC_INIT_R=y +-CONFIG_SPL_MAX_SIZE=0x2e000 ++CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x400000 +-CONFIG_SPL_BSS_MAX_SIZE=0x2000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y +-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 + CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y + CONFIG_TPL=y + CONFIG_CMD_BOOTZ=y +@@ -36,22 +27,26 @@ CONFIG_CMD_USB=y + # CONFIG_CMD_SETEXPR is not set + CONFIG_CMD_TIME=y + CONFIG_SPL_OF_CONTROL=y +-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++# CONFIG_OF_UPSTREAM is not set ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" + CONFIG_ENV_IS_IN_MMC=y + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y +-CONFIG_MISC=y +-CONFIG_ROCKCHIP_EFUSE=y +-CONFIG_ROCKCHIP_OTP=y ++CONFIG_ROCKCHIP_IODOMAIN=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y + CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_PHY_REALTEK=y ++CONFIG_DM_ETH_PHY=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_GMAC_ROCKCHIP=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_TYPEC=y + CONFIG_PMIC_RK8XX=y +-CONFIG_REGULATOR_PWM=y ++CONFIG_SPL_DM_REGULATOR_FIXED=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y + CONFIG_RAM_ROCKCHIP_LPDDR4=y +@@ -78,5 +73,4 @@ CONFIG_VIDEO=y + CONFIG_DISPLAY=y + CONFIG_VIDEO_ROCKCHIP=y + CONFIG_DISPLAY_ROCKCHIP_HDMI=y +-CONFIG_SPL_TINY_MEMSET=y + CONFIG_ERRNO_STR=y +diff --git a/package/boot/uboot-rockchip/src/configs/mrkaio-m68s-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/mrkaio-m68s-rk3568_defconfig +index 10831d2563d..86f7e9f06a8 100644 +--- a/package/boot/uboot-rockchip/src/configs/mrkaio-m68s-rk3568_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/mrkaio-m68s-rk3568_defconfig +@@ -3,18 +3,9 @@ CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 + CONFIG_DEFAULT_DEVICE_TREE="rk3568-mrkaio-m68s" + CONFIG_ROCKCHIP_RK3568=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 +@@ -30,12 +21,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-mrkaio-m68s.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y +@@ -47,6 +33,7 @@ CONFIG_CMD_PMIC=y + CONFIG_CMD_REGULATOR=y + # CONFIG_SPL_DOS_PARTITION is not set + CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set + CONFIG_OF_LIVE=y + CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" + CONFIG_SPL_DM_WARN=y +@@ -58,8 +45,6 @@ CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y + CONFIG_MISC=y + CONFIG_SUPPORT_EMMC_RPMB=y +-CONFIG_MMC_HS200_SUPPORT=y +-CONFIG_SPL_MMC_HS200_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y +diff --git a/package/boot/uboot-rockchip/src/configs/nanopi-r4se-rk3399_defconfig b/package/boot/uboot-rockchip/src/configs/nanopi-r4se-rk3399_defconfig +index 42f9b8ee7de..10f5cac8cf0 100644 +--- a/package/boot/uboot-rockchip/src/configs/nanopi-r4se-rk3399_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/nanopi-r4se-rk3399_defconfig +@@ -2,31 +2,22 @@ CONFIG_ARM=y + CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00200000 ++CONFIG_SPL_GPIO=y + CONFIG_NR_DRAM_BANKS=1 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 + CONFIG_ENV_OFFSET=0x3F8000 + CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4se" ++CONFIG_DM_RESET=y + CONFIG_ROCKCHIP_RK3399=y + CONFIG_TARGET_EVB_RK3399=y +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0x800800 + CONFIG_DEBUG_UART=y + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4se.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y +-CONFIG_MISC_INIT_R=y +-CONFIG_SPL_MAX_SIZE=0x2e000 ++CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x400000 +-CONFIG_SPL_BSS_MAX_SIZE=0x2000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y +-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 + CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y + CONFIG_TPL=y + CONFIG_CMD_BOOTZ=y +@@ -36,22 +27,26 @@ CONFIG_CMD_USB=y + # CONFIG_CMD_SETEXPR is not set + CONFIG_CMD_TIME=y + CONFIG_SPL_OF_CONTROL=y +-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++# CONFIG_OF_UPSTREAM is not set ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" + CONFIG_ENV_IS_IN_MMC=y + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y +-CONFIG_MISC=y +-CONFIG_ROCKCHIP_EFUSE=y +-CONFIG_ROCKCHIP_OTP=y ++CONFIG_ROCKCHIP_IODOMAIN=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y + CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_PHY_REALTEK=y ++CONFIG_DM_ETH_PHY=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_GMAC_ROCKCHIP=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_TYPEC=y + CONFIG_PMIC_RK8XX=y +-CONFIG_REGULATOR_PWM=y ++CONFIG_SPL_DM_REGULATOR_FIXED=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y + CONFIG_RAM_ROCKCHIP_LPDDR4=y +@@ -78,5 +73,4 @@ CONFIG_VIDEO=y + CONFIG_DISPLAY=y + CONFIG_VIDEO_ROCKCHIP=y + CONFIG_DISPLAY_ROCKCHIP_HDMI=y +-CONFIG_SPL_TINY_MEMSET=y + CONFIG_ERRNO_STR=y +diff --git a/package/boot/uboot-rockchip/src/configs/nanopi-r6c-rk3588s_defconfig b/package/boot/uboot-rockchip/src/configs/nanopi-r6c-rk3588s_defconfig +index e15766fc0b9..690a43fafd5 100644 +--- a/package/boot/uboot-rockchip/src/configs/nanopi-r6c-rk3588s_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/nanopi-r6c-rk3588s_defconfig +@@ -1,51 +1,44 @@ + CONFIG_ARM=y + CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 ++CONFIG_SF_DEFAULT_SPEED=24000000 ++CONFIG_SF_DEFAULT_MODE=0x2000 + CONFIG_DEFAULT_DEVICE_TREE="rk3588s-nanopi-r6c" + CONFIG_ROCKCHIP_RK3588=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 + CONFIG_TARGET_EVB_RK3588=y +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_PCI=y + CONFIG_DEBUG_UART=y + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y + CONFIG_SPL_LOAD_FIT=y + CONFIG_LEGACY_IMAGE_FORMAT=y +-CONFIG_OF_BOARD_SETUP=y + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6c.dtb" + # CONFIG_DISPLAY_CPUINFO is not set + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y + CONFIG_CMD_MMC=y ++CONFIG_CMD_USB=y + # CONFIG_CMD_SETEXPR is not set + CONFIG_CMD_REGULATOR=y + # CONFIG_SPL_DOS_PARTITION is not set + CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set + CONFIG_OF_LIVE=y +-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_SPL_DM_SEQ_ALIAS=y + CONFIG_SPL_REGMAP=y + CONFIG_SPL_SYSCON=y + CONFIG_SPL_CLK=y +@@ -61,11 +54,22 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y + CONFIG_PHY_REALTEK=y + CONFIG_DWC_ETH_QOS=y + CONFIG_DWC_ETH_QOS_ROCKCHIP=y +-CONFIG_REGULATOR_PWM=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y ++CONFIG_PHY_ROCKCHIP_USBDP=y ++CONFIG_SPL_PINCTRL=y + CONFIG_PWM_ROCKCHIP=y + CONFIG_SPL_RAM=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y + CONFIG_SYSRESET=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_USB_OHCI_GENERIC=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y + CONFIG_ERRNO_STR=y +diff --git a/package/boot/uboot-rockchip/src/configs/nanopi-r6s-rk3588s_defconfig b/package/boot/uboot-rockchip/src/configs/nanopi-r6s-rk3588s_defconfig +index f79b39ab7b8..14fdd3a47a8 100644 +--- a/package/boot/uboot-rockchip/src/configs/nanopi-r6s-rk3588s_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/nanopi-r6s-rk3588s_defconfig +@@ -1,51 +1,44 @@ + CONFIG_ARM=y + CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 ++CONFIG_SF_DEFAULT_SPEED=24000000 ++CONFIG_SF_DEFAULT_MODE=0x2000 + CONFIG_DEFAULT_DEVICE_TREE="rk3588s-nanopi-r6s" + CONFIG_ROCKCHIP_RK3588=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 + CONFIG_TARGET_EVB_RK3588=y +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_PCI=y + CONFIG_DEBUG_UART=y + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y + CONFIG_SPL_LOAD_FIT=y + CONFIG_LEGACY_IMAGE_FORMAT=y +-CONFIG_OF_BOARD_SETUP=y + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6s.dtb" + # CONFIG_DISPLAY_CPUINFO is not set + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y + CONFIG_CMD_MMC=y ++CONFIG_CMD_USB=y + # CONFIG_CMD_SETEXPR is not set + CONFIG_CMD_REGULATOR=y + # CONFIG_SPL_DOS_PARTITION is not set + CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set + CONFIG_OF_LIVE=y +-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_SPL_DM_SEQ_ALIAS=y + CONFIG_SPL_REGMAP=y + CONFIG_SPL_SYSCON=y + CONFIG_SPL_CLK=y +@@ -61,11 +54,22 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y + CONFIG_PHY_REALTEK=y + CONFIG_DWC_ETH_QOS=y + CONFIG_DWC_ETH_QOS_ROCKCHIP=y +-CONFIG_REGULATOR_PWM=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y ++CONFIG_PHY_ROCKCHIP_USBDP=y ++CONFIG_SPL_PINCTRL=y + CONFIG_PWM_ROCKCHIP=y + CONFIG_SPL_RAM=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y + CONFIG_SYSRESET=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_USB_OHCI_GENERIC=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y + CONFIG_ERRNO_STR=y +diff --git a/package/boot/uboot-rockchip/src/configs/photonicat-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/photonicat-rk3568_defconfig +index cdcb98b3f5b..4b4dec677b3 100644 +--- a/package/boot/uboot-rockchip/src/configs/photonicat-rk3568_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/photonicat-rk3568_defconfig +@@ -2,19 +2,10 @@ CONFIG_ARM=y + CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 + CONFIG_SPL_GPIO=y +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 + CONFIG_DEFAULT_DEVICE_TREE="rk3568-photonicat" + CONFIG_ROCKCHIP_RK3568=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 +@@ -30,12 +21,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-photonicat.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y +@@ -47,6 +33,7 @@ CONFIG_CMD_WDT=y + CONFIG_CMD_REGULATOR=y + # CONFIG_SPL_DOS_PARTITION is not set + CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set + CONFIG_OF_LIVE=y + CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" + CONFIG_SPL_DM_WARN=y +@@ -58,8 +45,6 @@ CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y + CONFIG_MISC=y + CONFIG_SUPPORT_EMMC_RPMB=y +-CONFIG_MMC_HS200_SUPPORT=y +-CONFIG_SPL_MMC_HS200_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y +diff --git a/package/boot/uboot-rockchip/src/configs/roc-pc-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/roc-pc-rk3568_defconfig +index 8034d67186f..3169e895e68 100644 +--- a/package/boot/uboot-rockchip/src/configs/roc-pc-rk3568_defconfig ++++ b/package/boot/uboot-rockchip/src/configs/roc-pc-rk3568_defconfig +@@ -3,18 +3,9 @@ CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_SYS_HAS_NONCACHED_MEMORY=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +-CONFIG_TEXT_BASE=0x00a00000 +-CONFIG_SPL_LIBCOMMON_SUPPORT=y +-CONFIG_SPL_LIBGENERIC_SUPPORT=y +-CONFIG_NR_DRAM_BANKS=2 +-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 +-CONFIG_DEFAULT_DEVICE_TREE="rk3568-roc-pc" ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-roc-pc" + CONFIG_ROCKCHIP_RK3568=y +-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y + CONFIG_SPL_SERIAL=y +-CONFIG_SPL_STACK_R_ADDR=0x600000 +-CONFIG_SPL_STACK=0x400000 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SYS_LOAD_ADDR=0xc00800 +@@ -30,12 +21,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-roc-pc.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 + CONFIG_SPL_PAD_TO=0x7f8000 +-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +-CONFIG_SPL_BSS_START_ADDR=0x4000000 +-CONFIG_SPL_BSS_MAX_SIZE=0x4000 + # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +-CONFIG_SPL_STACK_R=y + CONFIG_SPL_ATF=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_GPT=y +@@ -58,8 +44,6 @@ CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y + CONFIG_MISC=y + CONFIG_SUPPORT_EMMC_RPMB=y +-CONFIG_MMC_HS200_SUPPORT=y +-CONFIG_SPL_MMC_HS200_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_MMC_SDHCI=y diff --git a/devices/x86_64/.config b/devices/x86_64/.config index da95881b36c2..1665e9bc5c40 100644 --- a/devices/x86_64/.config +++ b/devices/x86_64/.config @@ -8,22 +8,10 @@ CONFIG_GRUB_IMAGES=y CONFIG_GRUB_EFI_IMAGES=y CONFIG_VMDK_IMAGES=n -# daed -CONFIG_DEVEL=y -CONFIG_BPF_TOOLCHAIN_HOST=y -# CONFIG_BPF_TOOLCHAIN_NONE is not set -CONFIG_KERNEL_BPF_EVENTS=y -CONFIG_KERNEL_CGROUP_BPF=y -CONFIG_KERNEL_DEBUG_INFO=y -CONFIG_KERNEL_DEBUG_INFO_BTF=y -# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set -CONFIG_KERNEL_XDP_SOCKETS=y - # 其他需要安装的软件包: CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx CONFIG_PACKAGE_kmod-pcie_mhi=m -CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=n diff --git a/devices/x86_64/diy.sh b/devices/x86_64/diy.sh index 6c11dbc05265..17fb52292918 100644 --- a/devices/x86_64/diy.sh +++ b/devices/x86_64/diy.sh @@ -10,6 +10,8 @@ curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linu curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/64/config-5.15 -o target/linux/x86/64/config-5.15 +sed -i 's/kmod-r8169/kmod-r8168/' target/linux/x86/image/64.mk + sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-usb-hid kmod-mmc kmod-sdhci usbutils pciutils lm-sensors-detect kmod-alx kmod-vmxnet3 kmod-igbvf kmod-iavf kmod-bnx2x kmod-pcnet32 kmod-tulip kmod-r8101 kmod-r8125 kmod-8139cp kmod-8139too kmod-i40e kmod-drm-i915 kmod-drm-amdgpu kmod-mlx4-core kmod-mlx5-core fdisk lsblk kmod-phy-broadcom/' target/linux/x86/Makefile mv -f tmp/r81* feeds/kiddin9/ diff --git a/devices/x86_generic/.config b/devices/x86_generic/.config index 17df92be484f..f3819406389d 100644 --- a/devices/x86_generic/.config +++ b/devices/x86_generic/.config @@ -8,17 +8,6 @@ CONFIG_GRUB_IMAGES=y CONFIG_GRUB_EFI_IMAGES=y CONFIG_VMDK_IMAGES=n -# daed -CONFIG_DEVEL=y -CONFIG_BPF_TOOLCHAIN_HOST=y -# CONFIG_BPF_TOOLCHAIN_NONE is not set -CONFIG_KERNEL_BPF_EVENTS=y -CONFIG_KERNEL_CGROUP_BPF=y -CONFIG_KERNEL_DEBUG_INFO=y -CONFIG_KERNEL_DEBUG_INFO_BTF=y -# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set -CONFIG_KERNEL_XDP_SOCKETS=y - # 其他需要安装的软件包: CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx diff --git a/devices/x86_generic/diy.sh b/devices/x86_generic/diy.sh index 53f89e9a91cf..8b8e1197959b 100644 --- a/devices/x86_generic/diy.sh +++ b/devices/x86_generic/diy.sh @@ -10,6 +10,8 @@ curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linu sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-usb-hid kmod-mmc kmod-sdhci usbutils pciutils lm-sensors-detect kmod-alx kmod-vmxnet3 kmod-igbvf kmod-iavf kmod-bnx2x kmod-pcnet32 kmod-tulip kmod-r8125 kmod-r8101 kmod-8139cp kmod-8139too kmod-i40e kmod-drm-i915 kmod-drm-amdgpu kmod-mlx4-core kmod-mlx5-core fdisk lsblk/' target/linux/x86/Makefile +sed -i 's/kmod-r8169/kmod-r8168/' target/linux/x86/image/generic.mk + mv -f tmp/r81* feeds/kiddin9/ sed -i 's/256/1024/g' target/linux/x86/image/Makefile