diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index 6723f07d091a..a50be84bd13b 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -117,7 +117,7 @@ jobs: sudo -E apt-get -qq install build-essential clang llvm flex g++ gawk gcc-multilib gettext \ git libncurses5-dev libssl-dev python3-distutils python3-pyelftools python3-setuptools \ libpython3-dev rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename \ - libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev + libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev sudo -E apt-get -qq purge azure-cli ghc* zulu* firefox powershell openjdk* dotnet* google* mysql* php* android* sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc sudo -E apt-get -qq autoremove --purge @@ -139,7 +139,7 @@ jobs: REPO_BRANCH="$((curl -gs -H 'Content-Type: application/json' \ -H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \ -X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v23 | tail -n 1)" - #REPO_BRANCH="openwrt-23.05" + REPO_BRANCH="openwrt-23.05" #echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/`echo $REPO_BRANCH | cut -d . -f 1,2 | sed -e 's/^v//'`\"">>devices/common/.config echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/23.05\"">>devices/common/.config if [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then diff --git a/devices/bcm27xx_bcm2708/diy.sh b/devices/bcm27xx_bcm2708/diy.sh index 798efb77f587..df7ae2e0bc48 100644 --- a/devices/bcm27xx_bcm2708/diy.sh +++ b/devices/bcm27xx_bcm2708/diy.sh @@ -6,6 +6,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile -sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile diff --git a/devices/bcm27xx_bcm2709/.config b/devices/bcm27xx_bcm2709/.config index 3f23af27f5f9..ef35d359aa50 100644 --- a/devices/bcm27xx_bcm2709/.config +++ b/devices/bcm27xx_bcm2709/.config @@ -6,5 +6,7 @@ CONFIG_TARGET_bcm27xx_bcm2709_DEVICE_rpi-2=y CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx +CONFIG_PACKAGE_kmod-pcie_mhi=m + diff --git a/devices/bcm27xx_bcm2710/.config b/devices/bcm27xx_bcm2710/.config index fb52fc5c65ca..c8b32aeff423 100644 --- a/devices/bcm27xx_bcm2710/.config +++ b/devices/bcm27xx_bcm2710/.config @@ -6,5 +6,6 @@ CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx +CONFIG_PACKAGE_kmod-pcie_mhi=m diff --git a/devices/bcm27xx_bcm2710/diy.sh b/devices/bcm27xx_bcm2710/diy.sh index d3c73f2dc12c..d9d390c0e95b 100644 --- a/devices/bcm27xx_bcm2710/diy.sh +++ b/devices/bcm27xx_bcm2710/diy.sh @@ -4,8 +4,6 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) #bash $SHELL_FOLDER/../common/kernel_6.1.sh -sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile - sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile mkdir -p files/lib/firmware/brcm diff --git a/devices/bcm27xx_bcm2711/.config b/devices/bcm27xx_bcm2711/.config index 01be0e258439..50d8ed56d283 100644 --- a/devices/bcm27xx_bcm2711/.config +++ b/devices/bcm27xx_bcm2711/.config @@ -8,3 +8,5 @@ CONFIG_PACKAGE_luci-ssl-nginx=y # nginx CONFIG_PACKAGE_kmod-of-mdio=n +CONFIG_PACKAGE_kmod-pcie_mhi=m + diff --git a/devices/bcm27xx_bcm2711/diy.sh b/devices/bcm27xx_bcm2711/diy.sh index 61bb1e473b4c..a35e0eca8098 100644 --- a/devices/bcm27xx_bcm2711/diy.sh +++ b/devices/bcm27xx_bcm2711/diy.sh @@ -5,5 +5,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) #bash $SHELL_FOLDER/../common/kernel_6.1.sh sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile -sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile + diff --git a/devices/bcm27xx_bcm2712/.config b/devices/bcm27xx_bcm2712/.config index 22c6af4a51f6..01b4a778d61a 100644 --- a/devices/bcm27xx_bcm2712/.config +++ b/devices/bcm27xx_bcm2712/.config @@ -8,3 +8,5 @@ CONFIG_PACKAGE_luci-ssl-nginx=y # nginx CONFIG_PACKAGE_kmod-of-mdio=n +CONFIG_PACKAGE_kmod-pcie_mhi=m + diff --git a/devices/bcm27xx_bcm2712/diy.sh b/devices/bcm27xx_bcm2712/diy.sh index 368eba9f983f..466e5d93a448 100644 --- a/devices/bcm27xx_bcm2712/diy.sh +++ b/devices/bcm27xx_bcm2712/diy.sh @@ -5,5 +5,3 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile -sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile - diff --git a/devices/common/.config b/devices/common/.config index 35401cd847d9..6c4d9d62abc5 100644 --- a/devices/common/.config +++ b/devices/common/.config @@ -95,6 +95,10 @@ CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_PACKAGE_kmod-sprd_pcie=n CONFIG_PACKAGE_kmod-drm-nouveau=n +CONFIG_PACKAGE_kmod-pcie_mhi=n + +CONFIG_PACKAGE_kmod-rtl8189es=n + CONFIG_IMAGEOPT=y CONFIG_VERSIONOPT=y diff --git a/devices/common/diy.sh b/devices/common/diy.sh index a56dc9064dd7..06886592bfea 100644 --- a/devices/common/diy.sh +++ b/devices/common/diy.sh @@ -18,7 +18,7 @@ sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' pac sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite --force-depends/' package/Makefile sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-opkg luci-app-upnp luci-app-autoreboot \ luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs \ -coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan /" include/target.mk +coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan luci-app-filebrowser /" include/target.mk sed -i "s/procd-ujail//" include/target.mk sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk @@ -32,7 +32,7 @@ while [[ "$status" == "in_progress" || "$status" == "queued" ]];do done -mv -f feeds/kiddin9/{r81*} tmp/ +mv -f feeds/kiddin9/r81* tmp/ sed -i "s/192.168.1/10.0.0/" package/feeds/kiddin9/base-files/files/bin/config_generate sed -i "s/192.168.1/10.0.0/" package/base-files/files/bin/config_generate @@ -58,7 +58,7 @@ rm -rf libs/libpfring git_clone_path master https://github.com/openwrt/packages libs/libpfring cd ../../ -rm -rf package/network/utils/xdp-tools package/feeds/kiddin9/quectel_MHI package/feeds/packages/v4l2loopback +rm -rf package/network/utils/xdp-tools package/feeds/kiddin9/fibocom_MHI package/feeds/packages/v4l2loopback grep -q 'PKG_RELEASE:=9' package/libs/openssl/Makefile && { sh -c "curl -sfL https://github.com/openwrt/openwrt/commit/a48d0bdb77eb93f7fba6e055dace125c72755b6a.patch | patch -d './' -p1 --forward" @@ -66,7 +66,6 @@ sh -c "curl -sfL https://github.com/openwrt/openwrt/commit/a48d0bdb77eb93f7fba6e sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh || sed -i "/wireless.\${name}.disabled/d" package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh -sed -i "/BuildPackage,miniupnpd-iptables/d" feeds/packages/net/miniupnpd/Makefile sed -i 's/Os/O2/g' include/target.mk sed -i "/mediaurlbase/d" package/feeds/*/luci-theme*/root/etc/uci-defaults/* sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf diff --git a/devices/common/kernel_6.1.sh b/devices/common/kernel_6.1.sh index 345435b996ac..204b0799cddb 100644 --- a/devices/common/kernel_6.1.sh +++ b/devices/common/kernel_6.1.sh @@ -6,7 +6,7 @@ mkdir new; cp -rf .git new/.git cd new git reset --hard origin/master -cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* package/network/config/wifi-scripts config/Config-images.in include/image*.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils ../ +cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* package/network/config/wifi-scripts config/Config-images.in include/image*.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf ../ cd - sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk @@ -14,6 +14,7 @@ sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-de #sed -i "s/\$(PKG_VERSION)-\$(PKG_RELEASE)/\$(PKG_VERSION)-r\$(PKG_RELEASE)/" include/package-defaults.mk cp -rf devices/common/patches/rootfstargz.patch.b devices/common/patches/rootfstargz.patch +cp -rf devices/common/patches/kernel6.1.patch.b devices/common/patches/kernel6.1.patch git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1 @@ -28,15 +29,17 @@ curl -sfL https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot. mkdir package/kernel/mt76/patches curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -o package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -rm -rf package/feeds/kiddin9/quectel_Gobinet - cd feeds/packages -rm -rf libs/xr_usb_serial_common net/coova-chilli net/xtables-addons -git_clone_path master https://github.com/openwrt/packages libs/xr_usb_serial_common +rm -rf libs net/coova-chilli net/xtables-addons net/jool kernel +git_clone_path master https://github.com/openwrt/packages libs git_clone_path master https://github.com/openwrt/packages net/coova-chilli git_clone_path master https://github.com/openwrt/packages net/xtables-addons +git_clone_path master https://github.com/openwrt/packages net/jool +git_clone_path master https://github.com/openwrt/packages kernel cd ../../ +rm -rf package/feeds/kiddin9/quectel_Gobinet package/feeds/kiddin9/fibocom_MHI package/feeds/packages/libpfring + sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab diff --git a/devices/common/patches/imagebuilder.patch b/devices/common/patches/imagebuilder.patch index 39b25ff95921..c144f03f4429 100644 --- a/devices/common/patches/imagebuilder.patch +++ b/devices/common/patches/imagebuilder.patch @@ -39,7 +39,7 @@ echo rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG) mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR) -+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ ++ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_ht-jsh_0211|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ + echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/small_flash" >>$(TOPDIR)/repositories.conf; \ + else \ + sed -i "/smflash/d" $(TOPDIR)/repositories.conf; \ diff --git a/devices/common/patches/kernel6.1.patch.b b/devices/common/patches/kernel6.1.patch.b new file mode 100644 index 000000000000..9c5c7dea067a --- /dev/null +++ b/devices/common/patches/kernel6.1.patch.b @@ -0,0 +1,21 @@ +--- a/package/kernel/qca-ssdk/Makefile ++++ b/package/kernel/qca-ssdk/Makefile +@@ -32,11 +32,17 @@ endef + + GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/') + ++ifdef CONFIG_TOOLCHAIN_BIN_PATH ++TOOLCHAIN_BIN_PATH=$(CONFIG_TOOLCHAIN_BIN_PATH) ++else ++TOOLCHAIN_BIN_PATH=$(TOOLCHAIN_DIR)/bin ++endif ++ + LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' PRJ_PATH=$(PKG_BUILD_DIR) MODULE_TYPE=KSLIB modules + + MAKE_FLAGS+= \ + TARGET_NAME=$(CONFIG_TARGET_NAME) \ +- TOOL_PATH=$(firstword $(TOOLCHAIN_BIN_DIRS)) \ ++ TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \ + SYS_PATH=$(LINUX_DIR) \ + TOOLPREFIX=$(TARGET_CROSS) \ + KVER=$(LINUX_VERSION) \ \ No newline at end of file diff --git a/devices/common/patches/usb-audio.patch b/devices/common/patches/usb-audio.patch index 0398e34762ab..55599fcdc516 100644 --- a/devices/common/patches/usb-audio.patch +++ b/devices/common/patches/usb-audio.patch @@ -4,7 +4,7 @@ CONFIG_SND_USB_AUDIO $(call AddDepends/usb) $(call AddDepends/sound) -+ DEPENDS += +LINUX_6_1:kmod-media-core ++ DEPENDS += +LINUX_6_1:kmod-media-core +LINUX_6_6:kmod-media-core FILES:= \ $(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko \ $(LINUX_DIR)/sound/usb/snd-usb-audio.ko \ No newline at end of file diff --git a/devices/mediatek_filogic/.config b/devices/mediatek_filogic/.config index b2958567c8ad..2d6d40bb9f0a 100644 --- a/devices/mediatek_filogic/.config +++ b/devices/mediatek_filogic/.config @@ -32,5 +32,10 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3-mini=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r4=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-x3000=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y +CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y +CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y +CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 +CONFIG_PACKAGE_kmod-pcie_mhi=m + diff --git a/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts b/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts new file mode 100644 index 000000000000..772033d728d0 --- /dev/null +++ b/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include +#include +#include "mt7981.dtsi" + +/ { + model = "Nokia EA0326GMP"; + compatible = "nokia,ea0326gmp", "mediatek,mt7981"; + + aliases { + led-boot = &power_led; + led-running = &power_led; + led-failsafe = &power_led; + led-upgrade = &power_led; + label-mac-device = &gmac1; + serial0 = &uart0; + }; + + chosen { + rootdisk = <&ubi_rootdisk>; + stdout-path = "serial0:115200n8"; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x10000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + button-wps { + label = "wps"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power_led: led-0 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&pio 4 GPIO_ACTIVE_LOW>; + }; + + led-1 { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&pio 5 GPIO_ACTIVE_LOW>; + }; + + led-2 { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&pio 6 GPIO_ACTIVE_LOW>; + }; + + led-3 { + color = ; + function = LED_FUNCTION_LAN; + gpios = <&pio 7 GPIO_ACTIVE_LOW>; + }; + + led-4 { + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + led-5 { + color = ; + function = LED_FUNCTION_WPS; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_factory_28 0>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + + nvmem-cells = <&macaddr_factory_28 3>; + nvmem-cell-names = "mac-address"; + }; +}; + +&mdio_bus { + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand: flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x00000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "factory"; + reg = <0x180000 0x200000>; + read-only; + }; + + partition@380000 { + label = "fip"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "config"; + reg = <0x580000 0x200000>; + read-only; + }; + + partition@780000 { + label = "config2"; + reg = <0x780000 0x200000>; + read-only; + }; + + partition@980000 { + label = "ubi"; + reg = <0x980000 0x6e00000>; + }; + }; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + status = "okay"; +}; diff --git a/devices/mediatek_filogic/patches/02-ax6000.patch b/devices/mediatek_filogic/patches/02-ax6000.patch index f699a3fed2be..cf29e5c2d3c2 100644 --- a/devices/mediatek_filogic/patches/02-ax6000.patch +++ b/devices/mediatek_filogic/patches/02-ax6000.patch @@ -64,17 +64,6 @@ index 0000000000000..759baae3aeb18 + }; +}; ---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -@@ -134,6 +134,7 @@ platform_do_upgrade() { - tplink,tl-xdr4288|\ - tplink,tl-xdr6086|\ - tplink,tl-xdr6088|\ -+ xiaomi,redmi-router-ax6000|\ - xiaomi,mi-router-ax3000t-ubootmod|\ - xiaomi,mi-router-wr30u-ubootmod) - CI_KERNPART="fit" - --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -26,6 +26,7 @@ xiaomi,mi-router-wr30u-ubootmod) diff --git a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch index 1207f00bc724..ec92e90e2841 100644 --- a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch +++ b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch @@ -70,4 +70,15 @@ + cmcc,rax3000m-emmc|\ acer,predator-w6|\ glinet,gl-mt2500|\ - glinet,gl-mt6000|\ \ No newline at end of file + glinet,gl-mt6000|\ + +--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata ++++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +@@ -31,6 +31,7 @@ case "$FIRMWARE" in + ;; + esac + ;; ++ cmcc,rax3000m-emmc|\ + ubnt,unifi-6-plus) + caldata_extract_mmc "factory" 0x0 0x1000 + ;; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/19-ct3003.patch b/devices/mediatek_filogic/patches/19-ct3003.patch new file mode 100644 index 000000000000..80813a5edf04 --- /dev/null +++ b/devices/mediatek_filogic/patches/19-ct3003.patch @@ -0,0 +1,22 @@ +--- a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts ++++ b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts +@@ -159,18 +159,9 @@ + + partition@580000 { + label = "ubi"; +- reg = <0x0580000 0x2000000>; ++ reg = <0x0580000 0x7000000>; + }; + +- partition@2580000 { +- label = "ubi_backup"; +- reg = <0x2580000 0x2000000>; +- }; +- +- partition@4580000 { +- label = "Config_backup"; +- reg = <0x4580000 0x0400000>; +- }; + }; + }; + }; diff --git a/devices/mediatek_filogic/patches/20-ea0326gmp.patch b/devices/mediatek_filogic/patches/20-ea0326gmp.patch new file mode 100644 index 000000000000..cf261dfc3e06 --- /dev/null +++ b/devices/mediatek_filogic/patches/20-ea0326gmp.patch @@ -0,0 +1,119 @@ +diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +index 7f75de8b3b961c..38aa621ea23867 100644 +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +@@ -54,6 +54,11 @@ netgear,wax220) + ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0" + ;; ++nokia,ea0326gmp) ++ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link" ++ ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" ++ ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy1-ap0" "link" ++ ;; + openembed,som7981) + ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx" + ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link" +diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +index c9fd8d96e69a1f..051db89275e2f0 100644 +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +@@ -46,6 +46,7 @@ mediatek_setup_interfaces() + ;; + cmcc,rax3000m|\ + h3c,magic-nx30-pro|\ ++ nokia,ea0326gmp|\ + zbtlink,zbt-z8103ax) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 + ;; +diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +index 62860390ebb2e6..928750e6473fc4 100644 +--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac ++++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +@@ -116,6 +116,11 @@ case "$board" in + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress + ;; ++ nokia,ea0326gmp) ++ addr=$(cat /sys/class/net/eth0/address) ++ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress ++ [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress ++ ;; + openembed,som7981) + [ "$PHYNBR" = "1" ] && cat /sys/class/net/eth0/address > /sys${DEVPATH}/macaddress + ;; +diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +index ee0e8b62d752db..62b7a209ed4059 100755 +--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +@@ -145,6 +145,12 @@ platform_do_upgrade() { + CI_UBIPART="ubi0" + nand_do_upgrade "$1" + ;; ++ nokia,ea0326gmp) ++ [ -e /dev/fit0 ] && fitblk /dev/fit0 ++ [ -e /dev/fitrw ] && fitblk /dev/fitrw ++ CI_KERNPART="fit" ++ nand_do_upgrade "$1" ++ ;; + ubnt,unifi-6-plus) + CI_KERNPART="kernel0" + EMMC_ROOT_DEV="$(cmdline_get_var root)" +diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk +index f99a73ac74c887..e8abed768fd97f 100644 +--- a/target/linux/mediatek/image/filogic.mk ++++ b/target/linux/mediatek/image/filogic.mk +@@ -881,6 +881,23 @@ define Device/netgear_wax220 + endef + TARGET_DEVICES += netgear_wax220 + ++define Device/nokia_ea0326gmp ++ DEVICE_VENDOR := Nokia ++ DEVICE_MODEL := EA0326GMP ++ DEVICE_DTS := mt7981b-nokia-ea0326gmp ++ DEVICE_DTS_DIR := ../dts ++ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware ++ UBINIZE_OPTS := -E 5 ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ KERNEL_IN_UBI := 1 ++ IMAGE_SIZE := 112640k ++ IMAGES += factory.bin ++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata ++endef ++TARGET_DEVICES += nokia_ea0326gmp ++ + define Device/openembed_som7981 + DEVICE_VENDOR := OpenEmbed + DEVICE_MODEL := SOM7981 +diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +index 62b7a209ed4059..cefe2ac853899c 100755 +--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +@@ -83,11 +83,7 @@ platform_do_upgrade() { + bananapi,bpi-r3|\ + bananapi,bpi-r3-mini|\ + bananapi,bpi-r4|\ +- jdcloud,re-cp-03|\ +- tplink,tl-xdr4288|\ +- tplink,tl-xdr6086|\ +- tplink,tl-xdr6088|\ +- xiaomi,redmi-router-ax6000-ubootmod) ++ jdcloud,re-cp-03) + [ -e /dev/fit0 ] && fitblk /dev/fit0 + [ -e /dev/fitrw ] && fitblk /dev/fitrw + bootdev="$(fitblk_get_bootdev)" +@@ -145,7 +141,11 @@ platform_do_upgrade() { + CI_UBIPART="ubi0" + nand_do_upgrade "$1" + ;; +- nokia,ea0326gmp) ++ nokia,ea0326gmp|\ ++ tplink,tl-xdr4288|\ ++ tplink,tl-xdr6086|\ ++ tplink,tl-xdr6088|\ ++ xiaomi,redmi-router-ax6000-ubootmod) + [ -e /dev/fit0 ] && fitblk /dev/fit0 + [ -e /dev/fitrw ] && fitblk /dev/fitrw + CI_KERNPART="fit" diff --git a/devices/meson_meson8b/diy.sh b/devices/meson_meson8b/diy.sh index 23707f657c5d..94d6ec3a236f 100644 --- a/devices/meson_meson8b/diy.sh +++ b/devices/meson_meson8b/diy.sh @@ -6,6 +6,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh -git_clone_path master https://github.com/coolsnowwolf/lede target/linux/meson diff --git a/devices/qualcommax_ipq60xx/diy.sh b/devices/qualcommax_ipq60xx/diy.sh index 3fddda0323ef..62be711f568b 100644 --- a/devices/qualcommax_ipq60xx/diy.sh +++ b/devices/qualcommax_ipq60xx/diy.sh @@ -6,7 +6,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh -rm -rf target/linux/qualcommax package/kernel/qca-* package/boot/uboot-envtools package/firmware/ipq-wifi +rm -rf target/linux/qualcommax package/kernel/qca- package/boot/uboot-envtools package/firmware/ipq-wifi git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax git_clone_path master https://github.com/coolsnowwolf/lede package/qca git_clone_path master https://github.com/coolsnowwolf/lede package/boot/uboot-envtools diff --git a/devices/qualcommax_ipq807x/diy.sh b/devices/qualcommax_ipq807x/diy.sh index 78601609f2d2..01a73dfac7c0 100644 --- a/devices/qualcommax_ipq807x/diy.sh +++ b/devices/qualcommax_ipq807x/diy.sh @@ -5,10 +5,8 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh -rm -rf package/kernel/qca-nss-dp package/kernel/qca-ssdk +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6 -git_clone_path master https://github.com/openwrt/openwrt target/linux/qualcommax +curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -git_clone_path master https://github.com/coolsnowwolf/lede package/qca - -sed -i "s/KERNEL_PATCHVER:=6.6/KERNEL_PATCHVER:=6.1/" target/linux/qualcommax/Makefile \ No newline at end of file +rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} \ No newline at end of file diff --git a/devices/rockchip_armv8/.config b/devices/rockchip_armv8/.config index 1c895eded9af..4cd2a1e52317 100644 --- a/devices/rockchip_armv8/.config +++ b/devices/rockchip_armv8/.config @@ -4,6 +4,9 @@ CONFIG_TARGET_rockchip_armv8=y CONFIG_TARGET_MULTI_PROFILE=y CONFIG_TARGET_ALL_PROFILES=y +CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_radxa_rock-pi-4a=n +CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_nlnet_xgp=n + CONFIG_TARGET_KERNEL_PARTSIZE=32 # daed diff --git a/devices/rockchip_armv8/diy.sh b/devices/rockchip_armv8/diy.sh index 2e86f372b265..37a7508ece58 100644 --- a/devices/rockchip_armv8/diy.sh +++ b/devices/rockchip_armv8/diy.sh @@ -5,20 +5,20 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh -rm -rf package/boot +rm -rf package/boot package/devel/kselftests-bpf package/devel/perf git_clone_path master https://github.com/immortalwrt/immortalwrt package/boot -rm -rf target/linux/generic target/linux/rockchip/!(Makefile) +rm -rf target/linux/generic target/linux/rockchip git_clone_path master https://github.com/immortalwrt/immortalwrt target/linux/generic git_clone_path master https://github.com/immortalwrt/immortalwrt target/linux/rockchip -git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1 +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6 -curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch +curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -rm -rf target/linux/generic/hack-6.1/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} +rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch} sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk @@ -29,6 +29,8 @@ rm -rf target/linux/rockchip/armv8/base-files/etc/uci-defaults/13_opkg_update sed -i -e 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/armv8.mk sed -i -e 's,wpad-openssl,wpad-basic-mbedtls,g' target/linux/rockchip/image/armv8.mk +curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk + sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-drm-rockchip/' target/linux/rockchip/Makefile cp -Rf $SHELL_FOLDER/diy/* ./ @@ -38,4 +40,4 @@ sed -i 's,NanoPi R2S$,NanoPi R2S / R2S Plus,' target/linux/rockchip/image/armv8. echo ' CONFIG_SENSORS_PWM_FAN=y -' >> ./target/linux/rockchip/armv8/config-6.1 +' >> ./target/linux/rockchip/armv8/config-6.6 diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch new file mode 100644 index 000000000000..60d244d30ae8 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch @@ -0,0 +1,462 @@ +--- /dev/null ++++ b/arch/arm/dts/rk3568-xgp-u-boot.dtsi +@@ -0,0 +1,21 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "rk356x-u-boot.dtsi" ++ ++/ { ++ chosen { ++ stdout-path = &uart2; ++ u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci; ++ }; ++}; ++ ++&sdmmc0 { ++ bus-width = <4>; ++ u-boot,spl-fifo-mode; ++}; ++ ++&uart2 { ++ u-boot,dm-spl; ++ clock-frequency = <24000000>; ++ status = "okay"; ++}; +--- /dev/null ++++ b/arch/arm/dts/rk3568-xgp.dts +@@ -0,0 +1,327 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "rk3568-evb.dts" ++ ++/ { ++ model = "NLnet XiGuaPi Board"; ++ compatible = "nlnet,xgp", "rockchip,rk3568"; ++ ++ aliases { ++ mmc0 = &sdmmc0; ++ mmc1 = &sdhci; ++ }; ++ /delete-node/ vcc3v3-sys; ++ ++ vcc_sysin_b: vcc_sysin_b { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_sysin_b"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <4000000>; ++ regulator-max-microvolt = <4000000>; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_cpu>; ++}; ++ ++&cpu1 { ++ cpu-supply = <&vdd_cpu>; ++}; ++ ++&cpu2 { ++ cpu-supply = <&vdd_cpu>; ++}; ++ ++&cpu3 { ++ cpu-supply = <&vdd_cpu>; ++}; ++ ++&i2c0 { ++ status = "okay"; ++ ++ vdd_cpu: regulator@1c { ++ compatible = "tcs,tcs4525"; ++ reg = <0x1c>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_cpu"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <800000>; ++ regulator-max-microvolt = <1150000>; ++ regulator-ramp-delay = <2300>; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ rk817: pmic@20 { ++ compatible = "rockchip,rk817"; ++ reg = <0x20>; ++ interrupt-parent = <&gpio0>; ++ interrupts = ; ++ ++ pinctrl-names = "default", "pmic-sleep", ++ "pmic-power-off", "pmic-reset"; ++ pinctrl-0 = <&pmic_int>; ++ rockchip,system-power-controller; ++ wakeup-source; ++ #clock-cells = <1>; ++ clock-output-names = "rk808-clkout1", "rk808-clkout2"; ++ //fb-inner-reg-idxs = <2>; ++ /* 1: rst regs (default in codes), 0: rst the pmic */ ++ pmic-reset-func = <0>; ++ ++ vcc1-supply = <&vcc_sysin_b>; ++ vcc2-supply = <&vcc_sysin_b>; ++ vcc3-supply = <&vcc_sysin_b>; ++ vcc4-supply = <&vcc_sysin_b>; ++ vcc5-supply = <&vcc_sysin_b>; ++ vcc6-supply = <&vcc_sysin_b>; ++ vcc7-supply = <&vcc_sysin_b>; ++ vcc8-supply = <&vcc_sysin_b>; ++ vcc9-supply = <&dcdc_boost>; ++ ++ pwrkey { ++ status = "okay"; ++ }; ++ ++ regulators { ++ vdd_logic: DCDC_REG1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-init-microvolt = <900000>; ++ regulator-initial-mode = <0x2>; ++ regulator-min-microvolt = <500000>; ++ regulator-max-microvolt = <1350000>; ++ regulator-name = "vdd_logic"; ++ regulator-ramp-delay = <6001>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_gpu: DCDC_REG2 { ++ regulator-always-on; ++ regulator-init-microvolt = <900000>; ++ regulator-initial-mode = <0x2>; ++ regulator-min-microvolt = <500000>; ++ regulator-max-microvolt = <1350000>; ++ regulator-name = "vdd_gpu"; ++ regulator-ramp-delay = <6001>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vcc_ddr: DCDC_REG3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-initial-mode = <0x2>; ++ regulator-name = "vcc_ddr"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ }; ++ }; ++ ++ vcc3v3_sys: DCDC_REG4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-initial-mode = <0x2>; ++ regulator-name = "vcc3v3_sys"; ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdda_0v9: LDO_REG2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <900000>; ++ regulator-name = "vdda_0v9"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdda0v9_pmu: LDO_REG3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <900000>; ++ regulator-name = "vdda0v9_pmu"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <900000>; ++ }; ++ }; ++ ++ vccio_acodec: LDO_REG4 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vccio_acodec"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vccio_sd: LDO_REG5 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vccio_sd"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vcc3v3_pmu: LDO_REG6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc3v3_pmu"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <3300000>; ++ }; ++ }; ++ ++ vcca_1v8_en: LDO_REG7 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcca_1v8_en"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdda0v9_image_p: LDO_REG8 { ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <900000>; ++ regulator-name = "vdda0v9_image_p"; ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vcca1v8_image_p: LDO_REG9 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcca1v8_image_p"; ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ dcdc_boost: BOOST { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <4700000>; ++ regulator-max-microvolt = <5400000>; ++ regulator-name = "boost"; ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ otg_switch: OTG_SWITCH { ++ regulator-name = "otg_switch"; ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&pinctrl { ++ pmic { ++ pmic_int: pmic_int { ++ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++}; ++ ++&saradc { ++ vref-supply = <&vcca_1v8_en>; ++ status = "okay"; ++}; ++ ++&gmac0 { ++ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; ++ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>; ++ assigned-clock-rates = <0>, <125000000>; ++ clock_in_out = "output"; ++ phy-mode = "rgmii-id"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac0_miim ++ &gmac0_tx_bus2 ++ &gmac0_rx_bus2 ++ &gmac0_rgmii_clk ++ &gmac0_rgmii_bus>; ++ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; ++ snps,reset-active-low; ++ snps,reset-delays-us = <0 20000 100000>; ++ tx_delay = <0x3c>; ++ rx_delay = <0x2f>; ++ phy-handle = <&rgmii_phy0>; ++ status = "okay"; ++}; ++ ++&gmac1 { ++ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; ++ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>; ++ assigned-clock-rates = <0>, <125000000>; ++ clock_in_out = "output"; ++ phy-mode = "rgmii"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac1m1_miim ++ &gmac1m1_tx_bus2 ++ &gmac1m1_rx_bus2 ++ &gmac1m1_rgmii_clk ++ &gmac1m1_rgmii_bus>; ++ snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; ++ snps,reset-active-low; ++ snps,reset-delays-us = <0 20000 100000>; ++ tx_delay = <0x3c>; ++ rx_delay = <0x2f>; ++ phy-handle = <&rgmii_phy1>; ++ phy-supply = <&vcca1v8_image_p>; ++ status = "okay"; ++}; ++ ++&mdio0 { ++ rgmii_phy0: ethernet-phy@0 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <0x1>; ++ }; ++}; ++ ++&mdio1 { ++ rgmii_phy1: ethernet-phy@0 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <0x1>; ++ }; ++}; +--- /dev/null ++++ b/configs/nlnet-xgp-rk3568_defconfig +@@ -0,0 +1,101 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_SYS_TEXT_BASE=0x00a00000 ++CONFIG_SPL_LIBCOMMON_SUPPORT=y ++CONFIG_SPL_LIBGENERIC_SUPPORT=y ++CONFIG_NR_DRAM_BANKS=2 ++CONFIG_DEFAULT_DEVICE_TREE="rk3568-xgp" ++CONFIG_ROCKCHIP_RK3568=y ++CONFIG_TEXT_BASE=0x00a00000 ++CONFIG_SPL_BSS_MAX_SIZE=0x4000 ++CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y ++CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 ++CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y ++CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y ++CONFIG_SPL_MMC=y ++CONFIG_SPL_SERIAL=y ++CONFIG_SPL_STACK_R_ADDR=0x600000 ++CONFIG_TARGET_EVB_RK3568=y ++CONFIG_DEBUG_UART_BASE=0xFE660000 ++CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_DEBUG_UART=y ++CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_API=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_SPL_LOAD_FIT=y ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-xgp.dtb" ++# CONFIG_SYS_DEVICE_NULLDEV is not set ++CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2 ++# CONFIG_DISPLAY_CPUINFO is not set ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++CONFIG_SPL_STACK_R=y ++CONFIG_SPL_SEPARATE_BSS=y ++CONFIG_SPL_ADC=y ++CONFIG_SPL_ATF=y ++CONFIG_SPL_ATF_LOAD_IMAGE_V2=y ++CONFIG_SPL_BOARD_INIT=y ++CONFIG_CMD_ADC=y ++CONFIG_CMD_BIND=y ++CONFIG_CMD_CLK=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_USB=y ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_PMIC=y ++CONFIG_CMD_REGULATOR=y ++# CONFIG_SPL_DOS_PARTITION is not set ++CONFIG_SPL_OF_CONTROL=y ++CONFIG_OF_LIVE=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_SPL_DM_WARN=y ++CONFIG_SPL_REGMAP=y ++CONFIG_SPL_SYSCON=y ++CONFIG_SPL_CLK=y ++CONFIG_ROCKCHIP_GPIO=y ++CONFIG_ROCKCHIP_GPIO_V2=y ++CONFIG_SYS_I2C_ROCKCHIP=y ++CONFIG_MISC=y ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_SPL_MMC_HS200_SUPPORT=y ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_ROCKCHIP=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y ++CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_DM_ETH=y ++CONFIG_ETH_DESIGNWARE=y ++CONFIG_GMAC_ROCKCHIP=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_DM_PMIC=y ++CONFIG_PMIC_RK8XX=y ++CONFIG_SPL_PMIC_RK8XX=y ++CONFIG_REGULATOR_PWM=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_SPL_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_REGULATOR_RK8XX=y ++CONFIG_PWM_ROCKCHIP=y ++CONFIG_SPL_RAM=y ++CONFIG_DM_RESET=y ++CONFIG_BAUDRATE=1500000 ++CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_PSCI=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_USB_OHCI_GENERIC=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y ++CONFIG_ROCKCHIP_USB2_PHY=y ++CONFIG_USB_KEYBOARD=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_ETHER_LAN75XX=y ++CONFIG_USB_ETHER_LAN78XX=y ++CONFIG_USB_ETHER_SMSC95XX=y ++CONFIG_ERRNO_STR=y diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nlnet-xgz68.dtsi b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nlnet-xgz68.dtsi new file mode 100644 index 000000000000..08d854241df2 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nlnet-xgz68.dtsi @@ -0,0 +1,732 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include +#include +#include +#include +#include "rk3568.dtsi" + +/ { + aliases { + mmc0 = &sdmmc0; + mmc1 = &sdhci; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1750000>; + + button-reset { + label = "reset"; + linux,code = ; + press-threshold-microvolt = <0>; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&sys_led_pin>; + pinctrl-names = "default"; + sys_led: sys-led { + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + label = "blue:sys"; + }; + }; + + vbus_typec: vbus_typec { + compatible = "regulator-fixed"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vbus_typec"; + }; + + vcc_sysin_b: vcc_sysin_b { + compatible = "regulator-fixed"; + regulator-name = "vcc_sysin_b"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <4000000>; + }; + + vcc_3v3: vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc3v3_sys>; + }; + + vcc_1v8: vcc_1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_sysin_b>; + }; + + vcc_1v8_image: vcc_1v8_image { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8_image"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_1v8>; + }; + + vcc_0v6_ddr: vcc_0v6_ddr { + compatible = "regulator-fixed"; + regulator-name = "vcc_0v6_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <600000>; + vin-supply = <&vcc_sysin_b>; + }; + + vcc_3v3_mainboard: vcc_3v3_mainboard { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_mainboard"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vbus_typec>; + }; + + vcc5v_mainboard: vcc5v_mainboard { + compatible = "regulator-fixed"; + regulator-name = "vcc5v_mainboard"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vbus_typec>; + }; + + vcc5v0_usb_otg0: vcc5v0_usb_otg0 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_otg0_en>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb_otg0"; + vin-supply = <&vcc5v_mainboard>; + }; + + battery_mainboard: battery_mainboard { + compatible = "regulator-fixed"; + regulator-name = "battery_mainboard"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <4000000>; + vin-supply = <&vbus_typec>; + }; + + vcc3v3_sd: vcc3v3_sd { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sd"; + regulator-always-on; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_pwren>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_mainboard>; + }; + + pcie_pi6c_oe: pcie-pi6c-oe { + compatible = "regulator-fixed"; + regulator-name = "pcie_pi6c_oe_en"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_all_power_en_pin>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc5v_mainboard>; + }; + + vcc_3v3_wifi: vcc-3v3-wifi { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_wifi"; + regulator-always-on; + enable-active-high; + //gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + //pinctrl-names = "default"; + //pinctrl-0 = <&pcie_all_power_en_pin>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_mainboard>; + }; + + vcc_4v0_5g: vcc-4v0-5g { + compatible = "regulator-fixed"; + regulator-name = "vcc_4v0_5g"; + regulator-always-on; + enable-active-high; + //gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + //pinctrl-names = "default"; + //pinctrl-0 = <&pcie_all_power_en_pin>; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <4000000>; + vin-supply = <&battery_mainboard>; + }; + +#ifdef DTS_NO_LEGACY + hdmi-con { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; +#endif +}; + + + +&cpu0 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu1 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu2 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu3 { + cpu-supply = <&vdd_cpu>; +}; + +&tsadc { + rockchip,hw-tshut-mode = <1>; + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + fusb0: usb-typec@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + vbus-supply = <&vbus_typec>; + status = "disabled"; + }; + + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1150000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sysin_b>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk817: pmic@20 { + compatible = "rockchip,rk817"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = ; + + pinctrl-names = "default", "pmic-sleep", + "pmic-power-off", "pmic-reset"; + pinctrl-0 = <&pmic_int>; + pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>; + pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>; + pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>; + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <1>; + clock-output-names = "rk808-clkout1", "rk808-clkout2"; + //fb-inner-reg-idxs = <2>; + /* 1: rst regs (default in codes), 0: rst the pmic */ + pmic-reset-func = <0>; + + vcc1-supply = <&vcc_sysin_b>; + vcc2-supply = <&vcc_sysin_b>; + vcc3-supply = <&vcc_sysin_b>; + vcc4-supply = <&vcc_sysin_b>; + vcc5-supply = <&vcc_sysin_b>; + vcc6-supply = <&vcc_sysin_b>; + vcc7-supply = <&vcc_sysin_b>; + vcc8-supply = <&vcc_sysin_b>; + vcc9-supply = <&dcdc_boost>; + + pwrkey { + status = "okay"; + }; + + pinctrl_rk8xx: pinctrl_rk8xx { + gpio-controller; + #gpio-cells = <2>; + + rk817_slppin_null: rk817_slppin_null { + pins = "gpio_slp"; + function = "pin_fun0"; + }; + + rk817_slppin_slp: rk817_slppin_slp { + pins = "gpio_slp"; + function = "pin_fun1"; + }; + + rk817_slppin_pwrdn: rk817_slppin_pwrdn { + pins = "gpio_slp"; + function = "pin_fun2"; + }; + + rk817_slppin_rst: rk817_slppin_rst { + pins = "gpio_slp"; + function = "pin_fun3"; + }; + }; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_logic"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-always-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_gpu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc3v3_sys: DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = <0x2>; + regulator-name = "vcc3v3_sys"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_pmu"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdda_0v9: LDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_acodec"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8_en: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca_1v8_en"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_image_p: LDO_REG8 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_image_p"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_image_p: LDO_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_image_p"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + dcdc_boost: BOOST { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <4700000>; + regulator-max-microvolt = <5400000>; + regulator-name = "boost"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + otg_switch: OTG_SWITCH { + regulator-name = "otg_switch"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&combphy2 { + status = "okay"; +}; + +&pcie2x1 { + reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_3v3_wifi>; + status = "okay"; +}; + +&pcie30phy { + phy-supply = <&pcie_pi6c_oe>; + data-lanes = <1 2>; + status = "okay"; +}; + +&pcie3x2 { + num-lanes = <1>; + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_4v0_5g>; + status = "okay"; +}; + +&pcie3x1 { + num-lanes = <1>; + reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_3v3_wifi>; + status = "okay"; +}; + +&pinctrl { + + leds { + sys_led_pin: sys-led-pin { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb { + vcc5v0_usb_otg0_en: vcc5v0_usb_otg0_en { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int: pmic_int { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + soc_slppin_gpio: soc_slppin_gpio { + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low>; + }; + + soc_slppin_rst: soc_slppin_rst { + rockchip,pins = <0 RK_PA2 2 &pcfg_pull_none>; + }; + + soc_slppin_slp: soc_slppin_slp { + rockchip,pins = <0 RK_PA2 1 &pcfg_pull_none>; + }; + }; + + pcie { + pcie_all_power_en_pin: pcie-all-power-en-pin { + rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&pmu_io_domains { + //fixed, pmuio0-supply = <&vcca1v8_pmu>; + pmuio1-supply = <&vcc3v3_pmu>; + pmuio2-supply = <&vcc3v3_pmu>; + vccio1-supply = <&vccio_acodec>; + //configure by hardware FLASH_VOL_SEL pin, vccio2-supply = <&vcca_1v8>; + vccio3-supply = <&vccio_sd>; + vccio4-supply = <&vcca1v8_pmu>; + vccio5-supply = <&vcc_1v8>; + vccio6-supply = <&vcca1v8_image_p>; + vccio7-supply = <&vcc_3v3>; + status = "okay"; +}; + +&rng { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca_1v8_en>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + max-frequency = <200000000>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; + status = "okay"; +}; + +&sdmmc0 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + +&usb2phy0 { + status = "okay"; +}; + +&usb2phy1 { + status = "okay"; +}; + +&usb2phy0_otg { + phy-supply = <&vcc5v0_usb_otg0>; + status = "okay"; +}; + +&usb_host0_xhci { + extcon = <&usb2phy0>; + status = "okay"; +}; + +&usb2phy0_host { + //phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb_host1_xhci { + status = "okay"; +}; + +&usb2phy1_otg { + //phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb2phy1_host { + //phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +#ifdef DTS_NO_LEGACY +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + +&hdmi { + avdd-0v9-supply = <&vdda0v9_image>; + avdd-1v8-supply = <&vcca1v8_image>; + status = "okay"; +}; + +&hdmi_in { + hdmi_in_vp0: endpoint { + remote-endpoint = <&vp0_out_hdmi>; + }; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&hdmi_sound { + status = "okay"; +}; +#endif + +#ifdef DTS_NO_LEGACY +&vop { + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; + status = "okay"; +}; + +&vop_mmu { + status = "okay"; +}; + +&vp0 { + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { + reg = ; + remote-endpoint = <&hdmi_in_vp0>; + }; +}; +#endif + +&i2c5 { + status = "okay"; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp-v3.dts b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp-v3.dts new file mode 100644 index 000000000000..74902816c199 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp-v3.dts @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3568-xgp.dts" + +/delete-node/ &backlight; +/delete-node/ &spi_gpio; + +/ { + model = "NLnet XiGuaPi Board V3"; + + leds { + pinctrl-0 = <&sys_led &net_led_pin>; + + net_led: net-led { + gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; + label = "blue:net"; + }; + }; + + led-controller { + compatible = "pwm-leds"; + + backlight: backlight { + label = "lcd:backlight"; + pwms = <&pwm14 0 1000000 0>; + max-brightness = <255>; + linux,default-trigger = "default-on"; + }; + }; +}; + +&pmu_io_domains { + vccio5-supply = <&vcc_3v3>; +}; + +&spi3 { + status = "okay"; +}; + +&pinctrl { + /delete-property/ spi_gpio; + leds { + net_led_pin: net-led-pin { + rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + display { + /delete-property/ display_dc_pin; + spi3_display_dc_pin: spi3_display_dc_pin { + rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + display_reset_pin: display_reset_pin { + rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + spi3 { + spi3_sck: spi3_sck { + rockchip,pins = <4 RK_PC2 2 &pcfg_pull_none>; + }; + spi3_mosi: spi3_mosi { + rockchip,pins = <4 RK_PC3 2 &pcfg_pull_none>; + }; + }; + + modem { + modem_reset_pins: modem-reset-pins { + rockchip,pins = <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; +}; + +&pwm14 { + pinctrl-0 = <&pwm14m0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&usb2phy0_host { + pinctrl-0 = <&modem_reset_pins>; + pinctrl-names = "default"; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp.dts b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp.dts new file mode 100644 index 000000000000..c151213e0359 --- /dev/null +++ b/devices/rockchip_armv8/diy/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-xgp.dts @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3568-nlnet-xgz68.dtsi" + +/ { + model = "NLnet XiGuaPi Board"; + compatible = "nlnet,xgp", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac0; + ethernet1 = &gmac1; + led-boot = &sys_led; + led-failsafe = &sys_led; + led-running = &sys_led; + led-upgrade = &sys_led; + }; + + backlight: backlight { + compatible = "gpio-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&backlight_led_pin>; + gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>; + default-on; + }; + + fan0: pwm-fan { + compatible = "pwm-fan"; + pinctrl-names = "default"; + #cooling-cells = <2>; + pwms = <&pwm7 0 40000 0>; + cooling-levels = <0 50 80 110 140 170 200 230 255>; + }; + + spi_gpio: spi-gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + num-chipselects = <1>; + }; +}; + +&gmac0 { + assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; + assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>; + assigned-clock-rates = <0>, <125000000>; + clock_in_out = "output"; + phy-mode = "rgmii-id"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_miim + &gmac0_tx_bus2 + &gmac0_rx_bus2 + &gmac0_rgmii_clk + &gmac0_rgmii_bus>; + snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x3c>; + rx_delay = <0x2f>; + phy-handle = <&rgmii_phy0>; + status = "okay"; +}; + +&gmac1 { + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>; + assigned-clock-rates = <0>, <125000000>; + clock_in_out = "output"; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac1m1_miim + &gmac1m1_tx_bus2 + &gmac1m1_rx_bus2 + &gmac1m1_rgmii_clk + &gmac1m1_rgmii_bus>; + snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x3c>; + rx_delay = <0x2f>; + phy-handle = <&rgmii_phy1>; + phy-supply = <&vcca1v8_image_p>; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x1>; + }; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x1>; + }; +}; + +&spi3 { + pinctrl-names = "default"; + pinctrl-0 = <&spi3m1_cs0 &spi3_sck &spi3_mosi>; + status = "disabled"; + + display@0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi3_display_dc_pin &display_reset_pin>; + compatible = "sitronix,st7735r"; + reg = <0>; + rotate = <0>; + dc-gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + buswidth = <8>; + debug = <0x0>; + status = "okay"; + }; +}; + +&spi_gpio { + pinctrl-names = "default"; + pinctrl-0 = <&spi_gpio_sck &spi_gpio_mosi &spi_gpio_cs>; + sck-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; + status = "okay"; + + display@0 { + pinctrl-names = "default"; + pinctrl-0 = <&display_dc_pin &display_reset_pin>; + compatible = "sitronix,st7735r"; + reg = <0>; + rotate = <0>; + dc-gpios = <&gpio4 RK_PC3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + buswidth = <8>; + debug = <0x0>; + status = "okay"; + }; +}; + +&pinctrl { + spi_gpio { + spi_gpio_sck: spi_gpio_sck { + rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + spi_gpio_mosi: spi_gpio_mosi { + rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + spi_gpio_cs: spi_gpio_cs { + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + spi3 { + spi3_sck: spi3_sck { + rockchip,pins = <4 RK_PC2 2 &pcfg_pull_none>; + }; + spi3_mosi: spi3_mosi { + rockchip,pins = <4 RK_PC3 2 &pcfg_pull_none>; + }; + }; + + display { + spi3_display_dc_pin: spi3_display_dc_pin { + rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + display_dc_pin: display_dc_pin { + rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + display_reset_pin: display_reset_pin { + rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + backlight { + backlight_led_pin: backlight-led-pin { + rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pwmfan { + pwm_fan_sense_pin: pwm-fan-sense-pin { + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&pwm7 { + status = "okay"; + pinctrl-0 = <&pwm7_pins>; + pinctrl-names = "default"; +}; + +&pwm3 { + compatible = "rockchip,remotectl-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm3_pins>; + remote_pwm_id = <3>; + handle_cpu_id = <1>; + remote_support_psci = <0>; + interrupts = , + ; + status = "okay"; + + /* China Mobile TV Box */ + ir_key1 { + rockchip,usercode = <0xdd22>; + rockchip,key_table = + <0x6a KEY_BACK>, + <0x35 KEY_UP>, + <0x2d KEY_DOWN>, + <0x66 KEY_LEFT>, + <0x3e KEY_RIGHT>, + <0x77 KEY_HOME>, + <0x7f KEY_VOLUMEUP>, + <0x7e KEY_VOLUMEDOWN>, + <0x23 KEY_POWER>, + <0x7d KEY_MENU>, + <0x6d KEY_1>, + <0x6c KEY_2>, + <0x33 KEY_3>, + <0x71 KEY_4>, + <0x70 KEY_5>, + <0x37 KEY_6>, + <0x75 KEY_7>, + <0x74 KEY_8>, + <0x3b KEY_9>, + <0x78 KEY_0>; + }; +}; + +&cpu_thermal { + trips { + cpu_idle: cpu_idle { + temperature = <20000>; + hysteresis = <5000>; + type = "passive"; + }; + cpu_low: cpu_low { + temperature = <40000>; + hysteresis = <5000>; + type = "active"; + }; + cpu_warm: cpu_warm { + temperature = <50000>; + hysteresis = <5000>; + type = "active"; + }; + cpu_hot: cpu_hot { + temperature = <60000>; + hysteresis = <5000>; + type = "active"; + }; + cpu_hall: cpu_hall { + temperature = <70000>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_idle>; + cooling-device = <&fan0 0 1>; + }; + map1 { + trip = <&cpu_low>; + cooling-device = <&fan0 1 3>; + }; + map2 { + trip = <&cpu_warm>; + cooling-device = <&fan0 3 5>; + }; + map3 { + trip = <&cpu_hot>; + cooling-device = <&fan0 5 7>; + }; + map4 { + trip = <&cpu_hall>; + cooling-device = <&fan0 7 THERMAL_NO_LIMIT>; + }; + }; +}; diff --git a/devices/rockchip_armv8/diy/target/linux/rockchip/patches-6.1/205-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch b/devices/rockchip_armv8/diy/target/linux/rockchip/patches-6.6/205-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch similarity index 100% rename from devices/rockchip_armv8/diy/target/linux/rockchip/patches-6.1/205-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch rename to devices/rockchip_armv8/diy/target/linux/rockchip/patches-6.6/205-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch diff --git a/devices/rockchip_armv8/patches/01-hinlink.patch b/devices/rockchip_armv8/patches/01-hinlink.patch index 25402a5edbf7..6ff63c5f8566 100644 --- a/devices/rockchip_armv8/patches/01-hinlink.patch +++ b/devices/rockchip_armv8/patches/01-hinlink.patch @@ -46,8 +46,8 @@ rk3399-orangepi.dtb \ rk3399-pinebook-pro.dtb \ rk3399-pinephone-pro.dtb \ --@@ -181,11 +183,16 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ -+@@ -181,11 +183,19 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ +-@@ -182,12 +184,17 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ ++@@ -182,12 +184,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-soquartz-model-a.dtb \ rk3568-bpi-r2-pro.dtb \ rk3568-evb.dtb \ @@ -126,23 +126,24 @@ ;; esac ---- a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -@@ -16,13 +16,16 @@ +--- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch ++++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch +@@ -16,7 +16,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -78,8 +80,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -78,8 +80,13 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp +-@@ -90,9 +92,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp ++@@ -90,9 +92,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb +@@ -24,6 +24,9 @@ + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb diff --git a/devices/rockchip_armv8/patches/22-H3399PC.patch b/devices/rockchip_armv8/patches/22-H3399PC.patch index 43aafc146b84..0eb3ff1341b7 100644 --- a/devices/rockchip_armv8/patches/22-H3399PC.patch +++ b/devices/rockchip_armv8/patches/22-H3399PC.patch @@ -54,22 +54,24 @@ diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/tar index 7eb99ade652..92ede0f46e6 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -@@ -18,6 +18,8 @@ rockchip_setup_interfaces() +@@ -18,6 +18,9 @@ rockchip_setup_interfaces() friendlyarm,nanopi-r4s-enterprise|\ friendlyarm,nanopi-r6c|\ radxa,rockpi-e|\ + rocktech,mpc1903|\ + sharevdi,h3399pc|\ ++ nlnet,xgp|\ xunlong,orangepi-r1-plus|\ xunlong,orangepi-r1-plus-lts) ucidef_set_interfaces_lan_wan 'eth1' 'eth0' -@@ -59,7 +60,9 @@ rockchip_setup_macs() +@@ -59,7 +60,10 @@ rockchip_setup_macs() friendlyarm,nanopi-r2c|\ friendlyarm,nanopi-r2s|\ lunzn,fastrhino-r66s|\ - lunzn,fastrhino-r68s) + lunzn,fastrhino-r68s|\ + rocktech,mpc1903|\ ++ nlnet,xgp|\ + sharevdi,h3399pc) wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0) lan_mac=$(macaddr_add "$wan_mac" 1) @@ -123,15 +125,15 @@ index 7eb99ade652..92ede0f46e6 100644 define Device/xunlong_orangepi-5 DEVICE_VENDOR := Xunlong DEVICE_MODEL := Orange Pi 5 -diff --git a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch +diff --git a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch index 231bca2b544..441ce2f4e59 100644 ---- a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch +--- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch ++++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch @@ -1,10 +1,13 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile --@@ -34,6 +34,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gr -+@@ -34,6 +34,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gr +-@@ -38,6 +38,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gr ++@@ -38,6 +38,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gr dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-dumo.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb @@ -149,8 +151,8 @@ index ac01f8bb352..6f08c2d1190 100644 @@ -1,10 +1,12 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile --@@ -147,6 +147,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ -+@@ -147,6 +147,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ +-@@ -148,6 +148,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ ++@@ -148,6 +148,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ rk3399-firefly.dtb \ rk3399-gru-bob.dtb \ rk3399-gru-kevin.dtb \ diff --git a/devices/rockchip_armv8/patches/33-rk3568.patch b/devices/rockchip_armv8/patches/33-rk3568.patch index f2d35d786cdd..8faa3c5ef6f0 100644 --- a/devices/rockchip_armv8/patches/33-rk3568.patch +++ b/devices/rockchip_armv8/patches/33-rk3568.patch @@ -1,26 +1,28 @@ -diff --git a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch +diff --git a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch index 231bca2b544..0c4b2c55d9a 100644 ---- a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch +--- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch ++++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch @@ -19,7 +19,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -78,8 +80,13 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -78,8 +80,16 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp +-@@ -90,9 +92,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp ++@@ -90,9 +92,19 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb -@@ -30,6 +30,9 @@ - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb +@@ -32,6 +32,11 @@ +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-seewo-sv21.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-t68m.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-panther-x2.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp-v3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb + @@ -103,6 +107,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ev --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -39,7 +41,7 @@ index 231bca2b544..0c4b2c55d9a 100644 # RK3568 boards define U-Boot/Default/rk3568 -@@ -188,6 +195,20 @@ +@@ -188,6 +195,27 @@ DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568 ATF:=$(RK3568_ATF) TPL:=$(RK3568_TPL) @@ -52,6 +54,13 @@ index 231bca2b544..0c4b2c55d9a 100644 + lyt_t68m +endef + ++define U-Boot/nlnet-xgp-rk3568 ++ $(U-Boot/Default/rk3568) ++ NAME:=NLnet XGP Board ++ BUILD_DEVICES:= \ ++ nlnet_xgp ++endef ++ +define U-Boot/seewo-sv21-rk3568 + $(U-Boot/Default/rk3568) + NAME:=Seewo sv21-rk3568 @@ -60,7 +69,7 @@ index 231bca2b544..0c4b2c55d9a 100644 endef define U-Boot/fastrhino-r66s-rk3568 -@@ -355,8 +376,11 @@ +@@ -355,8 +376,12 @@ rock-pi-e-rk3328 \ rock64-rk3328 \ radxa-cm3-io-rk3566 \ @@ -68,6 +77,7 @@ index 231bca2b544..0c4b2c55d9a 100644 fastrhino-r66s-rk3568 \ fastrhino-r68s-rk3568 \ + lyt-t68m-rk3568 \ ++ nlnet-xgp-rk3568 \ + seewo-sv21-rk3568 \ mrkaio-m68s-rk3568 \ nanopi-r5c-rk3568 \ @@ -75,7 +85,7 @@ index 231bca2b544..0c4b2c55d9a 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk -@@ -319,6 +319,36 @@ +@@ -319,6 +320,49 @@ endef TARGET_DEVICES += friendlyarm_nanopi-neo3 @@ -89,6 +99,19 @@ index 231bca2b544..0c4b2c55d9a 100644 +endef +TARGET_DEVICES += lyt_t68m + ++define Device/nlnet_xgp ++ DEVICE_VENDOR := NLnet ++ DEVICE_MODEL := XiGuaPi ++ SOC := rk3568 ++ KERNEL := kernel-bin ++ DEVICE_DTS := rockchip/rk3568-xgp rockchip/rk3568-xgp-v3 ++ UBOOT_DEVICE_NAME := nlnet-xgp-rk3568 ++ BOOT_FLOW := pine64-img ++ IMAGE/sysupgrade.img.gz := boot-combined | boot-script nlnet-xgp | pine64-img | gzip | append-metadata ++ DEVICE_PACKAGES := kmod-r8125 wpad-basic-mbedtls ++endef ++TARGET_DEVICES += nlnet_xgp ++ +define Device/panther_x2 + DEVICE_VENDOR := Panther + DEVICE_MODEL := X2 @@ -164,19 +187,21 @@ index 231bca2b544..0c4b2c55d9a 100644 --- a/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch +++ b/package/boot/uboot-rockchip/patches/900-arm-add-dts-files.patch -@@ -18,13 +18,14 @@ +@@ -18,7 +18,7 @@ rk3399-orangepi.dtb \ rk3399-pinebook-pro.dtb \ rk3399-pinephone-pro.dtb \ --@@ -181,11 +183,19 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ -+@@ -181,11 +183,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ +-@@ -182,12 +184,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ ++@@ -182,12 +184,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-soquartz-model-a.dtb \ rk3568-bpi-r2-pro.dtb \ rk3568-evb.dtb \ - + rk3568-fastrhino-r66s.dtb \ +@@ -26,6 +26,8 @@ + rk3568-fastrhino-r68s.dtb \ + rk3568-generic.dtb \ rk3568-lubancat-2.dtb \ ++ rk3568-lyt-t68m.dtb \ +++ rk3568-xgp.dtb \ + rk3568-mrkaio-m68s.dtb \ rk3568-nanopi-r5c.dtb \ rk3568-nanopi-r5s.dtb \ diff --git a/devices/rockchip_armv8/patches/44-m68s-plus.patch b/devices/rockchip_armv8/patches/44-m68s-plus.patch index 06eb9f743831..0c5a38bb98e9 100644 --- a/devices/rockchip_armv8/patches/44-m68s-plus.patch +++ b/devices/rockchip_armv8/patches/44-m68s-plus.patch @@ -52,19 +52,19 @@ DEVICE_VENDOR := Firefly DEVICE_MODEL := ROC-RK3328-CC ---- a/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -+++ b/target/linux/rockchip/patches-6.1/900-arm64-boot-add-dts-files.patch -@@ -16,11 +16,12 @@ +--- a/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch ++++ b/target/linux/rockchip/patches-6.6/900-arm64-boot-add-dts-files.patch +@@ -19,11 +19,12 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -78,8 +80,16 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -78,8 +80,17 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp +-@@ -90,9 +92,19 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp ++@@ -90,9 +92,20 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s-plus.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb - +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb \ No newline at end of file diff --git a/devices/rockchip_armv8/patches/55-xgp.patch b/devices/rockchip_armv8/patches/55-xgp.patch new file mode 100644 index 000000000000..5bb2a93907cf --- /dev/null +++ b/devices/rockchip_armv8/patches/55-xgp.patch @@ -0,0 +1,70 @@ +--- a/target/linux/rockchip/image/Makefile ++++ b/target/linux/rockchip/image/Makefile +@@ -20,6 +20,23 @@ define Build/boot-common + $(CP) $(IMAGE_KERNEL) $@.boot/kernel.img + endef + ++define Build/boot-combined ++ # This creates a new folder copies the dtbs (as rockchip*.dtb) ++ # and the kernel image (as kernel.img) ++ rm -fR $@.boot ++ mkdir -p $@.boot ++ ++ i=0; \ ++ for dts in $(DEVICE_DTS); do \ ++ dts=$$(echo $${dts} | cut -d'/' -f2); \ ++ $(CP) $(KDIR)/image-$$(echo $${dts} | cut -d'/' -f2).dtb $@.boot/rockchip$$(perl -e 'printf "%b\n",'$$i).dtb; \ ++ let i+=1; \ ++ done ++ ++ $(LN) rockchip0.dtb $@.boot/rockchip.dtb ++ $(CP) $(IMAGE_KERNEL) $@.boot/kernel.img ++endef ++ + define Build/boot-script + # Make an U-boot image and copy it to the boot partition + mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $(if $(1),$(1),mmc).bootscript $@.boot/boot.scr +diff --git a/target/linux/rockchip/image/nlnet-xgp.bootscript b/target/linux/rockchip/image/nlnet-xgp.bootscript +new file mode 100644 +index 0000000000000..80df26f6c1520 +--- /dev/null ++++ b/target/linux/rockchip/image/nlnet-xgp.bootscript +@@ -0,0 +1,38 @@ ++# nlnet-xgp rk3568 combined image, board detected by ADC ++ ++env delete hwrev ++env delete coreboard_adc_value ++env delete motherboard_adc_value ++ ++# using SARADC CH1 to detect coreboard hwrev ++# using SARADC CH7 to detect motherboard hwrev ++ ++adc single saradc@fe720000 1 coreboard_adc_value ++adc single saradc@fe720000 7 motherboard_adc_value ++ ++if test -n "$coreboard_adc_value"; then ++ if test "$coreboard_adc_value" -lt 225000; then ++ echo coreboard rev02 ++ fi ++fi ++ ++if test -n "$motherboard_adc_value"; then ++ if test "$motherboard_adc_value" -lt 225000; then ++ echo motherboard rev03 ++ setenv hwrev 1 ++ fi ++fi ++ ++env delete coreboard_adc_value ++env delete motherboard_adc_value ++ ++part uuid mmc ${devnum}:2 uuid ++ ++setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xfe660000 root=PARTUUID=${uuid} rw rootwait" ++ ++load mmc ${devnum}:1 ${fdt_addr_r} rockchip${hwrev}.dtb ++load mmc ${devnum}:1 ${kernel_addr_r} kernel.img ++ ++env delete hwrev ++ ++booti ${kernel_addr_r} - ${fdt_addr_r} diff --git a/devices/sunxi_cortexa53/.config b/devices/sunxi_cortexa53/.config index a82af7810bfc..ec940ab3a198 100644 --- a/devices/sunxi_cortexa53/.config +++ b/devices/sunxi_cortexa53/.config @@ -11,8 +11,6 @@ CONFIG_TARGET_DEVICE_sunxi_cortexa53_DEVICE_xunlong_orangepi-zero-plus=y CONFIG_TARGET_DEVICE_sunxi_cortexa53_DEVICE_xunlong_orangepi-zero2=y CONFIG_TARGET_DEVICE_sunxi_cortexa53_DEVICE_xunlong_orangepi-zero3=y -CONFIG_PACKAGE_kmod-rtl8189es=y - CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/sunxi_cortexa7/.config b/devices/sunxi_cortexa7/.config index 733384422df7..c1a4b4cbc9b1 100644 --- a/devices/sunxi_cortexa7/.config +++ b/devices/sunxi_cortexa7/.config @@ -21,8 +21,6 @@ CONFIG_TARGET_DEVICE_sunxi_cortexa7_DEVICE_sinovoip_bananapi-m2-berry=y CONFIG_TARGET_DEVICE_sunxi_cortexa7_DEVICE_sinovoip_bananapi-m2-ultra=y CONFIG_TARGET_DEVICE_sunxi_cortexa7_DEVICE_mele_m9=y -CONFIG_PACKAGE_kmod-rtl8189es=y - CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/x86_generic/.config b/devices/x86_generic/.config index 5e3d6885e707..17df92be484f 100644 --- a/devices/x86_generic/.config +++ b/devices/x86_generic/.config @@ -23,5 +23,7 @@ CONFIG_KERNEL_XDP_SOCKETS=y CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx +CONFIG_PACKAGE_kmod-pcie_mhi=m + CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=n