diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index f554fc007faf..d99265055ea1 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -259,7 +259,6 @@ jobs: run: | shopt -s extglob mkdir -p firmware/${{matrix.target}} - cd openwrt; kernel_v="$(make --file=info.mk kernel_version)"; cd - cp -rf openwrt/bin/targets/*/*/*{combined,sysupgrade}* ./firmware/${{matrix.target}}/ || true cd openwrt/bin/targets/*/*/ mv -f profiles.json profiles.json.b || true @@ -267,9 +266,6 @@ jobs: cp $GITHUB_WORKSPACE/openwrt/build_dir/target-*/linux-*/linux-*/.config ${{matrix.target}}_kernel.config || true cd - rename -v "s/openwrt-/${{ env.VERSION }}-openwrt-/" ./firmware/*/* || true - rename -v "s/friendlyarm_//" ./firmware/*/*gz || true - rename -v "s/embedfire_//" ./firmware/*/*gz || true - rename -v "s/xiaomi_redmi-router/redmi/" ./firmware/*/*bin || true Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤") echo "EMOJI=${Emoji[$[$RANDOM % ${#Emoji[@]}]]}" >> $GITHUB_ENV if [ ${{matrix.target}} == "x86_64" ]; then @@ -298,26 +294,6 @@ jobs: path: | openwrt/bin/targets/ - - name: Upload firmware to cowtransfer - if: env.UPLOAD_FIRMWARE_TO_COWTRANSFER == 'true' - continue-on-error: true - run: | - curl -fsSL git.io/file-transfer | sh - cowurl=$(./transfer cow --block 2621440 -s --no-progress ${FIRMWARE}) - cowurl=$(echo $cowurl | grep -o -E "https[^ ]*") - echo "COWURL=$cowurl" >> $GITHUB_ENV - echo "Download Link: ${{ env.EMOJI }} $cowurl ${{ env.EMOJI }} 🚀" - - - name: Upload firmware to WeTransfer - if: env.UPLOAD_FIRMWARE_TO_WETRANSFER == 'true' && ! contains(github.event.action, 'noup') - continue-on-error: true - run: | - curl -fsSL git.io/file-transfer | sh - wetrans=$(./transfer wet -s -p 16 --no-progress ${FIRMWARE}) - wetrans=$(echo $wetrans | grep -o -E "https[^ ]*") - echo "WETRANS=$wetrans" >> $GITHUB_ENV - echo "Download Link: ${{ env.EMOJI }} $wetrans ${{ env.EMOJI }} 🚀" - - name: Create release id: create_release if: env.REPO_TOKEN && env.UPLOAD_FIRMWARE_FOR_RELEASE == 'true' @@ -340,30 +316,6 @@ jobs: name: ${{ env.date2 }} ${{matrix.target}} ${{ env.EMOJI }} tag_name: ${{ env.date }}_${{matrix.target}} body_path: release.txt - - - name: Set Up Docker Buildx - uses: docker/setup-buildx-action@master - if: env.DOCKER_ID && env.DOCKER_PASSWD - - - name: Login To DockerHub - uses: docker/login-action@master - if: env.DOCKER_ID && env.DOCKER_PASSWD - with: - username: ${{ secrets.DOCKER_ID }} - password: ${{ secrets.DOCKER_PASSWD }} - - - name: Build and push docker image - uses: docker/build-push-action@master - continue-on-error: true - if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') && github.event.client_payload.target == 'x86_64' - with: - platforms: ${{ env.ARCH }} - file: Dockerfile - context: . - push: true - tags: | - ${{ secrets.DOCKER_ID }}/openwrt-nginx:${{ matrix.target }} - ${{ env.DOCKERTAG }} - name: WeChat notification continue-on-error: true diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 74ca5406be89..000000000000 --- a/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM scratch - -MAINTAINER Kiddin9 "https://github.com/kiddin9/OpenWrt_x86-r2s-r4s" - -ADD openwrt/bin/targets/*/*/*rootfs*.tar.gz / - diff --git a/devices/common/.config b/devices/common/.config index b70e2c395fdf..6cc90e7faf67 100644 --- a/devices/common/.config +++ b/devices/common/.config @@ -5,7 +5,6 @@ CONFIG_TARGET_ROOTFS_EXT4FS=n CONFIG_TARGET_ROOTFS_CPIOGZ=n CONFIG_LUCI_CSSTIDY=n -CONFIG_GRUB_CONSOLE=n CONFIG_SIGNED_PACKAGES=n CONFIG_SIGNATURE_CHECK=n diff --git a/devices/common/patches/kernel_version.patch b/devices/common/patches/kernel_version.patch new file mode 100644 index 000000000000..52c0d3a19789 --- /dev/null +++ b/devices/common/patches/kernel_version.patch @@ -0,0 +1,30 @@ +--- 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, + +--- a/scripts/json_add_image_info.py ++++ b/scripts/json_add_image_info.py +@@ -55,6 +55,7 @@ def get_titles(): + "profiles": { + device_id: { + "image_prefix": getenv("DEVICE_IMG_PREFIX"), ++ "image_initramfs": getenv("KERNEL_INITRAMFS_IMAGE"), + "images": [ + { + "type": getenv("FILE_TYPE"), diff --git a/devices/common/patches/fix.patch b/devices/common/patches/rootfstargz.patch similarity index 71% rename from devices/common/patches/fix.patch rename to devices/common/patches/rootfstargz.patch index 33b006041ba8..7e7ed7857817 100644 --- a/devices/common/patches/fix.patch +++ b/devices/common/patches/rootfstargz.patch @@ -79,46 +79,3 @@ $$(eval $$(foreach compile,$$(COMPILE), \ $$(call Device/Build/compile,$$(compile),$(1)))) - ---- 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, - ---- a/scripts/json_add_image_info.py -+++ b/scripts/json_add_image_info.py -@@ -55,6 +55,7 @@ def get_titles(): - "profiles": { - device_id: { - "image_prefix": getenv("DEVICE_IMG_PREFIX"), -+ "image_initramfs": getenv("KERNEL_INITRAMFS_IMAGE"), - "images": [ - { - "type": getenv("FILE_TYPE"), - ---- a/package/system/procd/files/procd.sh -+++ b/package/system/procd/files/procd.sh -@@ -260,7 +260,7 @@ _procd_set_param() { - reload_signal) - json_add_int "$type" $(kill -l "$1") - ;; -- pidfile|user|group|seccomp|capabilities|facility|\ -+ pidfile|user|group|capabilities|facility|\ - extroot|overlaydir|tmpoverlaysize) - json_add_string "$type" "$1" - ;; diff --git a/devices/common/patches/seccomp.patch b/devices/common/patches/seccomp.patch new file mode 100644 index 000000000000..981f43b02480 --- /dev/null +++ b/devices/common/patches/seccomp.patch @@ -0,0 +1,11 @@ +--- a/package/system/procd/files/procd.sh ++++ b/package/system/procd/files/procd.sh +@@ -260,7 +260,7 @@ _procd_set_param() { + reload_signal) + json_add_int "$type" $(kill -l "$1") + ;; +- pidfile|user|group|seccomp|capabilities|facility|\ ++ pidfile|user|group|capabilities|facility|\ + extroot|overlaydir|tmpoverlaysize) + json_add_string "$type" "$1" + ;; diff --git a/devices/mediatek_mt7981/diy.sh b/devices/mediatek_mt7981/diy.sh index de267ced2553..246a518dc872 100644 --- a/devices/mediatek_mt7981/diy.sh +++ b/devices/mediatek_mt7981/diy.sh @@ -6,7 +6,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) rm -rf feeds/kiddin9/{rtl*,fullconenat-nft} package/feeds/luci/rpcd-mod-luci toolchain/musl package/feeds/packages/gptfdisk package/utils/f2fs-tools package/utils/e2fsprogs package/libs/libselinux package/feeds/packages/acl package/feeds/packages/libevdev -rm -rf devices/common/patches/{fix.patch,iptables.patch,kernel-defaults.patch,targets.patch} +rm -rf devices/common/patches/{rootfstargz.patch,kernel_version.patch,seccomp.patch,iptables.patch,kernel-defaults.patch,targets.patch} #sed -i "/KernelPackage,sound-soc-core/d" package/kernel/linux/modules/sound.mk #sed -i "/KernelPackage,multimedia-input/d" package/kernel/linux/modules/video.mk diff --git a/devices/mediatek_mt7986/.config b/devices/mediatek_mt7986/.config deleted file mode 100644 index bd2f40747c5d..000000000000 --- a/devices/mediatek_mt7986/.config +++ /dev/null @@ -1,138 +0,0 @@ -CONFIG_TARGET_mediatek=y -CONFIG_TARGET_mediatek_mt7986=y -CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_mediatek_mt7986_DEVICE_mt7986a-ax6000-emmc-re-cp-03=y - -CONFIG_VERSION_DIST="OpenWrt" - -CONFIG_DEVEL=y -CONFIG_TOOLCHAINOPTS=y -CONFIG_BUSYBOX_CUSTOM=y -CONFIG_AFALG_UPDATE_CTR_IV=y -CONFIG_BUSYBOX_CONFIG_BLKID=y -CONFIG_BUSYBOX_CONFIG_FEATURE_BLKID_TYPE=y -CONFIG_BUSYBOX_CONFIG_VOLUMEID=y -CONFIG_CONNINFRA_AUTO_UP=y -CONFIG_CONNINFRA_EMI_SUPPORT=y -# CONFIG_GDB is not set -# CONFIG_KERNEL_BLK_DEV_THROTTLING is not set -# CONFIG_KERNEL_CFS_BANDWIDTH is not set -CONFIG_KERNEL_CGROUP_DEVICE=y -CONFIG_KERNEL_CGROUP_FREEZER=y -CONFIG_KERNEL_DEVMEM=y -# CONFIG_KERNEL_KEYS is not set -# CONFIG_KERNEL_MEMCG_SWAP is not set -CONFIG_KERNEL_NET_CLS_CGROUP=y -CONFIG_MTK_ACK_CTS_TIMEOUT_SUPPORT=y -CONFIG_MTK_AIR_MONITOR=y -CONFIG_MTK_AMPDU_CONF_SUPPORT=y -CONFIG_MTK_ANTENNA_CONTROL_SUPPORT=y -CONFIG_MTK_APCLI_SUPPORT=y -CONFIG_MTK_ATE_SUPPORT=y -CONFIG_MTK_BACKGROUND_SCAN_SUPPORT=y -CONFIG_MTK_CAL_BIN_FILE_SUPPORT=y -CONFIG_MTK_CFG_SUPPORT_FALCON_MURU=y -CONFIG_MTK_CFG_SUPPORT_FALCON_PP=y -CONFIG_MTK_CFG_SUPPORT_FALCON_SR=y -CONFIG_MTK_CFG_SUPPORT_FALCON_TXCMD_DBG=y -CONFIG_MTK_CHIP_MT7986=y -CONFIG_MTK_CONNINFRA_APSOC=y -CONFIG_MTK_CONNINFRA_APSOC_MT7986=y -CONFIG_MTK_CON_WPS_SUPPORT=y -CONFIG_MTK_DBDC_MODE=y -CONFIG_MTK_DOT11K_RRM_SUPPORT=y -CONFIG_MTK_DOT11R_FT_SUPPORT=y -CONFIG_MTK_DOT11W_PMF_SUPPORT=y -CONFIG_MTK_DOT11_HE_AX=y -CONFIG_MTK_DOT11_N_SUPPORT=y -CONFIG_MTK_DOT11_VHT_AC=y -CONFIG_MTK_FAST_NAT_SUPPORT=y -CONFIG_MTK_FIRST_IF_EEPROM_FLASH=y -CONFIG_MTK_FIRST_IF_IPAILNA=y -CONFIG_MTK_FIRST_IF_MT7986=y -CONFIG_MTK_GREENAP_SUPPORT=y -CONFIG_MTK_G_BAND_256QAM_SUPPORT=y -CONFIG_MTK_HDR_TRANS_RX_SUPPORT=y -CONFIG_MTK_HDR_TRANS_TX_SUPPORT=y -CONFIG_MTK_ICAP_SUPPORT=y -CONFIG_MTK_IGMP_SNOOP_SUPPORT=y -CONFIG_MTK_INTERWORKING=y -CONFIG_MTK_MAP_R2_VER_SUPPORT=y -CONFIG_MTK_MAP_R3_VER_SUPPORT=y -CONFIG_MTK_MAP_SUPPORT=y -CONFIG_MTK_MBSS_DTIM_SUPPORT=y -CONFIG_MTK_MBSS_SUPPORT=y -CONFIG_MTK_MCAST_RATE_SPECIFIC=y -CONFIG_MTK_MGMT_TXPWR_CTRL=y -CONFIG_MTK_MLME_MULTI_QUEUE_SUPPORT=y -CONFIG_MTK_MT_AP_SUPPORT=m -CONFIG_MTK_MT_DFS_SUPPORT=y -CONFIG_MTK_MT_MAC=y -CONFIG_MTK_MT_WIFI=m -CONFIG_MTK_MT_WIFI_PATH="mt_wifi" -CONFIG_MTK_MUMIMO_SUPPORT=y -CONFIG_MTK_MU_RA_SUPPORT=y -CONFIG_MTK_OFFCHANNEL_SCAN_FEATURE=y -CONFIG_MTK_OWE_SUPPORT=y -CONFIG_MTK_PHY_ICS_SUPPORT=y -CONFIG_MTK_QOS_R1_SUPPORT=y -CONFIG_MTK_RA_PHY_RATE_SUPPORT=y -CONFIG_MTK_RED_SUPPORT=y -CONFIG_MTK_RTMP_FLASH_SUPPORT=y -CONFIG_MTK_RT_FIRST_CARD_EEPROM="flash" -CONFIG_MTK_RT_FIRST_IF_RF_OFFSET=0xc0000 -CONFIG_MTK_SCS_FW_OFFLOAD=y -CONFIG_MTK_SECOND_IF_NONE=y -CONFIG_MTK_SMART_CARRIER_SENSE_SUPPORT=y -CONFIG_MTK_SPECTRUM_SUPPORT=y -CONFIG_MTK_SUPPORT_OPENWRT=y -CONFIG_MTK_THERMAL_PROTECT_SUPPORT=y -CONFIG_MTK_THIRD_IF_NONE=y -CONFIG_MTK_TPC_SUPPORT=y -CONFIG_MTK_TXBF_SUPPORT=y -CONFIG_MTK_UAPSD=y -CONFIG_MTK_VLAN_SUPPORT=y -CONFIG_MTK_VOW_SUPPORT=y -CONFIG_MTK_WARP_V2=y -CONFIG_MTK_WDS_SUPPORT=y -CONFIG_MTK_WHNAT_SUPPORT=m -CONFIG_MTK_WIFI_ADIE_TYPE="mt7976" -CONFIG_MTK_WIFI_BASIC_FUNC=y -CONFIG_MTK_WIFI_DRIVER=y -CONFIG_MTK_WIFI_EAP_FEATURE=y -CONFIG_MTK_WIFI_FW_BIN_LOAD=y -CONFIG_MTK_WIFI_MODE_AP=m -CONFIG_MTK_WIFI_MT_MAC=y -CONFIG_MTK_WIFI_SKU_TYPE="AX6000" -CONFIG_MTK_WIFI_TWT_SUPPORT=y -CONFIG_MTK_WLAN_HOOK=y -CONFIG_MTK_WLAN_SERVICE=y -CONFIG_MTK_WNM_SUPPORT=y -CONFIG_MTK_WPA3_SUPPORT=y -CONFIG_MTK_WSC_INCLUDED=y -CONFIG_MTK_WSC_V2_SUPPORT=y - -# CONFIG_PKG_CHECK_FORMAT_SECURITY is not set -# CONFIG_PKG_FORTIFY_SOURCE_1 is not set -CONFIG_PKG_FORTIFY_SOURCE_2=y -CONFIG_WARP_CHIPSET="mt7986" -CONFIG_WARP_DBG_SUPPORT=y -CONFIG_WARP_MEMORY_LEAK_DBG=y -CONFIG_WARP_VERSION=2 -CONFIG_WED_HW_RRO_SUPPORT=y -CONFIG_WIFI_NORMAL_SETTING=y -# CONFIG_WOLFSSL_HAS_ECC25519 is not set -CONFIG_first_card=y -CONFIG_first_card_name="MT7986" -# CONFIG_AFALG_FALLBACK is not set -# CONFIG_MTK_BAND_STEERING is not set -# CONFIG_MTK_DEFAULT_5G_PROFILE is not set -# CONFIG_MTK_MAC_REPEATER_SUPPORT is not set -# CONFIG_MTK_MULTI_PROFILE_SUPPORT is not set -# CONFIG_MTK_PCIE_ASPM_DYM_CTRL_SUPPORT is not set -# CONFIG_MTK_PRE_CAL_TRX_SET1_SUPPORT is not set -# CONFIG_MTK_PRE_CAL_TRX_SET2_SUPPORT is not set -# CONFIG_MTK_RLM_CAL_CACHE_SUPPORT is not set -# CONFIG_MTK_SNIFFER_RADIOTAP_SUPPORT is not set - -CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 \ No newline at end of file diff --git a/devices/mediatek_mt7986/README.md b/devices/mediatek_mt7986/README.md deleted file mode 100644 index 4a529940ffd9..000000000000 --- a/devices/mediatek_mt7986/README.md +++ /dev/null @@ -1 +0,0 @@ -源码来源 https://github.com/hanwckf/immortalwrt-mt798x 感谢 \ No newline at end of file diff --git a/devices/mediatek_mt7986/diy.sh b/devices/mediatek_mt7986/diy.sh deleted file mode 100644 index 1cfaedf19b10..000000000000 --- a/devices/mediatek_mt7986/diy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -shopt -s extglob - -SHELL_FOLDER=$(dirname $(readlink -f "$0")) - -rm -rf feeds/kiddin9/{rtl*,fullconenat-nft} package/feeds/luci/rpcd-mod-luci toolchain/musl package/feeds/packages/gptfdisk package/utils/f2fs-tools package/utils/e2fsprogs package/libs/libselinux package/feeds/packages/acl package/feeds/packages/libevdev - -rm -rf devices/common/patches/{fix.patch,iptables.patch,kernel-defaults.patch,targets.patch} - -sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/network/config/netifd/Makefile - -#sed -i "/KernelPackage,sound-soc-core/d" package/kernel/linux/modules/sound.mk -#sed -i "/KernelPackage,multimedia-input/d" package/kernel/linux/modules/video.mk - -svn export https://github.com/openwrt/openwrt/branches/openwrt-23.05/toolchain/musl toolchain/musl -svn export https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/utils/e2fsprogs package/utils/e2fsprogs -svn export https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/utils/ucode package/utils/ucode -svn export https://github.com/openwrt/openwrt/branches/openwrt-23.05/package/libs/libselinux package/libs/libselinux -#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 mkf2fs mtkhqos_util wireless-regdb switch regs kmod-warp kmod-mt_wifi kmod-mediatek_hnat kmod-conninfra datconf-lua mmc-utils/" target/linux/mediatek/Makefile diff --git a/devices/mediatek_mt7986/feeds.conf b/devices/mediatek_mt7986/feeds.conf deleted file mode 100644 index b0f00955de06..000000000000 --- a/devices/mediatek_mt7986/feeds.conf +++ /dev/null @@ -1,4 +0,0 @@ -src-git-full packages https://github.com/immortalwrt/packages.git;openwrt-21.02 -src-git luci https://github.com/openwrt/luci.git;openwrt-23.05 -src-git-full routing https://github.com/openwrt/routing.git;openwrt-21.02 -src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master diff --git a/devices/mediatek_mt7986/patches/base-files.patch b/devices/mediatek_mt7986/patches/base-files.patch deleted file mode 100644 index d601ca72c9d4..000000000000 --- a/devices/mediatek_mt7986/patches/base-files.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/package/feeds/kiddin9/base-files/Makefile -+++ b/package/feeds/kiddin9/base-files/Makefile -@@ -205,6 +205,9 @@ define Package/base-files/install - - $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \ - rm -f $(1)/etc/banner.failsafe,) -+ -+ $(if $(CONFIG_PACKAGE_wifi-profile), \ -+ rm -f $(1)/sbin/wifi) - endef - - ifneq ($(DUMP),1) - ---- a/package/feeds/kiddin9/base-files/files/etc/hotplug.d/net/00-sysctl -+++ b/package/feeds/kiddin9/base-files/files/etc/hotplug.d/net/00-sysctl -@@ -6,4 +6,6 @@ if [ "$ACTION" = add ]; then - sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" "$CONF" | \ - sysctl -e -p - | logger -t sysctl - done -+ -+ [ -f /sbin/smp.sh ] && /sbin/smp.sh - fi diff --git a/devices/mediatek_mt7986/patches/fix.patch b/devices/mediatek_mt7986/patches/fix.patch deleted file mode 100644 index feb32c4f1281..000000000000 --- a/devices/mediatek_mt7986/patches/fix.patch +++ /dev/null @@ -1,67 +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, - ---- a/package/mtk/applications/luci-app-mtk/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm -+++ b/package/mtk/applications/luci-app-mtk/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm -@@ -581,9 +581,7 @@

<%:Interface Configurations%> - <%=vifname and devname.."@"..vifname or devn - -

<%:Access control MAC address list%>

- -+ local list = cfgs["AccessControlList"..(vifidx-1)] or "" %><%=table.concat(list:split(";"), "\n")%> - - - <% if string.split(cfgs.WirelessMode,";")[1] == "16" or string.split(cfgs.WirelessMode,";")[1] == "17" or string.split(cfgs.WirelessMode,";")[1] == "18" then %> - ---- a/target/linux/mediatek/image/mt7986.mk -+++ b/target/linux/mediatek/image/mt7986.mk -@@ -62,7 +62,7 @@ TARGET_DEVICES += mt7986a-ax6000-snfi-nand-rfb - - define Device/mt7986a-ax6000-emmc-re-cp-03 - DEVICE_VENDOR := JDCloud -- DEVICE_MODEL := JDCloud MT7986a RE-CP-03 -+ DEVICE_MODEL := AX6000 Baili(RE-CP-03) - DEVICE_TITLE := JDCloud AX6000 Baili(RE-CP-03) - DEVICE_DTS := mt7986a-emmc-re-cp-03 - DEVICE_DTS_DIR := $(DTS_DIR)/mediatek diff --git a/devices/mediatek_mt7986/patches/iptables-mod-socket.patch b/devices/mediatek_mt7986/patches/iptables-mod-socket.patch deleted file mode 100644 index 0398c93b6a6c..000000000000 --- a/devices/mediatek_mt7986/patches/iptables-mod-socket.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/package/network/utils/iptables/Makefile -+++ b/package/network/utils/iptables/Makefile -@@ -388,6 +388,19 @@ iptables extension for triggering a LED. - - 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) - TITLE:=Transparent proxy iptables extensions -@@ -396,9 +409,6 @@ endef - define Package/iptables-mod-tproxy/description - Transparent proxy iptables extensions. - -- Matches: -- - socket -- - Targets: - - TPROXY - -@@ -721,6 +731,7 @@ $(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))) \ No newline at end of file diff --git a/devices/mediatek_mt7986/patches/kernel-defaults.patch b/devices/mediatek_mt7986/patches/kernel-defaults.patch deleted file mode 100644 index 934b00138ec7..000000000000 --- a/devices/mediatek_mt7986/patches/kernel-defaults.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/kernel-defaults.mk -+++ b/include/kernel-defaults.mk -@@ -115,6 +115,7 @@ endef - - define Kernel/CompileModules/Default - rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map -+ +$(KERNEL_MAKE) olddefconfig - +$(KERNEL_MAKE) modules - endef - diff --git a/devices/mediatek_mt7986/patches/targets.patch b/devices/mediatek_mt7986/patches/targets.patch deleted file mode 100644 index 9c54b3b92fb6..000000000000 --- a/devices/mediatek_mt7986/patches/targets.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/include/target.mk -+++ b/include/target.mk -@@ -46,27 +46,27 @@ DEFAULT_PACKAGES.router:=\ - dnsmasq-full \ - firewall \ - iptables \ -- ipv6helper \ -+ ip6tables \ -+ kmod-ipt-nat \ -+ kmod-ipt-nat6 \ -+ kmod-ipt-offload \ -+ odhcp6c \ -+ odhcpd-ipv6only \ - ppp \ - ppp-mod-pppoe --# For easy usage --DEFAULT_PACKAGES.tweak:=\ -- block-mount \ -- default-settings-chn \ -- kmod-ipt-raw \ -- kmod-nf-nathelper \ -- kmod-nf-nathelper-extra \ -- luci \ -- luci-app-filetransfer \ -- luci-compat \ -- luci-lib-base \ -- luci-lib-fs \ -- luci-lib-ipkg - - ifneq ($(DUMP),) - all: dumpinfo - endif - -+ifeq ($(ARCH),arm) -+ DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ -+ifeq ($(ARCH),aarch64) -+ DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ - target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1)))) - ifeq ($(DUMP),) - PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD) diff --git a/devices/mediatek_mt7986/settings.ini b/devices/mediatek_mt7986/settings.ini deleted file mode 100644 index ebe253088058..000000000000 --- a/devices/mediatek_mt7986/settings.ini +++ /dev/null @@ -1,2 +0,0 @@ -REPO_URL="https://github.com/lgs2007m/immortalwrt-mt798x" -REPO_BRANCH="openwrt-21.02" diff --git a/devices/qualcommax_ipq60xx/.config b/devices/qualcommax_ipq60xx/.config index 967964e5a8e1..5b970ac88183 100644 --- a/devices/qualcommax_ipq60xx/.config +++ b/devices/qualcommax_ipq60xx/.config @@ -1,11 +1,7 @@ CONFIG_TARGET_qualcommax=y CONFIG_TARGET_qualcommax_ipq60xx=y CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_cmiot_ax18=y -CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_glinet_gl-ax1800=y -CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_glinet_gl-axt1800=y -CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_qihoo_v6=y -CONFIG_TARGET_DEVICE_qualcommax_ipq60xx_DEVICE_zn_m2=y +CONFIG_TARGET_ALL_PROFILES=y CONFIG_PACKAGE_kmod-qca-nss-cfi-cryptoapi=n diff --git a/devices/qualcommax_ipq60xx/diy.sh b/devices/qualcommax_ipq60xx/diy.sh index e163adda915d..cb1b124bd9a9 100644 --- a/devices/qualcommax_ipq60xx/diy.sh +++ b/devices/qualcommax_ipq60xx/diy.sh @@ -7,3 +7,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) git clone https://github.com/JiaY-shi/nss-packages.git package/nss-packages rm -rf feeds/kiddin9/{fibocom_QMI_WWAN,quectel_Gobinet,shortcut-fe} + +rm -rf devices/common/patches/rootfstargz.patch diff --git a/devices/ramips_mt7621/.config b/devices/ramips_mt7621/.config index e7407756458a..744070ef00da 100644 --- a/devices/ramips_mt7621/.config +++ b/devices/ramips_mt7621/.config @@ -56,5 +56,6 @@ CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_h3c_tx1806=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_zbtlink_zbt-wg3526-32m=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ht-jsh_0211=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_c-life_xg1=y +CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_hatlab_gateboard-one=y CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/ramips_mt7621/patches/gateboard-one.patch b/devices/ramips_mt7621/patches/gateboard-one.patch new file mode 100644 index 000000000000..573a41115796 --- /dev/null +++ b/devices/ramips_mt7621/patches/gateboard-one.patch @@ -0,0 +1,613 @@ +From 09516f5f61930eb2a54388da04ca5363cb514792 Mon Sep 17 00:00:00 2001 +From: kiddin9 <48883331+kiddin9@users.noreply.github.com> +Date: Fri, 1 Dec 2023 06:28:22 +0800 +Subject: [PATCH] update + +--- + scripts/gen-rddependencies.sh | 13 + + target/linux/ramips/Makefile | 2 +- + .../dts/mt7621_hatlab_gateboard-one.dts | 390 ++++++++++++++++++ + target/linux/ramips/image/mt7621.mk | 36 ++ + .../mt7621/base-files/etc/board.d/02_network | 3 + + .../mt7621/base-files/lib/upgrade/platform.sh | 6 + + .../mt7621/base-files/sbin/fixup-mac-address | 4 + + target/linux/ramips/mt7621/config-5.15 | 1 + + ...spi-nor-Add-support-for-Puya-p25d40h.patch | 47 +++ + 9 files changed, 501 insertions(+), 1 deletion(-) + create mode 100755 scripts/gen-rddependencies.sh + create mode 100644 target/linux/ramips/dts/mt7621_hatlab_gateboard-one.dts + create mode 100644 target/linux/ramips/patches-5.15/406-mtd-spi-nor-Add-support-for-Puya-p25d40h.patch + +diff --git a/scripts/gen-rddependencies.sh b/scripts/gen-rddependencies.sh +new file mode 100755 +index 0000000000000..509d6a4fa67e4 +--- /dev/null ++++ b/scripts/gen-rddependencies.sh +@@ -0,0 +1,13 @@ ++#!/bin/sh ++ ++TARGETS=$* ++READELF="${READELF:-readelf}" ++XARGS="${XARGS:-xargs -r}" ++ ++find $TARGETS -type f -a -exec file {} \; | \ ++ sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.*/\1/p' | \ ++ $XARGS -n1 $READELF -l | grep 'Requesting' | cut -d':' -f2 | tr -d ' ]' | \ ++ $XARGS basename ++ ++cd `dirname ${0}` ++./gen-dependencies.sh ${TARGETS} +diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile +index 77b82d5334c22..caf5099d1a116 100644 +--- a/target/linux/ramips/Makefile ++++ b/target/linux/ramips/Makefile +@@ -8,7 +8,7 @@ ARCH:=mipsel + BOARD:=ramips + BOARDNAME:=MediaTek Ralink MIPS + SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 +-FEATURES:=squashfs gpio ++FEATURES:=squashfs gpio boot-part rootfs-part + + KERNEL_PATCHVER:=5.15 + +diff --git a/target/linux/ramips/dts/mt7621_hatlab_gateboard-one.dts b/target/linux/ramips/dts/mt7621_hatlab_gateboard-one.dts +new file mode 100644 +index 0000000000000..e982afaac511a +--- /dev/null ++++ b/target/linux/ramips/dts/mt7621_hatlab_gateboard-one.dts +@@ -0,0 +1,390 @@ ++#include "mt7621.dtsi" ++ ++#include ++#include ++#include ++ ++/ { ++ compatible = "hatlab,gateboard-one", "mediatek,mt7621-soc"; ++ model = "HATLab GateBoard-One"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ aliases { ++ led-boot = &led_sys; ++ led-failsafe = &led_sys; ++ led-running = &led_sys; ++ led-upgrade = &led_sys; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_sys: sys { ++ label = "green:sys"; ++ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ usb { ++ label = "blue:usb"; ++ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; ++ trigger-sources = <&xhci_ehci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; ++ linux,code = ; ++ }; ++ }; ++ ++ gpio_export { ++ compatible = "gpio-export"; ++ #size-cells = <0>; ++ ++ power_peripheral { ++ gpio-export,name = "power_peripheral"; ++ gpio-export,output = <0>; ++ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ cpu_fan: cpu_fan { ++ compatible = "gpio-fan"; ++ gpios = <&gpio 13 GPIO_ACTIVE_HIGH ++ &gpio 14 GPIO_ACTIVE_HIGH>; ++ gpio-fan,speed-map = < 0 0 ++ 2000 1 ++ 4000 2 ++ 6000 3>; ++ #cooling-cells = <2>; ++ }; ++ ++ thermal-zones { ++ cpu-thermal { ++ polling-delay = <1000>; ++ polling-delay-passive = <250>; ++ ++ thermal-sensors = <&cpu_sensor>; ++ ++ trips { ++ cpu_warm: cpu-warm { ++ temperature = <26000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cpu_hot: cpu-hot { ++ temperature = <37000>; ++ hysteresis = <2000>; ++ type = "active"; ++ }; ++ ++ cpu_alert: cpu-alert { ++ temperature = <75000>; ++ hysteresis = <2000>; ++ type = "hot"; ++ }; ++ }; ++ ++ cooling-maps { ++ map0 { ++ trip = <&cpu_warm>; ++ cooling-device = <&cpu_fan THERMAL_NO_LIMIT 2>; ++ }; ++ ++ map1 { ++ trip = <&cpu_hot>; ++ cooling-device = <&cpu_fan 3 THERMAL_NO_LIMIT>; ++ }; ++ }; ++ }; ++ }; ++ ++ crypto: crypto@1e004000 { ++ status = "okay"; ++ ++ compatible = "mediatek,mtk-eip93"; ++ reg = <0x1e004000 0x1000>; ++ ++ interrupt-parent = <&gic>; ++ interrupts = ; ++ }; ++ ++ i2c_gpio: i2c-gpio { ++ compatible = "i2c-gpio"; ++ ++ sda-gpios = <&gpio 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ scl-gpios = <&gpio 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ status = "disabled"; ++ }; ++ ++ i2c_sfp: i2c-sfp { ++ compatible = "i2c-gpio"; ++ ++ sda-gpios = <&expender0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ scl-gpios = <&expender0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ i2c_sfp_alias_0: i2c-sfp-alias-0 { ++ compatible = "i2c-gpio"; ++ ++ sda-gpios = <&expender0_alias_0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ scl-gpios = <&expender0_alias_0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ sfp: sfp { ++ compatible = "sff,sfp"; ++ i2c-bus = <&i2c_sfp>; ++ ++ maximum-power-milliwatt = <5000>; ++ ++ mod-def0-gpios = <&expender0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; ++ ++ // los-gpios = <&expender0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; ++ // rate-select0-gpios = <&expender0 4 GPIO_ACTIVE_HIGH>; ++ // tx-disable-gpios = <&expender0 6 GPIO_ACTIVE_HIGH>; ++ // tx-fault-gpios = <&expender0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; ++ }; ++ ++ sfp_alias_0: sfp-alias-0 { ++ compatible = "sff,sfp"; ++ i2c-bus = <&i2c_sfp_alias_0>; ++ ++ maximum-power-milliwatt = <5000>; ++ ++ mod-def0-gpios = <&expender0_alias_0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; ++ ++ // los-gpios = <&expender0_alias_0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; ++ // rate-select0-gpios = <&expender0_alias_0 4 GPIO_ACTIVE_HIGH>; ++ // tx-disable-gpios = <&expender0_alias_0 6 GPIO_ACTIVE_HIGH>; ++ // tx-fault-gpios = <&expender0_alias_0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; ++ }; ++}; ++ ++&spi0 { ++ status = "okay"; ++ ++ spi-nor@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <30000000>; ++ ++ partitions@0 { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x0 0x70000>; ++ read-only; ++ }; ++ ++ partition@70000 { ++ label = "u-boot-env"; ++ reg = <0x70000 0x8000>; ++ }; ++ ++ factory: partition@78000 { ++ label = "factory"; ++ reg = <0x78000 0x8000>; ++ }; ++ }; ++ }; ++ ++ spi-nand@1 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "spi-nand"; ++ reg = <1>; ++ spi-max-frequency = <30000000>; ++ ++ partition@0 { ++ label = "nand0-ubi"; ++ reg = <0x0 0x0>; ++ }; ++ }; ++}; ++ ++&uartlite2 { ++ status = "okay"; ++}; ++ ++&uartlite3 { ++ status = "okay"; ++}; ++ ++&state_default { ++ gpio { ++ groups = "wdt", "jtag", "i2c"; ++ function = "gpio"; ++ }; ++}; ++ ++&pcie { ++ status = "okay"; ++}; ++ ++&pcie0 { ++ mt76@0,0 { ++ reg = <0x0000 0 0 0 0>; ++ mediatek,eeprom-file = "mt76.pcie0.eeprom"; ++ }; ++}; ++ ++&pcie1 { ++ mt76@0,0 { ++ reg = <0x0000 0 0 0 0>; ++ mediatek,eeprom-file = "mt76.pcie1.eeprom"; ++ }; ++}; ++ ++&pcie2 { ++ mt76@0,0 { ++ reg = <0x0000 0 0 0 0>; ++ mediatek,eeprom-file = "mt76.pcie2.eeprom"; ++ }; ++}; ++ ++&sdhci { ++ status = "okay"; ++ max-frequency = <20000000>; ++}; ++ ++&mdio { ++ ephy7: ethernet-phy@7 { ++ reg = <7>; ++ eee-broken-1000t; ++ eee-broken-100tx; ++ realtek,autotxid; ++ }; ++}; ++ ++&gmac0 { ++ label = "dsa0"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ phy-mode = "trgmii"; ++}; ++ ++&gmac1 { ++ status = "okay"; ++ label = "eth5"; ++ ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <6>; ++ ++ phy-handle = <&ephy7>; ++ phy-mode = "rgmii-rxid"; ++}; ++ ++&switch0 { ++ ports { ++ port@0 { ++ status = "okay"; ++ label = "eth0"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++ }; ++ ++ port@1 { ++ status = "okay"; ++ label = "eth1"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <2>; ++ }; ++ ++ port@2 { ++ status = "okay"; ++ label = "eth2"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <3>; ++ }; ++ ++ port@3 { ++ status = "okay"; ++ label = "eth3"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <4>; ++ }; ++ ++ port@4 { ++ status = "okay"; ++ label = "eth4"; ++ nvmem-cells = <&macaddr_factory_0>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <5>; ++ }; ++ }; ++}; ++ ++&i2c_gpio { ++ status = "okay"; ++ ++ expender0: pcf8574a@38 { ++ compatible = "nxp,pcf8574a"; ++ reg = <0x38>; ++ interrupt-parent = <&gpio>; ++ interrupts = <15 IRQ_TYPE_EDGE_FALLING>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ }; ++ ++ expender0_alias_0: pcf8574@20 { ++ compatible = "nxp,pcf8574"; ++ reg = <0x20>; ++ interrupt-parent = <&gpio>; ++ interrupts = <15 IRQ_TYPE_EDGE_FALLING>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ }; ++ ++ rtc0: pcf8563@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ }; ++ ++ cpu_sensor: lm75@4f { ++ compatible = "national,lm75"; ++ reg = <0x4f>; ++ #thermal-sensor-cells = <0>; ++ }; ++}; ++ ++&factory { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ #mtd-mac-address = <&factory 0x0>; ++ ++ macaddr_factory_0: macaddr@0 { ++ reg = <0x0 0x6>; ++ }; ++}; +diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk +index d456176a0178e..0f81321a52248 100644 +--- a/target/linux/ramips/image/mt7621.mk ++++ b/target/linux/ramips/image/mt7621.mk +@@ -42,6 +42,20 @@ define Build/haier-sim_wr1800k-factory + rm -rf "$@.tmp" "$@.tmp.tgz" + endef + ++define Build/hatlab-gateboard-combined ++ rm -fR $@.bootfs.img ++ ++ mkfs.fat $@.bootfs.img -C 16384 ++ mcopy -i $@.bootfs.img $(IMAGE_KERNEL) ::vmlinux.itb ++ ++ PADDING="1" SIGNATURE="$(IMG_PART_SIGNATURE)" \ ++ GUID="$(IMG_PART_DISKGUID)" $(SCRIPT_DIR)/gen_image_generic.sh \ ++ $@ \ ++ $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.bootfs.img \ ++ $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \ ++ 256 ++endef ++ + define Build/iodata-mstc-header + ( \ + data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \ +@@ -1123,6 +1137,28 @@ define Device/haier_har-20s2u1 + endef + TARGET_DEVICES += haier_har-20s2u1 + ++define Device/hatlab_gateboard-one ++ $(Device/dsa-migration) ++ DEVICE_VENDOR := HATLab ++ DEVICE_MODEL := GateBoard-One ++ DEVICE_PACKAGES := kmod-i2c-gpio kmod-gpio-pcf857x kmod-sdhci-mt7620 kmod-usb3 kmod-usb-storage kmod-usb-ledtrig-usbport kmod-fs-ext4 kmod-hwmon-lm75 kmod-thermal kmod-hwmon-gpiofan kmod-rtc-pcf8563 kmod-phy-realtek kmod-sfp ++ MKUBIFS_OPTS := -m 2048 -e 124KiB -c 1024 ++ KERNEL := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb ++ IMAGE/kernel.itb := append-kernel ++ IMAGE/rootfs.img := append-rootfs ++ IMAGE/rootfs.img.gz := append-rootfs | gzip ++ IMAGE/combined.img := hatlab-gateboard-combined | append-metadata ++ IMAGE/combined.img.gz := hatlab-gateboard-combined | gzip | append-metadata ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata ++ IMAGES := kernel.itb sysupgrade.bin ++ ifeq ($(CONFIG_TARGET_IMAGES_GZIP),y) ++ IMAGES += rootfs.img.gz combined.img.gz ++ else ++ IMAGES += rootfs.img combined.img ++ endif ++endef ++TARGET_DEVICES += hatlab_gateboard-one ++ + define Device/hilink_hlk-7621a-evb + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) +diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +index 4b23afc1cf291..dca281172348f 100644 +--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network ++++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +@@ -150,6 +150,9 @@ ramips_setup_interfaces() + meig,slt866) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; ++ hatlab,gateboard-one) ++ ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4" "eth5" ++ ;; + *) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; +diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +index 5d8305b788cce..b38fe16145ad9 100755 +--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +@@ -160,6 +160,12 @@ platform_do_upgrade() { + ;; + zyxel,wsm20) + zyxel_mstc_upgrade_prepare ++ nand_do_upgrade "$1" ++ ;; ++ hatlab,gateboard-one) ++ CI_KERNPART="vmlinux.itb" ++ CI_UBIPART="nand0-ubi" ++ + nand_do_upgrade "$1" + ;; + *) +diff --git a/target/linux/ramips/mt7621/base-files/sbin/fixup-mac-address b/target/linux/ramips/mt7621/base-files/sbin/fixup-mac-address +index dad15c584216d..375db51647b70 100755 +--- a/target/linux/ramips/mt7621/base-files/sbin/fixup-mac-address ++++ b/target/linux/ramips/mt7621/base-files/sbin/fixup-mac-address +@@ -13,6 +13,10 @@ case $board in + partname=factory + offset=$((0xe000)) + ;; ++ hatlab,gateboard-one) ++ partname=factory ++ offset=$((0x0)) ++ ;; + *) + echo "Unsupported board" + exit 1 +diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 +index 05e4c1ce87799..b93159ed079ef 100644 +--- a/target/linux/ramips/mt7621/config-5.15 ++++ b/target/linux/ramips/mt7621/config-5.15 +@@ -156,6 +156,7 @@ CONFIG_MTD_PHYSMAP=y + CONFIG_MTD_RAW_NAND=y + CONFIG_MTD_ROUTERBOOT_PARTS=y + CONFIG_MTD_SERCOMM_PARTS=y ++CONFIG_MTD_SPI_NAND=y + CONFIG_MTD_SPI_NOR=y + CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y + CONFIG_MTD_SPLIT_FIT_FW=y +diff --git a/target/linux/ramips/patches-5.15/406-mtd-spi-nor-Add-support-for-Puya-p25d40h.patch b/target/linux/ramips/patches-5.15/406-mtd-spi-nor-Add-support-for-Puya-p25d40h.patch +new file mode 100644 +index 0000000000000..88ae591fca963 +--- /dev/null ++++ b/target/linux/ramips/patches-5.15/406-mtd-spi-nor-Add-support-for-Puya-p25d40h.patch +@@ -0,0 +1,47 @@ ++--- a/drivers/mtd/spi-nor/Makefile +++++ b/drivers/mtd/spi-nor/Makefile ++@@ -12,6 +12,7 @@ spi-nor-objs += intel.o ++ spi-nor-objs += issi.o ++ spi-nor-objs += macronix.o ++ spi-nor-objs += micron-st.o +++spi-nor-objs += puya.o ++ spi-nor-objs += spansion.o ++ spi-nor-objs += sst.o ++ spi-nor-objs += winbond.o ++--- /dev/null +++++ b/drivers/mtd/spi-nor/puya.c ++@@ -0,0 +1,14 @@ +++#include +++ +++#include "core.h" +++ +++static const struct flash_info puya_parts[] = { +++ /* PUYA */ +++ { "p25d40h", INFO(0x856013, 0, 64 * 1024, 8, SECT_4K) }, +++}; +++ +++const struct spi_nor_manufacturer spi_nor_puya = { +++ .name = "puya", +++ .parts = puya_parts, +++ .nparts = ARRAY_SIZE(puya_parts), +++}; ++--- a/drivers/mtd/spi-nor/core.c +++++ b/drivers/mtd/spi-nor/core.c ++@@ -1852,6 +1852,7 @@ static const struct spi_nor_manufacturer ++ &spi_nor_issi, ++ &spi_nor_macronix, ++ &spi_nor_micron, +++ &spi_nor_puya, ++ &spi_nor_st, ++ &spi_nor_spansion, ++ &spi_nor_sst, ++--- a/drivers/mtd/spi-nor/core.h +++++ b/drivers/mtd/spi-nor/core.h ++@@ -483,6 +483,7 @@ extern const struct spi_nor_manufacturer ++ extern const struct spi_nor_manufacturer spi_nor_issi; ++ extern const struct spi_nor_manufacturer spi_nor_macronix; ++ extern const struct spi_nor_manufacturer spi_nor_micron; +++extern const struct spi_nor_manufacturer spi_nor_puya; ++ extern const struct spi_nor_manufacturer spi_nor_st; ++ extern const struct spi_nor_manufacturer spi_nor_spansion; ++ extern const struct spi_nor_manufacturer spi_nor_sst; 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..b0c797010153 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/316-rockchip-rk3568-Add-support-for-nlnet-xgp.patch @@ -0,0 +1,498 @@ +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -173,6 +173,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ + dtb-$(CONFIG_ROCKCHIP_RK3568) += \ + rk3568-bpi-r2-pro.dtb \ + rk3568-evb.dtb \ ++ rk3568-xgp.dtb \ + rk3568-r66s.dtb \ + rk3568-opc-h68k.dtb \ + rk3568-mrkaio-m68s.dtb \ +--- /dev/null ++++ b/arch/arm/dts/rk3568-xgp-u-boot.dtsi +@@ -0,0 +1,21 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "rk3568-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,357 @@ ++// 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>; ++ }; ++ ++ 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>; ++ }; ++}; ++ ++&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; ++ }; ++ }; ++ ++ 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; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&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/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_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/package/boot/uboot-rockchip/patches/317-rockchip-rk356x-add-saradc-data.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk356x-add-saradc-data.patch new file mode 100644 index 000000000000..38cf32470a3b --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/317-rockchip-rk356x-add-saradc-data.patch @@ -0,0 +1,24 @@ +--- a/drivers/adc/rockchip-saradc.c ++++ b/drivers/adc/rockchip-saradc.c +@@ -184,6 +184,12 @@ static const struct rockchip_saradc_data + .clk_rate = 1000000, + }; + ++static const struct rockchip_saradc_data rk3568_saradc_data = { ++ .num_bits = 10, ++ .num_channels = 8, ++ .clk_rate = 1000000, ++}; ++ + static const struct udevice_id rockchip_saradc_ids[] = { + { .compatible = "rockchip,saradc", + .data = (ulong)&saradc_data }, +@@ -191,6 +197,8 @@ static const struct udevice_id rockchip_ + .data = (ulong)&rk3066_tsadc_data }, + { .compatible = "rockchip,rk3399-saradc", + .data = (ulong)&rk3399_saradc_data }, ++ { .compatible = "rockchip,rk3568-saradc", ++ .data = (ulong)&rk3568_saradc_data }, + { } + }; + diff --git a/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/318-cmd-adc-fix-varname-set.patch b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/318-cmd-adc-fix-varname-set.patch new file mode 100644 index 000000000000..88c142e18996 --- /dev/null +++ b/devices/rockchip_armv8/diy/package/boot/uboot-rockchip/patches/318-cmd-adc-fix-varname-set.patch @@ -0,0 +1,37 @@ +--- a/cmd/adc.c ++++ b/cmd/adc.c +@@ -71,6 +71,7 @@ static int do_adc_info(struct cmd_tbl *c + static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) + { ++ char *varname = NULL; + struct udevice *dev; + unsigned int data; + int ret, uV, val; +@@ -78,6 +79,9 @@ static int do_adc_single(struct cmd_tbl + if (argc < 3) + return CMD_RET_USAGE; + ++ if (argc >= 4) ++ varname = argv[3]; ++ + ret = adc_channel_single_shot(argv[1], simple_strtol(argv[2], NULL, 0), + &data); + if (ret) { +@@ -95,7 +99,8 @@ static int do_adc_single(struct cmd_tbl + printf("%u\n", data); + } + +- env_set_ulong(argv[2], val); ++ if (varname) ++ env_set_ulong(varname, val); + + return CMD_RET_SUCCESS; + } +@@ -160,5 +165,5 @@ static char adc_help_text[] = + U_BOOT_CMD_WITH_SUBCMDS(adc, "ADC sub-system", adc_help_text, + U_BOOT_SUBCMD_MKENT(list, 1, 1, do_adc_list), + U_BOOT_SUBCMD_MKENT(info, 2, 1, do_adc_info), +- U_BOOT_SUBCMD_MKENT(single, 3, 1, do_adc_single), ++ U_BOOT_SUBCMD_MKENT(single, 4, 1, do_adc_single), + U_BOOT_SUBCMD_MKENT(scan, 3, 1, do_adc_scan)); 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/patches/xgp.patch b/devices/rockchip_armv8/patches/xgp.patch new file mode 100644 index 000000000000..67a29213c9ce --- /dev/null +++ b/devices/rockchip_armv8/patches/xgp.patch @@ -0,0 +1,172 @@ +diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile +index bc3297efa9d4e..4875f01b43617 100644 +--- a/package/boot/uboot-rockchip/Makefile ++++ b/package/boot/uboot-rockchip/Makefile +@@ -196,6 +196,17 @@ define U-Boot/opc-h68k-rk3568 + DDR:=rk3568_ddr_1560MHz_v1.13.bin + endef + ++define U-Boot/xgp-rk3568 ++ BUILD_SUBTARGET:=armv8 ++ NAME:=XGP Board ++ BUILD_DEVICES:= \ ++ nlnet_xgp ++ DEPENDS:=+PACKAGE_u-boot-xgp-rk3568:arm-trusted-firmware-rk3568 ++ PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor ++ ATF:=rk3568_bl31_v1.28.elf ++ DDR:=rk3568_ddr_1560MHz_v1.13.bin ++endef ++ + define U-Boot/photonicat-rk3568 + BUILD_SUBTARGET:=armv8 + NAME:=Ariaboard Photonicat +@@ -255,6 +266,7 @@ endef + UBOOT_TARGETS := \ + mrkaio-m68s-rk3568 \ + opc-h68k-rk3568 \ ++ xgp-rk3568 \ + photonicat-rk3568 \ + radxa-e25-rk3568 \ + rock-3a-rk3568 \ +diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +index 8fed56a0027b9..95410bca3a518 100755 +--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network ++++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +@@ -17,6 +17,7 @@ + friendlyarm,nanopi-r2s|\ + friendlyarm,nanopi-r4s|\ + friendlyarm,nanopi-r4se|\ ++ nlnet,xgp|\ + rocktech,mpc1903|\ + sharevdi,h3399pc|\ + sharevdi,guangmiao-g4c|\ +@@ -88,6 +89,7 @@ + hinlink,opc-h66k|\ + hinlink,opc-h68k|\ + hinlink,opc-h69k|\ ++ nlnet,xgp|\ + rocktech,mpc1903|\ + sharevdi,h3399pc) + wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0) +diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk +index 88f40f98f45db..c8fe96f74d37e 100644 +--- a/target/linux/rockchip/image/armv8.mk ++++ b/target/linux/rockchip/image/armv8.mk +@@ -81,6 +80,21 @@ $(call Device/fastrhino_common) + endef + TARGET_DEVICES += fastrhino_r68s + ++define Device/nlnet_common ++ DEVICE_VENDOR := NLnet ++ SOC := rk3568 ++ UBOOT_DEVICE_NAME := xgp-rk3568 ++ IMAGE/sysupgrade.img.gz := boot-combined | boot-script nlnet-xgp | pine64-img | gzip | append-metadata ++ DEVICE_PACKAGES := kmod-r8125 ++endef ++ ++define Device/nlnet_xgp ++$(call Device/nlnet_common) ++ DEVICE_MODEL := XiGuaPi ++ DEVICE_DTS = rockchip/rk3568-xgp rockchip/rk3568-xgp-v3 ++endef ++TARGET_DEVICES += nlnet_xgp ++ + define Device/friendlyarm_nanopi-neo3 + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi NEO3 +diff --git a/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch b/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch +index 2f9a26979dc4b..f66423793c78d 100644 +--- a/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch ++++ b/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch +@@ -19,4 +19,5 @@ + +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r68s.dtb + +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-seewo-sv21.dtb + +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-t68m.dtb +++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp.dtb + +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-panther-x2.dtb + +--- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds ++++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +@@ -36,6 +36,9 @@ hinlink,opc-h68k|\ + hinlink,opc-h69k) + ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth0" + ;; ++nlnet,xgp) ++ ucidef_set_led_netdev "wan" "WAN" "blue:sys" "eth0" ++ ;; + esac + + board_config_flush +diff --git a/target/linux/rockchip/image/Makefile b/target/linux/rockchip/image/Makefile +index a2b711a4367cb..b2c53fe0f97e4 100644 +--- 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} +