diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index ac853c2facd3..94aa3cb9d732 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -25,7 +25,7 @@ env: jobs: build: - runs-on: Ubuntu-22.04 + runs-on: ubuntu-latest name: Build ${{matrix.target}} strategy: @@ -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 @@ -116,8 +114,9 @@ jobs: sudo -E apt-get -qq update 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 + python3-dev python3-pip 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 gcc-multilib + pip3 install --user -U pylibfdt 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 @@ -139,7 +138,7 @@ jobs: REPO_BRANCH="$((curl -gs -H 'Content-Type: application/json' \ -H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \ -X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v23 | tail -n 1)" - REPO_BRANCH="openwrt-23.05" + #REPO_BRANCH="openwrt-23.05" #echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/`echo $REPO_BRANCH | cut -d . -f 1,2 | sed -e 's/^v//'`\"">>devices/common/.config echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/23.05\"">>devices/common/.config if [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then @@ -163,19 +162,21 @@ jobs: - name: Load custom configuration run: | function git_clone_path() { - branch="$1" rurl="$2" localdir="gitemp" mv="$3" + trap 'rm -rf "$tmpdir"' EXIT + branch="$1" rurl="$2" mv="$3" [[ "$mv" != "mv" ]] && shift 2 || shift 3 - git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir + rootdir="$PWD" + tmpdir="$(mktemp -d)" || exit 1 + git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $tmpdir if [ "$?" != 0 ]; then echo "error on $rurl" - return 0 + exit 1 fi - cd $localdir + cd $tmpdir git sparse-checkout init --cone git sparse-checkout set $@ - [[ "$mv" != "mv" ]] && cp -rn ./* ../ || mv -n $@/* ../$@/ - cd .. - rm -rf gitemp + [[ "$mv" != "mv" ]] && cp -rn ./* $rootdir/ || mv -n $@/* $rootdir/$@/ + cd $rootdir } export -f git_clone_path cp -rf devices/common/. openwrt/ @@ -203,8 +204,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_bcm2710/diy.sh b/devices/bcm27xx_bcm2710/diy.sh index d9d390c0e95b..eeea276cf220 100644 --- a/devices/bcm27xx_bcm2710/diy.sh +++ b/devices/bcm27xx_bcm2710/diy.sh @@ -6,8 +6,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile -mkdir -p files/lib/firmware/brcm -wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.bin -wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.txt -wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.bin -wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.txt +wget -N https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.bin -P files/lib/firmware/brcm/ +wget -N https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.txt -P files/lib/firmware/brcm/ +wget -N https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.bin -P files/lib/firmware/brcm/ +wget -N https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.txt -P files/lib/firmware/brcm/ diff --git a/devices/bcm27xx_bcm2712/diy.sh b/devices/bcm27xx_bcm2712/diy.sh index 466e5d93a448..c7aa7e4a3480 100644 --- a/devices/bcm27xx_bcm2712/diy.sh +++ b/devices/bcm27xx_bcm2712/diy.sh @@ -2,6 +2,6 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) -bash $SHELL_FOLDER/../common/kernel_6.1.sh +bash $SHELL_FOLDER/../common/kernel_6.6.sh 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..fc667a488fcf 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,18 +30,21 @@ 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/ +wget -N https://raw.githubusercontent.com/openwrt/packages/master/lang/golang/golang/Makefile -P feeds/packages/lang/golang/golang/ + sed -i "s/192.168.1/10.0.0/" package/feeds/kiddin9/base-files/files/bin/config_generate sed -i "s/192.168.1/10.0.0/" package/base-files/files/bin/config_generate #sed -i "/call Build\/check-size,\$\$(KERNEL_SIZE)/d" include/image.mk -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -P package/kernel/linux/modules/ git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-5.15 -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-5.15/ sed -i "s/CONFIG_WERROR=y/CONFIG_WERROR=n/" target/linux/generic/config-5.15 @@ -50,21 +52,14 @@ sed -i "s/no-lto,$/no-lto no-mold,$/" include/package.mk [ -d package/kernel/mt76 ] && { 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 +wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -P package/kernel/mt76/patches/ } -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..af41532e2ec5 100644 --- a/devices/common/kernel_6.1.sh +++ b/devices/common/kernel_6.1.sh @@ -2,41 +2,42 @@ 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 -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-6.1/ -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -P package/kernel/linux/modules/ rm -rf target/linux/generic/hack-6.1/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} -curl -sfL https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot.mk -o include/u-boot.mk +wget -N https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot.mk -P include/ 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 +wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -P package/kernel/mt76/patches/ 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/xr_usb_serial_common net/xtables-addons +git_clone_path master https://github.com/openwrt/packages kernel libs/xr_usb_serial_common net/xtables-addons cd ../../ -rm -rf package/feeds/kiddin9/quectel_Gobinet package/feeds/kiddin9/fibocom_MHI package/feeds/packages/libpfring +wget -N https://raw.githubusercontent.com/openwrt/packages/master/net/coova-chilli/patches/011-kernel517.patch -P package/feeds/packages/coova-chilli/patches/ 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..efd37923aed5 100644 --- a/devices/common/kernel_6.6.sh +++ b/devices/common/kernel_6.6.sh @@ -7,6 +7,15 @@ bash $SHELL_FOLDER/../common/kernel_6.1.sh git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6 -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 +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-6.6/ + +wget -N https://raw.githubusercontent.com/openwrt/packages/master/libs/dmx_usb_module/patches/101-fix-kernel-6.6-builds.patch -P package/feeds/packages/dmx_usb_module/patches/ + +cd feeds/packages +rm -rf libs/libpfring +git_clone_path master https://github.com/openwrt/packages libs/libpfring +cd ../../ + +wget -N https://raw.githubusercontent.com/openwrt/openwrt/main/package/devel/kselftests-bpf/Makefile -P package/devel/kselftests-bpf/ 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/default-packages.patch b/devices/common/patches/default-packages.patch new file mode 100644 index 000000000000..83952051be62 --- /dev/null +++ b/devices/common/patches/default-packages.patch @@ -0,0 +1,14 @@ +--- a/include/target.mk ++++ b/include/target.mk +@@ -78,10 +78,8 @@ DEFAULT_PACKAGES.nas:=\ + mdadm + # For router targets + DEFAULT_PACKAGES.router:=\ +- dnsmasq \ ++ dnsmasq-full \ + firewall4 \ +- nftables \ +- kmod-nft-offload \ + odhcp6c \ + odhcpd-ipv6only \ + ppp \ \ No newline at end of file diff --git a/devices/common/patches/download.patch.b b/devices/common/patches/download.patch.b deleted file mode 100644 index c7eac24c044a..000000000000 --- a/devices/common/patches/download.patch.b +++ /dev/null @@ -1,11 +0,0 @@ ---- a/scripts/download.pl -+++ b/scripts/download.pl -@@ -82,11 +82,11 @@ ($) - } - - return $have_curl -- ? (qw(curl -f --connect-timeout 20 --retry 5 --location), -+ ? (qw(curl -f --connect-timeout 5 --retry 3 -m 30 --location), - $check_certificate ? () : '--insecure', - shellwords($ENV{CURL_OPTIONS} || ''), - $url) \ No newline at end of file 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/iptables.patch b/devices/common/patches/iptables.patch deleted file mode 100644 index 86474adf2875..000000000000 --- a/devices/common/patches/iptables.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/package/network/utils/iptables/Makefile -+++ b/package/network/utils/iptables/Makefile -@@ -111,7 +111,6 @@ define Package/arptables-nft - $(call Package/iptables/Default) - DEPENDS:=+kmod-nft-arp +xtables-nft +kmod-arptables - TITLE:=ARP firewall administration tool nft -- PROVIDES:=arptables - ALTERNATIVES:=\ - 300:/usr/sbin/arptables:/usr/sbin/xtables-nft-multi \ - 300:/usr/sbin/arptables-restore:/usr/sbin/xtables-nft-multi \ -@@ -122,7 +121,6 @@ define Package/ebtables-nft - $(call Package/iptables/Default) - DEPENDS:=+kmod-nft-bridge +xtables-nft +kmod-ebtables - TITLE:=Bridge firewall administration tool nft -- PROVIDES:=ebtables - ALTERNATIVES:=\ - 300:/usr/sbin/ebtables:/usr/sbin/xtables-nft-multi \ - 300:/usr/sbin/ebtables-restore:/usr/sbin/xtables-nft-multi \ -@@ -133,7 +131,6 @@ define Package/iptables-nft - $(call Package/iptables/Default) - TITLE:=IP firewall administration tool nft - DEPENDS:=+kmod-ipt-core +xtables-nft -- PROVIDES:=iptables - ALTERNATIVES:=\ - 300:/usr/sbin/iptables:/usr/sbin/xtables-nft-multi \ - 300:/usr/sbin/iptables-restore:/usr/sbin/xtables-nft-multi \ -@@ -486,7 +483,6 @@ define Package/ip6tables-nft - $(call Package/iptables/Default) - DEPENDS:=@IPV6 +kmod-ip6tables +xtables-nft - TITLE:=IP firewall administration tool nft -- PROVIDES:=ip6tables - ALTERNATIVES:=\ - 300:/usr/sbin/ip6tables:/usr/sbin/xtables-nft-multi \ - 300:/usr/sbin/ip6tables-restore:/usr/sbin/xtables-nft-multi \ \ 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/common/patches/targets.patch b/devices/common/patches/targets.patch deleted file mode 100644 index ef39698b2283..000000000000 --- a/devices/common/patches/targets.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/include/target.mk -+++ b/include/target.mk -@@ -53,10 +53,10 @@ DEFAULT_PACKAGES.nas:=\ - mdadm - # For router targets - DEFAULT_PACKAGES.router:=\ -- dnsmasq \ -- firewall4 \ -- nftables \ -- kmod-nft-offload \ -+ dnsmasq-full \ -+ firewall \ -+ kmod-ipt-nat \ -+ kmod-ipt-nat6 \ - odhcp6c \ - odhcpd-ipv6only \ - ppp \ -@@ -93,6 +93,18 @@ else - endif - endif - -+ifneq ($(CONFIG_SMALL_FLASH),) -+DEFAULT_PACKAGES+=-coremark -htop -bash -openssh-sftp-server -+endif -+ -+ifeq ($(ARCH),arm) -+DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ -+ifeq ($(ARCH),aarch64) -+DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ - # Add device specific packages (here below to allow device type set from subtarget) - DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE)) - diff --git a/devices/ipq40xx_generic/diy.sh b/devices/ipq40xx_generic/diy.sh index 77230d1da3d7..23528b5ef681 100644 --- a/devices/ipq40xx_generic/diy.sh +++ b/devices/ipq40xx_generic/diy.sh @@ -6,6 +6,6 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) #sh -c "curl -sfL https://patch-diff.githubusercontent.com/raw/openwrt/openwrt/pull/10778.patch | git apply -p1" -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/ipq40xx/patches-5.10/999-ipq40xx-unlock-cpu-frequency.patch -o target/linux/ipq40xx/patches-5.15/999-ipq40xx-unlock-cpu-frequency.patch +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/ipq40xx/patches-5.10/999-ipq40xx-unlock-cpu-frequency.patch -P target/linux/ipq40xx/patches-5.15/ 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/.config b/devices/mediatek_filogic/.config index cf95a11b18b1..02598c9aeace 100644 --- a/devices/mediatek_filogic/.config +++ b/devices/mediatek_filogic/.config @@ -2,41 +2,8 @@ CONFIG_TARGET_mediatek=y CONFIG_TARGET_mediatek_filogic=y CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_asus_tuf-ax4200=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_asus_rt-ax59u=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_asus_tuf-ax6000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_tplink_tl-xdr4288=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_tplink_tl-xdr6086=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_tplink_tl-xdr6088=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt3000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_h3c_magic-nx30-pro=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_mi-router-wr30u=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_redmi-router-ax6000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_qihoo_360t7=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_mi-router-ax3000t=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_jcg_q30-pro=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cetron_ct3003=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt6000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt2500=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_rax3000m-nand=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_rax3000m-emmc=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_jdcloud_re-cp-03=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_abt_asr3000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_ruijie_rg-x60-pro=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_netcore_n60=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_a10=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_konka_komi-a31=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_imou_lc-hx3001=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3-mini=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r4=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-x3000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_ikuai_q3000=y -CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openwrt_one=y +CONFIG_TARGET_ALL_PROFILES=y + CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 CONFIG_PACKAGE_kmod-pcie_mhi=m 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/08-cmcc_rax3000m.patch b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch index 9327a4230f44..27313c7972b3 100644 --- a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch +++ b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch @@ -1,14 +1,14 @@ --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -@@ -41,7 +41,7 @@ mediatek_setup_interfaces() - bananapi,bpi-r4) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2" +@@ -12,7 +12,7 @@ mediatek_setup_interfaces() + ucidef_set_interface_lan "eth0" "dhcp" ;; + abt,asr3000|\ - cmcc,rax3000m|\ + cmcc,rax3000m*|\ h3c,magic-nx30-pro|\ + nokia,ea0326gmp|\ zbtlink,zbt-z8103ax) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -71,14 +71,3 @@ acer,predator-w6|\ glinet,gl-mt2500|\ glinet,gl-mt6000|\ - ---- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata -+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata -@@ -31,6 +31,7 @@ case "$FIRMWARE" in - ;; - esac - ;; -+ cmcc,rax3000m-emmc|\ - ubnt,unifi-6-plus) - caldata_extract_mmc "factory" 0x0 0x1000 - ;; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch index 5d34c85a3b4f..e276992374f6 100644 --- a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch +++ b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch @@ -27,7 +27,7 @@ --- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts -@@ -98,6 +98,10 @@ +@@ -101,6 +101,10 @@ spi-tx-bus-width = <4>; spi-rx-bus-width = <4>; @@ -37,4 +37,18 @@ + partitions { compatible = "fixed-partitions"; - #address-cells = <1>; \ No newline at end of file + #address-cells = <1>; +@@ -140,12 +144,11 @@ + partition@380000 { + label = "fip"; + reg = <0x0380000 0x0200000>; +- read-only; + }; + + partition@580000 { + label = "ubi"; +- reg = <0x0580000 0x7000000>; ++ reg = <0x0580000 0x6e80000>; + }; + }; + }; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/12-asr3000.patch b/devices/mediatek_filogic/patches/12-asr3000.patch index 9d571f67171f..5eba32a85ace 100644 --- a/devices/mediatek_filogic/patches/12-asr3000.patch +++ b/devices/mediatek_filogic/patches/12-asr3000.patch @@ -1,365 +1,52 @@ -From 02f7ea25d6612180b3a97b688d6e69cfe7af2f0d Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Thu, 19 Oct 2023 15:14:45 +0800 -Subject: [PATCH] mediatek: add ABT ASR3000 support - -Signed-off-by: Tianling Shen ---- - .../dts/mt7981b-abt-asr3000.dts | 267 ++++++++++++++++++ - .../filogic/base-files/etc/board.d/01_leds | 5 + - .../filogic/base-files/etc/board.d/02_network | 17 +- - .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 + - target/linux/mediatek/image/filogic.mk | 21 ++ - 5 files changed, 307 insertions(+), 8 deletions(-) - create mode 100644 target/linux/mediatek/dts/mt7981b-abt-asr3000.dts - -diff --git a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts -new file mode 100644 -index 00000000000..605721f2d08 ---- /dev/null +--- a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts +++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts -@@ -0,0 +1,268 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (C) 2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include -+#include -+ -+#include "mt7981.dtsi" -+ -+/ { -+ model = "ABT ASR3000 (custom U-Boot layout)"; -+ compatible = "abt,asr3000", "mediatek,mt7981"; -+ -+ aliases { -+ led-boot = &mesh_led; -+ led-failsafe = &mesh_led; -+ led-upgrade = &mesh_led; -+ serial0 = &uart0; -+ label-mac-device = &gmac1; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ memory { -+ reg = <0 0x40000000 0 0x10000000>; -+ }; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ -+ button-reset { -+ label = "reset"; -+ linux,code = ; -+ gpios = <&pio 1 GPIO_ACTIVE_LOW>; -+ }; -+ -+ button-mesh { -+ label = "mesh"; -+ linux,code = ; -+ linux,input-type = ; -+ gpios = <&pio 0 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ gpio-leds { -+ compatible = "gpio-leds"; -+ -+ led-0 { -+ label = "red:wan"; -+ gpios = <&pio 4 GPIO_ACTIVE_LOW>; -+ }; -+ -+ led-1 { -+ label = "green:wan"; -+ gpios = <&pio 8 GPIO_ACTIVE_LOW>; -+ }; -+ -+ mesh_led: led-2 { -+ label = "green:mesh"; -+ gpios = <&pio 15 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-3 { -+ label = "green:wlan2g"; -+ gpios = <&pio 34 GPIO_ACTIVE_LOW>; -+ }; -+ -+ led-4 { -+ label = "green:wlan5g"; -+ gpios = <&pio 35 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+ð { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mdio_pins>; -+ -+ status = "okay"; -+ -+ gmac0: mac@0 { -+ compatible = "mediatek,eth-mac"; -+ reg = <0>; -+ phy-mode = "2500base-x"; -+ -+ nvmem-cells = <&macaddr_art_0 0>; -+ nvmem-cell-names = "mac-address"; -+ -+ fixed-link { -+ speed = <2500>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ -+ gmac1: mac@1 { -+ compatible = "mediatek,eth-mac"; -+ reg = <1>; -+ phy-mode = "gmii"; -+ phy-handle = <&int_gbe_phy>; -+ -+ nvmem-cells = <&macaddr_art_0 0>; -+ nvmem-cell-names = "mac-address"; -+ }; -+}; -+ -+&mdio_bus { -+ switch: switch@0 { -+ compatible = "mediatek,mt7531"; -+ reg = <31>; -+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ interrupt-parent = <&pio>; -+ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; -+ }; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_flash_pins>; -+ status = "okay"; -+ -+ spi_nand: flash@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "spi-nand"; -+ reg = <0>; -+ spi-max-frequency = <52000000>; -+ -+ spi-cal-enable; -+ spi-cal-mode = "read-data"; -+ spi-cal-datalen = <7>; -+ spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; -+ spi-cal-addrlen = <5>; -+ spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; -+ -+ spi-tx-bus-width = <4>; -+ spi-rx-bus-width = <4>; +@@ -155,6 +155,10 @@ + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + -+ partitions: partitions { -+ compatible = "fixed-partitions"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ partition@0 { -+ label = "BL2"; -+ reg = <0x00000 0x100000>; -+ read-only; -+ }; -+ -+ partition@100000 { -+ label = "u-boot-env"; -+ reg = <0x100000 0x80000>; -+ }; -+ -+ partition@180000 { -+ label = "art"; -+ reg = <0x180000 0x100000>; -+ read-only; -+ -+ compatible = "nvmem-cells"; -+ nvmem-layout { -+ compatible = "fixed-layout"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ macaddr_art_0: macaddr@0 { -+ compatible = "mac-base"; -+ reg = <0x0 0x6>; -+ #nvmem-cell-cells = <1>; -+ }; -+ }; -+ }; -+ -+ factory: partition@280000 { -+ label = "Factory"; -+ reg = <0x280000 0x100000>; -+ }; -+ -+ partition@380000 { -+ label = "FIP"; -+ reg = <0x380000 0x200000>; -+ }; -+ -+ partition@580000 { -+ label = "ubi"; -+ reg = <0x580000 0x6e80000>; -+ }; -+ }; -+ }; -+}; -+ -+&switch { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "lan1"; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan2"; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan3"; -+ }; -+ -+ port@6 { -+ reg = <6>; -+ ethernet = <&gmac0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <2500>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ }; -+}; -+ -+&pio { -+ spi0_flash_pins: spi0-pins { -+ mux { -+ function = "spi"; -+ groups = "spi0", "spi0_wp_hold"; -+ }; -+ -+ conf-pu { -+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; -+ drive-strength = ; -+ bias-pull-up = ; -+ }; -+ -+ conf-pd { -+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; -+ drive-strength = ; -+ bias-pull-down = ; -+ }; -+ }; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&watchdog { -+ status = "okay"; -+}; -+ -+&wifi { -+ status = "okay"; -+ -+ mediatek,mtd-eeprom = <&factory 0x0>; -+}; -diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -index 8e4fd8003c168..c21f23d4587f2 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -@@ -41,6 +41,7 @@ mediatek_setup_interfaces() - bananapi,bpi-r4) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2" - ;; -+ abt,asr3000|\ - cmcc,rax3000m*|\ - h3c,magic-nx30-pro|\ - zbtlink,zbt-z8103ax) -diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -index 3d625a820d6..9290afe4c31 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -@@ -6,6 +6,11 @@ board=$(board_name) - board_config_update + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; +@@ -208,13 +212,12 @@ + partition@380000 { + label = "fip"; + reg = <0x380000 0x200000>; +- read-only; + }; - case $board in -+abt,asr3000) -+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" -+ ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "phy0-ap0" -+ ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan5g" "phy1-ap0" -+ ;; - confiabits,mt7981) - ucidef_set_led_netdev "lan1" "lan1" "blue:lan-1" "lan1" "link tx rx" - ucidef_set_led_netdev "lan2" "lan2" "blue:lan-2" "lan2" "link tx rx" -diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -index 6a513c74fb9..f586edf525f 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -@@ -10,6 +10,11 @@ PHYNBR=${DEVPATH##*/phy} - board=$(board_name) + partition@580000 { + compatible = "linux,ubi"; + label = "ubi"; +- reg = <0x580000 0x7a80000>; ++ reg = <0x580000 0x6e80000>; - case "$board" in -+ abt,asr3000) -+ addr=$(get_mac_label) -+ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress -+ [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress -+ ;; - acer,predator-w6) - key_path="/var/qcidata/data" - [ "$PHYNBR" = "0" ] && cat $key_path/2gMAC > /sys${DEVPATH}/macaddress -diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk -index 95aee51b689..7f28be90a7b 100644 + volumes { + ubi_rootdisk: ubi-volume-fit { + --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk -@@ -105,6 +105,27 @@ define Build/cetron-header - rm $@.tmp - endef - -+define Device/abt_asr3000 -+ DEVICE_VENDOR := ABT -+ DEVICE_MODEL := ASR3000 -+ DEVICE_DTS := mt7981b-abt-asr3000 -+ DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware -+ UBINIZE_OPTS := -E 5 -+ BLOCKSIZE := 128k -+ PAGESIZE := 2048 -+ IMAGE_SIZE := 113152k -+ KERNEL_IN_UBI := 1 +@@ -115,17 +115,10 @@ define Device/abt_asr3000 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 +- UBOOTENV_IN_UBI := 1 +- IMAGES := sysupgrade.itb +- KERNEL_INITRAMFS_SUFFIX := -recovery.itb +- KERNEL := kernel-bin | gzip +- KERNEL_INITRAMFS := kernel-bin | lzma | \ +- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k +- IMAGE/sysupgrade.itb := append-kernel | \ +- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata +- ARTIFACTS := preloader.bin bl31-uboot.fip +- ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 +- ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot abt_asr3000 ++ IMAGE_SIZE := 114816k + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -+ KERNEL = kernel-bin | lzma | \ -+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb -+ KERNEL_INITRAMFS = kernel-bin | lzma | \ -+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd -+endef -+TARGET_DEVICES += abt_asr3000 -+ - define Device/asus_tuf-ax4200 - DEVICE_VENDOR := ASUS - DEVICE_MODEL := TUF-AX4200 + endef + TARGET_DEVICES += abt_asr3000 \ 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..e22fb34957f5 100644 --- a/devices/mediatek_filogic/patches/16-komi-a31.patch +++ b/devices/mediatek_filogic/patches/16-komi-a31.patch @@ -5,8 +5,6 @@ Subject: [PATCH] mediatek: filogic: add support for KONKA KOMI A31 Signed-off-by: Chen Minqiang --- - .../dts/mt7981b-konka-komi-a31-base.dtsi | 233 ++++++++++++++++++ - .../dts/mt7981b-konka-komi-a31-nmbm.dts | 21 ++ .../mediatek/dts/mt7981b-konka-komi-a31.dts | 8 + .../filogic/base-files/etc/board.d/01_leds | 4 + .../filogic/base-files/etc/board.d/02_network | 2 + @@ -14,8 +12,6 @@ Signed-off-by: Chen Minqiang .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 47 ++++ 8 files changed, 322 insertions(+) - create mode 100644 target/linux/mediatek/dts/mt7981b-konka-komi-a31-base.dtsi - create mode 100644 target/linux/mediatek/dts/mt7981b-konka-komi-a31-nmbm.dts create mode 100644 target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts diff --git a/target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts b/target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts @@ -288,21 +284,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/mediatek_filogic/patches/ax3000t.patch b/devices/mediatek_filogic/patches/ax3000t.patch new file mode 100644 index 000000000000..c39e38a50e6b --- /dev/null +++ b/devices/mediatek_filogic/patches/ax3000t.patch @@ -0,0 +1,26 @@ +--- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts ++++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts +@@ -17,18 +17,12 @@ + &partitions { + // ubi_kernel is the ubi partition in stock. + partition@600000 { +- label = "ubi_kernel"; +- reg = <0x600000 0x2200000>; ++ label = "ubi"; ++ reg = <0x600000 0x7000000>; + }; + +- /* ubi is the result of squashing +- * consecutive stock partitions: +- * - ubi1 +- * - overlay +- * - data +- */ +- partition@2800000 { +- label = "ubi"; +- reg = <0x2800000 0x4e00000>; ++ partition@7600000 { ++ label = "KF"; ++ reg = <0x7600000 0x40000>; + }; + }; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/netcore-n60.patch b/devices/mediatek_filogic/patches/netcore-n60.patch new file mode 100644 index 000000000000..4d457e68a876 --- /dev/null +++ b/devices/mediatek_filogic/patches/netcore-n60.patch @@ -0,0 +1,46 @@ +--- a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts ++++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts +@@ -175,6 +175,10 @@ + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + ++ mediatek,nmbm; ++ mediatek,bmt-max-ratio = <1>; ++ mediatek,bmt-max-reserved-blocks = <64>; ++ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; +@@ -200,7 +204,6 @@ + partition@380000 { + label = "FIP"; + reg = <0x0380000 0x0200000>; +- read-only; + }; + + partition@580000 { + +--- a/target/linux/mediatek/image/filogic.mk ++++ b/target/linux/mediatek/image/filogic.mk +@@ -942,18 +942,10 @@ define Device/netcore_n60 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 +- UBOOTENV_IN_UBI := 1 +- IMAGES := sysupgrade.itb +- KERNEL_INITRAMFS_SUFFIX := -recovery.itb +- KERNEL := kernel-bin | gzip +- KERNEL_INITRAMFS := kernel-bin | lzma | \ +- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k +- IMAGE/sysupgrade.itb := append-kernel | \ +- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware +- ARTIFACTS := preloader.bin bl31-uboot.fip +- ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3 +- ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot netcore_n60 ++ IMAGES += factory.bin ++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + endef + TARGET_DEVICES += netcore_n60 + diff --git a/devices/mediatek_filogic/patches/ruijie-rg-x60-pro.patch b/devices/mediatek_filogic/patches/ruijie-rg-x60-pro.patch new file mode 100644 index 000000000000..2f2a6f3c5a53 --- /dev/null +++ b/devices/mediatek_filogic/patches/ruijie-rg-x60-pro.patch @@ -0,0 +1,19 @@ +--- a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts ++++ b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts +@@ -199,7 +199,6 @@ + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; +- read-only; + }; + + partition@580000 { +@@ -216,7 +215,7 @@ + + partition@680000 { + label = "ubi"; +- reg = <0x680000 0x3f00000>; ++ reg = <0x680000 0x6b00000>; + }; + }; + }; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/tplink-tl-xdr.patch b/devices/mediatek_filogic/patches/tplink-tl-xdr.patch new file mode 100644 index 000000000000..06e9fad3eeca --- /dev/null +++ b/devices/mediatek_filogic/patches/tplink-tl-xdr.patch @@ -0,0 +1,79 @@ +--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi ++++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +@@ -202,25 +202,25 @@ + + factory: partition@160000 { + label = "factory"; +- reg = <0x160000 0x0060000>; ++ reg = <0x160000 0x00a0000>; + read-only; + }; + +- partition@1c0000 { ++ partition@200000 { + label = "reserved"; +- reg = <0x1c0000 0x01c0000>; ++ reg = <0x200000 0x0180000>; + read-only; + }; + + partition@380000 { + label = "fip"; +- reg = <0x380000 0x0200000>; +- read-only; ++ reg = <0x380000 0x0180000>; ++ // read-only; + }; + +- partition@580000 { ++ partition@500000 { + compatible = "linux,ubi"; +- reg = <0x580000 0x7800000>; ++ reg = <0x500000 0x7300000>; + label = "ubi"; + + volumes { + +--- a/target/linux/mediatek/image/filogic.mk ++++ b/target/linux/mediatek/image/filogic.mk +@@ -1130,23 +1130,13 @@ define Device/tplink_tl-xdr-common + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 +- UBOOTENV_IN_UBI := 1 +- IMAGES := sysupgrade.itb +- KERNEL_INITRAMFS_SUFFIX := -recovery.itb +- KERNEL := kernel-bin | gzip +- KERNEL_INITRAMFS := kernel-bin | lzma | \ +- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k +- IMAGE/sysupgrade.itb := append-kernel | \ +- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | append-metadata + DEVICE_PACKAGES := fitblk kmod-usb3 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware +- ARTIFACTS := preloader.bin bl31-uboot.fip +- ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3 ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + endef + + define Device/tplink_tl-xdr4288 + DEVICE_MODEL := TL-XDR4288 + DEVICE_DTS := mt7986a-tplink-tl-xdr4288 +- ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot tplink_tl-xdr4288 + $(call Device/tplink_tl-xdr-common) + endef + TARGET_DEVICES += tplink_tl-xdr4288 +@@ -1154,7 +1144,6 @@ TARGET_DEVICES += tplink_tl-xdr4288 + define Device/tplink_tl-xdr6086 + DEVICE_MODEL := TL-XDR6086 + DEVICE_DTS := mt7986a-tplink-tl-xdr6086 +- ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot tplink_tl-xdr6086 + $(call Device/tplink_tl-xdr-common) + endef + TARGET_DEVICES += tplink_tl-xdr6086 +@@ -1162,7 +1151,6 @@ TARGET_DEVICES += tplink_tl-xdr6086 + define Device/tplink_tl-xdr6088 + DEVICE_MODEL := TL-XDR6088 + DEVICE_DTS := mt7986a-tplink-tl-xdr6088 +- ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot tplink_tl-xdr6088 + $(call Device/tplink_tl-xdr-common) + endef + TARGET_DEVICES += tplink_tl-xdr6088 \ 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..537ac2bd3ce0 100644 --- a/devices/rockchip_armv8/.config +++ b/devices/rockchip_armv8/.config @@ -9,19 +9,9 @@ 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服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx + diff --git a/devices/rockchip_armv8/diy.sh b/devices/rockchip_armv8/diy.sh index e86a56f8cd78..e46715dcda14 100644 --- a/devices/rockchip_armv8/diy.sh +++ b/devices/rockchip_armv8/diy.sh @@ -5,7 +5,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.6.sh -rm -rf package/boot package/devel/kselftests-bpf package/devel/perf +rm -rf package/boot package/devel/perf rm -rf target/linux/generic/!(*-5.15) target/linux/rockchip @@ -14,9 +14,11 @@ git_clone_path master https://github.com/immortalwrt/immortalwrt mv target/linux git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6 -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 +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-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} +wget -N https://github.com/immortalwrt/immortalwrt/raw/master/include/kernel-6.6 -P include/ + +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 @@ -27,7 +29,7 @@ rm -rf target/linux/rockchip/armv8/base-files/etc/uci-defaults/13_opkg_update pa sed -i -e 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/armv8.mk sed -i -e 's,wpad-openssl,wpad-basic-mbedtls,g' target/linux/rockchip/image/armv8.mk -curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk +wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/linux/modules/video.mk -P package/kernel/linux/modules/ sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-drm-rockchip/' target/linux/rockchip/Makefile diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/306-rockchip-rk3399-Add-support-for-Rongpin-king3399.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/306-rockchip-rk3399-Add-support-for-Rongpin-king3399.patch index 1a8856e195b6..1024dea7246b 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/306-rockchip-rk3399-Add-support-for-Rongpin-king3399.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/306-rockchip-rk3399-Add-support-for-Rongpin-king3399.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/configs/rongpin-king3399-rk3399_defconfig -@@ -0,0 +1,73 @@ +@@ -0,0 +1,74 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 @@ -37,6 +37,7 @@ +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names 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 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/307-rockchip-rk3399-Add-support-for-Rocktech-MPC1903.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/307-rockchip-rk3399-Add-support-for-Rocktech-MPC1903.patch index 3461748e43eb..f542fcc80966 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/307-rockchip-rk3399-Add-support-for-Rocktech-MPC1903.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/307-rockchip-rk3399-Add-support-for-Rocktech-MPC1903.patch @@ -708,7 +708,7 @@ +}; --- /dev/null +++ b/configs/rocktech-mpc1903-rk3399_defconfig -@@ -0,0 +1,72 @@ +@@ -0,0 +1,73 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 @@ -745,6 +745,7 @@ +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names 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 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-sharevdi-h3399pc.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-sharevdi-h3399pc.patch index 0276a5569e88..d582884d9ada 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-sharevdi-h3399pc.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-sharevdi-h3399pc.patch @@ -848,7 +848,7 @@ +}; --- /dev/null +++ b/configs/sharevdi-h3399pc-rk3399_defconfig -@@ -0,0 +1,72 @@ +@@ -0,0 +1,73 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 @@ -885,6 +885,7 @@ +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_SPL_OF_CONTROL=y ++# CONFIG_OF_UPSTREAM is not set +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names 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 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3566-Add-support-for-panther-x2.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3566-Add-support-for-panther-x2.patch index 668ebfc76343..183fa4c18716 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3566-Add-support-for-panther-x2.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3566-Add-support-for-panther-x2.patch @@ -11,7 +11,7 @@ +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-evb" ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-evb1-v10" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y @@ -27,7 +27,7 @@ +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb.dtb" ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb1-v10.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-lyt_t68m.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-lyt_t68m.patch index 52ab28109941..8156ca4b22fc 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-lyt_t68m.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-lyt_t68m.patch @@ -22,7 +22,7 @@ @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + -+#include "rk3568-evb.dts" ++#include "rk3568-evb1-v10.dts" + +/ { + model = "LYT T68M"; @@ -30,7 +30,7 @@ +}; --- /dev/null +++ b/configs/lyt-t68m-rk3568_defconfig -@@ -0,0 +1,83 @@ +@@ -0,0 +1,84 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 @@ -77,6 +77,7 @@ +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_REGMAP=y diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch index 60d244d30ae8..8109733ea3e6 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch @@ -27,7 +27,7 @@ @@ -0,0 +1,327 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + -+#include "rk3568-evb.dts" ++#include "rk3568-evb1-v10.dts" + +/ { + model = "NLnet XiGuaPi Board"; @@ -354,7 +354,7 @@ +}; --- /dev/null +++ b/configs/nlnet-xgp-rk3568_defconfig -@@ -0,0 +1,101 @@ +@@ -0,0 +1,102 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_ARCH_ROCKCHIP=y @@ -408,6 +408,7 @@ +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_NET_RANDOM_ETHADDR=y +CONFIG_SPL_DM_WARN=y diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk3566-Add-support-for-seewo-sv21-3568.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk3566-Add-support-for-seewo-sv21-3568.patch index 3a54cb9c342f..63b76b0c5e66 100644 --- a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk3566-Add-support-for-seewo-sv21-3568.patch +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk3566-Add-support-for-seewo-sv21-3568.patch @@ -11,7 +11,7 @@ +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-evb" ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-evb1-v10" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y @@ -27,7 +27,7 @@ +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb.dtb" ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb1-v10.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi new file mode 100644 index 000000000000..f4769d12bd18 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rk356x-u-boot.dtsi" + +/ { + chosen { + stdout-path = &uart2; + u-boot,spl-boot-order = "same-as-spl", &sdhci; + }; +}; + +&sdhci { + cap-mmc-highspeed; + mmc-hs200-1_8v; +}; + +&uart2 { + clock-frequency = <24000000>; + bootph-all; + status = "okay"; +}; diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts new file mode 100644 index 000000000000..c86119a23b94 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "Hinlink OPC-H66K"; + compatible = "hinlink,opc-h66k", "rockchip,rk3568"; +}; + +&vcc3v3_pcie { + gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi new file mode 100644 index 000000000000..c194d51bbf93 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi @@ -0,0 +1,619 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +#include +#include +#include +#include +#include "rk3568.dtsi" + +/ { + aliases { + mmc0 = &sdhci; + mmc1 = &sdmmc0; + + led-boot = &power_led; + led-failsafe = &power_led; + led-running = &power_led; + led-upgrade = &power_led; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + hdmi-con { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&reset_button_pin>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <50>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_lan_pin>, <&led_power_pin>, <&led_wan_pin>; + + led-lan { + label = "amber:lan"; + gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + }; + + power_led: led-power { + label = "green:power"; + gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; + }; + + led-wan { + label = "blue:wan"; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; + }; + }; + + pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 100 150 200 255>; + #cooling-cells = <2>; + pwms = <&pwm0 0 50000 0>; + }; + + vcc12v_dcin: vcc12v-dcin-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-name = "vcc12v_dcin"; + }; + + vcc3v3_sys: vcc3v3-sys-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_sys: vcc5v0-sys-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb: vcc5v0-usb-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb_host: vcc5v0-usb-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_host_en>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb_host"; + vin-supply = <&vcc5v0_usb>; + }; + + vcc3v3_pcie: vcc3v3-pcie-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pcie"; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; +}; + +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + +&combphy2 { + 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"; +}; + +&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"; + + 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 = <712500>; + regulator-max-microvolt = <1390000>; + 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 = ; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; + #clock-cells = <1>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; + rockchip,system-power-controller; + #sound-dai-cells = <0>; + wakeup-source; + + 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>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_logic"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-always-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_gpu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_npu: DCDC_REG4 { + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_npu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc_1v8"; + + 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-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_acodec"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca_1v8"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_image: LDO_REG9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_image"; + + 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-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&i2c5 { + status = "okay"; +}; + +&i2s0_8ch { + status = "okay"; +}; + +&pcie2x1 { + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie30phy { + data-lanes = <1 2>; + status = "okay"; +}; + +&pcie3x1 { + num-lanes = <1>; + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie3x2 { + num-lanes = <1>; + reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pinctrl { + leds { + led_lan_pin: led-lan-pin { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_power_pin: led-power-pin { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_wan_pin: led-wan-pin { + rockchip,pins = <3 RK_PA5 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_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb { + vcc5v0_usb_host_en: vcc5v0-usb-host-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>; + 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"; +}; + +&pwm0 { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca_1v8>; + status = "okay"; +}; + +&sata0 { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <200000000>; + mmc-hs200-1_8v; + no-sdio; + no-sd; + 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-sdr50; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + 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_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"; +}; + +&usb2phy1 { + status = "okay"; +}; + +&usb2phy1_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy1_otg { + phy-supply = <&vcc5v0_usb_host>; + 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"; +}; + +&vp0 { + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { + reg = ; + remote-endpoint = <&hdmi_in_vp0>; + }; +}; diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi new file mode 100644 index 000000000000..d11f9160d1fd --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rk3568-opc-h66k-u-boot.dtsi" diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts new file mode 100644 index 000000000000..3e6c801e8775 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "Hinlink OPC-H68K"; + compatible = "hinlink,opc-h68k", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac0; + ethernet1 = &gmac1; + }; +}; + +&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-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 = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x3c>; + rx_delay = <0x2f>; + phy-handle = <&rgmii_phy0>; + 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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x4f>; + rx_delay = <0x26>; + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&vcc3v3_pcie { + gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi new file mode 100644 index 000000000000..d11f9160d1fd --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rk3568-opc-h66k-u-boot.dtsi" diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts new file mode 100644 index 000000000000..5e1839315999 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2023 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "HINLINK OPC-H69K Board"; + compatible = "hinlink,opc-h69k", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac1; + }; + + vcc5v0_ahci: vcc5v0-ahci-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sata_pwr_en>; + regulator-always-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_ahci"; + vin-supply = <&vcc5v0_sys>; + }; +}; + +&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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x4f>; + rx_delay = <0x26>; + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&pinctrl { + sata { + sata_pwr_en: sata-pwr-en { + rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sata0 { + target-supply = <&vcc5v0_ahci>; +}; + +&vcc3v3_pcie { + gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig new file mode 100644 index 000000000000..6a20aa09ced2 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig @@ -0,0 +1,86 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h66k" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_TARGET_EVB_RK3568=y +CONFIG_SPL_STACK=0x400000 +CONFIG_DEBUG_UART_BASE=0xFE660000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h66k.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_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="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_SPL_DM_WARN=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y +CONFIG_POWER_DOMAIN=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig new file mode 100644 index 000000000000..e61228c3db0d --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig @@ -0,0 +1,86 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h68k" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_TARGET_EVB_RK3568=y +CONFIG_SPL_STACK=0x400000 +CONFIG_DEBUG_UART_BASE=0xFE660000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h68k.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_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="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_SPL_DM_WARN=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y +CONFIG_POWER_DOMAIN=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig new file mode 100644 index 000000000000..5df787d8a5f3 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig @@ -0,0 +1,86 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h69k" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_TARGET_EVB_RK3568=y +CONFIG_SPL_STACK=0x400000 +CONFIG_DEBUG_UART_BASE=0xFE660000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h69k.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_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="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_SPL_DM_WARN=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y +CONFIG_POWER_DOMAIN=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts new file mode 100644 index 000000000000..c86119a23b94 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "Hinlink OPC-H66K"; + compatible = "hinlink,opc-h66k", "rockchip,rk3568"; +}; + +&vcc3v3_pcie { + gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi new file mode 100644 index 000000000000..4e4d76b71e44 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi @@ -0,0 +1,623 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +#include +#include +#include +#include +#include "rk3568.dtsi" + +/ { + aliases { + mmc0 = &sdhci; + mmc1 = &sdmmc0; + + led-boot = &power_led; + led-failsafe = &power_led; + led-running = &power_led; + led-upgrade = &power_led; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + hdmi-con { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&reset_button_pin>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <50>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_lan_pin>, <&led_power_pin>, <&led_wan_pin>; + + led-lan { + label = "amber:lan"; + gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + }; + + power_led: led-power { + label = "green:power"; + gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; + }; + + led-wan { + label = "blue:wan"; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; + }; + }; + + pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 100 150 200 255>; + #cooling-cells = <2>; + pwms = <&pwm0 0 50000 0>; + }; + + vcc12v_dcin: vcc12v-dcin-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-name = "vcc12v_dcin"; + }; + + vcc3v3_sys: vcc3v3-sys-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_sys: vcc5v0-sys-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb: vcc5v0-usb-regulator { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb_host: vcc5v0-usb-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_host_en>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb_host"; + vin-supply = <&vcc5v0_usb>; + }; + + vcc3v3_pcie: vcc3v3-pcie-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pcie"; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; +}; + +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + +&combphy2 { + 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"; +}; + +&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"; + + 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 = <712500>; + regulator-max-microvolt = <1390000>; + 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 = ; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; + #clock-cells = <1>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; + rockchip,system-power-controller; + #sound-dai-cells = <0>; + wakeup-source; + + 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>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_logic"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-always-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_gpu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_npu: DCDC_REG4 { + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_npu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc_1v8"; + + 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-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_acodec"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca_1v8"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_image: LDO_REG9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_image"; + + 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-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&i2c5 { + status = "okay"; +}; + +&i2s0_8ch { + status = "okay"; +}; + +&pcie2x1 { + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie30phy { + data-lanes = <1 2>; + status = "okay"; +}; + +&pcie3x1 { + num-lanes = <1>; + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie3x2 { + num-lanes = <1>; + reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pinctrl { + leds { + led_lan_pin: led-lan-pin { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_power_pin: led-power-pin { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_wan_pin: led-wan-pin { + rockchip,pins = <3 RK_PA5 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_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb { + vcc5v0_usb_host_en: vcc5v0-usb-host-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>; + 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"; +}; + +&pwm0 { + status = "okay"; +}; + +&rng { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca_1v8>; + status = "okay"; +}; + +&sata0 { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <200000000>; + mmc-hs200-1_8v; + no-sdio; + no-sd; + 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-sdr50; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + 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_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"; +}; + +&usb2phy1 { + status = "okay"; +}; + +&usb2phy1_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy1_otg { + phy-supply = <&vcc5v0_usb_host>; + 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"; +}; + +&vp0 { + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { + reg = ; + remote-endpoint = <&hdmi_in_vp0>; + }; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts new file mode 100644 index 000000000000..648fe1f4bf00 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "Hinlink OPC-H68K"; + compatible = "hinlink,opc-h68k", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac0; + ethernet1 = &gmac1; + }; +}; + +&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-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 = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x3c>; + rx_delay = <0x2f>; + phy-handle = <&rgmii_phy0>; + 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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x4f>; + rx_delay = <0x26>; + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + realtek,led-data = <0x6d60>; + }; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + realtek,led-data = <0x6d60>; + }; +}; + +&vcc3v3_pcie { + gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts new file mode 100644 index 000000000000..2dad7f7b559e --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2023 AmadeusGhost + */ + +/dts-v1/; + +#include "rk3568-opc-h66k.dtsi" + +/ { + model = "HINLINK OPC-H69K Board"; + compatible = "hinlink,opc-h69k", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac1; + }; + + vcc5v0_ahci: vcc5v0-ahci-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sata_pwr_en>; + regulator-always-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_ahci"; + vin-supply = <&vcc5v0_sys>; + }; +}; + +&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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x4f>; + rx_delay = <0x26>; + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + realtek,led-data = <0x6d60>; + }; +}; + +&pinctrl { + sata { + sata_pwr_en: sata-pwr-en { + rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sata0 { + target-supply = <&vcc5v0_ahci>; +}; + +&vcc3v3_pcie { + gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; +}; diff --git a/devices/rockchip_armv8/patches/01-hinlink.patch b/devices/rockchip_armv8/patches/01-hinlink.patch index 8e4e8e5573bf..e00d2edd1d27 100644 --- a/devices/rockchip_armv8/patches/01-hinlink.patch +++ b/devices/rockchip_armv8/patches/01-hinlink.patch @@ -42,25 +42,24 @@ --- 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 @@ - 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) += \ - 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 \ +@@ -1,6 +1,6 @@ + --- a/arch/arm/dts/Makefile + +++ b/arch/arm/dts/Makefile +-@@ -96,6 +96,19 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ ++@@ -96,6 +96,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ + rk3368-geekbox.dtb \ + rk3368-px5-evb.dtb \ + +@@ -10,6 +10,9 @@ + + + +dtb-$(CONFIG_ROCKCHIP_RK3568) += \ + + rk3568-mrkaio-m68s.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-photonicat.dtb + + + +dtb-$(CONFIG_ROCKCHIP_RK3588) += \ --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -125,25 +124,3 @@ set_interface_core 8 "eth3" ;; esac - ---- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -@@ -16,7 +16,7 @@ - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -90,9 +92,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -90,9 +92,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb -@@ -24,6 +24,9 @@ - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb -++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb -++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb -++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb diff --git a/devices/rockchip_armv8/patches/02-hinlink.revert.patch b/devices/rockchip_armv8/patches/02-hinlink.revert.patch index c8bb78c1c696..ee7bfda8df3c 100644 --- a/devices/rockchip_armv8/patches/02-hinlink.revert.patch +++ b/devices/rockchip_armv8/patches/02-hinlink.revert.patch @@ -1,1179 +1,3 @@ -From e0ab5b6aa808202939dae170f75ed3d532b8ab38 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Wed, 20 Sep 2023 11:07:49 +0800 -Subject: [PATCH] rockchip: remove Hinlink support - -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 ----------------- - .../arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi | 3 - - .../src/arch/arm/dts/rk3568-opc-h68k.dts | 78 --- - .../arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi | 3 - - .../src/arch/arm/dts/rk3568-opc-h69k.dts | 74 --- - .../src/configs/opc-h66k-rk3568_defconfig | 85 --- - .../src/configs/opc-h68k-rk3568_defconfig | 85 --- - .../src/configs/opc-h69k-rk3568_defconfig | 85 --- - .../armv8/base-files/etc/board.d/01_leds | 12 - - .../armv8/base-files/etc/board.d/02_network | 10 +- - .../etc/hotplug.d/net/40-net-smp-affinity | 7 +- - .../boot/dts/rockchip/rk3568-opc-h66k.dts | 17 - - .../boot/dts/rockchip/rk3568-opc-h66k.dtsi | 623 ------------------ - .../boot/dts/rockchip/rk3568-opc-h68k.dts | 80 --- - .../boot/dts/rockchip/rk3568-opc-h69k.dts | 75 --- - target/linux/rockchip/image/armv8.mk | 30 - - .../900-arm64-boot-add-dts-files.patch | 5 +- - 21 files changed, 6 insertions(+), 1952 deletions(-) - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi - delete mode 100644 package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts - delete mode 100644 package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig - delete mode 100644 package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig - delete mode 100644 package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig - delete mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts - delete mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi - delete mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts - delete mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts - -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi -deleted file mode 100644 -index f4769d12bd1..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k-u-boot.dtsi -+++ /dev/null -@@ -1,21 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -- --#include "rk356x-u-boot.dtsi" -- --/ { -- chosen { -- stdout-path = &uart2; -- u-boot,spl-boot-order = "same-as-spl", &sdhci; -- }; --}; -- --&sdhci { -- cap-mmc-highspeed; -- mmc-hs200-1_8v; --}; -- --&uart2 { -- clock-frequency = <24000000>; -- bootph-all; -- status = "okay"; --}; -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts -deleted file mode 100644 -index c86119a23b9..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dts -+++ /dev/null -@@ -1,17 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "Hinlink OPC-H66K"; -- compatible = "hinlink,opc-h66k", "rockchip,rk3568"; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; --}; -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi -deleted file mode 100644 -index c194d51bbf9..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h66k.dtsi -+++ /dev/null -@@ -1,619 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --#include --#include --#include --#include --#include "rk3568.dtsi" -- --/ { -- aliases { -- mmc0 = &sdhci; -- mmc1 = &sdmmc0; -- -- led-boot = &power_led; -- led-failsafe = &power_led; -- led-running = &power_led; -- led-upgrade = &power_led; -- }; -- -- chosen { -- stdout-path = "serial2:1500000n8"; -- }; -- -- hdmi-con { -- compatible = "hdmi-connector"; -- type = "a"; -- -- port { -- hdmi_con_in: endpoint { -- remote-endpoint = <&hdmi_out_con>; -- }; -- }; -- }; -- -- gpio-keys { -- compatible = "gpio-keys"; -- pinctrl-0 = <&reset_button_pin>; -- pinctrl-names = "default"; -- -- reset { -- label = "reset"; -- gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; -- linux,code = ; -- debounce-interval = <50>; -- }; -- }; -- -- gpio-leds { -- compatible = "gpio-leds"; -- pinctrl-names = "default"; -- pinctrl-0 = <&led_lan_pin>, <&led_power_pin>, <&led_wan_pin>; -- -- led-lan { -- label = "amber:lan"; -- gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; -- }; -- -- power_led: led-power { -- label = "green:power"; -- gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; -- }; -- -- led-wan { -- label = "blue:wan"; -- gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; -- }; -- }; -- -- pwm-fan { -- compatible = "pwm-fan"; -- cooling-levels = <0 100 150 200 255>; -- #cooling-cells = <2>; -- pwms = <&pwm0 0 50000 0>; -- }; -- -- vcc12v_dcin: vcc12v-dcin-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <12000000>; -- regulator-max-microvolt = <12000000>; -- regulator-name = "vcc12v_dcin"; -- }; -- -- vcc3v3_sys: vcc3v3-sys-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_sys"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_sys: vcc5v0-sys-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_sys"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_usb: vcc5v0-usb-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_usb"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_usb_host: vcc5v0-usb-host-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; -- pinctrl-names = "default"; -- pinctrl-0 = <&vcc5v0_usb_host_en>; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_usb_host"; -- vin-supply = <&vcc5v0_usb>; -- }; -- -- vcc3v3_pcie: vcc3v3-pcie-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_pcie"; -- startup-delay-us = <5000>; -- vin-supply = <&vcc5v0_sys>; -- }; --}; -- --&combphy0 { -- status = "okay"; --}; -- --&combphy1 { -- status = "okay"; --}; -- --&combphy2 { -- 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"; --}; -- --&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"; -- -- 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 = <712500>; -- regulator-max-microvolt = <1390000>; -- 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 = ; -- assigned-clocks = <&cru I2S1_MCLKOUT_TX>; -- assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; -- #clock-cells = <1>; -- clock-names = "mclk"; -- clocks = <&cru I2S1_MCLKOUT_TX>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; -- rockchip,system-power-controller; -- #sound-dai-cells = <0>; -- wakeup-source; -- -- 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>; -- -- regulators { -- vdd_logic: DCDC_REG1 { -- regulator-always-on; -- regulator-boot-on; -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_logic"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vdd_gpu: DCDC_REG2 { -- regulator-always-on; -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_gpu"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc_ddr: DCDC_REG3 { -- regulator-always-on; -- regulator-boot-on; -- regulator-initial-mode = <0x2>; -- regulator-name = "vcc_ddr"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- }; -- }; -- -- vdd_npu: DCDC_REG4 { -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_npu"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc_1v8: DCDC_REG5 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcc_1v8"; -- -- 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-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <900000>; -- regulator-max-microvolt = <900000>; -- regulator-name = "vdda_0v9"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vdda0v9_pmu: LDO_REG3 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <900000>; -- regulator-max-microvolt = <900000>; -- regulator-name = "vdda0v9_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <900000>; -- }; -- }; -- -- vccio_acodec: LDO_REG4 { -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vccio_acodec"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vccio_sd: LDO_REG5 { -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vccio_sd"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc3v3_pmu: LDO_REG6 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <3300000>; -- }; -- }; -- -- vcca_1v8: LDO_REG7 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca_1v8"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcca1v8_pmu: LDO_REG8 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca1v8_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <1800000>; -- }; -- }; -- -- vcca1v8_image: LDO_REG9 { -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca1v8_image"; -- -- 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-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- }; -- }; --}; -- --&i2c5 { -- status = "okay"; --}; -- --&i2s0_8ch { -- status = "okay"; --}; -- --&pcie2x1 { -- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pcie30phy { -- data-lanes = <1 2>; -- status = "okay"; --}; -- --&pcie3x1 { -- num-lanes = <1>; -- reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pcie3x2 { -- num-lanes = <1>; -- reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pinctrl { -- leds { -- led_lan_pin: led-lan-pin { -- rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- -- led_power_pin: led-power-pin { -- rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- -- led_wan_pin: led-wan-pin { -- rockchip,pins = <3 RK_PA5 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_PA0 RK_FUNC_GPIO &pcfg_pull_up>; -- }; -- }; -- -- usb { -- vcc5v0_usb_host_en: vcc5v0-usb-host-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>; -- 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"; --}; -- --&pwm0 { -- status = "okay"; --}; -- --&saradc { -- vref-supply = <&vcca_1v8>; -- status = "okay"; --}; -- --&sata0 { -- status = "okay"; --}; -- --&sdhci { -- bus-width = <8>; -- cap-mmc-highspeed; -- max-frequency = <200000000>; -- mmc-hs200-1_8v; -- no-sdio; -- no-sd; -- 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-sdr50; -- vmmc-supply = <&vcc3v3_sd>; -- vqmmc-supply = <&vccio_sd>; -- 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_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"; --}; -- --&usb2phy1 { -- status = "okay"; --}; -- --&usb2phy1_host { -- phy-supply = <&vcc5v0_usb_host>; -- status = "okay"; --}; -- --&usb2phy1_otg { -- phy-supply = <&vcc5v0_usb_host>; -- 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"; --}; -- --&vp0 { -- vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { -- reg = ; -- remote-endpoint = <&hdmi_in_vp0>; -- }; --}; -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi -deleted file mode 100644 -index d11f9160d1f..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi -+++ /dev/null -@@ -1,3 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -- --#include "rk3568-opc-h66k-u-boot.dtsi" -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts -deleted file mode 100644 -index 3e6c801e877..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h68k.dts -+++ /dev/null -@@ -1,78 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "Hinlink OPC-H68K"; -- compatible = "hinlink,opc-h68k", "rockchip,rk3568"; -- -- aliases { -- ethernet0 = &gmac0; -- ethernet1 = &gmac1; -- }; --}; -- --&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-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 = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x3c>; -- rx_delay = <0x2f>; -- phy-handle = <&rgmii_phy0>; -- 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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x4f>; -- rx_delay = <0x26>; -- phy-handle = <&rgmii_phy1>; -- status = "okay"; --}; -- --&mdio0 { -- rgmii_phy0: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0x0>; -- }; --}; -- --&mdio1 { -- rgmii_phy1: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0x0>; -- }; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; --}; -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi -deleted file mode 100644 -index d11f9160d1f..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k-u-boot.dtsi -+++ /dev/null -@@ -1,3 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -- --#include "rk3568-opc-h66k-u-boot.dtsi" -diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts -deleted file mode 100644 -index 5e183931599..00000000000 ---- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-opc-h69k.dts -+++ /dev/null -@@ -1,74 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2023 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "HINLINK OPC-H69K Board"; -- compatible = "hinlink,opc-h69k", "rockchip,rk3568"; -- -- aliases { -- ethernet0 = &gmac1; -- }; -- -- vcc5v0_ahci: vcc5v0-ahci-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; -- pinctrl-names = "default"; -- pinctrl-0 = <&sata_pwr_en>; -- regulator-always-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_ahci"; -- vin-supply = <&vcc5v0_sys>; -- }; --}; -- --&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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x4f>; -- rx_delay = <0x26>; -- phy-handle = <&rgmii_phy1>; -- status = "okay"; --}; -- --&mdio1 { -- rgmii_phy1: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0x0>; -- }; --}; -- --&pinctrl { -- sata { -- sata_pwr_en: sata-pwr-en { -- rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- }; --}; -- --&sata0 { -- target-supply = <&vcc5v0_ahci>; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; --}; -diff --git a/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig -deleted file mode 100644 -index c98b528f0e9..00000000000 ---- a/package/boot/uboot-rockchip/src/configs/opc-h66k-rk3568_defconfig -+++ /dev/null -@@ -1,85 +0,0 @@ --CONFIG_ARM=y --CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h66k" --CONFIG_ROCKCHIP_RK3568=y --CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y --CONFIG_SPL_SERIAL=y --CONFIG_SPL_STACK_R_ADDR=0x600000 --CONFIG_TARGET_EVB_RK3568=y --CONFIG_SPL_STACK=0x400000 --CONFIG_DEBUG_UART_BASE=0xFE660000 --CONFIG_DEBUG_UART_CLOCK=24000000 --CONFIG_SYS_LOAD_ADDR=0xc00800 --CONFIG_DEBUG_UART=y --CONFIG_FIT=y --CONFIG_FIT_VERBOSE=y --CONFIG_SPL_LOAD_FIT=y --CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h66k.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_PMIC=y --CONFIG_CMD_REGULATOR=y --# CONFIG_SPL_DOS_PARTITION is not set --CONFIG_SPL_OF_CONTROL=y --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_SPL_DM_WARN=y --CONFIG_SPL_REGMAP=y --CONFIG_SPL_SYSCON=y --CONFIG_SPL_CLK=y --CONFIG_ROCKCHIP_GPIO=y --CONFIG_SYS_I2C_ROCKCHIP=y --CONFIG_MISC=y --CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y --CONFIG_GMAC_ROCKCHIP=y --CONFIG_PHY_ROCKCHIP_INNO_USB2=y --CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y --CONFIG_POWER_DOMAIN=y --CONFIG_DM_PMIC=y --CONFIG_PMIC_RK8XX=y --CONFIG_SPL_DM_REGULATOR_FIXED=y --CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y --CONFIG_USB=y --CONFIG_USB_XHCI_HCD=y --CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y -diff --git a/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig -deleted file mode 100644 -index c2a8435f4bc..00000000000 ---- a/package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig -+++ /dev/null -@@ -1,85 +0,0 @@ --CONFIG_ARM=y --CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h68k" --CONFIG_ROCKCHIP_RK3568=y --CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y --CONFIG_SPL_SERIAL=y --CONFIG_SPL_STACK_R_ADDR=0x600000 --CONFIG_TARGET_EVB_RK3568=y --CONFIG_SPL_STACK=0x400000 --CONFIG_DEBUG_UART_BASE=0xFE660000 --CONFIG_DEBUG_UART_CLOCK=24000000 --CONFIG_SYS_LOAD_ADDR=0xc00800 --CONFIG_DEBUG_UART=y --CONFIG_FIT=y --CONFIG_FIT_VERBOSE=y --CONFIG_SPL_LOAD_FIT=y --CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h68k.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_PMIC=y --CONFIG_CMD_REGULATOR=y --# CONFIG_SPL_DOS_PARTITION is not set --CONFIG_SPL_OF_CONTROL=y --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_SPL_DM_WARN=y --CONFIG_SPL_REGMAP=y --CONFIG_SPL_SYSCON=y --CONFIG_SPL_CLK=y --CONFIG_ROCKCHIP_GPIO=y --CONFIG_SYS_I2C_ROCKCHIP=y --CONFIG_MISC=y --CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y --CONFIG_GMAC_ROCKCHIP=y --CONFIG_PHY_ROCKCHIP_INNO_USB2=y --CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y --CONFIG_POWER_DOMAIN=y --CONFIG_DM_PMIC=y --CONFIG_PMIC_RK8XX=y --CONFIG_SPL_DM_REGULATOR_FIXED=y --CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y --CONFIG_USB=y --CONFIG_USB_XHCI_HCD=y --CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y -diff --git a/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig b/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig -deleted file mode 100644 -index 7045f4dd343..00000000000 ---- a/package/boot/uboot-rockchip/src/configs/opc-h69k-rk3568_defconfig -+++ /dev/null -@@ -1,85 +0,0 @@ --CONFIG_ARM=y --CONFIG_SKIP_LOWLEVEL_INIT=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-opc-h69k" --CONFIG_ROCKCHIP_RK3568=y --CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y --CONFIG_SPL_SERIAL=y --CONFIG_SPL_STACK_R_ADDR=0x600000 --CONFIG_TARGET_EVB_RK3568=y --CONFIG_SPL_STACK=0x400000 --CONFIG_DEBUG_UART_BASE=0xFE660000 --CONFIG_DEBUG_UART_CLOCK=24000000 --CONFIG_SYS_LOAD_ADDR=0xc00800 --CONFIG_DEBUG_UART=y --CONFIG_FIT=y --CONFIG_FIT_VERBOSE=y --CONFIG_SPL_LOAD_FIT=y --CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h69k.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_PMIC=y --CONFIG_CMD_REGULATOR=y --# CONFIG_SPL_DOS_PARTITION is not set --CONFIG_SPL_OF_CONTROL=y --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_SPL_DM_WARN=y --CONFIG_SPL_REGMAP=y --CONFIG_SPL_SYSCON=y --CONFIG_SPL_CLK=y --CONFIG_ROCKCHIP_GPIO=y --CONFIG_SYS_I2C_ROCKCHIP=y --CONFIG_MISC=y --CONFIG_SUPPORT_EMMC_RPMB=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_ETH_DESIGNWARE=y --CONFIG_GMAC_ROCKCHIP=y --CONFIG_PHY_ROCKCHIP_INNO_USB2=y --CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y --CONFIG_POWER_DOMAIN=y --CONFIG_DM_PMIC=y --CONFIG_PMIC_RK8XX=y --CONFIG_SPL_DM_REGULATOR_FIXED=y --CONFIG_REGULATOR_RK8XX=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_SYSRESET_PSCI=y --CONFIG_USB=y --CONFIG_USB_XHCI_HCD=y --CONFIG_USB_XHCI_DWC3=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_ERRNO_STR=y diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index 0a631349591..6b6109bb928 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -1197,825 +21,6 @@ index 0a631349591..6b6109bb928 100644 esac board_config_flush -diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts -deleted file mode 100644 -index c86119a23b9..00000000000 ---- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts -+++ /dev/null -@@ -1,17 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "Hinlink OPC-H66K"; -- compatible = "hinlink,opc-h66k", "rockchip,rk3568"; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; --}; -diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi -deleted file mode 100644 -index 4e4d76b71e4..00000000000 ---- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dtsi -+++ /dev/null -@@ -1,623 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --#include --#include --#include --#include --#include "rk3568.dtsi" -- --/ { -- aliases { -- mmc0 = &sdhci; -- mmc1 = &sdmmc0; -- -- led-boot = &power_led; -- led-failsafe = &power_led; -- led-running = &power_led; -- led-upgrade = &power_led; -- }; -- -- chosen { -- stdout-path = "serial2:1500000n8"; -- }; -- -- hdmi-con { -- compatible = "hdmi-connector"; -- type = "a"; -- -- port { -- hdmi_con_in: endpoint { -- remote-endpoint = <&hdmi_out_con>; -- }; -- }; -- }; -- -- gpio-keys { -- compatible = "gpio-keys"; -- pinctrl-0 = <&reset_button_pin>; -- pinctrl-names = "default"; -- -- reset { -- label = "reset"; -- gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; -- linux,code = ; -- debounce-interval = <50>; -- }; -- }; -- -- gpio-leds { -- compatible = "gpio-leds"; -- pinctrl-names = "default"; -- pinctrl-0 = <&led_lan_pin>, <&led_power_pin>, <&led_wan_pin>; -- -- led-lan { -- label = "amber:lan"; -- gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; -- }; -- -- power_led: led-power { -- label = "green:power"; -- gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; -- }; -- -- led-wan { -- label = "blue:wan"; -- gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; -- }; -- }; -- -- pwm-fan { -- compatible = "pwm-fan"; -- cooling-levels = <0 100 150 200 255>; -- #cooling-cells = <2>; -- pwms = <&pwm0 0 50000 0>; -- }; -- -- vcc12v_dcin: vcc12v-dcin-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <12000000>; -- regulator-max-microvolt = <12000000>; -- regulator-name = "vcc12v_dcin"; -- }; -- -- vcc3v3_sys: vcc3v3-sys-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_sys"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_sys: vcc5v0-sys-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_sys"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_usb: vcc5v0-usb-regulator { -- compatible = "regulator-fixed"; -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_usb"; -- vin-supply = <&vcc12v_dcin>; -- }; -- -- vcc5v0_usb_host: vcc5v0-usb-host-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; -- pinctrl-names = "default"; -- pinctrl-0 = <&vcc5v0_usb_host_en>; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_usb_host"; -- vin-supply = <&vcc5v0_usb>; -- }; -- -- vcc3v3_pcie: vcc3v3-pcie-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_pcie"; -- startup-delay-us = <5000>; -- vin-supply = <&vcc5v0_sys>; -- }; --}; -- --&combphy0 { -- status = "okay"; --}; -- --&combphy1 { -- status = "okay"; --}; -- --&combphy2 { -- 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"; --}; -- --&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"; -- -- 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 = <712500>; -- regulator-max-microvolt = <1390000>; -- 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 = ; -- assigned-clocks = <&cru I2S1_MCLKOUT_TX>; -- assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; -- #clock-cells = <1>; -- clock-names = "mclk"; -- clocks = <&cru I2S1_MCLKOUT_TX>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; -- rockchip,system-power-controller; -- #sound-dai-cells = <0>; -- wakeup-source; -- -- 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>; -- -- regulators { -- vdd_logic: DCDC_REG1 { -- regulator-always-on; -- regulator-boot-on; -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_logic"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vdd_gpu: DCDC_REG2 { -- regulator-always-on; -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_gpu"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc_ddr: DCDC_REG3 { -- regulator-always-on; -- regulator-boot-on; -- regulator-initial-mode = <0x2>; -- regulator-name = "vcc_ddr"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- }; -- }; -- -- vdd_npu: DCDC_REG4 { -- regulator-init-microvolt = <900000>; -- regulator-initial-mode = <0x2>; -- regulator-min-microvolt = <500000>; -- regulator-max-microvolt = <1350000>; -- regulator-name = "vdd_npu"; -- regulator-ramp-delay = <6001>; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc_1v8: DCDC_REG5 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcc_1v8"; -- -- 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-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <900000>; -- regulator-max-microvolt = <900000>; -- regulator-name = "vdda_0v9"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vdda0v9_pmu: LDO_REG3 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <900000>; -- regulator-max-microvolt = <900000>; -- regulator-name = "vdda0v9_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <900000>; -- }; -- }; -- -- vccio_acodec: LDO_REG4 { -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vccio_acodec"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vccio_sd: LDO_REG5 { -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vccio_sd"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcc3v3_pmu: LDO_REG6 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc3v3_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <3300000>; -- }; -- }; -- -- vcca_1v8: LDO_REG7 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca_1v8"; -- -- regulator-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- -- vcca1v8_pmu: LDO_REG8 { -- regulator-always-on; -- regulator-boot-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca1v8_pmu"; -- -- regulator-state-mem { -- regulator-on-in-suspend; -- regulator-suspend-microvolt = <1800000>; -- }; -- }; -- -- vcca1v8_image: LDO_REG9 { -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <1800000>; -- regulator-name = "vcca1v8_image"; -- -- 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-state-mem { -- regulator-off-in-suspend; -- }; -- }; -- }; -- }; --}; -- --&i2c5 { -- status = "okay"; --}; -- --&i2s0_8ch { -- status = "okay"; --}; -- --&pcie2x1 { -- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pcie30phy { -- data-lanes = <1 2>; -- status = "okay"; --}; -- --&pcie3x1 { -- num-lanes = <1>; -- reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pcie3x2 { -- num-lanes = <1>; -- reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; -- vpcie3v3-supply = <&vcc3v3_pcie>; -- status = "okay"; --}; -- --&pinctrl { -- leds { -- led_lan_pin: led-lan-pin { -- rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- -- led_power_pin: led-power-pin { -- rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- -- led_wan_pin: led-wan-pin { -- rockchip,pins = <3 RK_PA5 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_PA0 RK_FUNC_GPIO &pcfg_pull_up>; -- }; -- }; -- -- usb { -- vcc5v0_usb_host_en: vcc5v0-usb-host-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>; -- 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"; --}; -- --&pwm0 { -- status = "okay"; --}; -- --&rng { -- status = "okay"; --}; -- --&saradc { -- vref-supply = <&vcca_1v8>; -- status = "okay"; --}; -- --&sata0 { -- status = "okay"; --}; -- --&sdhci { -- bus-width = <8>; -- cap-mmc-highspeed; -- max-frequency = <200000000>; -- mmc-hs200-1_8v; -- no-sdio; -- no-sd; -- 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-sdr50; -- vmmc-supply = <&vcc3v3_sd>; -- vqmmc-supply = <&vccio_sd>; -- 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_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"; --}; -- --&usb2phy1 { -- status = "okay"; --}; -- --&usb2phy1_host { -- phy-supply = <&vcc5v0_usb_host>; -- status = "okay"; --}; -- --&usb2phy1_otg { -- phy-supply = <&vcc5v0_usb_host>; -- 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"; --}; -- --&vp0 { -- vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { -- reg = ; -- remote-endpoint = <&hdmi_in_vp0>; -- }; --}; -diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts -deleted file mode 100644 -index 648fe1f4bf0..00000000000 ---- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts -+++ /dev/null -@@ -1,80 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2022 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "Hinlink OPC-H68K"; -- compatible = "hinlink,opc-h68k", "rockchip,rk3568"; -- -- aliases { -- ethernet0 = &gmac0; -- ethernet1 = &gmac1; -- }; --}; -- --&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-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 = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x3c>; -- rx_delay = <0x2f>; -- phy-handle = <&rgmii_phy0>; -- 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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x4f>; -- rx_delay = <0x26>; -- phy-handle = <&rgmii_phy1>; -- status = "okay"; --}; -- --&mdio0 { -- rgmii_phy0: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0>; -- realtek,led-data = <0x6d60>; -- }; --}; -- --&mdio1 { -- rgmii_phy1: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0>; -- realtek,led-data = <0x6d60>; -- }; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; --}; -diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts -deleted file mode 100644 -index 2dad7f7b559..00000000000 ---- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts -+++ /dev/null -@@ -1,75 +0,0 @@ --// SPDX-License-Identifier: GPL-2.0-or-later OR MIT --/* -- * Copyright (c) 2023 AmadeusGhost -- */ -- --/dts-v1/; -- --#include "rk3568-opc-h66k.dtsi" -- --/ { -- model = "HINLINK OPC-H69K Board"; -- compatible = "hinlink,opc-h69k", "rockchip,rk3568"; -- -- aliases { -- ethernet0 = &gmac1; -- }; -- -- vcc5v0_ahci: vcc5v0-ahci-regulator { -- compatible = "regulator-fixed"; -- enable-active-high; -- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; -- pinctrl-names = "default"; -- pinctrl-0 = <&sata_pwr_en>; -- regulator-always-on; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-name = "vcc5v0_ahci"; -- vin-supply = <&vcc5v0_sys>; -- }; --}; -- --&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-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 = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; -- snps,reset-active-low; -- snps,reset-delays-us = <0 20000 100000>; -- tx_delay = <0x4f>; -- rx_delay = <0x26>; -- phy-handle = <&rgmii_phy1>; -- status = "okay"; --}; -- --&mdio1 { -- rgmii_phy1: ethernet-phy@0 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <0>; -- realtek,led-data = <0x6d60>; -- }; --}; -- --&pinctrl { -- sata { -- sata_pwr_en: sata-pwr-en { -- rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; -- }; -- }; --}; -- --&sata0 { -- target-supply = <&vcc5v0_ahci>; --}; -- --&vcc3v3_pcie { -- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; --}; diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index a54dd3beef0..f7f9a6d136f 100644 --- a/target/linux/rockchip/image/armv8.mk 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..e5a31231cd6f 100644 --- a/devices/rockchip_armv8/patches/33-rk3568.patch +++ b/devices/rockchip_armv8/patches/33-rk3568.patch @@ -1,28 +1,30 @@ -diff --git a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -index 231bca2b544..0c4b2c55d9a 100644 --- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch +++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -@@ -19,7 +19,7 @@ +@@ -16,7 +16,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -90,9 +92,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -90,9 +92,19 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp +-@@ -90,19 +92,24 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp ++@@ -90,19 +92,33 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb -@@ -32,6 +32,11 @@ - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb +@@ -25,6 +25,15 @@ + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-seewo-sv21.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-t68m.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-panther-x2.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp-v3.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s-plus.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb - @@ -103,6 +107,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ev --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -184,24 +186,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/44-m68s-plus.patch b/devices/rockchip_armv8/patches/44-m68s-plus.patch index 0c5a38bb98e9..a3a0d71c8d32 100644 --- a/devices/rockchip_armv8/patches/44-m68s-plus.patch +++ b/devices/rockchip_armv8/patches/44-m68s-plus.patch @@ -13,19 +13,19 @@ --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -@@ -8,7 +8,7 @@ rockchip_setup_interfaces() - +@@ -9,7 +9,7 @@ rockchip_setup_interfaces() case "$board" in ariaboard,photonicat|\ + armsom,sige7|\ - ezpro,mrkaio-m68s|\ + ezpro,mrkaio-m68s*|\ firefly,rk3568-roc-pc|\ friendlyarm,nanopi-r2c|\ friendlyarm,nanopi-r2c-plus|\ -@@ -54,7 +54,7 @@ rockchip_setup_macs() - local label_mac="" +@@ -59,7 +59,7 @@ rockchip_setup_macs() case "$board" in + armsom,sige7|\ - ezpro,mrkaio-m68s|\ + ezpro,mrkaio-m68s*|\ friendlyarm,nanopc-t6|\ @@ -51,20 +51,3 @@ define Device/firefly_roc-rk3328-cc DEVICE_VENDOR := Firefly DEVICE_MODEL := ROC-RK3328-CC - ---- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch -@@ -19,11 +19,12 @@ - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -90,9 +92,19 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -90,9 +92,20 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb -++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s-plus.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb diff --git a/devices/rockchip_armv8/patches/55-xgp.patch b/devices/rockchip_armv8/patches/55-xgp.patch.b similarity index 100% rename from devices/rockchip_armv8/patches/55-xgp.patch rename to devices/rockchip_armv8/patches/55-xgp.patch.b diff --git a/devices/rockchip_armv8/patches/add_extra_CPU_FLAGS.patch b/devices/rockchip_armv8/patches/add_extra_CPU_FLAGS.b similarity index 100% rename from devices/rockchip_armv8/patches/add_extra_CPU_FLAGS.patch rename to devices/rockchip_armv8/patches/add_extra_CPU_FLAGS.b diff --git a/devices/rockchip_armv8/patches/pico3399.patch.b b/devices/rockchip_armv8/patches/pico3399.patch.b deleted file mode 100644 index cc3c1647d7d8..000000000000 --- a/devices/rockchip_armv8/patches/pico3399.patch.b +++ /dev/null @@ -1,108 +0,0 @@ -From f847e36bfe9d24f6bd86dc52ebf17f0025118cd6 Mon Sep 17 00:00:00 2001 -From: icevel -Date: Wed, 1 Feb 2023 17:20:59 +0800 -Subject: [PATCH] add support - ---- - package/boot/uboot-rockchip/Makefile | 12 + - ...99-Add-support-for-rockchip-pico3399.patch | 749 ++++++++++++++++++ - .../armv8/base-files/etc/board.d/02_network | 1 + - .../boot/dts/rockchip/rk3399-pico3399.dts | 668 ++++++++++++++++ - target/linux/rockchip/image/armv8.mk | 10 + - ...99-add-support-for-rockchip-pico3399.patch | 11 + - 7 files changed, 1462 insertions(+) - create mode 100644 package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch - create mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts - create mode 100644 target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch - -diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile -index 69ce25dae..283f4821b 100644 ---- a/package/boot/uboot-rockchip/Makefile -+++ b/package/boot/uboot-rockchip/Makefile -@@ -72,6 +72,17 @@ endef - - # RK3399 boards - -+define U-Boot/rockchip-pico3399-rk3399 -+ BUILD_SUBTARGET:=armv8 -+ NAME:=rockchip pico3399 -+ BUILD_DEVICES:= \ -+ rockchip_pico3399 -+ DEPENDS:=+PACKAGE_u-boot-rockchip-pico3399-rk3399:arm-trusted-firmware-rk3399 -+ PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor -+ ATF:=rk3399_bl31_v1.35.elf -+ USE_RKBIN:=1 -+endef -+ - define U-Boot/guangmiao-g4c-rk3399 - BUILD_SUBTARGET:=armv8 - NAME:=GuangMiao G4C -@@ -308,6 +319,7 @@ UBOOT_TARGETS := \ - r66s-rk3568 \ - station-p2-rk3568 \ - panther-x2-rk3566 \ -+ rockchip-pico3399-rk3399 \ - sharevdi-h3399pc-rk3399 \ - guangmiao-g4c-rk3399 \ - nanopi-r4s-rk3399 \ -diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -index 8bdefcbb6..5c0aa413a 100755 ---- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -@@ -39,6 +39,11 @@ rockchip_setup_interfaces() - friendlyarm,nanopi-r5s) - ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" - ;; -+ ockchip,pico3399) -+ ucidef_set_interfaces_lan_wan 'eth0' 'eth1' -+ ucidef_add_switch "switch0" \ -+ "0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" -+ ;; - *) - ucidef_set_interface_lan 'eth0' - ;; -@@ -88,6 +93,7 @@ rockchip_setup_macs() - hinlink,opc-h68k|\ - hinlink,opc-h69k|\ - rocktech,mpc1903|\ -+ rockchip,pico3399|\ - sharevdi,h3399pc) - wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0) - lan_mac=$(macaddr_add "$wan_mac" +1) -diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk -index f15f8f26b..19d1eba72 100644 ---- a/target/linux/rockchip/image/armv8.mk -+++ b/target/linux/rockchip/image/armv8.mk -@@ -192,6 +192,16 @@ define Device/rocktech_mpc1903 - endef - TARGET_DEVICES += rocktech_mpc1903 - -+define Device/rockchip_pico3399 -+ DEVICE_VENDOR := rockchip -+ DEVICE_MODEL := pico3399 -+ 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 -+endef -+TARGET_DEVICES += rockchip_pico3399 -+ - define Device/sharevdi_guangmiao-g4c - DEVICE_VENDOR := SHAREVDI - DEVICE_MODEL := GuangMiao G4C -diff --git a/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch b/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch -new file mode 100644 -index 000000000..ddfa7f575 ---- /dev/null -+++ b/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch -@@ -0,0 +1,8 @@ -+--- a/arch/arm64/boot/dts/rockchip/Makefile -++++ b/arch/arm64/boot/dts/rockchip/Makefile -+@@ -58,6 +58,7 @@ -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb -++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pico3399.dtb -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mpc1903.dtb -+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-h3399pc.dtb 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..0265056090cd 100644 --- a/devices/x86_64/diy.sh +++ b/devices/x86_64/diy.sh @@ -6,9 +6,11 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-5.15 -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -o target/linux/x86/base-files/etc/board.d/02_network +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -P target/linux/x86/base-files/etc/board.d/ -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/64/config-5.15 -o target/linux/x86/64/config-5.15 +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/64/config-5.15 -P target/linux/x86/64/ + +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 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..783f092db117 100644 --- a/devices/x86_generic/diy.sh +++ b/devices/x86_generic/diy.sh @@ -6,10 +6,12 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-5.15 -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -o target/linux/x86/base-files/etc/board.d/02_network +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -P target/linux/x86/base-files/etc/board.d/ 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