kiddin9 há 2 anos atrás
pai
commit
6283297d30
57 ficheiros alterados com 1544 adições e 3108 exclusões
  1. 11 25
      .github/workflows/Openwrt-AutoBuild.yml
  2. 1 1
      devices/armsr_armv8/patches/rootfs.patch
  3. 2 0
      devices/bcm53xx/diy.sh
  4. 2 0
      devices/common/.config
  5. 1 3
      devices/common/diy.sh
  6. 0 4
      devices/ipq40xx_generic/diy.sh
  7. 45 0
      devices/ipq40xx_generic/patches/ACRH17.patch
  8. 10 0
      devices/ipq60xx_generic.x/.config
  9. 19 0
      devices/ipq60xx_generic.x/diy.sh
  10. 44 0
      devices/ipq60xx_generic.x/patches/fix.patch
  11. 58 0
      devices/ipq60xx_generic/.config
  12. 1 0
      devices/ipq60xx_generic/README.md
  13. 42 3
      devices/ipq60xx_generic/diy.sh
  14. 2 0
      devices/ipq60xx_generic/diy/include/kernel-4.4
  15. BIN
      devices/ipq60xx_generic/diy/package/firmware/ath11k-firmware/files/board-2.bin.IPQ6018
  16. 11 0
      devices/ipq60xx_generic/diy/package/system/fstools/patches/fix.patch
  17. 117 0
      devices/ipq60xx_generic/patches/fix.patch
  18. 3 0
      devices/ipq806x_generic/.config
  19. 24 4
      devices/ipq806x_generic/diy.sh
  20. 1095 0
      devices/ipq806x_generic/patches/xiaomi_r3d.patch
  21. 0 6
      devices/ipq807x_generic/diy.sh
  22. 6 6
      devices/ipq807x_generic/patches/01-zte_mf269.bin.patch
  23. 0 65
      devices/ipq807x_ipq60xx/.config
  24. 0 46
      devices/ipq807x_ipq60xx/diy.sh
  25. 0 7
      devices/ipq807x_ipq60xx/feeds.conf
  26. 0 28
      devices/ipq807x_ipq60xx/patches/0999-depends.patch
  27. 0 108
      devices/ipq807x_ipq60xx/patches/base-files.patch
  28. 0 41
      devices/ipq807x_ipq60xx/patches/fix.patch
  29. 0 26
      devices/ipq807x_ipq60xx/patches/iptables-mod-socket.patch
  30. 0 8
      devices/ipq807x_ipq60xx/patches/kernel-defaults.patch
  31. 0 32
      devices/ipq807x_ipq60xx/patches/targets.patch
  32. 1 1
      devices/mediatek_filogic/patches/ax6000.patch
  33. 1 0
      devices/mediatek_mt7981/README.md
  34. 3 1
      devices/mediatek_mt7981/diy.sh
  35. 2 3
      devices/meson_meson8b/diy.sh
  36. 9 0
      devices/qualcommax_ipq60xx/.config
  37. 1 0
      devices/qualcommax_ipq60xx/README.md
  38. 15 0
      devices/qualcommax_ipq60xx/diy.sh
  39. 4 0
      devices/qualcommax_ipq60xx/feeds.conf
  40. 2 0
      devices/qualcommax_ipq60xx/settings.ini
  41. 0 3
      devices/rockchip_armv8/.config
  42. 6 7
      devices/rockchip_armv8/diy.sh
  43. 1 1
      devices/rockchip_armv8/patches/r6s.patch.b
  44. 4 0
      devices/rockchip_rk3588_armv8/diy.sh
  45. 0 170
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera1.dtsi
  46. 0 182
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera2.dtsi
  47. 0 179
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera3.dtsi
  48. 0 101
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-lcd.dtsi
  49. 0 25
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dts
  50. 0 454
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-spi.dts
  51. 0 454
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
  52. 0 381
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
  53. 0 615
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi.dtsi
  54. 0 14
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/02-arm64-dts-rockchip-ad-orange-pi-5.patch
  55. 0 34
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/03-fix.patch
  56. 0 69
      devices/rockchip_rk3588_armv8/patches/orangepi-5.patch
  57. 1 1
      devices/rockchip_rk3588_armv8/settings.ini

+ 11 - 25
.github/workflows/Openwrt-AutoBuild.yml

@@ -69,7 +69,7 @@ jobs:
         elif [ ${{matrix.target}} == "x86_generic" ]; then
             echo "ARCH=linux/amd32" >> $GITHUB_ENV
             echo "MTARGET=x86_generic" >> $GITHUB_ENV
-        elif [[ ${{matrix.target}} =~ (armvirt_64|ipq807x_generic|mediatek_mt7622|mediatek_mt7981|mediatek_gl_mt7981|mediatek_filogic|bcm27xx_bcm2710|ipq60xx_generic|ipq807x_ipq60xx|bcm4908_generic|sunxi_cortexa53) ]]; then
+        elif [[ ${{matrix.target}} =~ (armvirt_64|ipq807x_generic|mediatek_mt7622|mediatek_mt7981|mediatek_filogic|bcm27xx_bcm2710|ipq60xx_generic|ipq60xx_ipq60xx_64|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
@@ -117,7 +117,9 @@ jobs:
       run: |
         sudo -E apt-get -qq update
         sudo -E apt-get -qq install build-essential clang 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
+        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
         sudo -E apt-get -qq purge azure-cli ghc* zulu* llvm* 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
@@ -136,19 +138,7 @@ jobs:
 
     - name: Clone source code
       run: |
-        if [ "${{matrix.target}}" == "ipq807x_ipq60xx" ]; then
-            git clone https://github.com/gl-inet/gl-infra-builder.git
-            cd gl-infra-builder
-            python3 setup.py -c configs/config-wlan-ap.yml
-            ln -sf gl-infra-builder/wlan-ap/openwrt ../openwrt
-            cd -
-        elif [ "${{matrix.target}}" == "mediatek_gl_mt7981" ]; then
-            git clone https://github.com/gl-inet/gl-infra-builder.git
-            cd gl-infra-builder
-            python3 setup.py -c configs/config-mt798x-7.6.6.1.yml
-            ln -sf gl-infra-builder/mt7981 ../openwrt
-            cd -
-        elif [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then
+        if [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then
           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)"
@@ -177,21 +167,17 @@ jobs:
         cd openwrt
         chmod +x devices/common/$DIY_SH
         /bin/bash "devices/common/$DIY_SH"
+        cp -f devices/common/$CONFIG_FILE .config
+        if [ -f "devices/${{matrix.target}}/$CONFIG_FILE" ]; then
+          echo >> .config
+          cat devices/${{matrix.target}}/$CONFIG_FILE >> .config
+        fi
         if [ -f "devices/${{matrix.target}}/$DIY_SH" ]; then
           chmod +x devices/${{matrix.target}}/$DIY_SH
           echo "/bin/bash devices/${{matrix.target}}/$DIY_SH"
           /bin/bash "devices/${{matrix.target}}/$DIY_SH"
         fi
         cp -Rf ./diy/* ./ || true
-        if [ -f "devices/${{matrix.target}}/default-settings" ]; then
-          echo >> package/*/*/my-default-settings/files/etc/uci-defaults/99-default-settings
-          cat devices/${{matrix.target}}/default-settings >> package/*/*/my-default-settings/files/etc/uci-defaults/99-default-settings
-        fi
-        cp -f devices/common/$CONFIG_FILE .config
-        if [ -f "devices/${{matrix.target}}/$CONFIG_FILE" ]; then
-          echo >> .config
-          cat devices/${{matrix.target}}/$CONFIG_FILE >> .config
-        fi
 
     - name: Apply patches
       run: |
@@ -219,7 +205,7 @@ jobs:
       run: |
         cd openwrt
         make defconfig
-        if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|meson_meson8b|rockchip_*|sunxi_*|x86_*) ]]; then
+        if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*) ]]; then
         sed -n '/# Wireless Drivers/,/# end of Wireless Drivers/p' .config | sed -e 's/=m/=n/' >>.config
         make defconfig
         fi

+ 1 - 1
devices/armsr_armv8/patches/rootfs.patch

@@ -42,7 +42,7 @@
  
 +define Device/box
 +  DEVICE_TITLE := 电视盒子全系列 / N1
-+  DEVICE_PACKAGES := perlbase-base perlbase-utf8 perlbase-time perlbase-xsloader perlbase-file btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-mbedtls iw fdisk lsblk -luci-app-attendedsysupgrade -luci-app-gpsysupgrade
++  DEVICE_PACKAGES := perlbase-base perlbase-utf8 perlbase-time perlbase-xsloader perlbase-file btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-mbedtls iw fdisk lsblk automount -luci-app-attendedsysupgrade -luci-app-gpsysupgrade
 +endef
 +TARGET_DEVICES += box
 +

+ 2 - 0
devices/bcm53xx/diy.sh

@@ -4,6 +4,8 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
+sh -c curl -sfL https://patch-diff.githubusercontent.com/raw/openwrt/openwrt/pull/11542.patch | git apply -p1
+
 sed -i "s/^TARGET_DEVICES /# TARGET_DEVICES /" target/linux/bcm53xx/image/Makefile
 sed -i "s/# TARGET_DEVICES += phicomm_k3/TARGET_DEVICES += phicomm_k3/" target/linux/bcm53xx/image/Makefile
 sed -i "s/# TARGET_DEVICES += asus_rt-ac88u/TARGET_DEVICES += asus_rt-ac88u/" target/linux/bcm53xx/image/Makefile

+ 2 - 0
devices/common/.config

@@ -20,6 +20,8 @@ CONFIG_JSON_OVERVIEW_IMAGE_INFO=y
 
 CONFIG_FEED_telephony=n
 
+CONFIG_KERNEL_WERROR=n
+
 # IPv6支持:
 CONFIG_IPV6=y
 

+ 1 - 3
devices/common/diy.sh

@@ -2,10 +2,8 @@
 #=================================================
 shopt -s extglob
 
-[ ! -f feeds.conf ] && {
 sed -i '$a src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master' feeds.conf.default
 sed -i "/telephony/d" feeds.conf.default
-}
 
 sed -i "s?targets/%S/packages?targets/%S/\$(LINUX_VERSION)?" include/feeds.mk
 
@@ -43,7 +41,7 @@ sed -i "s/192.168.1/10.0.0/" package/base-files/files/bin/config_generate
 svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/hack-5.15 target/linux/generic/hack-5.15
 svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/backport-5.15 target/linux/generic/backport-5.15
 find target/linux/generic/backport-5.15 -name "[0-9][0-9][0-9]-[a-z][a-z]*" -exec rm -f {} \;
-rm -rf target/linux/generic/backport-5.15/{799-v6.0-net-mii*,802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*}
+rm -rf target/linux/generic/backport-5.15/{799-v6.0-net-mii*,802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*,890-v6.1-mtd-spinand-winbond*,891-v6.1-mtd-spinand-winbond*}
 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
 sed -i "s/CONFIG_WERROR=y/CONFIG_WERROR=n/" target/linux/generic/config-5.15
 ) &

+ 0 - 4
devices/ipq40xx_generic/diy.sh

@@ -4,10 +4,6 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-
-
-svn export --force https://github.com/openwrt/openwrt/trunk/package/firmware/ipq-wifi package/firmware/ipq-wifi
-
 #sh -c "curl -sfL https://patch-diff.githubusercontent.com/raw/openwrt/openwrt/pull/10778.patch | git apply -p1"
 
 

+ 45 - 0
devices/ipq40xx_generic/patches/ACRH17.patch

@@ -0,0 +1,45 @@
+--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
++++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
+@@ -225,38 +225,13 @@
+ 			#size-cells = <1>;
+ 
+ 			partition@0 {
+-				label = "SBL1";
+-				reg = <0x00000000 0x00080000>;
+-				read-only;
+-			};
+-			partition@80000 {
+-				label = "MIBIB";
+-				reg = <0x00080000 0x00080000>;
+-				read-only;
+-			};
+-			partition@100000 {
+-				label = "QSEE";
+-				reg = <0x00100000 0x00100000>;
+-				read-only;
+-			};
+-			partition@200000 {
+-				label = "CDT";
+-				reg = <0x00200000 0x00080000>;
+-				read-only;
+-			};
+-			partition@280000 {
+-				label = "APPSBL";
+-				reg = <0x00280000 0x00140000>;
+-				read-only;
+-			};
+-			partition@3C0000 {
+-				label = "APPSBLENV";
+-				reg = <0x003C0000 0x00040000>;
++				label = "Bootloader";
++				reg = <0x000000000000 0x000000400000>;
+ 				read-only;
+ 			};
+ 			partition@400000 {
+-				label = "ubi";
+-				reg = <0x00400000 0x07C00000>;
++				label = "UBI_DEV";
++				reg = <0x000000400000 0x000007C00000>;
+ 			};
+ 		};
+ 	};

+ 10 - 0
devices/ipq60xx_generic.x/.config

@@ -0,0 +1,10 @@
+
+CONFIG_TARGET_ipq60xx=y
+CONFIG_TARGET_ipq60xx_generic=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_ALL_PROFILES=y
+CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_360_v6=n
+
+CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
+
+

+ 19 - 0
devices/ipq60xx_generic.x/diy.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+shopt -s extglob
+
+svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/ipq60xx target/linux/ipq60xx
+rm -rf target/linux/ipq60xx/patches-5.15/{0133-clk-ipq-support-for-resetting-multiple-bits.patch,0168-clk-qcom-ipq6018-fix-networking-resets.patch}
+make defconfig
+
+svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/qca
+
+sed -i "s/+kmod-pppoe/+kmod-pppoe +kmod-bonding/" package/qca/nss/qca-nss-clients-64/Makefile
+
+rm -rf package/kernel/{qca-nss-dp,qca-ssdk}
+
+sed -i "s/CONFIG_ALL_NONSHARED=y/CONFIG_ALL_NONSHARED=n/" .config
+sed -i "s/CONFIG_ALL_KMODS=y/CONFIG_ALL_KMODS=n/" .config
+make defconfig
+sed -i "s/# CONFIG_ALL_NONSHARED is not set/CONFIG_ALL_NONSHARED=y/" .config
+
+

+ 44 - 0
devices/ipq60xx_generic.x/patches/fix.patch

@@ -0,0 +1,44 @@
+--- a/package/qca/nss/qca-nss-clients-64/Makefile
++++ b/package/qca/nss/qca-nss-clients-64/Makefile
+@@ -17,7 +17,7 @@ define KernelPackage/qca-nss-drv-pppoe-64
+   CATEGORY:=Kernel modules
+   SUBMENU:=Network Devices
+   TITLE:=Kernel driver for NSS (connection manager) - PPPoE
+-  DEPENDS:=@(TARGET_ipq60xx||TARGET_ipq807x) +kmod-qca-nss-drv-64 +kmod-ppp +kmod-pppoe
++  DEPENDS:=@(TARGET_ipq60xx||TARGET_ipq807x) +kmod-qca-nss-drv-64 +kmod-ppp +kmod-pppoe +kmod-bonding
+   FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko
+   AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe)
+ endef
+@@ -45,7 +45,7 @@ define KernelPackage/qca-nss-drv-vlan-mgr-64
+   CATEGORY:=Kernel modules
+   SUBMENU:=Network Devices
+   TITLE:=Kernel driver for NSS vlan manager
+-  DEPENDS:=@(LINUX_5_10||LINUX_5_15) @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-qca-nss-drv-64
++  DEPENDS:=@(LINUX_5_10||LINUX_5_15) @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-qca-nss-drv-64 +kmod-bonding
+   FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko
+   AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan)
+ endef
+
+--- a/package/kernel/mac80211/ath.mk
++++ b/package/kernel/mac80211/ath.mk
+@@ -325,7 +325,7 @@ define KernelPackage/ath11k-ahb
+   $(call KernelPackage/mac80211/Default)
+   TITLE:=Qualcomm 802.11ax AHB wireless chipset support
+   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+-  DEPENDS+= @TARGET_ipq807x +kmod-ath11k +kmod-qrtr-smd
++  DEPENDS+= @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-ath11k +kmod-qrtr-smd
+   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko
+   AUTOLOAD:=$(call AutoProbe,ath11k_ahb)
+ endef
+
+--- a/package/kernel/linux/modules/netsupport.mk
++++ b/package/kernel/linux/modules/netsupport.mk
+@@ -1536,7 +1536,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_ipq60xx||TARGET_ipq807x)
+   KCONFIG:=CONFIG_QRTR_SMD
+   FILES:= $(LINUX_DIR)/net/qrtr/qrtr-smd.ko
+   AUTOLOAD:=$(call AutoProbe,qrtr-smd)

+ 58 - 0
devices/ipq60xx_generic/.config

@@ -3,6 +3,64 @@ CONFIG_TARGET_ipq60xx=y
 CONFIG_TARGET_ipq60xx_generic=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
+CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-ax1800=n
+CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-axt1800=n
+
+CONFIG_TARGET_ROOTFS_INITRAMFS=n
+
+CONFIG_PACKAGE_perf=n
+
+CONFIG_GCC_USE_VERSION_7=y
+CONFIG_PACKAGE_kmod-dm-raid=n
+CONFIG_PACKAGE_kmod-dm=n
+CONFIG_PACKAGE_kmod-fs-xfs=n
+CONFIG_PACKAGE_kmod-fs-btrfs=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr=n
+CONFIG_PACKAGE_kmod-drm-ttm=n
+CONFIG_PACKAGE_kmod-drm-kms-helper=n
+CONFIG_PACKAGE_kmod-gigaset=n
+CONFIG_PACKAGE_kmod-isdn4linux=n
+CONFIG_PACKAGE_kmod-video-pwc=n
+CONFIG_PACKAGE_kmod-mmc-spi=n
+CONFIG_PACKAGE_kmod-scsi-cdrom=n
+CONFIG_PACKAGE_kmod-scsi-generic=n
+CONFIG_PACKAGE_kmod-scsi-tape=n
+CONFIG_PACKAGE_kmod-sound-core=n
+CONFIG_PACKAGE_kmod-iio-hmc5843=n
+CONFIG_PACKAGE_kmod-ledtrig-netdev=n
+CONFIG_PACKAGE_kmod-tg3=n
+CONFIG_PACKAGE_kmod-be2net=n
+CONFIG_PACKAGE_kmod-bmp085-spi=n
+CONFIG_PACKAGE_kmod-mac80211-hwsim=n
+CONFIG_PACKAGE_kmod-ath3k=n
+CONFIG_PACKAGE_kmod-ath5k=n
+CONFIG_PACKAGE_kmod-ath6kl-sdio=n
+CONFIG_PACKAGE_kmod-ath6kl-usb=n
+CONFIG_PACKAGE_kmod-ath9k=n
+CONFIG_PACKAGE_kmod-ath10k=n
+CONFIG_PACKAGE_kmod-ath10k-ct=n
+CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=n
+CONFIG_PACKAGE_kmod-crypto-qcrypto=n
+CONFIG_PACKAGE_kmod-gl-mifi-mcu=n
+CONFIG_PACKAGE_kmod-mdio-netlink=n
+CONFIG_PACKAGE_kmod-nf-nathelper-extra=n
+CONFIG_PACKAGE_kmod-nf-ipvs-sip=n
+CONFIG_PACKAGE_kmod-nf-nathelper-extra=n
+CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common=n
+CONFIG_PACKAGE_kmod-ovpn-dco=n
+CONFIG_PACKAGE_spidev-test=n
+CONFIG_PACKAGE_kmod-lib80211=n
+CONFIG_PACKAGE_kmod-carl9170=n
+CONFIG_PACKAGE_kmod-batman-adv=n
+CONFIG_PACKAGE_kmod-rtl8812au-ct=n
+CONFIG_PACKAGE_kmod-rtl8821cu=n
+CONFIG_PACKAGE_kmod-rtl88x2bu=n
+CONFIG_PACKAGE_kmod-pf-ring=n
+CONFIG_PACKAGE_kmod-netatop=n
+
+
+CONFIG_SECCOMP=n
 
 CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
 

+ 1 - 0
devices/ipq60xx_generic/README.md

@@ -0,0 +1 @@
+Kernel等部分源码来源 https://github.com/coolsnowwolf/openwrt-gl-ax1800 感谢

+ 42 - 3
devices/ipq60xx_generic/diy.sh

@@ -1,9 +1,48 @@
 #!/bin/bash
 shopt -s extglob
 
-svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/ipq60xx target/linux/ipq60xx
+rm -rf package/boot/uboot-envtools package/kernel package/firmware/ath11k* package/qca target/linux/generic target/linux/ipq60xx package/network/config/netifd feeds/kiddin9/fullconenat toolchain tools/squashfskit4
+svn export --force https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/boot/uboot-envtools package/boot/uboot-envtools
+svn export --force https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/firmware/ath11k-firmware package/firmware/ath11k-firmware
+svn export --force https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/qca package/qca
 
-svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/qca
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/target/linux/generic target/linux/generic
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/target/linux/ipq60xx target/linux/ipq60xx
+wget -P dl/ https://github.com/coolsnowwolf/openwrt-gl-ax1800/raw/master/dl/linux-4.4.60.tar.xz
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/kernel package/kernel
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/network/services/fullconenat feeds/kiddin9/fullconenat
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/network/config/netifd package/network/config/netifd
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/toolchain toolchain
+svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/tools/squashfskit4 tools/squashfskit4
+rm -rf target/linux/generic/files
+rm -rf package/network/config/netifd/patches
 
-rm -rf package/kernel/{qca-nss-dp,qca-ssdk}
+sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2024-12-06/" package/network/config/netifd/Makefile
 
+curl -sfL https://raw.githubusercontent.com/coolsnowwolf/openwrt-gl-ax1800/master/include/netfilter.mk -o include/netfilter.mk
+curl -sfL https://raw.githubusercontent.com/coolsnowwolf/openwrt-gl-ax1800/master/include/quilt.mk -o include/quilt.mk
+
+rm -rf toolchain/.svn
+rm -rf feeds/kiddin9/{rtl*,fullconenat-nft,shortcut-fe,netifd} package/kernel/mt76 toolchain/musl package/feeds/packages/{xtables-addons,openvswitch} package/libs/elfutils package/utils/util-linux package/feeds/luci/ucode-mod-html package/libs/openssl package/network/utils/iptables package/feeds/packages/v4l2loopback package/feeds/packages/jool package/network/utils/uqmi devices/common/patches/mt7922.patch
+svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/toolchain/musl toolchain/musl
+svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/toolchain/glibc toolchain/glibc
+svn co https://github.com/openwrt/openwrt/branches/openwrt-22.03/package/libs/elfutils package/libs/elfutils
+svn co https://github.com/openwrt/openwrt/branches/openwrt-22.03/package/utils/util-linux package/utils/util-linux
+svn co https://github.com/openwrt/openwrt/branches/openwrt-22.03/package/libs/openssl package/libs/openssl
+svn co https://github.com/openwrt/openwrt/branches/openwrt-22.03/package/network/utils/iptables package/network/utils/iptables
+svn co https://github.com/openwrt/openwrt/branches/openwrt-22.03/package/network/utils/uqmi package/network/utils/uqmi
+
+sed -i "s/5.4.0/4.4.0/" toolchain/glibc/common.mk
+
+echo '
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_PINCTRL_BAYTRAIL=n
+CONFIG_PINCTRL_CHERRYVIEW=n
+CONFIG_PINCTRL_BROXTON=n
+CONFIG_PINCTRL_SUNRISEPOINT=n
+CONFIG_PINCTRL_QDF2XXX=n
+CONFIG_GPIO_AMDPT=n
+CONFIG_PCC=n
+CONFIG_PMIC_OPREGION=n
+CCONFIG_RYPTO_CRC32_ARM64=n
+' >> ./target/linux/ipq60xx/config-4.4

+ 2 - 0
devices/ipq60xx_generic/diy/include/kernel-4.4

@@ -0,0 +1,2 @@
+LINUX_VERSION-4.4 = .60
+LINUX_KERNEL_HASH-4.4.60 = 10f619f7f9ab9f2776d0e34d37138b1ca14e9a026b91790dbdb1eb6c8d15edc6

BIN
devices/ipq60xx_generic/diy/package/firmware/ath11k-firmware/files/board-2.bin.IPQ6018


+ 11 - 0
devices/ipq60xx_generic/diy/package/system/fstools/patches/fix.patch

@@ -0,0 +1,11 @@
+--- a/libfstools/overlay.c
++++ b/libfstools/overlay.c
+@@ -33,4 +33,8 @@
+ #define SWITCH_JFFS2 "/tmp/.switch_jffs2"
+ 
++#ifndef GLOB_ONLYDIR
++#define GLOB_ONLYDIR 0
++#endif
++
+ static bool keep_sysupgrade;
+ 

+ 117 - 0
devices/ipq60xx_generic/patches/fix.patch

@@ -0,0 +1,117 @@
+--- a/rules.mk
++++ b/rules.mk
+@@ -136,8 +136,12 @@ else
+   TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
+ endif
+ 
+-ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
+-  iremap = -f$(if $(CONFIG_REPRODUCIBLE_DEBUG_INFO),file,macro)-prefix-map=$(1)=$(2)
++ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
++  ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
++    iremap = -fmacro-prefix-map=$(1)=$(2)
++  else
++    iremap = -iremap$(1):$(2)
++  endif
+ endif
+ 
+ PACKAGE_DIR:=$(BIN_DIR)/packages
+
+--- a/include/image.mk
++++ b/include/image.mk
+@@ -159,9 +159,6 @@ DTC_WARN_FLAGS := \
+   -Wno-graph_port \
+   -Wno-unique_unit_address
+ 
+-DTC_FLAGS += $(DTC_WARN_FLAGS)
+-DTCO_FLAGS += $(DTC_WARN_FLAGS)
+-
+ define Image/pad-to
+ 	dd if=$(1) of=$(1).new bs=$(2) conv=sync
+ 	mv $(1).new $(1)
+
+--- a/package/network/utils/iptables/Makefile
++++ b/package/network/utils/iptables/Makefile
+@@ -784,7 +784,6 @@ $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m)))
+ $(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m)))
+ $(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m)))
+ $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
+-$(eval $(call BuildPlugin,iptables-mod-socket,$(IPT_SOCKET-m)))
+ $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
+ $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))
+ $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m)))
+
+--- a/include/target.mk
++++ b/include/target.mk
+@@ -147,10 +147,17 @@ ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)
+ endif
+ 
+ GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic
++ifeq ($(CONFIG_TARGET_ipq60xx),y)
++GENERIC_BACKPORT_DIR :=
++GENERIC_PATCH_DIR :=
++GENERIC_HACK_DIR :=
++GENERIC_FILES_DIR :=
++else
+ GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
+ GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
+ GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
+ GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
++endif
+ 
+ __config_name_list = $(1)/config-$(KERNEL_PATCHVER) $(1)/config-default
+ __config_list = $(firstword $(wildcard $(call __config_name_list,$(1))))
+
+--- a/package/kernel/mac80211/ath.mk
++++ b/package/kernel/mac80211/ath.mk
+@@ -282,7 +282,7 @@ define KernelPackage/ath11k
+   TITLE:=Atheros 802.11ax wireless cards support
+   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+   DEPENDS+= @TARGET_ipq60xx +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
+-	+@DRIVER_11AX_SUPPORT +@DRIVER_11W_SUPPORT +kmod-qca-nss-drv
++	+@DRIVER_11AX_SUPPORT +@DRIVER_11W_SUPPORT +kmod-qca-nss-drv +kmod-hwmon-core
+   FILES:= \
+ 	$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
+ endef
+
+--- a/target/linux/ipq60xx/Makefile
++++ b/target/linux/ipq60xx/Makefile
+@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/target.mk
+ DEFAULT_PACKAGES += \
+ 	kmod-leds-gpio kmod-gpio-button-hotplug swconfig \
+ 	kmod-qca-nss-dp kmod-qca-nss-drv kmod-qca-ssdk \
+-	kmod-ath11k-ahb qca-ssdk-shell wpad-openssl \
++	kmod-ath11k-ahb qca-ssdk-shell wpad-basic-mbedtls \
+ 	ath11k-firmware-ipq6018 nss-firmware-ipq6018 \
+ 	kmod-qca-nss-drv-pppoe kmod-qca-nss-ecm uboot-envtools
+ 
+
+--- a/target/linux/ipq60xx/image/Makefile
++++ b/target/linux/ipq60xx/image/Makefile
+@@ -104,7 +104,7 @@ define Device/qihoo_v6
+ 	PAGESIZE := 2048
+ 	DEVICE_DTS := qcom-ipq6018-qihoo-v6
+ 	DEVICE_DTS_CONFIG := config@cp03-c1
+-	DEVICE_TITLE := Qihoo V6
++	DEVICE_TITLE := Qihoo 360 V6
+ 	DEVICE_PACKAGES := ath11k-wifi-qihoo-v6 kmod-usb3 kmod-usb-phy-msm
+ endef
+ TARGET_DEVICES += qihoo_v6
+
+--- a/target/linux/ipq60xx/files-4.4/arch/arm64/boot/dts/qcom/qcom-ipq6018-zn-m2.dts
++++ b/target/linux/ipq60xx/files-4.4/arch/arm64/boot/dts/qcom/qcom-ipq6018-zn-m2.dts
+@@ -70,3 +70,15 @@
+ 		};
+ 	};
+ };
++
++&qusb_phy_0 {
++status = "ok";
++};
++
++&ssphy_0 {
++status = "ok";
++};
++
++&usb3 {
++status = "ok";
++};

+ 3 - 0
devices/ipq806x_generic/.config

@@ -13,9 +13,12 @@ CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_ad7200=y
 CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
 CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_vr2600v=y
 CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_buffalo_wxr-2533dhp=y
+CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_xiaomi_r3d=y
 
 CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
 
+CONFIG_PACKAGE_kmod-ipsec=n
+
 CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
 
 

+ 24 - 4
devices/ipq806x_generic/diy.sh

@@ -4,9 +4,29 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-git clone https://github.com/qosmio/nss-packages package/nss-packages
+rm -rf target/linux/ipq806x target/linux/generic
+svn co https://github.com/APCCV/OpenWRT-23.05.0-rc2-NSS/trunk/target/linux/ipq806x target/linux/ipq806x
+
+svn co https://github.com/APCCV/OpenWRT-23.05.0-rc2-NSS/trunk/target/linux/generic target/linux/generic
+
+curl -sfL https://raw.githubusercontent.com/APCCV/OpenWRT-23.05.0-rc2-NSS/v23.05.0-rc2/include/kernel-5.15 -o include/kernel-5.15
+
+make defconfig
+
+git clone https://github.com/ACwifidude/nss-packages package/nss-packages
+
+sed -i "s/vxlan\/vxlan.ko/vxlan.ko/" package/kernel/linux/modules/netsupport.mk
+
+rm -rf package/feeds/kiddin9/{shortcut-fe,fullconenat,fibocom_QMI_WWAN,fullconenat-nft,fast-classifier,simulated-driver} package/nss-packages/qca-nss-crypto package/nss-packages/qca-nss-cfi
+
+curl -sfL https://raw.githubusercontent.com/APCCV/OpenWRT-23.05.0-rc2-NSS/v23.05.0-rc2/nss-makefile-changes/qca-nss-clients-Makefile -o package/nss-packages/qca-nss-clients/Makefile
+curl -sfL https://raw.githubusercontent.com/APCCV/OpenWRT-23.05.0-rc2-NSS/v23.05.0-rc2/nss-makefile-changes/qca-nss-ecm-Makefile -o package/nss-packages/qca-nss-ecm/Makefile
+
+sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-drv kmod-qca-nss-ecm-standard kmod-qca-nss-gmac kmod-qca-nss-drv-qdisc kmod-nss-ifb kmod-qca-nss-drv-pppoe kmod-qca-nss-drv-l2tpv2 kmod-qca-nss-drv-tunipip6/' target/linux/ipq806x/Makefile
+sed -i "s/CONFIG_ALL_NONSHARED=y/CONFIG_ALL_NONSHARED=n/" .config
+sed -i "s/CONFIG_ALL_KMODS=y/CONFIG_ALL_KMODS=n/" .config
+make defconfig
+sed -i "s/# CONFIG_ALL_NONSHARED is not set/CONFIG_ALL_NONSHARED=y/" .config
+sed -i "s/# CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_xiaomi_r3d is not set/CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_xiaomi_r3d=y/" .config
 
-#rm -rf target/linux/ipq806x
-#svn co https://github.com/APCCV/OpenWRT-23.05.0-rc1-NSS/trunk/target/linux/ipq806x target/linux/ipq806x
 
-#sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-drv kmod-qca-nss-drv-qdisc kmod-qca-nss-ecm-standard kmod-qca-nss-gmac kmod-qca-nss-drv-pppoe kmod-qca-nss-drv-pptp kmod-nss-ifb qca-nss-crypto qca-nss-drv-igs/' target/linux/ipq806x/Makefile

+ 1095 - 0
devices/ipq806x_generic/patches/xiaomi_r3d.patch

@@ -0,0 +1,1095 @@
+From c433730d889d0dfb31bdcf4f102ca47939606c46 Mon Sep 17 00:00:00 2001
+From: remittor <[email protected]>
+Date: Fri, 11 Aug 2023 12:08:30 +0300
+Subject: [PATCH] ipq806x: Add support for Xiaomi Mi Router HD (R3D)
+
+Xiaomi R3D is a 2.4/5 GHz band 11ac router, based on IPQ8064.
+
+Specification:
+* SoC: Qualcomm IPQ8064
+* RAM: 512MB DDR3
+* Flash: 256MB NAND (Macronix MX30UF2G18AC-TI)
+* Ethernet: 4x 10/100/1000 Mbps (1x WAN, 3x LAN)
+* WiFi: Qualcomm QCA9984 (5GHz, 4T4R, n/ac)
+* WiFi: Qualcomm QCA9980 (2.4GHz, 4T4R, b/g/n)
+* USB: 1x 3.0
+* SATA: 1x SATA 3.1 (only for internal HDD 3.5")
+* BTN: Power, Reset
+* LEDS: Status(Green/Blue/Red)
+* UART: present as 4-pads on the PCB (3.3V, 115200-8-N-1)
+
+MAC addresses as verified by stock firmware:
+
+| Interface   |       MAC         |  ART    | Format |
+|-------------+-------------------+---------+--------|
+| WAN (label) | xx:xx:xx:xx:xx:B2 | 0x0     | binary |
+| LAN         | xx:xx:xx:xx:xx:B3 | 0x6     | binary |
+| WiFi 2g     | xx:xx:xx:xx:xx:B4 | 0x1006  | binary |
+| WiFi 5g     | xx:xx:xx:xx:xx:B5 | 0x5006  | binary |
+---
+ package/boot/uboot-envtools/files/ipq806x     |   6 +-
+ .../ipq806x/base-files/etc/board.d/02_network |   4 +
+ .../etc/hotplug.d/firmware/11-ath10k-caldata  |   6 +
+ .../ipq806x/base-files/etc/init.d/bootcount   |   8 +
+ .../base-files/lib/upgrade/platform.sh        |   3 +
+ .../ipq806x/base-files/lib/upgrade/xiaomi.sh  | 441 ++++++++++++++++
+ .../arch/arm/boot/dts/qcom-ipq8064-r3d.dts    | 479 ++++++++++++++++++
+ target/linux/ipq806x/image/generic.mk         |  17 +
+ 8 files changed, 963 insertions(+), 1 deletion(-)
+ create mode 100644 target/linux/ipq806x/base-files/lib/upgrade/xiaomi.sh
+ create mode 100644 target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-r3d.dts
+
+diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x
+index 01a86c7b19fc..c0a781c1e21b 100644
+--- a/package/boot/uboot-envtools/files/ipq806x
++++ b/package/boot/uboot-envtools/files/ipq806x
+@@ -52,6 +52,10 @@ qcom,ipq8064-ap148|\
+ qcom,ipq8064-db149)
+ 	ubootenv_add_uci_config $(ubootenv_mtdinfo)
+ 	;;
++xiaomi,r3d)
++	ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
++	ubootenv_add_uci_sys_config "/dev/mtd12" "0x0" "0x10000" "0x10000"
++	;;
+ ubnt,unifi-ac-hd|\
+ zyxel,nbg6817)
+ 	ubootenv_add_uci_config "/dev/mtdblock9" "0x0" "0x10000" "0x10000"
+@@ -59,6 +63,6 @@ zyxel,nbg6817)
+ esac
+ 
+ config_load ubootenv
+-config_foreach ubootenv_add_app_config ubootenv
++config_foreach ubootenv_add_app_config
+ 
+ exit 0
+diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network
+index 8dd52452b173..df27cbde7c5d 100644
+--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
++++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
+@@ -89,6 +89,10 @@ nokia,ac400i |\
+ ubnt,unifi-ac-hd)
+ 	ucidef_set_interface_lan "eth0 eth1"
+ 	;;
++xiaomi,r3d)
++	ucidef_add_switch "switch0" \
++		"1:lan:3" "2:lan:2" "3:lan:1" "6@eth1" "5:wan" "0@eth0"
++	;;
+ zyxel,nbg6817)
+ 	hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
+ 	ucidef_add_switch "switch0" \
+diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+index 4c5019cf5bd2..aa8ed06aae4b 100644
+--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
++++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+@@ -56,6 +56,9 @@ case "$FIRMWARE" in
+ 		caldata_extract "0:art" 0x1000 0x2f20
+ 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +2)
+ 		;;
++	xiaomi,r3d)
++		caldata_extract "ART" 0x1000 0x2f20
++		;;
+ 	zyxel,nbg6817)
+ 		caldata_extract "0:art" 0x1000 0x2f20
+ 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
+@@ -92,6 +95,9 @@ case "$FIRMWARE" in
+ 		caldata_extract "0:art" 0x5000 0x2f20
+ 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +3)
+ 		;;
++	xiaomi,r3d)
++		caldata_extract "ART" 0x5000 0x2f20
++		;;
+ 	zyxel,nbg6817)
+ 		caldata_extract "0:art" 0x5000 0x2f20
+ 		ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
+diff --git a/target/linux/ipq806x/base-files/etc/init.d/bootcount b/target/linux/ipq806x/base-files/etc/init.d/bootcount
+index cb32a4ed3568..9d9ab3f100fe 100755
+--- a/target/linux/ipq806x/base-files/etc/init.d/bootcount
++++ b/target/linux/ipq806x/base-files/etc/init.d/bootcount
+@@ -16,5 +16,13 @@ boot() {
+ 	linksys,ea8500)
+ 		mtd resetbc s_env || true
+ 		;;
++	xiaomi,r3d)
++		local boot_wait=$( fw_printenv boot_wait | cut -d = -f 2 )
++		[ "$boot_wait" != "on" ] && fw_setenv boot_wait on
++		local bootdelay=$( fw_printenv bootdelay | cut -d = -f 2 )
++		[ "$bootdelay" != "3" ] && fw_setenv bootdelay 3
++		local uart_en=$( fw_printenv uart_en | cut -d = -f 2 )
++		[ "$uart_en" != "1" ] && fw_setenv uart_en 1
++		;;
+ 	esac
+ }
+diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+index 5ec4f513bd33..b142fce86a08 100644
+--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
++++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+@@ -71,6 +71,9 @@ platform_do_upgrade() {
+ 		MTD_CONFIG_ARGS="-s 0x200000"
+ 		default_do_upgrade "$1"
+ 		;;
++	xiaomi,r3d)
++		platform_do_upgrade_xiaomi "$1" 0x2800000
++		;;
+ 	zyxel,nbg6817)
+ 		zyxel_do_upgrade "$1"
+ 		;;
+diff --git a/target/linux/ipq806x/base-files/lib/upgrade/xiaomi.sh b/target/linux/ipq806x/base-files/lib/upgrade/xiaomi.sh
+new file mode 100644
+index 000000000000..9246e8f867e3
+--- /dev/null
++++ b/target/linux/ipq806x/base-files/lib/upgrade/xiaomi.sh
+@@ -0,0 +1,441 @@
++# SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++
++. /lib/functions.sh
++
++MAGIC_XIAOMI_HDR1="48445231"     # "HDR1" - xiaomi image header
++MAGIC_XIAOMI_BLK="beba0000"
++MAGIC_UIMAGE="27051956"          # uImage header
++MAGIC_UBI="55424923"             # "UBI#"
++MAGIC_UBIFS="31181006"
++MAGIC_HSQS="68737173"            # "hsqs"
++MAGIC_SYSUPG="7379737570677261"  # TAR "sysupgrade"
++
++XIAOMI_PAGESIZE=2048
++
++XIAOMI_FW_FILE=""
++XIAOMI_FW_SIZE=0
++XIAOMI_KERNEL_PART=$CI_KERNPART
++XIAOMI_KERNEL2_PART=""
++XIAOMI_KERNEL2_NAMES="kernel_stock|kernel_dup"
++XIAOMI_ROOTFS_PART=$CI_UBIPART
++XIAOMI_ROOTFS_PARTSIZE=
++
++XIAOMI_RESTORE_ROOTFS2=
++
++log_msg() {
++	echo "$@"
++}
++
++log_err() {
++	echo "ERROR: $@" >&2
++}
++
++die() {
++	log_err "$@"
++	exit 1
++}
++
++get_uint32_at() {
++	local offset=$1
++	local endianness=$2
++	local hex
++	if [ $(( $offset + 4 )) -gt $XIAOMI_FW_SIZE ]; then
++		echo ""
++		return
++	fi
++	local dd_args="if=$XIAOMI_FW_FILE skip=$offset bs=1 count=4"
++	if [ "$endianness" = "be" ]; then
++		hex=$( dd $dd_args 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' )
++	else
++		hex=$( dd $dd_args 2>/dev/null | hexdump -v -e '1/4 "%02x"' )
++	fi
++	echo $( printf "%d" 0x$hex )
++}
++
++get_hexdump_at() {
++	local offset=$1
++	local size=$2
++	if [ $(( $offset + $size )) -gt $XIAOMI_FW_SIZE ]; then
++		echo ""
++		return
++	fi
++	local dd_args="if=$XIAOMI_FW_FILE skip=$offset bs=1 count=$size"
++	echo $( dd $dd_args 2>/dev/null | hexdump -v -n $size -e '1/1 "%02x"' )
++}
++
++get_round_up() {
++	local value=$1
++	local base=$2
++	local pad=0
++	if [ -z "$base" ]; then
++		base=$XIAOMI_PAGESIZE
++	else
++		base=$( printf "%d" $base )
++	fi
++	if [ $(( $value % $base )) != 0 ]; then
++		pad=$(( $base - $value % $base ))
++	fi
++	echo $(( $value + $pad ))
++}
++
++get_part_size() {
++	local part_name=$1
++	local part=$( cat /proc/mtd | grep \"$part_name\" )
++	if [ -z "$part" ]; then
++		echo 0
++	else
++		local mtd_size_hex=$( echo $part | awk '{print "0x"$2}' )
++		echo $( printf "%d" $mtd_size_hex )
++	fi
++}
++
++xiaomi_check_sizes() {
++	local part_name=$1
++	local img_offset=$2
++	local img_size=$3
++
++	local mtd_size=$( get_part_size $part_name )
++	if [ "$mtd_size" = "0" ]; then
++		echo "cannot find mtd partition with name '$part_name'"
++		return 1
++	fi	
++	local img_end=$(( $img_offset + $img_size ))
++	if [ $img_end -gt $XIAOMI_FW_SIZE ]; then
++		echo "incorrect image size (part: '$part_name')"
++		return 1
++	fi
++	if [ $img_size -gt $mtd_size ]; then
++		echo "image is greater than partition '$part_name'"
++		return 1
++	fi
++	echo ""
++	return 0
++}
++
++xiaomi_mtd_write() {
++	local part_name=$1
++	local img_offset=$2
++	local img_size=$3
++	local part_skip=$4
++
++	img_size=$( get_round_up $img_size )
++	local err=$( xiaomi_check_sizes $part_name $img_offset $img_size )
++	if [ -n "$err" ]; then
++		log_err $err
++		return 1
++	fi
++	if [ -n "$part_skip" ]; then
++		part_skip="-p $part_skip"
++	fi
++	local count=$(( $img_size / $XIAOMI_PAGESIZE ))
++	local dd_args="if=$XIAOMI_FW_FILE iflag=skip_bytes skip=$img_offset bs=$XIAOMI_PAGESIZE count=$count"
++	dd $dd_args | mtd -f $part_skip write - "$part_name" || {
++		log_err "Failed to flash '$part_name'"
++		return 1
++	}
++	return 0
++}
++
++xiaomi_flash_images() {
++	local kernel_offset=$1
++	local kernel_size=$2
++	local rootfs_offset=$3
++	local rootfs_size=$4
++	local err
++	local part_skip=0
++
++	kernel_size=$( get_round_up $kernel_size )
++	rootfs_size=$( get_round_up $rootfs_size )
++
++	err=$( xiaomi_check_sizes $XIAOMI_KERNEL_PART $kernel_offset $kernel_size )
++	[ -n "$err" ] && { log_err $err; return 1; }
++
++	if [ -n "$XIAOMI_KERNEL2_PART" ]; then
++		err=$( xiaomi_check_sizes $XIAOMI_KERNEL2_PART $kernel_offset $kernel_size )
++		[ -n "$err" ] && { log_err $err; return 1; }
++	fi
++
++	err=$( xiaomi_check_sizes $XIAOMI_ROOTFS_PART $rootfs_offset $rootfs_size )
++	[ -n "$err" ] && { log_err $err; return 1; }
++
++	if [ "$XIAOMI_RESTORE_ROOTFS2" = "true" -a -n "$XIAOMI_ROOTFS_PARTSIZE" ]; then
++		part_skip=$( printf "%d" $XIAOMI_ROOTFS_PARTSIZE )
++		if [ $part_skip -lt 1000000 ]; then
++			part_skip=0
++		fi
++	fi
++
++	if [ $part_skip -gt 0 ]; then
++		local ksize=$(( $part_skip + $rootfs_size ))
++		local mtd_size=$( get_part_size $XIAOMI_ROOTFS_PART )
++		if [ $ksize -gt $mtd_size ]; then
++			log_err "double rootfs is greater than partition '$XIAOMI_ROOTFS_PART'"
++			return 1
++		fi
++	fi
++
++	mtd erase "$XIAOMI_ROOTFS_PART" || {
++		log_err "Failed to erase partition '$part_name'"
++		return 1
++	}
++
++	xiaomi_mtd_write $XIAOMI_KERNEL_PART $kernel_offset $kernel_size || {
++		log_err "Failed flash data to '$XIAOMI_KERNEL_PART' partition"
++		return 1
++	}
++	log_msg "Kernel image flashed to '$XIAOMI_KERNEL_PART'"
++
++	if [ -n "$XIAOMI_KERNEL2_PART" ]; then
++		xiaomi_mtd_write $XIAOMI_KERNEL2_PART $kernel_offset $kernel_size || {
++			log_err "Failed flash data to '$XIAOMI_KERNEL2_PART' partition"
++			return 1
++		}
++		log_msg "Kernel image flashed to '$XIAOMI_KERNEL2_PART'"
++	fi
++
++	xiaomi_mtd_write $XIAOMI_ROOTFS_PART $rootfs_offset $rootfs_size || {
++		log_err "Failed flash data to '$XIAOMI_ROOTFS_PART' partition"
++		return 1
++	}
++	log_msg "Rootfs image flashed to '$XIAOMI_ROOTFS_PART'!"
++	
++	if [ $part_skip -gt 0 ]; then
++		xiaomi_mtd_write $XIAOMI_ROOTFS_PART $rootfs_offset $rootfs_size $part_skip || {
++			log_err "Failed flash data to '$XIAOMI_ROOTFS_PART' partition (2)"
++			return 1
++		}
++		log_msg "Rootfs image flashed to '$XIAOMI_ROOTFS_PART':$XIAOMI_ROOTFS_PARTSIZE"
++	fi
++
++	log_msg "Firmware write successful! Reboot..."
++	sync
++	umount -a
++	reboot -f
++	exit 0
++}
++
++check_ubi_header() {
++	local offset=$1
++
++	local magic=$( get_hexdump_at $offset 4 )
++	[ "$magic" != $MAGIC_UBI ] && { echo ""; return 1; }
++
++	local magic_ubi2="55424921"  # "UBI!"
++	offset=$(( $offset + $XIAOMI_PAGESIZE ))
++	magic=$( get_hexdump_at $offset 4 )
++	[ "$magic" != $magic_ubi2 ] && { echo ""; return 1; }
++
++	echo "true"
++	return 0
++}
++
++get_rootfs_offset() {
++	local start=$1
++	local pos  offset  align  end
++
++	for offset in 0 1 2 3 4; do
++		pos=$(( $start + $offset ))
++		[ -n "$( check_ubi_header $pos )" ] && { echo $pos; return 0; }
++	done
++
++	for align in 4 8 16 32 64 128 256 512 1024 2048 4096; do
++		pos=$( get_round_up $start $align )
++		[ -n "$( check_ubi_header $pos )" ] && { echo $pos; return 0; }
++	done
++
++	align=65536
++	pos=$( get_round_up $start $align )
++	end=$(( $pos + 3000000 ))
++	while true; do
++		[ $(( $pos + 150000 )) -gt $XIAOMI_FW_SIZE ] && break
++		[ -n "$( check_ubi_header $pos )" ] && { echo $pos; return 0; }
++		pos=$(( $pos + $align ))
++		[ $pos -ge $end ] && break
++	done
++
++	echo ""
++	return 1
++}
++
++xiaomi_do_factory_upgrade() {
++	local err
++	local magic
++	local kernel_offset  kernel_size
++	local rootfs_offset  rootfs_size
++
++	local kernel_mtd="$( find_mtd_index $XIAOMI_KERNEL_PART )"
++	if [ -z "$kernel_mtd" ]; then
++		log_err "partition '$XIAOMI_KERNEL_PART' not found"
++		return 1
++	fi
++	log_msg "Forced factory upgrade..."
++
++	kernel_offset=0
++	kernel_size=$( get_uint32_at 12 "be" )
++	kernel_size=$(( $kernel_size + 64 ))	
++
++	rootfs_offset=$( get_rootfs_offset $kernel_size )
++	if [ -z "$rootfs_offset" ]; then
++		log_err "can't find ubinized rootfs in the firmware image"
++		return 1
++	fi
++	rootfs_size=$(( $XIAOMI_FW_SIZE - $rootfs_offset ))
++	local rootfs_end=$(( $rootfs_offset + $rootfs_size ))
++
++	XIAOMI_RESTORE_ROOTFS2=false
++	xiaomi_flash_images $kernel_offset $kernel_size $rootfs_offset $rootfs_size || {
++		log_err "can't flash factory image"
++		return 1
++	}
++	exit 0
++}
++
++xiaomi_do_revert_stock() {
++	local err
++	local magic
++	local blk  blkpos  blk_magic  offset  file_size
++	local kernel_offset
++	local kernel_size=0
++	local rootfs_offset
++	local rootfs_size=0
++
++	local kernel_mtd=$( find_mtd_index $XIAOMI_KERNEL_PART )
++	if [ -z "$kernel_mtd" ]; then
++		log_err "partition '$XIAOMI_KERNEL_PART' not found"
++		return 1
++	fi
++	log_msg "Forced revert to stock firmware..."
++
++	for blk in 16 20 24 28 32 36; do
++		blkpos=$( get_uint32_at $blk )
++		[ -z "$blkpos" ] && continue
++		[ $blkpos -lt 48 ] && continue
++		blk_magic=$( get_hexdump_at $blkpos 4 )
++		[ "$blk_magic" != $MAGIC_XIAOMI_BLK ] && continue
++		offset=$(( $blkpos + 8 ))
++		file_size=$( get_uint32_at $offset 4 )
++		[ -z "$file_size" ] && continue
++		[ $file_size -lt 1000000 ] && continue
++		offset=$(( $blkpos + 48 ))
++		magic=$( get_hexdump_at $offset 4 )
++		if [ "$magic" = $MAGIC_UIMAGE ]; then
++			kernel_size=$file_size
++			kernel_offset=$offset
++		fi
++		if [ "$magic" = $MAGIC_UBI -o "$magic" = $MAGIC_HSQS ]; then
++			rootfs_size=$file_size
++			rootfs_offset=$offset
++		fi
++	done
++	if [ $kernel_size -eq 0 ]; then
++		log_err "incorrect stock firmware image (kernel not found)"
++		return 1
++	fi
++	if [ $rootfs_size -eq 0 ]; then
++		log_err "incorrect stock firmware image (rootfs not found)"
++		return 1
++	fi
++
++	XIAOMI_RESTORE_ROOTFS2=true
++	xiaomi_flash_images $kernel_offset $kernel_size $rootfs_offset $rootfs_size || {
++		log_err "ERROR: can't revert to stock firmware"
++		return 1
++	}
++	exit 0
++}
++
++platform_do_upgrade_xiaomi() {
++	XIAOMI_FW_FILE=$1
++	local stock_rootfs_size=$2
++	local magic
++	local kernel_mtd  kernel2_mtd  rootfs_mtd
++	local kernel2_part_list  part_name
++
++	XIAOMI_FW_SIZE=$( wc -c "$XIAOMI_FW_FILE" 2> /dev/null | awk '{print $1}' )
++	if [ -z "$XIAOMI_FW_SIZE" ]; then
++		log_err "File '$XIAOMI_FW_FILE' not found!"
++		exit 1
++	fi
++	if [ $XIAOMI_FW_SIZE -lt 1000000 ]; then
++		log_err "file '$XIAOMI_FW_FILE' is incorrect"
++		exit 1
++	fi
++
++	kernel_mtd=$( find_mtd_index $XIAOMI_KERNEL_PART )
++	if [ -z "$kernel_mtd" ]; then
++		log_err "cannot find mtd partition for '$XIAOMI_KERNEL_PART'"
++		exit 1
++	fi
++	kernel2_part_list=$( echo "$XIAOMI_KERNEL2_NAMES" | sed 's/|/\n/g' )
++	for part_name in $kernel2_part_list; do
++		kernel2_mtd=$( find_mtd_index $part_name )
++		if [ -n "$kernel2_mtd" ]; then
++			XIAOMI_KERNEL2_PART="$part_name"
++			log_msg "Found alt kernel partition '$XIAOMI_KERNEL2_PART'"
++			break
++		fi
++	done
++	rootfs_mtd=$( find_mtd_index $XIAOMI_ROOTFS_PART )
++	if [ -z "$rootfs_mtd" ]; then
++		log_err "cannot find mtd partition for '$XIAOMI_ROOTFS_PART'"
++		exit 1
++	fi
++
++	magic=$( get_hexdump_at 0 4 )
++
++	# Flash factory image (uImage header)
++	if [ "$magic" = $MAGIC_UIMAGE ]; then
++		xiaomi_do_factory_upgrade
++		exit $?
++	fi
++
++	# Revert to stock firmware ("HDR1" header)
++	if [ "$magic" = $MAGIC_XIAOMI_HDR1 ]; then
++		if [ -n "$stock_rootfs_size" ]; then
++			XIAOMI_ROOTFS_PARTSIZE=$stock_rootfs_size
++		fi
++		xiaomi_do_revert_stock
++		exit $?
++	fi
++
++	magic=$( get_hexdump_at 0 8 )
++	if [ "$magic" != $MAGIC_SYSUPG ]; then
++		log_err "incorrect image for system upgrading!"
++		exit 1
++	fi
++	log_msg "SysUpgrade start..."
++	local tar_file=$XIAOMI_FW_FILE
++	local board_dir=$( tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$' )
++	[ -z "$board_dir" ] && {
++		log_err "board dir not found"
++		exit 1
++	}
++	board_dir=${board_dir%/}
++
++	local control_len=$( (tar xf $tar_file $board_dir/CONTROL -O | wc -c) 2> /dev/null)
++	if [ $control_len -lt 3 ]; then
++		log_err "incorrect stock firmware image (CONTROL not found)"
++		exit 1
++	fi
++	local kernel_len=$( (tar xf $tar_file $board_dir/kernel -O | wc -c) 2> /dev/null)
++	if [ $kernel_len -lt 1000000 ]; then
++		log_err "incorrect stock firmware image (kernel not found)"
++		exit 1
++	fi
++	local rootfs_len=$( (tar xf $tar_file $board_dir/root -O | wc -c) 2> /dev/null)
++	if [ $rootfs_len -lt 1000000 ]; then
++		log_err "incorrect stock firmware image (rootfs not found)"
++		exit 1
++	fi
++
++	if [ -n "$XIAOMI_KERNEL2_PART" ]; then
++		tar Oxf $tar_file $board_dir/kernel | mtd -f write - $XIAOMI_KERNEL2_PART && {
++			log_msg "Kernel image flashed to '$XIAOMI_KERNEL2_PART'"
++		} || {
++			log_err "cannot flash partition '$XIAOMI_KERNEL2_PART'"
++			exit 1
++		}
++	fi
++
++	nand_do_upgrade "$XIAOMI_FW_FILE"
++}
+diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-r3d.dts b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-r3d.dts
+new file mode 100644
+index 000000000000..fd952d230c5d
+--- /dev/null
++++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-r3d.dts
+@@ -0,0 +1,479 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++
++#include "qcom-ipq8064-v2.0-smb208.dtsi"
++
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Xiaomi Mi Router HD (R3D)";
++	compatible = "xiaomi,r3d", "qcom,ipq8064";
++
++	memory@0 {
++		device_type = "memory";
++		reg = <0x42000000 0x1e000000>;
++	};
++
++	reserved-memory {
++		rsvd@44600000 {
++			reg = <0x44600000 0x200000>; /* IPQ_TZ_APPS_ADDR */
++			no-map;
++		};
++	};
++
++	aliases {
++		label-mac-device = &gmac1;
++
++		mdio-gpio0 = &mdio0;
++
++		led-boot = &led_status_yellow;
++		led-failsafe = &led_status_red;
++		led-running = &led_status_blue;
++		led-upgrade = &led_status_yellow;
++	};
++
++	chosen {
++		bootargs = "rootfstype=squashfs noinitrd";
++	};
++
++	keys {
++		compatible = "gpio-keys";
++		pinctrl-0 = <&button_pins>;
++		pinctrl-names = "default";
++
++		reset {
++			label = "reset";
++			gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
++			linux,code = <KEY_RESTART>;
++			debounce-interval = <60>;
++			wakeup-source;
++		};
++
++		power {
++			label = "power"; /* Labeled POWER on the device, but using for sleep mode */
++			gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
++			linux,code = <KEY_POWER>;
++			debounce-interval = <60>;
++			wakeup-source;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-0 = <&led_pins>;
++		pinctrl-names = "default";
++
++		led_status_red: led_status_red {
++			label = "red:status";
++			gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
++			default-state = "keep";
++		};
++
++		led_status_blue: led_status_blue {
++			label = "blue:status";
++			gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
++			default-state = "keep";
++		};
++
++		led_status_yellow: led_status_yellow {
++			label = "yellow:status";
++			gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
++			default-state = "keep";
++		};
++	};
++
++	i2c_gpio_0 { // GSBI1
++		compatible = "i2c-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		pinctrl-0 = <&i2c1_pins>;
++		pinctrl-names = "default";
++		sda-gpios = <&qcom_pinmux 53 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++		scl-gpios = <&qcom_pinmux 54 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++		i2c-gpio,delay-us = <5>;
++
++		emc2301@2f {
++			compatible = "smsc,emc2301";
++			reg = <0x2f>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			fan@0 {
++				reg = <0>;
++				pwm-output-mode = <1>;
++			};
++		};
++	};
++
++	i2c_gpio_1 { // GSBI2
++		compatible = "i2c-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		pinctrl-0 = <&i2c2_pins>;
++		pinctrl-names = "default";
++		sda-gpios = <&qcom_pinmux 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++		scl-gpios = <&qcom_pinmux 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++		i2c-gpio,delay-us = <5>;
++
++		tmp75@48 {
++			compatible = "ti,tmp75";
++			reg = <0x48>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++			#thermal-sensor-cells = <0>;
++			status = "okay";
++		};
++	};
++};
++
++// https://github.com/openwrt/openwrt/commit/622ce713ca246aa465bf28d2a743f96999085ea2
++// https://github.com/openwrt/openwrt/commit/2336c2dbb1929837f7e42d4315c8073342a5b46b
++// https://forum.openwrt.org/t/failed-to-startup-an-ipq806x-router-on-kernel-5-4/60775/41
++&CPU_SPC {
++	status = "disabled";
++};
++
++&adm_dma {
++	status = "okay";
++};
++
++&qcom_pinmux {
++	i2c1_pins: i2c1_pins { // GSBI1 - EMC2301
++		mux {
++			pins = "gpio53", "gpio54";
++			function = "gsbi1";
++			drive-strength = <12>;
++			bias-none;
++			input;
++		};
++	};
++
++	i2c2_pins: i2c2_pins { // GSBI2 - TMP75
++		mux {
++			pins = "gpio24", "gpio25";
++			function = "gsbi2";
++			drive-strength = <12>;
++			bias-none;
++			input;
++		};
++	};
++
++	button_pins: button_pins {
++		mux {
++			pins = "gpio16", "gpio68";
++			function = "gpio";
++			drive-strength = <2>;
++			bias-pull-up;
++		};
++	};
++
++	led_pins: led_pins {
++		mux {
++			pins = "gpio7", "gpio8", "gpio9";
++			function = "gpio";
++			drive-strength = <2>;
++			bias-pull-up;
++		};
++	};
++
++	usb_pwr_en_pins: usb_pwr_en_pins {
++		mux {
++			pins = "gpio56";
++			function = "gpio";
++			drive-strength = <12>;
++			bias-pull-up;
++			output-high;
++		};
++	};
++};
++
++&sata_phy {
++	status = "okay";
++};
++
++&sata {
++	status = "okay";
++};
++
++&hs_phy_0 {
++	status = "okay";
++};
++
++&ss_phy_0 {
++	status = "okay";
++};
++
++&usb3_0 {
++	status = "okay";
++};
++
++&hs_phy_1 {
++	status = "okay";
++};
++
++&ss_phy_1 {
++	status = "okay";
++};
++
++&usb3_1 {
++	status = "okay";
++	pinctrl-0 = <&usb_pwr_en_pins>;
++	pinctrl-names = "default";
++};
++
++&pcie0 {
++	status = "okay";
++	reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
++	pinctrl-0 = <&pcie0_pins>;
++	pinctrl-names = "default";
++
++	bridge@0,0 {
++		reg = <0x00000000 0 0 0 0>;
++		#address-cells = <3>;
++		#size-cells = <2>;
++		ranges;
++
++		wifi@1,0 {
++			compatible = "pci168c,0040";
++			reg = <0x00010000 0 0 0 0>;
++
++			nvmem-cells = <&macaddr_art_1006>, <&precal_art_1000>;
++			nvmem-cell-names = "mac-address", "pre-calibration";
++		};
++	};
++};
++
++&pcie1 {
++	status = "okay";
++	reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
++	pinctrl-0 = <&pcie1_pins>;
++	pinctrl-names = "default";
++	max-link-speed = <1>;
++
++	bridge@0,0 {
++		reg = <0x00000000 0 0 0 0>;
++		#address-cells = <3>;
++		#size-cells = <2>;
++		ranges;
++
++		wifi@1,0 {
++			compatible = "pci168c,0040";
++			reg = <0x00010000 0 0 0 0>;
++
++			nvmem-cells = <&macaddr_art_5006>, <&precal_art_5000>;
++			nvmem-cell-names = "mac-address", "pre-calibration";
++		};
++	};  
++};
++
++&nand {
++	status = "okay";
++
++	pinctrl-0 = <&nand_pins>;
++	pinctrl-names = "default";
++
++	nand@0 {
++		reg = <0>;
++		compatible = "qcom,nandcs";
++
++		nand-bus-width = <8>;
++		nand-ecc-strength = <4>;
++		nand-ecc-step-size = <512>;
++
++		nand-is-boot-medium;
++		qcom,boot-partitions = <0 0xf0000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition@0 {
++				label = "SBL1";
++				reg = <0x0 0x40000>;
++				read-only;
++			};
++
++			partition@40000 {
++				label = "MIBIB";
++				reg = <0x40000 0x80000>;
++				read-only;
++			};
++
++			partition@c0000 {
++				label = "SBL2";
++				reg = <0xc0000 0x80000>;
++				read-only;
++			};
++
++			partition@140000 {
++				label = "SBL3";
++				reg = <0x140000 0x80000>;
++				read-only;
++			};
++
++			partition@1c0000 {
++				label = "DDRCONFIG";
++				reg = <0x1c0000 0x80000>;
++				read-only;
++			};
++
++			partition@240000 {
++				label = "SSD";
++				reg = <0x240000 0x80000>;
++				read-only;
++			};
++
++			partition@2c0000 {
++				label = "TZ";
++				reg = <0x2c0000 0x80000>;
++				read-only;
++			};
++
++			partition@340000 {
++				label = "RPM";
++				reg = <0x340000 0x80000>;
++				read-only;
++			};
++
++			partition@3c0000 {
++				label = "APPSBL";
++				reg = <0x3c0000 0x100000>;
++				read-only;
++			};
++
++			partition@4c0000 {
++				label = "APPSBLENV";
++				reg = <0x4c0000 0x80000>;
++			};
++
++			art: partition@540000 {
++				label = "ART";
++				reg = <0x540000 0x80000>;
++				read-only;
++
++				compatible = "nvmem-cells";
++				#address-cells = <1>;
++				#size-cells = <1>;
++
++				macaddr_art_0: macaddr@0 {  // WAN (label)
++					reg = <0x0 0x6>;
++				};
++				macaddr_art_6: macaddr@6 {  // LAN
++					reg = <0x6 0x6>;
++				};
++				macaddr_art_1006: macaddr@1006 {  // WiFi 2g
++					reg = <0x1006 0x6>;
++				};
++				macaddr_art_5006: macaddr@5006 {  // WiFi 5g
++					reg = <0x5006 0x6>;
++				};
++				precal_art_1000: precal@1000 {
++					reg = <0x1000 0x2f20>;
++				};
++				precal_art_5000: precal@5000 {
++					reg = <0x5000 0x2f20>;
++				};
++			};
++
++			partition@5c0000 {
++				label = "BOOTCONFIG";
++				reg = <0x5c0000 0x40000>;
++				read-only;
++			};
++
++			partition@600000 {
++				label = "bdata";
++				reg = <0x600000 0x80000>;
++			};
++
++			partition@680000 {
++				label = "crash";
++				reg = <0x680000 0x80000>;
++				read-only;
++			};
++
++			partition@700000 {
++				label = "crash_syslog";
++				reg = <0x700000 0x80000>;
++				read-only;
++			};
++
++			partition@780000 {
++				label = "rsvd";
++				reg = <0x780000 0x80000>;
++				read-only;
++			};
++
++			/* Stock U-Boot support Dual Boot */
++			partition@800000 {
++				label = "kernel_dup";
++				reg = <0x800000 0x400000>;
++			};
++
++			partition@c00000 {
++				label = "kernel";
++				reg = <0xc00000 0x400000>;
++			};
++
++			partition@1000000 {
++				label = "ubi";
++				reg = <0x1000000 0xf000000>;
++			};
++		};
++	};
++};
++
++&mdio0 {
++	status = "okay";
++
++	pinctrl-0 = <&mdio0_pins>;
++	pinctrl-names = "default";
++
++	phy0: ethernet-phy@0 {
++		reg = <0>;
++		qca,ar8327-initvals = <
++			0x04 0x07600000  /* PAD0_MODE */
++			0x08 0x01000000  /* PAD5_MODE */
++			0x0c 0x00000080  /* PAD6_MODE */
++			0x7c 0x0000004e  /* PORT0_STATUS */
++			0x94 0x0000004e  /* PORT6_STATUS */
++			0xe0 0xc74164de  /* SGMII_CTRL */
++			0xe4 0x0006a545  /* MAC_POWER_SEL */
++		>;
++	};
++
++	phy4: ethernet-phy@4 {
++		reg = <4>;
++	};
++};
++
++&gmac1 {
++	status = "okay";
++	phy-mode = "rgmii";
++	qcom,id = <1>;
++
++	pinctrl-0 = <&rgmii2_pins>;
++	pinctrl-names = "default";
++
++	nvmem-cells = <&macaddr_art_0>;
++	nvmem-cell-names = "mac-address";
++
++	fixed-link {
++		speed = <1000>;
++		full-duplex;
++	};
++};
++
++&gmac2 {
++	status = "okay";
++	phy-mode = "sgmii";
++	qcom,id = <2>;
++
++	nvmem-cells = <&macaddr_art_6>;
++	nvmem-cell-names = "mac-address";
++
++	fixed-link {
++		speed = <1000>;
++		full-duplex;
++	};
++};
+diff --git a/target/linux/ipq806x/image/generic.mk b/target/linux/ipq806x/image/generic.mk
+index aac0a2c8fadf..b437706cd445 100644
+--- a/target/linux/ipq806x/image/generic.mk
++++ b/target/linux/ipq806x/image/generic.mk
+@@ -471,6 +471,23 @@ define Device/ubnt_unifi-ac-hd
+ endef
+ TARGET_DEVICES += ubnt_unifi-ac-hd
+ 
++define Device/xiaomi_r3d
++	$(call Device/LegacyImage)
++	DEVICE_VENDOR := Xiaomi
++	DEVICE_MODEL := R3D
++	SOC := qcom-ipq8064
++	BLOCKSIZE := 128k
++	PAGESIZE := 2048
++	KERNEL_SIZE := 4096k
++	IMAGE_SIZE := 86016k
++	UBINIZE_OPTS := -E 5
++	IMAGES := factory.bin sysupgrade.bin
++	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(BLOCKSIZE) | check-size
++	DEVICE_PACKAGES := kmod-i2c-gpio kmod-hwmon-lm75 kmod-hwmon-emc2305 hwmon-drivetemp \
++		kmod-usb-storage-uas ath10k-firmware-qca9984-ct ath10k-firmware-qca99x0-ct
++endef
++TARGET_DEVICES += xiaomi_r3d
++
+ define Device/zyxel_nbg6817
+ 	DEVICE_VENDOR := ZyXEL
+ 	DEVICE_MODEL := NBG6817

+ 0 - 6
devices/ipq807x_generic/diy.sh

@@ -3,12 +3,6 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-#git clone https://github.com/qosmio/nss-packages package/nss-packages
-
-#sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-nss-drv kmod-qca-nss-drv-pppoe kmod-qca-nss-ecm kmod-qca-nss-drv-bridge-mgr kmod-qca-nss-drv-vlan-mgr nss-firmware-ipq8074/' target/linux/ipq807x/Makefile
-
-sh -c "curl -sfL https://github.com/robimarko/openwrt/commit/23fa931934151f72c1655ffa62ff1a979575f07e.patch | patch -d './' -p1 --forward"
-
 sed -i '/rm -rf $(KDIR)\/tmp/d' include/image.mk
 
 rm -rf feeds/kiddin9/{rtl8821cu,rtl88x2bu} package/kernel/mt76 devices/common/patches/mt7922.patch

+ 6 - 6
devices/ipq807x_generic/patches/01-zte_mf269.bin.patch

@@ -38,22 +38,22 @@ diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Make
 index 32988910c0a..763eeb3a137 100644
 --- a/package/firmware/ipq-wifi/Makefile
 +++ b/package/firmware/ipq-wifi/Makefile
-@@ -38,6 +38,7 @@ ALLWIFIBOARDS:= \
+@@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
  	wallys_dr40x9 \
  	xiaomi_ax3600 \
  	xiaomi_ax9000 \
 +	zte_mf269 \
+ 	zte_mf289f \
+ 	zte_mf287plus \
  	zyxel_nbg7815
- 
- ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
-@@ -122,6 +123,7 @@ $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
+@@ -128,6 +129,7 @@ $(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,zte_mf269,ZTE MF269))
+ $(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F))
+ $(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
  $(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815))
- 
- $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
 diff --git a/package/firmware/ipq-wifi/board-zte_mf269.ipq8074 b/package/firmware/ipq-wifi/board-zte_mf269.ipq8074
 new file mode 100644
 index 0000000000000000000000000000000000000000..473fceabc4e532a3099c0210562a31188e0c1988

+ 0 - 65
devices/ipq807x_ipq60xx/.config

@@ -1,65 +0,0 @@
-
-CONFIG_TARGET_ipq807x=y
-CONFIG_TARGET_ipq807x_ipq60xx=y
-CONFIG_TARGET_MULTI_PROFILE=y
-CONFIG_TARGET_DEVICE_ipq807x_ipq60xx_DEVICE_glinet_axt1800=y
-CONFIG_TARGET_DEVICE_ipq807x_ipq60xx_DEVICE_glinet_ax1800=y
-
-CONFIG_CCACHE=n
-
-CONFIG_PACKAGE_perf=n
-
-CONFIG_PACKAGE_kmod-dm-raid=n
-CONFIG_PACKAGE_kmod-dm=n
-CONFIG_PACKAGE_kmod-siit=n
-CONFIG_PACKAGE_kmod-gl-mifi-mcu=n
-CONFIG_PACKAGE_kmod-pf-ring=n
-CONFIG_PACKAGE_kmod-pptp=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-pptp=n
-CONFIG_PACKAGE_kmod-bt_tty=n
-CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common=n
-CONFIG_PACKAGE_kmod-jool=n
-
-CONFIG_PACKAGE_kmod-qca-nss-drv-clmapmgr=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-eogremgr=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-gre=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-lag-mgr=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-map-t=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-match=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-profile=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-pvxlanmgr=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-vxlanmgr=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-igs=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-mirror=n
-CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=n
-
-CONFIG_PACKAGE_kmod-bpf-test=n
-CONFIG_PACKAGE_kmod-rtc-pt7c4338=n
-CONFIG_PACKAGE_kmod-video-pwc=n
-
-CONFIG_PACKAGE_spidev-test=n
-
-CONFIG_PACKAGE_kmod-scsi-cdrom=n
-CONFIG_PACKAGE_kmod-scsi-core=n
-CONFIG_PACKAGE_kmod-scsi-generic=n
-CONFIG_PACKAGE_kmod-scsi-tape=n
-
-CONFIG_PACKAGE_kmod-mac80211-hwsim=n
-CONFIG_PACKAGE_kmod-ath6kl=n
-CONFIG_PACKAGE_kmod-ath6kl-sdio=n
-CONFIG_PACKAGE_kmod-ath6kl-usb=n
-CONFIG_PACKAGE_kmod-lib80211=n
-CONFIG_PACKAGE_kmod-ath5k=n
-CONFIG_PACKAGE_kmod-ath10k=n
-CONFIG_PACKAGE_kmod-ath9k=n
-CONFIG_PACKAGE_kmod-ath9k-common=n
-CONFIG_PACKAGE_kmod-ath9k-htc=n
-CONFIG_PACKAGE_kmod-carl9170=n
-
-
-CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
-

+ 0 - 46
devices/ipq807x_ipq60xx/diy.sh

@@ -1,46 +0,0 @@
-#!/bin/bash
-
-shopt -s extglob
-
-SHELL_FOLDER=$(dirname $(readlink -f "$0"))
-
-rm -rf target/linux/ipq807x
-mv -f ../feeds/ipq807x/ipq807x target/linux/
-
-rm -rf package/feeds
-./scripts/feeds install -a -p ipq807x -f
-./scripts/feeds install -a -p wifi_ax -f
-./scripts/feeds install -a -p gl_feeds_common -f
-./scripts/feeds install -a -p kiddin9 -f
-./scripts/feeds install -a
-
-sed -i "/CONFIG_KERNEL_/d" devices/common/.config
-
-echo "
-CONFIG_FEED_gl_feeds_common=n
-CONFIG_FEED_ipq807x=n
-CONFIG_FEED_wifi_ax=n
-" >> devices/common/.config
-
-sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/feeds/wifi_ax/hostapd/Makefile
-
-rm -rf target/imagebuilder
-svn co https://github.com/openwrt/openwrt/branches/openwrt-21.02/target/imagebuilder target/imagebuilder
-
-rm -rf feeds/kiddin9/{rtl*,base-files,netifd,fullconenat-nft,mbedtls,oaf,shortcut-fe,fullconenat}
-svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/network/services/fullconenat feeds/kiddin9/fullconenat
-
-rm -rf package/kernel/{ath10k-ct,mt76,rtl8812au-ct}
-rm -rf feeds/packages/net/xtables-addons package/feeds/packages/{openvswitch,ksmbd} package/feeds/routing/batman-adv
-
-rm -rf package/kernel/exfat
-
-rm -rf devices/common/patches/{glinet,fix.patch,iptables.patch,targets.patch,kernel-defaults.patch,disable_flock.patch}
-
-rm -rf toolchain/musl package/utils/e2fsprogs package/libs/libselinux package/feeds/packages/acl  package/feeds/luci/ucode-mod-html package/feeds/luci/rpcd-mod-luci
-
-svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/toolchain/musl toolchain/musl
-svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/utils/e2fsprogs package/utils/e2fsprogs
-svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/libs/libselinux package/libs/libselinux
-svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/utils/ucode package/utils/ucode
-#ln -sf $(pwd)/feeds/luci/modules/luci-base package/feeds/kiddin9/

+ 0 - 7
devices/ipq807x_ipq60xx/feeds.conf

@@ -1,7 +0,0 @@
-src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02
-src-git luci https://github.com/openwrt/luci.git;openwrt-23.05
-src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
-src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master
-src-git gl_feeds_common https://github.com/gl-inet/gl-feeds.git;common
-src-link ipq807x ../../feeds/ipq807x
-src-link wifi_ax ../../feeds/wifi-ax

+ 0 - 28
devices/ipq807x_ipq60xx/patches/0999-depends.patch

@@ -1,28 +0,0 @@
---- a/target/linux/ipq807x/image/ipq60xx.mk
-+++ b/target/linux/ipq807x/image/ipq60xx.mk
-@@ -68,5 +68,5 @@
-   SUPPORTED_DEVICES := glinet,ax1800
-   DEVICE_DTS_CONFIG := config@cp03-c1
--  DEVICE_PACKAGES := ath11k-wifi-gl-ax1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3
-+  DEVICE_PACKAGES := ath11k-wifi-gl-ax1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3 wireless-regdb kmod-wireguard-backport
-   IMAGE/sysupgrade.tar := sysupgrade-tar | append-gl-metadata
- endef
-@@ -78,5 +78,5 @@
-   SUPPORTED_DEVICES := glinet,axt1800
-   DEVICE_DTS_CONFIG := config@cp03-c1
--  DEVICE_PACKAGES := ath11k-wifi-gl-axt1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3
-+  DEVICE_PACKAGES := ath11k-wifi-gl-axt1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3 wireless-regdb kmod-hwmon-pwmfan kmod-gl-sdk4-fan kmod-wireguard-backport
-   IMAGE/sysupgrade.tar := sysupgrade-tar | append-gl-metadata
- endef
-
---- a/target/linux/ipq807x/Makefile
-+++ b/target/linux/ipq807x/Makefile
-@@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/target.mk
- DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
- 	kmod-qca-nss-drv \
- 	kmod-usb-phy-ipq807x kmod-usb-dwc3-of-simple \
--	kmod-ath11k-ahb kmod-qrtr_mproc wpad \
-+	kmod-ath11k-ahb kmod-qrtr_mproc wpad-openssl \
- 	kmod-gpio-button-hotplug \
- 	qca-thermald-10.4 qca-ssdk-shell kmod-qca-nss-drv-bridge-mgr \
- 	uboot-envtools

+ 0 - 108
devices/ipq807x_ipq60xx/patches/base-files.patch

@@ -1,108 +0,0 @@
---- a/package/base-files/files/etc/rc.common
-+++ b/package/base-files/files/etc/rc.common
-@@ -28,7 +28,10 @@ restart() {
- }
- 
- boot() {
--	start "$@"
-+	name="$(basename "${initscript}")"
-+	name="${name##S[0-9][0-9]}"
-+	[[ "$(uci -q get $name.$name[0].enabled)" == 0 || "$(uci -q get $name.config.enabled)" == 0 || "$(uci -q get $name.$name.enabled)" == 0 || "$(uci -q get $name.main.enabled)" == 0 || "$(uci -q get $name.$name[0].enable)" == 0 || "$(uci -q get $name.config.enable)" == 0 || "$(uci -q get $name.$name.enable)" == 0 || "$(uci -q get $name.main.enable)" == 0 ]] || start "$@";
-+	
- }
- 
- shutdown() {
-
---- a/package/base-files/files/lib/functions.sh
-+++ b/package/base-files/files/lib/functions.sh
-@@ -283,10 +283,13 @@ default_postinst() {
- 			if [ "$PKG_UPGRADE" != "1" ]; then
- 				"$i" enable
- 			fi
--			"$i" start
-+			if "$i" enabled; then
-+				"$i" start
-+			fi
- 		fi
- 	done
- 
-+	[ -x /etc/init.d/ucitrack ] && /etc/init.d/ucitrack reload
- 	return $ret
- }
- 
-
---- a/package/base-files/files/etc/shinit
-+++ b/package/base-files/files/etc/shinit
-@@ -2,6 +2,8 @@
- [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
- 
- alias ll='ls -alF --color=auto'
-+alias reboot='(/bin/busybox reboot &);sleep 3;/bin/busybox reboot -f'
-+PS1='\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[m\]\[\e[32m\]\[\e[1;32m\]\@\[\e[36m\] \w\[\e[m\]\[\e[32m\]]\[\e[0m\] \$\[\e[m\] '
- 
- [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
-
---- a/package/base-files/files/sbin/sysupgrade
-+++ b/package/base-files/files/sbin/sysupgrade
-@@ -231,24 +231,15 @@ do_save_conffiles() {
- 	ask_bool 0 "Edit config file list" && vi "$CONFFILES"
- 
- 	if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
--		echo "${INSTALLED_PACKAGES}" >> "$CONFFILES"
--		mkdir -p "$ETCBACKUP_DIR"
--		# Avoid touching filesystem on each backup
--		RAMFS="$(mktemp -d -t sysupgrade.XXXXXX)"
--		mkdir -p "$RAMFS/upper" "$RAMFS/work"
--		mount -t overlay overlay -o lowerdir=$ETCBACKUP_DIR,upperdir=$RAMFS/upper,workdir=$RAMFS/work $ETCBACKUP_DIR &&
--			UMOUNT_ETCBACKUP_DIR=1 || {
--				echo "Cannot mount '$ETCBACKUP_DIR' as tmpfs to avoid touching disk while saving the list of installed packages." >&2
--				ask_bool 0 "Abort" && exit
--			}
--
--		# Format: pkg-name<TAB>{rom,overlay,unkown}
--		# rom is used for pkgs in /rom, even if updated later
--		find /usr/lib/opkg/info -name "*.control" \( \
--			\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
--			\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
--			\( -exec echo {} unknown \; \) \
--			\) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES}
-+		. /etc/profile.d/opkg.sh && opkg save
-+		[ -f /rom/etc/uci-defaults/zz-asu-defaults ] && {
-+		 cp -f /rom/etc/uci-defaults/zz-asu-defaults /etc/uci-defaults/zz-asu-defaults
-+		 echo "/etc/uci-defaults/zz-asu-defaults" >> $CONFFILES
-+		}
-+	else
-+		uci -q del opkg.auto
-+		uci -q del opkg.custom
-+		uci commit opkg
- 	fi
- 
- 	v "Saving config files..."
-
---- a/package/base-files/files/etc/profile
-+++ b/package/base-files/files/etc/profile
-@@ -22,7 +23,11 @@ esac
- 
- [ -n "$FAILSAFE" ] || {
- 	for FILE in /etc/profile.d/*.sh; do
--		[ -e "$FILE" ] && . "$FILE"
-+		if [ "$FILE" == "/etc/profile.d/sysinfo.sh" ]; then
-+		 [ "$(which bash)" ] && env -i bash "$FILE"
-+		else
-+		 [ -e "$FILE" ] && . "$FILE"
-+		fi
- 	done
- 	unset FILE
- }
-
---- a/package/base-files/files/lib/preinit/02_sysinfo
-+++ b/package/base-files/files/lib/preinit/02_sysinfo
-@@ -5,6 +5,7 @@ do_sysinfo_generic() {
- 		echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name
- 	[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
- 		echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model
-+	sed -i "s/friendlyelec/friendlyarm/" /tmp/sysinfo/board_name
- }
- 
- boot_hook_add preinit_main do_sysinfo_generic
-

+ 0 - 41
devices/ipq807x_ipq60xx/patches/fix.patch

@@ -1,41 +0,0 @@
---- a/include/image.mk
-+++ b/include/image.mk
-@@ -609,6 +609,7 @@ define Device/Build/image
- 	IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
- 	IMAGE_FILESYSTEM="$(1)" \
- 	IMAGE_PREFIX="$(IMAGE_PREFIX)" \
-+	KERNEL_INITRAMFS_IMAGE="$(subst $(IMG_PREFIX_EXTRA),,$(KERNEL_INITRAMFS_IMAGE))" \
- 	DEVICE_VENDOR="$(DEVICE_VENDOR)" \
- 	DEVICE_MODEL="$(DEVICE_MODEL)" \
- 	DEVICE_VARIANT="$(DEVICE_VARIANT)" \
-
---- a/scripts/json_add_image_info.py
-+++ b/scripts/json_add_image_info.py
-@@ -48,6 +48,7 @@ def get_titles():
-     "profiles": {
-         device_id: {
-             "image_prefix": getenv("IMAGE_PREFIX"),
-+            "image_initramfs": getenv("KERNEL_INITRAMFS_IMAGE"),
-             "images": [
-                 {
-                     "type": getenv("IMAGE_TYPE"),
-
---- a/scripts/json_overview_image_info.py
-+++ b/scripts/json_overview_image_info.py
-@@ -47,7 +47,7 @@ def get_initial_output(image_info):
- 
- 
- if output:
--    default_packages, output["arch_packages"] = run(
-+    default_packages, output["arch_packages"], output["kernel_version"] = run(
-         [
-             "make",
-             "--no-print-directory",
-@@ -55,6 +55,7 @@ def get_initial_output(image_info):
-             "target/linux/",
-             "val.DEFAULT_PACKAGES",
-             "val.ARCH_PACKAGES",
-+            "val.LINUX_VERSION",
-         ],
-         stdout=PIPE,
-         stderr=PIPE,

+ 0 - 26
devices/ipq807x_ipq60xx/patches/iptables-mod-socket.patch

@@ -1,26 +0,0 @@
---- a/package/network/utils/iptables/Makefile
-+++ b/package/network/utils/iptables/Makefile
-@@ -394,4 +394,17 @@
- endef
- 
-+define Package/iptables-mod-socket
-+$(call Package/iptables/Module, +kmod-ipt-socket)
-+  TITLE:=Socket match iptables extensions
-+endef
-+
-+define Package/iptables-mod-socket/description
-+Socket match iptables extensions.
-+
-+ Matches:
-+  - socket
-+
-+endef
-+
- define Package/iptables-mod-tproxy
- $(call Package/iptables/Module, +kmod-ipt-tproxy)
-@@ -679,4 +692,5 @@
- $(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m)))
- $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
-+$(eval $(call BuildPlugin,iptables-mod-socket,$(IPT_SOCKET-m)))
- $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
- $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))

+ 0 - 8
devices/ipq807x_ipq60xx/patches/kernel-defaults.patch

@@ -1,8 +0,0 @@
---- a/include/kernel-defaults.mk
-+++ b/include/kernel-defaults.mk
-@@ -116,4 +116,5 @@
- define Kernel/CompileModules/Default
- 	rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
-+	+$(KERNEL_MAKE) olddefconfig
- 	+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
- endef

+ 0 - 32
devices/ipq807x_ipq60xx/patches/targets.patch

@@ -1,32 +0,0 @@
---- a/include/target.mk
-+++ b/include/target.mk
-@@ -44,9 +44,11 @@
- # For router targets
- DEFAULT_PACKAGES.router:=\
--	dnsmasq \
-+	dnsmasq-full \
- 	firewall \
- 	ip6tables \
- 	iptables \
- 	kmod-ipt-offload \
-+	kmod-ipt-nat \
-+	kmod-ipt-nat6 \
- 	odhcp6c \
- 	odhcpd-ipv6only \
-@@ -83,4 +85,16 @@
-     -include ./$(SUBTARGET)/target.mk
-   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
- 

+ 1 - 1
devices/mediatek_filogic/patches/ax6000.patch

@@ -83,7 +83,7 @@ index 0000000000000..759baae3aeb18
  	tplink,tl-xdr6088|\
  	xiaomi,mi-router-wr30u-112m-nmbm|\
  	xiaomi,mi-router-wr30u-ubootmod|\
-+	xiaomi,redmi-router-ax6000|\	
++	xiaomi,redmi-router-ax6000|\
  	xiaomi,redmi-router-ax6000-ubootmod)
  		CI_KERNPART="fit"
  		nand_do_upgrade "$1"

+ 1 - 0
devices/mediatek_mt7981/README.md

@@ -0,0 +1 @@
+源码来源 https://github.com/hanwckf/immortalwrt-mt798x 感谢

+ 3 - 1
devices/mediatek_mt7981/diy.sh

@@ -18,4 +18,6 @@ svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/libs/li
 svn co https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/utils/ucode package/utils/ucode
 #ln -sf $(pwd)/feeds/luci/modules/luci-base package/feeds/kiddin9/
 
-sed -i "s/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += luci-app-mtk mii_mgr wifi-profile mtkhqos_util wireless-regdb switch regs kmod-warp kmod-mt_wifi kmod-mediatek_hnat kmod-conninfra datconf-lua/" target/linux/mediatek/Makefile
+sed -i "s/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += luci-app-mtk mii_mgr wifi-profile mtkhqos_util wireless-regdb switch regs kmod-warp kmod-mt_wifi kmod-mediatek_hnat kmod-conninfra datconf-lua/" target/linux/mediatek/Makefile
+
+rm -rf devices/common/patches/enable_wifi.patch

+ 2 - 3
devices/meson_meson8b/diy.sh

@@ -11,7 +11,6 @@ svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/meson target/linu
 
 curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/include/kernel-5.10 -o include/kernel-5.10
 
-svn co https://github.com/openwrt/routing/branches/openwrt-22.03/batman-adv feeds/routing/batman-adv
-
-sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += automount/' target/linux/meson/Makefile
 
+rm -rf package/network/services/hostapd
+sed -i "/KernelPackage,cfg80211/d" package/kernel/mac80211/Makefile

+ 9 - 0
devices/qualcommax_ipq60xx/.config

@@ -0,0 +1,9 @@
+CONFIG_TARGET_qualcommax=y
+CONFIG_TARGET_qualcommax_ipq60xx=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_glinet_gl-ax1800=y
+CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_glinet_gl-axt1800=y
+
+CONFIG_PACKAGE_kmod-qca-nss-cfi-cryptoapi=n
+
+CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

+ 1 - 0
devices/qualcommax_ipq60xx/README.md

@@ -0,0 +1 @@
+源码来源 https://github.com/JiaY-shi/openwrt 感谢

+ 15 - 0
devices/qualcommax_ipq60xx/diy.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+shopt -s extglob
+
+SHELL_FOLDER=$(dirname $(readlink -f "$0"))
+make defconfig
+
+git clone https://github.com/JiaY-shi/nss-packages.git package/nss-packages
+
+sed -i "s/CONFIG_ALL_NONSHARED=y/CONFIG_ALL_NONSHARED=n/" .config
+sed -i "s/CONFIG_ALL_KMODS=y/CONFIG_ALL_KMODS=n/" .config
+make defconfig
+sed -i "s/# CONFIG_ALL_NONSHARED is not set/CONFIG_ALL_NONSHARED=y/" .config
+
+rm -rf feeds/kiddin9/{fibocom_QMI_WWAN,quectel_Gobinet,shortcut-fe}

+ 4 - 0
devices/qualcommax_ipq60xx/feeds.conf

@@ -0,0 +1,4 @@
+src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
+src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
+src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
+src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master

+ 2 - 0
devices/qualcommax_ipq60xx/settings.ini

@@ -0,0 +1,2 @@
+REPO_URL="https://github.com/JiaY-shi/openwrt"
+REPO_BRANCH="ipq60xx-devel_nss"

+ 0 - 3
devices/rockchip_armv8/.config

@@ -4,12 +4,9 @@ CONFIG_TARGET_rockchip_armv8=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
 
-CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r6c=n
-CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r6s=n
 CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_radxa_rock-pi-4=n
 CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_pine64_rockpro64=n
 
-CONFIG_PACKAGE_kmod-rtl8821cu=m
 CONFIG_PACKAGE_kmod-rtl88x2bu=m
 CONFIG_PACKAGE_kmod-pcie_mhi=m
 

+ 6 - 7
devices/rockchip_armv8/diy.sh

@@ -6,16 +6,15 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 rm -rf package/boot/uboot-rockchip
 svn export --force https://github.com/coolsnowwolf/lede/trunk/package/boot/uboot-rockchip package/boot/uboot-rockchip
 svn export --force https://github.com/coolsnowwolf/lede/trunk/package/boot/arm-trusted-firmware-rockchip-vendor package/boot/arm-trusted-firmware-rockchip-vendor
-rm -rf target/linux/rockchip/!(Makefile|patches-5.15)
+
+rm -rf target/linux/generic target/linux/rockchip/!(Makefile)
+
+svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic target/linux/generic
 svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/rockchip target/linux/rockchip
-rm -rf target/linux/rockchip/{.svn,patches-5.15/.svn}
-svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/rockchip/patches-5.15 target/linux/rockchip/patches-5.15
-rm -rf target/linux/rockchip/patches-5.15/{002-net-usb*,204-rockchip-rk3328*,003-dt-bindings*,006-rockchip-rk3399*,072-v6.2-net-phy*,073-v6.2-net-phy*,074-v6.3-net-phy*,075-v6.3-net-phy*,076-v6.3-net-phy*,077-v6.3-net-phy*,078-v6.3-net-phy*,079-v6.3-net-phy*,202-rockchip-rk3328-Add*,203-rockchip-rk3328-Add*}
 
-curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk
+curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/include/kernel-5.15 -o include/kernel-5.15
 
-curl -sfL https://raw.githubusercontent.com/icevel/lede-pico3399-ro/master/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch -o package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch
-curl -sfL https://raw.githubusercontent.com/icevel/lede-pico3399-ro/master/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts -o target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts
+curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk
 
 sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk
 

+ 1 - 1
devices/rockchip_armv8/patches/r6s.patch → devices/rockchip_armv8/patches/r6s.patch.b

@@ -134,7 +134,7 @@
  include $(SUBTARGET).mk
  
 +define Image/Build
-+	if [[ "$(PROFILE_SANITIZED)" == "$(PROFILE_SANITIZED)" == "friendlyarm_nanopc-t6" ]]; then \
++	if [[ "$(PROFILE_SANITIZED)" == "friendlyarm_nanopc-t6" ]]; then \
 +		export IMG_PREFIX="$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))"; \
 +		export BIN_DIR=$(BIN_DIR); \
 +		export TOPDIR=$(TOPDIR); \

+ 4 - 0
devices/rockchip_rk3588_armv8/diy.sh

@@ -22,5 +22,9 @@ sed -i "/KernelPackage,dma-buf/d" package/kernel/linux/modules/other.mk
 
 sed -i "/friendlyelec/d" package/feeds/kiddin9/base-files/files/lib/preinit/02_sysinfo
 
+rm -rf devices/common/patches/enable_wifi.patch
+
+sed -i "s/ath11k ath11k-ahb ath11k-pci //" package/kernel/mac80211/ath.mk
+
 #curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk
 

+ 0 - 170
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera1.dtsi

@@ -1,170 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-&csi2_dphy0_hw {
-	status = "disabled";
-};
-
-&csi2_dphy0 {
-	status = "disabled";
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi_in_ucam0: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&ov13850_out2>;
-				data-lanes = <1 2>;
-			};
-
-			mipi_in_ucam1: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&ov13855_out2>;
-				data-lanes = <1 2>;
-			};
-		};
-		port@1 {
-		        reg = <1>;
-		        #address-cells = <1>;
-		        #size-cells = <0>;
-		        csidphy0_out: endpoint@0 {
-		                reg = <0>;
-		                remote-endpoint = <&mipi2_csi2_input>;
-		        };
-		};
-	};
-};
-
-&i2c7 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c7m0_xfer>;
-
-	vm149c_p1: vm149c-p1@c {
-		compatible = "silicon touch,vm149c";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <1>;
-		rockchip,camera-module-facing = "back";
-	};
-
-	ov13850_1: ov13850-1@10 {
-		compatible = "ovti,ov13850";
-		status = "disabled";
-		reg = <0x10>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
-		clock-names = "xvclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&mipim0_camera3_clk>;
-		reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <0>;
-		rockchip,camera-module-facing = "back";
-		rockchip,camera-module-name = "CMK-CT0116";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&vm149c_p1>;
-		port {
-			ov13850_out2: endpoint {
-				remote-endpoint = <&mipi_in_ucam0>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-
-	dw9714_p1: dw9714-p1@c {
-		compatible = "dongwoon,dw9714";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <0>;
-		rockchip,vcm-start-current = <10>;
-		rockchip,vcm-rated-current = <85>;
-		rockchip,vcm-step-mode = <5>;
-		rockchip,camera-module-facing = "back";
-	};
-
-	ov13855_1: ov13855-1@36 {
-		compatible = "ovti,ov13855";
-		status = "disabled";
-		reg = <0x36>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
-		clock-names = "xvclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&mipim0_camera3_clk>;
-		reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <0>;
-		rockchip,camera-module-facing = "back";
-		rockchip,camera-module-name = "CMK-OT2016-FV1";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&dw9714_p1>;
-		port {
-			ov13855_out2: endpoint {
-				remote-endpoint = <&mipi_in_ucam1>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-};
-
-&mipi2_csi2 {
-	status = "disabled";
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			mipi2_csi2_input: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&csidphy0_out>;
-			};
-		};
-		port@1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			mipi2_csi2_output: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&cif_mipi_in2>;
-			};
-		};
-	};
-};
-
-&rkcif_mipi_lvds2 {
-	status = "disabled";
-	port {
-		cif_mipi_in2: endpoint {
-			remote-endpoint = <&mipi2_csi2_output>;
-		};
-	};
-};
-
-&rkcif_mipi_lvds2_sditf {
-	status = "disabled";
-	port {
-		mipi2_lvds_sditf: endpoint {
-			remote-endpoint = <&isp0_vir1>;
-		};
-	};
-};
-
-&rkisp0_vir1 {
-	status = "disabled";
-	port {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		isp0_vir1: endpoint@0 {
-			reg = <0>;
-			remote-endpoint = <&mipi2_lvds_sditf>;
-		};
-	};
-};

+ 0 - 182
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera2.dtsi

@@ -1,182 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-&csi2_dcphy0 {
-	status = "disabled";
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi_in_cam0: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&ov13850_out>;
-				data-lanes = <1 2>;
-			};
-
-			mipi_in_cam1: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&ov13855_out>;
-				data-lanes = <1 2>;
-			};
-		};
-
-		port@1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			csidcphy0_out: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&mipi0_csi2_input>;
-			};
-		};
-	};
-};
-
-&i2c7 {
-	status = "okay";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c7m0_xfer>;
-
-	vm149c_p2: vm149c-p2@c {
-		compatible = "silicon touch,vm149c";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <1>;
-		rockchip,camera-module-facing = "back";
-	};
-
-	ov13850_2: ov13850-2@10 {
-		compatible = "ovti,ov13850";
-		status = "disabled";
-		reg = <0x10>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
-		clock-names = "xvclk";
-                power-domains = <&power RK3588_PD_VI>;
-		pinctrl-names = "default";
-                pinctrl-0 = <&mipim0_camera4_clk>;
-		rockchip,grf = <&sys_grf>;
-		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <0>;
-		rockchip,camera-module-facing = "back";
-		rockchip,camera-module-name = "CMK-CT0116";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&vm149c_p2>;
-		port {
-			ov13850_out: endpoint {
-				remote-endpoint = <&mipi_in_cam0>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-
-	dw9714_p2: dw9714-p2@c {
-		compatible = "dongwoon,dw9714";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <0>;
-		rockchip,vcm-start-current = <10>;
-		rockchip,vcm-rated-current = <85>;
-		rockchip,vcm-step-mode = <5>;
-		rockchip,camera-module-facing = "back";
-	};
-
-	ov13855_2: ov13855-2@36 {
-		compatible = "ovti,ov13855";
-		status = "disabled";
-		reg = <0x36>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
-		clock-names = "xvclk";
-		power-domains = <&power RK3588_PD_VI>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&mipim0_camera4_clk>;
-		rockchip,grf = <&sys_grf>;
-		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <0>;
-		rockchip,camera-module-facing = "back";
-		rockchip,camera-module-name = "CMK-OT2016-FV1";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&dw9714_p2>;
-		port {
-			ov13855_out: endpoint {
-				remote-endpoint = <&mipi_in_cam1>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-};
-
-&mipi0_csi2 {
-	status = "disabled";
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi0_csi2_input: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&csidcphy0_out>;
-			};
-		};
-
-		port@1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi0_csi2_output: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&cif_mipi_in0>;
-			};
-		};
-	};
-};
-
-&rkcif_mipi_lvds {
-	status = "disabled";
-
-	port {
-		cif_mipi_in0: endpoint {
-			remote-endpoint = <&mipi0_csi2_output>;
-		};
-	};
-};
-
-&rkcif_mipi_lvds_sditf {
-	status = "disabled";
-
-	port {
-		mipi_lvds_sditf: endpoint {
-			remote-endpoint = <&isp1_in1>;
-		};
-	};
-};
-
-&rkisp0_vir0 {
-	status = "disabled";
-
-	port {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		isp1_in1: endpoint@0 {
-			reg = <0>;
-			remote-endpoint = <&mipi_lvds_sditf>;
-		};
-	};
-};

+ 0 - 179
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera3.dtsi

@@ -1,179 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-&csi2_dcphy1 {
-	status = "disabled";
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi_in_dcphy0: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&ov13850_out1>;
-				data-lanes = <1 2>;
-			};
-
-			mipi_in_dcphy1: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&ov13855_out1>;
-				data-lanes = <1 2>;
-			};
-		};
-
-		port@1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			csidcphy1_out: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&mipi1_csi2_input>;
-			};
-		};
-	};
-};
-
-&i2c2 {
-	status = "okay";
-
-	vm149cp1: vm149c@c {
-		compatible = "silicon touch,vm149c";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <1>;
-		rockchip,camera-module-facing = "front";
-	};
-
-	ov13850_3: ov13850@10 {
-		compatible = "ovti,ov13850";
-		status = "disabled";
-		reg = <0x10>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
-		clock-names = "xvclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&mipim0_camera4_clk>;
-		rockchip,grf = <&sys_grf>;
-		reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <1>;
-		rockchip,camera-module-facing = "front";
-		rockchip,camera-module-name = "CMK-CT0116";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&vm149cp1>;
-		port {
-			ov13850_out1: endpoint {
-				remote-endpoint = <&mipi_in_dcphy0>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-
-	dw9714: dw9714@c {
-		compatible = "dongwoon,dw9714";
-		status = "disabled";
-		reg = <0x0c>;
-		rockchip,camera-module-index = <0>;
-		rockchip,vcm-start-current = <10>;
-		rockchip,vcm-rated-current = <85>;
-		rockchip,vcm-step-mode = <5>;
-		rockchip,camera-module-facing = "front";
-	};
-
-	ov13855_3: ov13855@36 {
-		compatible = "ovti,ov13855";
-		status = "disabled";
-		reg = <0x36>;
-		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
-		clock-names = "xvclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&mipim0_camera4_clk>;
-		rockchip,grf = <&sys_grf>;
-		reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
-		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
-		rockchip,camera-module-index = <1>;
-		rockchip,camera-module-facing = "front";
-		rockchip,camera-module-name = "CMK-OT2016-FV1";
-		rockchip,camera-module-lens-name = "default";
-		lens-focus = <&dw9714>;
-		port {
-			ov13855_out1: endpoint {
-				remote-endpoint = <&mipi_in_dcphy1>;
-				data-lanes = <1 2>;
-			};
-		};
-	};
-};
-
-&mipi1_csi2 {
-	status = "disabled";
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi1_csi2_input: endpoint@1 {
-				reg = <1>;
-				remote-endpoint = <&csidcphy1_out>;
-			};
-		};
-
-		port@1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			mipi1_csi2_output: endpoint@0 {
-				reg = <0>;
-				remote-endpoint = <&cif_mipi_in1>;
-			};
-		};
-	};
-};
-
-&rkcif_mipi_lvds1 {
-	status = "disabled";
-
-	port {
-		cif_mipi_in1: endpoint {
-			remote-endpoint = <&mipi1_csi2_output>;
-		};
-	};
-};
-
-&rkcif_mipi_lvds1_sditf {
-	status = "disabled";
-
-        port {
-                mipi1_lvds_sditf: endpoint {
-                        remote-endpoint = <&isp1_in0>;
-                };
-        };
-};
-
-&rkisp1_vir0 {
-	status = "disabled";
-
-	port {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		isp1_in0: endpoint@0 {
-			reg = <0>;
-			remote-endpoint = <&mipi1_lvds_sditf>;
-		};
-	};
-};

+ 0 - 101
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-lcd.dtsi

@@ -1,101 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-
-&dsi0 {
-	status = "disabled";
-};
-
-&dsi0_panel {
-	status = "disabled";
-	reset-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>;
-	enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&lcd0_rst_gpio>;
-};
-
-&dsi0_in_vp2 {
-	status = "disabled";
-};
-
-&dsi0_in_vp3 {
-	status = "disabled";
-};
-
-&route_dsi0 {
-	status = "disabled";
-	connect = <&vp3_out_dsi0>;
-};
-
-&mipi_dcphy0 {
-	status = "okay";
-};
-
-&i2c7 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c7m0_xfer>;
-
-	gt9xx_1: touchscreen@14 {
-		compatible = "goodix,gt9271";
-		reg = <0x14>;
-		interrupt-parent = <&gpio1>;
-		interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
-		irq-gpios = <&gpio1 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
-		reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
-		touchscreen-inverted-x;
-		//touchscreen-inverted-y;
-		touchscreen-swapped-x-y;
-		touchscreen-size-x = <1280>;
-		touchscreen-size-y = <800>;
-		status = "okay";
-	};
-};
-
-
-
-&dsi1 {
-	status = "disabled";
-};
-
-&dsi1_panel {
-	status = "disabled";
-	reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_LOW>;
-	enable-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&lcd1_rst_gpio>;
-};
-
-&dsi1_in_vp2 {
-	status = "disabled";
-};
-
-&dsi1_in_vp3 {
-	status = "disabled";
-};
-
-&route_dsi1 {
-	status = "disabled";
-	connect = <&vp3_out_dsi1>;
-};
-
-&mipi_dcphy1 {
-	status = "okay";
-};
-
-&i2c2 {
-	status = "okay";
-
-	gt9xx_0: touchscreen@14 {
-		compatible = "goodix,gt9271";
-		reg = <0x14>;
-		interrupt-parent = <&gpio1>;
-		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
-		irq-gpios = <&gpio1 RK_PA7 IRQ_TYPE_LEVEL_LOW>;
-		reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
-		touchscreen-inverted-x;
-		//touchscreen-inverted-y;
-		touchscreen-swapped-x-y;
-		touchscreen-size-x = <1280>;
-		touchscreen-size-y = <800>;
-		status = "okay";
-	};
-};

+ 0 - 25
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dts

@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-/dts-v1/;
-
-#include "rk3588s-orangepi-5.dts"
-
-&sata0 {
-	status = "okay";
-};
-
-&pcie2x1l2 {
-	status = "disabled";
-};
-
-&wireless_wlan {
-	status = "disabled";
-};
-
-&wireless_bluetooth {
-	status = "disabled";
-};

+ 0 - 454
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-spi.dts

@@ -1,454 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-/dts-v1/;
-
-#include "rk3588s-orangepi-5.dtsi"
-#include "rk3588-linux.dtsi"
-#include "rk3588s-orangepi-5-lcd.dtsi"
-
-#include "rk3588s-orangepi-5-camera1.dtsi"
-#include "rk3588s-orangepi-5-camera2.dtsi"
-#include "rk3588s-orangepi-5-camera3.dtsi"
-
-/ {
-	model = "Orange Pi 5";
-	compatible = "rockchip,rk3588s-orangepi-5", "rockchip,rk3588";
-
-	vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc_3v3_sd_s0";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
-		enable-active-low;
-		vin-supply = <&vcc_3v3_s3>;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-
-	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc_1v1_nldo_s3";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <1100000>;
-		regulator-max-microvolt = <1100000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-
-	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3_pcie2x1l2";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-		enable-active-high;
-		regulator-boot-on;
-		regulator-always-on;
-		gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
-		startup-delay-us = <50000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-
-	leds: gpio-leds {
-		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 =<&leds_gpio>;
-		status = "okay";
-
-		led@1 {
-			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
-			label = "status_led";
-			linux,default-trigger = "heartbeat";
-			linux,default-trigger-delay-ms = <0>;
-		};
-	};
-};
-
-&gmac1 {
-	/* Use rgmii-rxid mode to disable rx delay inside Soc */
-	phy-mode = "rgmii-rxid";
-	clock_in_out = "output";
-
-	snps,reset-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
-	snps,reset-active-low;
-	/* Reset time is 20ms, 100ms for rtl8211f */
-	snps,reset-delays-us = <0 20000 100000>;
-
-	pinctrl-names = "default";
-	pinctrl-0 = <&gmac1_miim
-	             &gmac1_tx_bus2
-	             &gmac1_rx_bus2
-	             &gmac1_rgmii_clk
-	             &gmac1_rgmii_bus>;
-
-	tx_delay = <0x42>;
-	/* rx_delay = <0x3f>; */
-
-	phy-handle = <&rgmii_phy1>;
-	status = "okay";
-};
-
-&mdio1 {
-	rgmii_phy1: phy@1 {
-		compatible = "ethernet-phy-ieee802.3-c22";
-		reg = <0x1>;
-	};
-};
-
-&hdmi0 {
-	enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
-	cec-enable;
-	status = "okay";
-};
-
-&hdmi0_in_vp0 {
-	status = "okay";
-};
-
-&hdmi0_sound {
-	status = "okay";
-};
-
-&hdptxphy_hdmi0 {
-	status = "okay";
-};
-
-&route_hdmi0{
-	status = "okay";
-};
-
-&i2s5_8ch {
-	status = "okay";
-};
-
-&i2s1_8ch {
-	status = "okay";
-	rockchip,i2s-tx-route = <3 2 1 0>;
-	rockchip,i2s-rx-route = <1 3 2 0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2s1m0_sclk
-	             &i2s1m0_lrck
-	             &i2s1m0_sdi1
-	             &i2s1m0_sdo3>;
-};
-
-&i2c0 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0m2_xfer>;
-
-	vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
-		compatible = "rockchip,rk8602";
-		reg = <0x42>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_cpu_big0_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <1050000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-
-	vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
-		compatible = "rockchip,rk8603";
-		reg = <0x43>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_cpu_big1_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <1050000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-};
-
-&i2c2 {
-	status = "okay";
-
-	vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
-		compatible = "rockchip,rk8602";
-		reg = <0x42>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_npu_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <950000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-};
-
-/*
-   pin3: GPIO1_B7
-   pin5: GPIO1_B6
-*/
-&i2c5 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c5m3_xfer>;
-};
-
-&uart1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1m1_xfer>;
-};
-
-&pwm13 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm13m2_pins>;
-};
-
-/*
-   pin7: GPIO1_C6
-*/
-&pwm15 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm15m2_pins>;
-};
-
-/*
-   pin11: GPIO4_B2
-   pin13: GPIO4_B3
-*/
-&pwm14 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm14m1_pins>;
-};
-
-&can1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&can1m1_pins>;
-	assigned-clocks = <&cru CLK_CAN1>;
-	assigned-clock-rates = <200000000>;
-};
-
-/*
-   pin15: GPIO0_D4
-   pin12: GPIO0_D5
-*/
-&can2 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&can2m1_pins>;
-	assigned-clocks = <&cru CLK_CAN2>;
-	assigned-clock-rates = <200000000>;
-};
-
-/*
-   pin19: GPIO1_C1
-   pin21: GPIO1_C0
-   pin23: GPIO1_C2
-   pin24: GPIO1_C4
-*/
-&spi4 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi4m0_cs1 &spi4m0_pins>;
-	assigned-clocks = <&cru CLK_SPI4>;
-	assigned-clock-rates = <200000000>;
-	num-cs = <2>;
-
-	spi_dev@1 {
-		compatible = "rockchip,spidev";
-		reg = <1>;
-		spi-max-frequency = <50000000>;
-	};
-};
-
-&i2c3 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c3m0_xfer>;
-};
-
-&uart3 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart3m0_xfer>;
-};
-
-&pwm3 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm3m2_pins>;
-	//pinctrl-0 = <&pwm3m0_pins>;
-};
-
-/*
-   pin8:  GPIO4_A3
-   pin10: GPIO4_A4
-*/
-&uart0 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0m2_xfer>;
-};
-
-/*
-   pin16: GPIO1_D3
-   pin18: GPIO1_D2
-*/
-&uart4 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart4m0_xfer>;
-};
-
-&i2c1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	//pinctrl-0 = <&i2c1m4_xfer>;
-	pinctrl-0 = <&i2c1m2_xfer>;
-};
-
-&pwm0 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm0m1_pins>;
-};
-
-/*
-   pin26: GPIO1_A3
-*/
-&pwm1 {
-	status = "disabled";
-	pinctrl-names = "active";
-	//pinctrl-0 = <&pwm1m2_pins>;
-	pinctrl-0 = <&pwm1m1_pins>;
-};
-
-/* watchdog */
-&wdt {
-        status = "okay";
-};
-
-&sfc {
-	status = "okay";
-	max-freq = <100000000>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&fspim0_pins>;
-
-	spi_flash: spi-flash@0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "jedec,spi-nor";
-		reg = <0x0>;
-		spi-max-frequency = <100000000>;
-		spi-tx-bus-width = <1>;
-		spi-rx-bus-width = <4>;
-		status = "okay";
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			uboot@0 {
-				label = "uboot";
-				reg = <0x0 0x200000>;
-			};
-
-			dtb@200000 {
-				label = "dtb";
-				reg = <0x200000 0x40000>;
-			};
-
-			firmware@240000 {
-				compatible = "denx,uimage";
-				label = "firmware";
-				reg = <0x240000 0xdc0000>;
-			};
-
-		};
-	};
-};
-
-&mipi_dcphy0 {
-        status = "okay";
-};
-
-&mipi_dcphy1 {
-        status = "okay";
-};
-
-&rkcif {
-	status = "okay";
-};
-
-&rkcif_mmu {
-	status = "okay";
-};
-
-&rkisp0 {
-	status = "okay";
-};
-
-&isp0_mmu {
-	status = "okay";
-};
-
-&rkisp1 {
-	status = "okay";
-};
-
-&isp1_mmu {
-	status = "okay";
-};
-
-&sata0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sata_reset>;
-	status = "disabled";
-};
-
-&pcie2x1l2 {
-	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
-	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
-	rockchip,skip-scan-in-resume;
-	status = "okay";
-};
-
-&wireless_wlan {
-	status = "okay";
-};
-
-&wireless_bluetooth {
-	status = "okay";
-};
-
-&pinctrl
-{
-	gpio-func {
-		leds_gpio: leds-gpio {
-			rockchip,pins =
-				<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-};

+ 0 - 454
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts

@@ -1,454 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-/dts-v1/;
-
-#include "rk3588s-orangepi-5.dtsi"
-#include "rk3588-linux.dtsi"
-#include "rk3588s-orangepi-5-lcd.dtsi"
-
-#include "rk3588s-orangepi-5-camera1.dtsi"
-#include "rk3588s-orangepi-5-camera2.dtsi"
-#include "rk3588s-orangepi-5-camera3.dtsi"
-
-/ {
-	model = "Orange Pi 5";
-	compatible = "rockchip,rk3588s-orangepi-5", "rockchip,rk3588";
-
-	vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc_3v3_sd_s0";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
-		enable-active-low;
-		vin-supply = <&vcc_3v3_s3>;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-
-	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc_1v1_nldo_s3";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <1100000>;
-		regulator-max-microvolt = <1100000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-
-	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3_pcie2x1l2";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-		enable-active-high;
-		regulator-boot-on;
-		regulator-always-on;
-		gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
-		startup-delay-us = <50000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-
-	leds: gpio-leds {
-		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 =<&leds_gpio>;
-		status = "okay";
-
-		led@1 {
-			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
-			label = "status_led";
-			linux,default-trigger = "heartbeat";
-			linux,default-trigger-delay-ms = <0>;
-		};
-	};
-};
-
-&gmac1 {
-	/* Use rgmii-rxid mode to disable rx delay inside Soc */
-	phy-mode = "rgmii-rxid";
-	clock_in_out = "output";
-
-	snps,reset-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
-	snps,reset-active-low;
-	/* Reset time is 20ms, 100ms for rtl8211f */
-	snps,reset-delays-us = <0 20000 100000>;
-
-	pinctrl-names = "default";
-	pinctrl-0 = <&gmac1_miim
-	             &gmac1_tx_bus2
-	             &gmac1_rx_bus2
-	             &gmac1_rgmii_clk
-	             &gmac1_rgmii_bus>;
-
-	tx_delay = <0x42>;
-	/* rx_delay = <0x3f>; */
-
-	phy-handle = <&rgmii_phy1>;
-	status = "okay";
-};
-
-&mdio1 {
-	rgmii_phy1: phy@1 {
-		compatible = "ethernet-phy-ieee802.3-c22";
-		reg = <0x1>;
-	};
-};
-
-&hdmi0 {
-	enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
-	cec-enable;
-	status = "okay";
-};
-
-&hdmi0_in_vp0 {
-	status = "okay";
-};
-
-&hdmi0_sound {
-	status = "okay";
-};
-
-&hdptxphy_hdmi0 {
-	status = "okay";
-};
-
-&route_hdmi0{
-	status = "okay";
-};
-
-&i2s5_8ch {
-	status = "okay";
-};
-
-&i2s1_8ch {
-	status = "okay";
-	rockchip,i2s-tx-route = <3 2 1 0>;
-	rockchip,i2s-rx-route = <1 3 2 0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2s1m0_sclk
-	             &i2s1m0_lrck
-	             &i2s1m0_sdi1
-	             &i2s1m0_sdo3>;
-};
-
-&i2c0 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0m2_xfer>;
-
-	vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
-		compatible = "rockchip,rk8602";
-		reg = <0x42>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_cpu_big0_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <1050000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-
-	vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
-		compatible = "rockchip,rk8603";
-		reg = <0x43>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_cpu_big1_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <1050000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-};
-
-&i2c2 {
-	status = "okay";
-
-	vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
-		compatible = "rockchip,rk8602";
-		reg = <0x42>;
-		vin-supply = <&vcc5v0_sys>;
-		regulator-compatible = "rk860x-reg";
-		regulator-name = "vdd_npu_s0";
-		regulator-min-microvolt = <550000>;
-		regulator-max-microvolt = <950000>;
-		regulator-ramp-delay = <2300>;
-		rockchip,suspend-voltage-selector = <1>;
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
-	};
-};
-
-/*
-   pin3: GPIO1_B7
-   pin5: GPIO1_B6
-*/
-&i2c5 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c5m3_xfer>;
-};
-
-&uart1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1m1_xfer>;
-};
-
-&pwm13 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm13m2_pins>;
-};
-
-/*
-   pin7: GPIO1_C6
-*/
-&pwm15 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm15m2_pins>;
-};
-
-/*
-   pin11: GPIO4_B2
-   pin13: GPIO4_B3
-*/
-&pwm14 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm14m1_pins>;
-};
-
-&can1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&can1m1_pins>;
-	assigned-clocks = <&cru CLK_CAN1>;
-	assigned-clock-rates = <200000000>;
-};
-
-/*
-   pin15: GPIO0_D4
-   pin12: GPIO0_D5
-*/
-&can2 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&can2m1_pins>;
-	assigned-clocks = <&cru CLK_CAN2>;
-	assigned-clock-rates = <200000000>;
-};
-
-/*
-   pin19: GPIO1_C1
-   pin21: GPIO1_C0
-   pin23: GPIO1_C2
-   pin24: GPIO1_C4
-*/
-&spi4 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi4m0_cs1 &spi4m0_pins>;
-	assigned-clocks = <&cru CLK_SPI4>;
-	assigned-clock-rates = <200000000>;
-	num-cs = <2>;
-
-	spi_dev@1 {
-		compatible = "rockchip,spidev";
-		reg = <1>;
-		spi-max-frequency = <50000000>;
-	};
-};
-
-&i2c3 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c3m0_xfer>;
-};
-
-&uart3 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart3m0_xfer>;
-};
-
-&pwm3 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm3m2_pins>;
-	//pinctrl-0 = <&pwm3m0_pins>;
-};
-
-/*
-   pin8:  GPIO4_A3
-   pin10: GPIO4_A4
-*/
-&uart0 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0m2_xfer>;
-};
-
-/*
-   pin16: GPIO1_D3
-   pin18: GPIO1_D2
-*/
-&uart4 {
-	status = "disabled";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart4m0_xfer>;
-};
-
-&i2c1 {
-	status = "disabled";
-	pinctrl-names = "default";
-	//pinctrl-0 = <&i2c1m4_xfer>;
-	pinctrl-0 = <&i2c1m2_xfer>;
-};
-
-&pwm0 {
-	status = "disabled";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm0m1_pins>;
-};
-
-/*
-   pin26: GPIO1_A3
-*/
-&pwm1 {
-	status = "disabled";
-	pinctrl-names = "active";
-	//pinctrl-0 = <&pwm1m2_pins>;
-	pinctrl-0 = <&pwm1m1_pins>;
-};
-
-/* watchdog */
-&wdt {
-	status = "okay";
-};
-
-&sfc {
-	status = "disabled";
-	max-freq = <100000000>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&fspim0_pins>;
-
-	spi_flash: spi-flash@0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "jedec,spi-nor";
-		reg = <0x0>;
-		spi-max-frequency = <100000000>;
-		spi-tx-bus-width = <1>;
-		spi-rx-bus-width = <4>;
-		status = "disabled";
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			uboot@0 {
-				label = "uboot";
-				reg = <0x0 0x200000>;
-			};
-
-			dtb@200000 {
-				label = "dtb";
-				reg = <0x200000 0x40000>;
-			};
-
-			firmware@240000 {
-				//compatible = "denx,uimage";
-				label = "firmware";
-				reg = <0x240000 0xdc0000>;
-			};
-
-		};
-	};
-};
-
-&mipi_dcphy0 {
-	status = "okay";
-};
-
-&mipi_dcphy1 {
-	status = "okay";
-};
-
-&rkcif {
-	status = "okay";
-};
-
-&rkcif_mmu {
-	status = "okay";
-};
-
-&rkisp0 {
-	status = "okay";
-};
-
-&isp0_mmu {
-	status = "okay";
-};
-
-&rkisp1 {
-	status = "okay";
-};
-
-&isp1_mmu {
-	status = "okay";
-};
-
-&sata0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sata_reset>;
-	status = "disabled";
-};
-
-&pcie2x1l2 {
-	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
-	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
-	rockchip,skip-scan-in-resume;
-	status = "okay";
-};
-
-&wireless_wlan {
-	status = "okay";
-};
-
-&wireless_bluetooth {
-	status = "okay";
-};
-
-&pinctrl
-{
-	gpio-func {
-		leds_gpio: leds-gpio {
-			rockchip,pins =
-				<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-};

+ 0 - 381
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi

@@ -1,381 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-#include "dt-bindings/usb/pd.h"
-#include "rk3588s.dtsi"
-#include "rk3588s-orangepi.dtsi"
-#include "rk3588-rk806-single.dtsi"
-
-/ {
-	combophy_avdd0v85: combophy-avdd0v85 {
-		compatible = "regulator-fixed";
-		regulator-name = "combophy_avdd0v85";
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-min-microvolt = <850000>;
-		regulator-max-microvolt = <850000>;
-		vin-supply = <&vdd_0v85_s0>;
-	};
-
-	combophy_avdd1v8: combophy-avdd1v8 {
-		compatible = "regulator-fixed";
-		regulator-name = "combophy_avdd1v8";
-		regulator-boot-on;
-		regulator-always-on;
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-		vin-supply = <&avcc_1v8_s0>;
-	};
-
-	es8388_sound: es8388-sound {
-		status = "okay";
-		compatible = "rockchip,multicodecs-card";
-		rockchip,card-name = "rockchip-es8388";
-		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
-		io-channels = <&saradc 3>;
-		io-channel-names = "adc-detect";
-		keyup-threshold-microvolt = <1800000>;
-		poll-interval = <100>;
-		rockchip,format = "i2s";
-		rockchip,mclk-fs = <256>;
-		rockchip,cpu = <&i2s1_8ch>;
-		rockchip,codec = <&es8388>;
-		rockchip,audio-routing =
-			"Headphone", "LOUT1",
-			"Headphone", "ROUT1",
-			"Headphone", "Headphone Power",
-			"Headphone", "Headphone Power",
-			"LINPUT1", "Main Mic",
-			"LINPUT2", "Main Mic",
-			"RINPUT1", "Headset Mic",
-			"RINPUT2", "Headset Mic";
-		pinctrl-names = "default";
-		pinctrl-0 = <&hp_det>;
-		play-pause-key {
-			label = "playpause";
-			linux,code = <KEY_PLAYPAUSE>;
-			press-threshold-microvolt = <2000>;
-		};
-	};
-
-	wireless_bluetooth: wireless-bluetooth {
-		compatible = "bluetooth-platdata";
-		clocks = <&hym8563>;
-		clock-names = "ext_clock";
-		uart_rts_gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
-		pinctrl-names = "default", "rts_gpio";
-		pinctrl-0 = <&uart9m2_rtsn>, <&bt_gpio>;
-		pinctrl-1 = <&uart9_gpios>;
-		BT,reset_gpio    = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
-		BT,wake_gpio     = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
-		status = "disabled";
-	};
-
-	wireless_wlan: wireless-wlan {
-		compatible = "wlan-platdata";
-		wifi_chip_type = "ap6275p";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wifi_host_wake_irq>, <&wifi_poweren_gpio>;
-		WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
-		WIFI,poweren_gpio = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
-		status = "disabled";
-	};
-
-	vbus5v0_typec: vbus5v0-typec {
-		compatible = "regulator-fixed";
-		regulator-name = "vbus5v0_typec";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		enable-active-high;
-		gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
-		vin-supply = <&vcc5v0_usb>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&typec5v_pwren>;
-	};
-};
-
-&pwm6 {
-	status = "okay";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm6m0_pins>;
-};
-
-&pwm2 {
-	status = "okay";
-	pinctrl-names = "active";
-	pinctrl-0 = <&pwm2m0_pins>;
-};
-
-&backlight_1 {
-	pwms = <&pwm6 0 25000 0>;
-	status = "okay";
-};
-
-&backlight {
-	pwms = <&pwm2 0 25000 0>;
-	status = "okay";
-};
-
-&combphy0_ps {
-	status = "okay";
-};
-
-&dp0 {
-	status = "okay";
-};
-
-&dp0_in_vp1 {
-	status = "okay";
-};
-
-&dp0_in_vp2 {
-	status = "disabled";
-};
-
-&dp0_sound{
-	status = "okay";
-};
-
-&spdif_tx2{
-	status = "okay";
-};
-
-&mipi_dcphy0 {
-	status = "okay";
-};
-
-&mipi_dcphy1 {
-	status = "okay";
-};
-
-&i2c6 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c6m3_xfer>;
-
-	es8388: es8388@10 {
-		status = "okay";
-		#sound-dai-cells = <0>;
-		compatible = "everest,es8388", "everest,es8323";
-		reg = <0x10>;
-		clocks = <&cru I2S1_8CH_MCLKOUT>;
-		clock-names = "mclk";
-		assigned-clocks = <&cru I2S1_8CH_MCLKOUT>;
-		assigned-clock-rates = <12288000>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&i2s1m0_mclk>;
-	};
-
-	usbc0: fusb302@22 {
-		compatible = "fcs,fusb302";
-		reg = <0x22>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&usbc0_int>;
-		vbus-supply = <&vbus5v0_typec>;
-		status = "okay";
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port@0 {
-				reg = <0>;
-				usbc0_role_sw: endpoint@0 {
-					remote-endpoint = <&dwc3_0_role_switch>;
-				};
-			};
-		};
-
-		usb_con: connector {
-			compatible = "usb-c-connector";
-			label = "USB-C";
-			data-role = "dual";
-			power-role = "dual";
-			try-power-role = "sink";
-			op-sink-microwatt = <1000000>;
-			sink-pdos =
-				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
-			source-pdos =
-				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-
-			altmodes {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				altmode@0 {
-					reg = <0>;
-					svid = <0xff01>;
-					vdo = <0xffffffff>;
-				};
-			};
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					usbc0_orien_sw: endpoint {
-						remote-endpoint = <&usbdp_phy0_orientation_switch>;
-					};
-				};
-
-				port@1 {
-					reg = <1>;
-					dp_altmode_mux: endpoint {
-						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
-					};
-				};
-			};
-		};
-	};
-
-	hym8563: hym8563@51 {
-		compatible = "haoyu,hym8563";
-		reg = <0x51>;
-		#clock-cells = <0>;
-		clock-frequency = <32768>;
-		clock-output-names = "hym8563";
-		pinctrl-names = "default";
-		pinctrl-0 = <&hym8563_int>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
-		wakeup-source;
-	};
-};
-
-&pcie2x1l1 {
-	status = "disabled";
-};
-
-&pcie2x1l2 {
-	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
-	rockchip,skip-scan-in-resume;
-	status = "disabled";
-};
-
-&pinctrl {
-	sata {
-		sata_reset:sata-reset{
-			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	headphone {
-		hp_det: hp-det {
-			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	hym8563 {
-		hym8563_int: hym8563-int {
-			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	lcd {
-		lcd0_rst_gpio: lcd0-rst-gpio {
-			rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		lcd1_rst_gpio: lcd1-rst-gpio {
-			rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	usb-typec {
-		usbc0_int: usbc0-int {
-			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-
-		typec5v_pwren: typec5v-pwren {
-			rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	wireless-bluetooth {
-		uart9_gpios: uart9-gpios {
-			rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		bt_gpio: bt-gpio {
-			rockchip,pins =
-				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
-				<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	wireless-wlan {
-		wifi_host_wake_irq: wifi-host-wake-irq {
-			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
-		};
-
-		wifi_poweren_gpio: wifi-poweren-gpio {
-			rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-};
-
-&u2phy0_otg {
-	rockchip,typec-vbus-det;
-	status = "okay";
-};
-
-&uart9 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>;
-};
-
-&usbdp_phy0 {
-	orientation-switch;
-	svid = <0xff01>;
-	sbu1-dc-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
-	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
-
-	port {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		usbdp_phy0_orientation_switch: endpoint@0 {
-			reg = <0>;
-			remote-endpoint = <&usbc0_orien_sw>;
-		};
-
-		usbdp_phy0_dp_altmode_mux: endpoint@1 {
-			reg = <1>;
-			remote-endpoint = <&dp_altmode_mux>;
-		};
-	};
-};
-
-&usbdrd_dwc3_0 {
-	status = "okay";
-	dr_mode = "otg";
-	usb-role-switch;
-	port {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		dwc3_0_role_switch: endpoint@0 {
-			reg = <0>;
-			remote-endpoint = <&usbc0_role_sw>;
-		};
-	};
-};
-
-&combphy2_psu {
-        status = "okay";
-};
-
-&usbhost3_0 {
-	dr_mode = "host";
-	status = "okay";
-};
-
-&usbhost_dwc3_0 {
-	status = "okay";
-};

+ 0 - 615
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi.dtsi

@@ -1,615 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
- *
- */
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/pwm/pwm.h>
-#include <dt-bindings/pinctrl/rockchip.h>
-#include <dt-bindings/input/rk-input.h>
-#include <dt-bindings/display/drm_mipi_dsi.h>
-#include <dt-bindings/display/rockchip_vop.h>
-#include <dt-bindings/sensor-dev.h>
-
-/ {
-	adc_keys: adc-keys {
-		compatible = "adc-keys";
-		io-channels = <&saradc 1>;
-		io-channel-names = "buttons";
-		keyup-threshold-microvolt = <1800000>;
-		poll-interval = <100>;
-
-		vol-up-key {
-			label = "volume up";
-			linux,code = <KEY_VOLUMEUP>;
-			press-threshold-microvolt = <17000>;
-		};
-
-		vol-down-key {
-			label = "volume down";
-			linux,code = <KEY_VOLUMEDOWN>;
-			press-threshold-microvolt = <417000>;
-		};
-
-		menu-key {
-			label = "menu";
-			linux,code = <KEY_MENU>;
-			press-threshold-microvolt = <890000>;
-		};
-
-		back-key {
-			label = "back";
-			linux,code = <KEY_BACK>;
-			press-threshold-microvolt = <1235000>;
-		};
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		brightness-levels = <
-			  0  20  20  21  21  22  22  23
-			 23  24  24  25  25  26  26  27
-			 27  28  28  29  29  30  30  31
-			 31  32  32  33  33  34  34  35
-			 35  36  36  37  37  38  38  39
-			 40  41  42  43  44  45  46  47
-			 48  49  50  51  52  53  54  55
-			 56  57  58  59  60  61  62  63
-			 64  65  66  67  68  69  70  71
-			 72  73  74  75  76  77  78  79
-			 80  81  82  83  84  85  86  87
-			 88  89  90  91  92  93  94  95
-			 96  97  98  99 100 101 102 103
-			104 105 106 107 108 109 110 111
-			112 113 114 115 116 117 118 119
-			120 121 122 123 124 125 126 127
-			128 129 130 131 132 133 134 135
-			136 137 138 139 140 141 142 143
-			144 145 146 147 148 149 150 151
-			152 153 154 155 156 157 158 159
-			160 161 162 163 164 165 166 167
-			168 169 170 171 172 173 174 175
-			176 177 178 179 180 181 182 183
-			184 185 186 187 188 189 190 191
-			192 193 194 195 196 197 198 199
-			200 201 202 203 204 205 206 207
-			208 209 210 211 212 213 214 215
-			216 217 218 219 220 221 222 223
-			224 225 226 227 228 229 230 231
-			232 233 234 235 236 237 238 239
-			240 241 242 243 244 245 246 247
-			248 249 250 251 252 253 254 255
-		>;
-		default-brightness-level = <200>;
-	};
-
-	backlight_1: backlight_1 {
-		compatible = "pwm-backlight";
-		brightness-levels = <
-			  0  20  20  21  21  22  22  23
-			 23  24  24  25  25  26  26  27
-			 27  28  28  29  29  30  30  31
-			 31  32  32  33  33  34  34  35
-			 35  36  36  37  37  38  38  39
-			 40  41  42  43  44  45  46  47
-			 48  49  50  51  52  53  54  55
-			 56  57  58  59  60  61  62  63
-			 64  65  66  67  68  69  70  71
-			 72  73  74  75  76  77  78  79
-			 80  81  82  83  84  85  86  87
-			 88  89  90  91  92  93  94  95
-			 96  97  98  99 100 101 102 103
-			104 105 106 107 108 109 110 111
-			112 113 114 115 116 117 118 119
-			120 121 122 123 124 125 126 127
-			128 129 130 131 132 133 134 135
-			136 137 138 139 140 141 142 143
-			144 145 146 147 148 149 150 151
-			152 153 154 155 156 157 158 159
-			160 161 162 163 164 165 166 167
-			168 169 170 171 172 173 174 175
-			176 177 178 179 180 181 182 183
-			184 185 186 187 188 189 190 191
-			192 193 194 195 196 197 198 199
-			200 201 202 203 204 205 206 207
-			208 209 210 211 212 213 214 215
-			216 217 218 219 220 221 222 223
-			224 225 226 227 228 229 230 231
-			232 233 234 235 236 237 238 239
-			240 241 242 243 244 245 246 247
-			248 249 250 251 252 253 254 255
-		>;
-		default-brightness-level = <200>;
-	};
-
-	dp0_sound: dp0-sound {
-		status = "disabled";
-		compatible = "rockchip,hdmi";
-		rockchip,card-name= "rockchip-dp0";
-		rockchip,mclk-fs = <512>;
-		rockchip,cpu = <&spdif_tx2>;
-		rockchip,codec = <&dp0 1>;
-		rockchip,jack-det;
-	};
-
-	hdmi0_sound: hdmi0-sound {
-		status = "disabled";
-		compatible = "rockchip,hdmi";
-		rockchip,mclk-fs = <128>;
-		rockchip,card-name = "rockchip-hdmi0";
-		rockchip,cpu = <&i2s5_8ch>;
-		rockchip,codec = <&hdmi0>;
-		rockchip,jack-det;
-	};
-
-	spdif_tx1_dc: spdif-tx1-dc {
-		status = "disabled";
-		compatible = "linux,spdif-dit";
-		#sound-dai-cells = <0>;
-	};
-
-	spdif_tx1_sound: spdif-tx1-sound {
-		status = "disabled";
-		compatible = "simple-audio-card";
-		simple-audio-card,name = "rockchip,spdif-tx1";
-		simple-audio-card,cpu {
-			sound-dai = <&spdif_tx1>;
-		};
-		simple-audio-card,codec {
-			sound-dai = <&spdif_tx1_dc>;
-		};
-	};
-
-	test-power {
-		status = "okay";
-	};
-
-	vcc12v_dcin: vcc12v-dcin {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc12v_dcin";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <12000000>;
-		regulator-max-microvolt = <12000000>;
-	};
-
-	vcc5v0_sys: vcc5v0-sys {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc12v_dcin>;
-	};
-
-	vcc5v0_usbdcin: vcc5v0-usbdcin {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_usbdcin";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc12v_dcin>;
-	};
-
-	vcc5v0_usb: vcc5v0-usb {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_usb";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_usbdcin>;
-	};
-};
-
-&av1d {
-	status = "okay";
-};
-
-&av1d_mmu {
-	status = "okay";
-};
-
-&combphy0_ps {
-	status = "okay";
-};
-
-&combphy2_psu {
-	status = "okay";
-};
-
-&cpu_l0 {
-	cpu-supply = <&vdd_cpu_lit_s0>;
-	mem-supply = <&vdd_cpu_lit_mem_s0>;
-};
-
-&cpu_b0 {
-	cpu-supply = <&vdd_cpu_big0_s0>;
-	mem-supply = <&vdd_cpu_big0_mem_s0>;
-};
-
-&cpu_b2 {
-	cpu-supply = <&vdd_cpu_big1_s0>;
-	mem-supply = <&vdd_cpu_big1_mem_s0>;
-};
-
-&dsi0 {
-	status = "okay";
-	//rockchip,lane-rate = <1000>;
-	dsi0_panel: panel@0 {
-		status = "okay";
-		compatible = "innolux,afj101-ba2131";
-		reg = <0>;
-		backlight = <&backlight>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port@0 {
-				reg = <0>;
-				panel_in_dsi: endpoint {
-					remote-endpoint = <&dsi_out_panel>;
-				};
-			};
-		};
-	};
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@1 {
-			reg = <1>;
-			dsi_out_panel: endpoint {
-				remote-endpoint = <&panel_in_dsi>;
-			};
-		};
-	};
-
-};
-
-&dsi1 {
-	status = "okay";
-	//rockchip,lane-rate = <1000>;
-	dsi1_panel: panel@0 {
-		status = "okay";
-		compatible = "innolux,afj101-ba2131";
-		reg = <0>;
-		backlight = <&backlight_1>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port@0 {
-				reg = <0>;
-				panel_in_dsi1: endpoint {
-					remote-endpoint = <&dsi1_out_panel>;
-				};
-			};
-		};
-	};
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@1 {
-			reg = <1>;
-			dsi1_out_panel: endpoint {
-				remote-endpoint = <&panel_in_dsi1>;
-			};
-		};
-	};
-
-};
-
-&gpu {
-	mali-supply = <&vdd_gpu_s0>;
-	mem-supply = <&vdd_gpu_mem_s0>;
-	status = "okay";
-};
-
-&i2s0_8ch {
-	status = "okay";
-	pinctrl-0 = <&i2s0_lrck
-		     &i2s0_sclk
-		     &i2s0_sdi0
-		     &i2s0_sdo0>;
-};
-
-&iep {
-	status = "okay";
-};
-
-&iep_mmu {
-	status = "okay";
-};
-
-&jpegd {
-	status = "okay";
-};
-
-&jpegd_mmu {
-	status = "okay";
-};
-
-&jpege_ccu {
-	status = "okay";
-};
-
-&jpege0 {
-	status = "okay";
-};
-
-&jpege0_mmu {
-	status = "okay";
-};
-
-&jpege1 {
-	status = "okay";
-};
-
-&jpege1_mmu {
-	status = "okay";
-};
-
-&jpege2 {
-	status = "okay";
-};
-
-&jpege2_mmu {
-	status = "okay";
-};
-
-&jpege3 {
-	status = "okay";
-};
-
-&jpege3_mmu {
-	status = "okay";
-};
-
-&mpp_srv {
-	status = "okay";
-};
-
-&rga3_core0 {
-	status = "okay";
-};
-
-&rga3_0_mmu {
-	status = "okay";
-};
-
-&rga3_core1 {
-	status = "okay";
-};
-
-&rga3_1_mmu {
-	status = "okay";
-};
-
-&rga2 {
-	status = "okay";
-};
-
-&rknpu {
-	rknpu-supply = <&vdd_npu_s0>;
-	mem-supply = <&vdd_npu_mem_s0>;
-	status = "okay";
-};
-
-&rknpu_mmu {
-	status = "okay";
-};
-
-&rkvdec_ccu {
-	status = "okay";
-};
-
-&rkvdec0 {
-	status = "okay";
-};
-
-&rkvdec0_mmu {
-	status = "okay";
-};
-
-&rkvdec1 {
-	status = "okay";
-};
-
-&rkvdec1_mmu {
-	status = "okay";
-};
-
-&rkvenc_ccu {
-	status = "okay";
-};
-
-&rkvenc0 {
-	status = "okay";
-};
-
-&rkvenc0_mmu {
-	status = "okay";
-};
-
-&rkvenc1 {
-	status = "okay";
-};
-
-&rkvenc1_mmu {
-	status = "okay";
-};
-
-&rockchip_suspend {
-	status = "okay";
-	rockchip,sleep-debug-en = <1>;
-};
-
-&saradc {
-	status = "okay";
-	vref-supply = <&vcc_1v8_s0>;
-};
-
-&sdhci {
-	bus-width = <8>;
-	no-sdio;
-	no-sd;
-	non-removable;
-	max-frequency = <200000000>;
-	mmc-hs400-1_8v;
-	mmc-hs400-enhanced-strobe;
-	status = "disabled";
-};
-
-&sdmmc {
-	max-frequency = <150000000>;
-	no-sdio;
-	no-mmc;
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	disable-wp;
-	sd-uhs-sdr104;
-	vmmc-supply = <&vcc_3v3_sd_s0>;
-	vqmmc-supply = <&vccio_sd_s0>;
-	status = "okay";
-};
-
-&tsadc {
-	status = "okay";
-};
-
-&u2phy0 {
-	status = "okay";
-};
-
-&u2phy2 {
-	status = "okay";
-};
-
-&u2phy3 {
-	status = "okay";
-};
-
-&u2phy0_otg {
-	status = "okay";
-};
-
-&u2phy2_host {
-	status = "okay";
-};
-
-&u2phy3_host {
-	status = "okay";
-};
-
-&usb_host0_ehci {
-	status = "okay";
-};
-
-&usb_host0_ohci {
-	status = "okay";
-};
-
-&usb_host1_ehci {
-	status = "okay";
-};
-
-&usb_host1_ohci {
-	status = "okay";
-};
-
-&usbdp_phy0 {
-	status = "okay";
-};
-
-&usbdp_phy0_dp {
-	status = "okay";
-};
-
-&usbdp_phy0_u3 {
-	status = "okay";
-};
-
-&usbdrd3_0 {
-	status = "okay";
-};
-
-&usbdrd_dwc3_0 {
-	dr_mode = "otg";
-	status = "okay";
-};
-
-&usbhost3_0 {
-	status = "okay";
-};
-
-&usbhost_dwc3_0 {
-	status = "okay";
-};
-
-&vdpu {
-	status = "okay";
-};
-
-&vdpu_mmu {
-	status = "okay";
-};
-
-&vop {
-	status = "okay";
-	disable-win-move;
-	assigned-clocks = <&cru ACLK_VOP>;
-	assigned-clock-rates = <800000000>;
-};
-
-&vop_mmu {
-	status = "okay";
-};
-
-&vepu {
-	status = "okay";
-};
-
-/* vp0 & vp1 splice for 8K output */
-&vp0 {
-	cursor-win-id=<ROCKCHIP_VOP2_ESMART0>;
-	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART0>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER0>;
-};
-
-&vp1 {
-	cursor-win-id=<ROCKCHIP_VOP2_ESMART1>;
-	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART1>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER1>;
-};
-
-&vp2 {
-	cursor-win-id=<ROCKCHIP_VOP2_ESMART2>;
-	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART2>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER2>;
-};
-
-&vp3 {
-	cursor-win-id=<ROCKCHIP_VOP2_ESMART3>;
-	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART3>;
-	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER3>;
-};
-
-/* Fix tty terminal out of screen, and most dclk of resolutions was not supported in hdmiphy clock from parent clock by default */
-&display_subsystem {
-	clocks = <&hdptxphy_hdmi_clk0>;
-	clock-names = "hdmi0_phy_pll";
-};

+ 0 - 14
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/02-arm64-dts-rockchip-ad-orange-pi-5.patch

@@ -1,14 +0,0 @@
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -186,8 +186,11 @@
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb8-lp4x-v10.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5-spi.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5-sata.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-rk806-single-v10.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb
- 
- endif

+ 0 - 34
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/03-fix.patch

@@ -1,34 +0,0 @@
---- a/net/netfilter/xt_connmark.c
-+++ b/net/netfilter/xt_connmark.c
-@@ -118,14 +118,6 @@
- 	return connmark_tg_shift(skb, &info3);
- }
- 
--static unsigned int
--connmark_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
--+{
--	const struct xt_connmark_tginfo3 *info = par->targinfo;
--
--	return connmark_tg_shift(skb, info);
--}
--
- static int connmark_tg_check(const struct xt_tgchk_param *par)
- {
- 	int ret;
-@@ -192,16 +184,6 @@
- 		.targetsize     = sizeof(struct xt_connmark_tginfo2),
- 		.destroy        = connmark_tg_destroy,
- 		.me             = THIS_MODULE,
--	},
--	{
--		.name           = "CONNMARK",
--		.revision       = 3,
--		.family         = NFPROTO_UNSPEC,
--		.checkentry     = connmark_tg_check,
--		.target         = connmark_tg_v3,
--		.targetsize     = sizeof(struct xt_connmark_tginfo3),
--		.destroy        = connmark_tg_destroy,
--		.me             = THIS_MODULE,
- 	}
- };
- 

+ 0 - 69
devices/rockchip_rk3588_armv8/patches/orangepi-5.patch

@@ -1,69 +0,0 @@
---- a/package/boot/uboot-rockchip/Makefile
-+++ b/package/boot/uboot-rockchip/Makefile
-@@ -175,6 +175,19 @@ define U-Boot/nanopi-r6s-rk3588
- 
- endef
- 
-+define U-Boot/orangepi-5-rk3588
-+  BUILD_SUBTARGET:=armv8
-+  NAME:=ORANGEPI-5
-+  BUILD_DEVICES:= \
-+    xunlong_orangepi-5
-+  DEPENDS:=+PACKAGE_u-boot-orangepi-5-rk3588:arm-trusted-firmware-rockchip
-+  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
-+  DEVICE_DTS := rk3588-nanopi-r6c.dts
-+  UBOOT_CONFIG:= nanopi-r6c-rk3588
-+  ATF:=rk3588_bl31.elf
-+  DDR_3588:=$(1)
-+endef
-+
- define U-Boot/orangepi-5-plus-rk3588
-   BUILD_SUBTARGET:=armv8
-   NAME:=ORANGEPI-5-PLUS
-@@ -204,6 +217,7 @@ endef
- UBOOT_TARGETS := \
-   nanopi-r6c-rk3588 \
-   nanopi-r6s-rk3588 \
-+   orangepi-5-rk3588 \
-   orangepi-5-plus-rk3588 \
-   rock-5b-rk3588 \
-   bpi-r2-pro-rk3568 \
-
---- a/target/linux/rockchip_rk3588/armv8/base-files/etc/board.d/02_network
-+++ b/target/linux/rockchip_rk3588/armv8/base-files/etc/board.d/02_network
-@@ -71,6 +71,7 @@ rockchip_setup_macs()
- 	friendlyelec,nanopi-r6c|\
- 	friendlyelec,nanopi-r6s|\
- 	friendlyarm,nanopi-r4s|\
-+	rockchip,rk3588s-orangepi-5|\
- 	rockchip,rk3588-orangepi-5-plus)
- 		wan_mac=$(nanopi_r4s_get_mac wan)
- 		lan_mac=$(nanopi_r4s_get_mac lan)
-
---- a/target/linux/rockchip_rk3588/image/armv8.mk
-+++ b/target/linux/rockchip_rk3588/image/armv8.mk
-@@ -53,6 +53,23 @@ define Device/friendlyelec_nanopi-r6s
- endef
- TARGET_DEVICES += friendlyelec_nanopi-r6s
- 
-+define Device/xunlong_orangepi-5
-+  DEVICE_VENDOR := XunLong
-+  DEVICE_MODEL := Orange Pi 5
-+  SOC := rk3588s
-+  UBOOT_DEVICE_NAME := orangepi-5-rk3588
-+  SUPPORTED_DEVICES := rockchip,rk3588s-orangepi-5
-+  IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r6c | pine64-img | gzip | append-metadata
-+ DEVICE_PACKAGES := \
-+	blkid block-mount blockd btrfs-progs f2fs-tools f2fsck fdisk fixparts fstools gdisk \
-+	kmod-ata-ahci kmod-ata-core kmod-fs-autofs4 kmod-fs-btrfs kmod-fs-exfat kmod-fs-exportfs luci-app-ttyd \
-+	kmod-fs-ext4 kmod-fs-squashfs kmod-nvme kmod-usb-net-rtl8152 kmod-usb-storage kmod-usb-storage-extras kmod-usb-storage-uas \
-+	kmod-usb-xhci-hcd kmod-usb3 losetup lsblk luci luci-proto-wireguard mkf2fs mount-utils parted partx-util pciutils resize2fs \
-+	kmod-r8125 usbutils wget-ssl smartmontools luci-app-statistics collectd-mod-cpufreq collectd-mod-sensors collectd-mod-thermal \
-+	collectd-mod-conntrack collectd-mod-irq dnsmasq-full -dnsmasq ethtool iperf3-ssl bash irqbalance
-+endef
-+TARGET_DEVICES += xunlong_orangepi-5
-+
- define Device/xunlong_orangepi-5-plus
-   DEVICE_VENDOR := XunLong
-   DEVICE_MODEL := OrangePi 5 Plus
-

+ 1 - 1
devices/rockchip_rk3588_armv8/settings.ini

@@ -1,2 +1,2 @@
 REPO_URL="https://github.com/mj22226/openwrt"
-REPO_BRANCH="nanopi-r6c/r6s"
+REPO_BRANCH="rk3588-bsp"