mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Merge branch 'develop'
This commit is contained in:
commit
1d79b4dcce
465 changed files with 111744 additions and 1473 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -1,20 +1,11 @@
|
|||
*.o
|
||||
.DS_Store
|
||||
.*.swp
|
||||
/env
|
||||
/dl
|
||||
/.config
|
||||
/.config.old
|
||||
/bin
|
||||
/build_dir
|
||||
/staging_dir
|
||||
/tmp
|
||||
/logs
|
||||
/feeds
|
||||
/feeds.conf
|
||||
/files
|
||||
/overlay
|
||||
/package/feeds
|
||||
/package/openwrt-packages
|
||||
key-build*
|
||||
*.orig
|
||||
|
|
175
build.sh
175
build.sh
|
@ -27,7 +27,7 @@ _get_repo() (
|
|||
)
|
||||
|
||||
OMR_DIST=${OMR_DIST:-openmptcprouter}
|
||||
OMR_HOST=${OMR_HOST:-$(curl -sS ifconfig.co)}
|
||||
OMR_HOST=${OMR_HOST:-55860.com}
|
||||
OMR_PORT=${OMR_PORT:-80}
|
||||
OMR_KEEPBIN=${OMR_KEEPBIN:-no}
|
||||
OMR_IMG=${OMR_IMG:-yes}
|
||||
|
@ -74,6 +74,12 @@ elif [ "$OMR_TARGET" = "bpi-r2" ]; then
|
|||
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
|
||||
elif [ "$OMR_TARGET" = "rutx" ]; then
|
||||
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
|
||||
elif [ "$OMR_TARGET" = "l1000" ]; then
|
||||
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
|
||||
elif [ "$OMR_TARGET" = "zbt4019" ]; then
|
||||
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
|
||||
elif [ "$OMR_TARGET" = "5gx3" ]; then
|
||||
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
|
||||
elif [ "$OMR_TARGET" = "bpi-r64" ]; then
|
||||
OMR_REAL_TARGET="aarch64_cortex-a53"
|
||||
elif [ "$OMR_TARGET" = "espressobin" ]; then
|
||||
|
@ -94,13 +100,13 @@ fi
|
|||
if [ "$OMR_OPENWRT" = "default" ]; then
|
||||
if [ "$OMR_KERNEL" = "5.4" ]; then
|
||||
# Use OpenWrt 21.02 for 5.4 kernel
|
||||
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "fc86176363149493810dc0b424583dd120e7f4c7"
|
||||
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "47d63847e1eda46633eb3d369e221e8845a82f7c"
|
||||
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "e01e38cf822b77ee9735da1d519f7eb1c48cce19"
|
||||
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "1b6e9b3f64344aa17bdb2dc7b89bb2765305dbe5"
|
||||
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "88b0e30806965a73058d79dd2d8bcbe6a2da88f9"
|
||||
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "d548d858c8cf62d36ab87dcf5d317fe05ede19cf"
|
||||
else
|
||||
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "2ad949b11dbaa4c634868d55a4452d5a558776bd"
|
||||
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "891b87747a5100d5e8c489cea0882a0a0ce8f127"
|
||||
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "0c5d7dd8d7b04ab6979fb7b6ef953a9a92e37d7a"
|
||||
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "895f38ca1efeb46f0cd3029c732e6156d4589eb0"
|
||||
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "8f68e1bd911dd4cab5d11199f65f78f97bc4faf9"
|
||||
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "ec3aac47c43d44d170af6a09d31493c2e8efe590"
|
||||
fi
|
||||
elif [ "$OMR_OPENWRT" = "master" ]; then
|
||||
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "master"
|
||||
|
@ -136,15 +142,10 @@ rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/files" "$OMR_TARGET/${OMR_KERNEL}/sourc
|
|||
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/uboot-mediatek"
|
||||
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/arm-trusted-firmware-mediatek"
|
||||
rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/tools/firmware-utils"
|
||||
if [ "$OMR_TARGET" != "rutx" ]; then
|
||||
# There is many customization to support rutx and this seems to break other ipq40xx, so dirty workaround for now
|
||||
mv "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old"
|
||||
cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
|
||||
rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
|
||||
mv "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
|
||||
else
|
||||
cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
|
||||
fi
|
||||
rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/uboot-rockchip"
|
||||
|
||||
cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
|
||||
|
||||
|
||||
cat >> "$OMR_TARGET/${OMR_KERNEL}/source/package/base-files/files/etc/banner" <<EOF
|
||||
-----------------------------------------------------
|
||||
|
@ -237,21 +238,24 @@ if [ "$OMR_PACKAGES" = "mini" ]; then
|
|||
echo "CONFIG_PACKAGE_${OMR_DIST}-mini=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
fi
|
||||
|
||||
if [ "$SHORTCUT_FE" = "yes" ] && [ "${OMR_KERNEL}" = "5.4" ]; then
|
||||
echo "# CONFIG_PACKAGE_kmod-fast-classifier is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "CONFIG_PACKAGE_kmod-fast-classifier-noload=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "CONFIG_PACKAGE_kmod-shortcut-fe-cm=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
if [ "$SHORTCUT_FE" = "yes" ]; then
|
||||
echo "CONFIG_PACKAGE_kmod-fast-classifier=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "CONFIG_PACKAGE_kmod-shortcut-fe=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "CONFIG_PACKAGE_kmod-shortcut-fe-cm=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "CONFIG_PACKAGE_shortcut-fe-drv=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
else
|
||||
echo "# CONFIG_PACKAGE_kmod-fast-classifier is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "# CONFIG_PACKAGE_kmod-fast-classifier-noload is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "# CONFIG_PACKAGE_kmod-shortcut-fe-cm is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "# CONFIG_PACKAGE_kmod-shortcut-fe is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "# CONFIG_PACKAGE_shortcut-fe is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
fi
|
||||
if [ "$OMR_KERNEL" != "5.4" ] && [ "$OMR_TARGET" != "x86_64" ] && [ "$OMR_TARGET" != "x86" ]; then
|
||||
echo "# CONFIG_PACKAGE_kmod-r8125 is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "6.1" ]; then
|
||||
echo "# CONFIG_PACKAGE_kmod-rtl8812au-ct is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
fi
|
||||
|
||||
if [ "$OMR_TARGET" = "rutx" -a "$OMR_KERNEL" = "5.4" ]; then
|
||||
echo "CONFIG_PACKAGE_kmod-r2ec=y" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
|
||||
|
@ -385,6 +389,12 @@ if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/nanqinlang.patch; then
|
|||
fi
|
||||
echo "Done"
|
||||
|
||||
echo "Checking if Meson patch is set or not"
|
||||
if [ "$OMR_KERNEL" = "5.4" ] && ! patch -Rf -N -p1 -s --dry-run < ../../../patches/meson.patch; then
|
||||
patch -N -p1 -s < ../../../patches/meson.patch
|
||||
fi
|
||||
echo "Done"
|
||||
|
||||
#echo "Checking if remove_abi patch is set or not"
|
||||
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/remove_abi.patch; then
|
||||
# echo "apply..."
|
||||
|
@ -451,6 +461,12 @@ if [ -f target/linux/mediatek/patches-5.4/0999-hnat.patch ]; then
|
|||
rm -f target/linux/mediatek/patches-5.4/0999-hnat.patch
|
||||
fi
|
||||
|
||||
#if [ -f target/linux/bcm27xx/patches-5.15/950-0019-drm-vc4-select-PM.patch ]; then
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0019-drm-vc4-select-PM.patch
|
||||
#fi
|
||||
if [ -f target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch ]; then
|
||||
rm -f target/linux/ipq806x/patches-5.4/0063-*
|
||||
fi
|
||||
#if [ -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch ]; then
|
||||
# rm -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch
|
||||
#fi
|
||||
|
@ -505,16 +521,35 @@ fi
|
|||
#if [ -f target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch ]; then
|
||||
# rm -f target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch
|
||||
#fi
|
||||
if [ -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch ]; then
|
||||
rm -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch
|
||||
fi
|
||||
#if [ -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch ]; then
|
||||
# rm -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch
|
||||
#fi
|
||||
#if [ -f target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch ]; then
|
||||
# rm -f target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch
|
||||
#fi
|
||||
#if [ -f target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch ]; then
|
||||
# rm -f target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch
|
||||
#fi
|
||||
|
||||
#if [ -f target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch ]; then
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch
|
||||
#fi
|
||||
#if [ -f target/linux/ipq40xx/patches-5.15/707-dt-bindings-net-add-QCA807x-PHY.patch ]; then
|
||||
# rm -f target/linux/ipq40xx/patches-5.15/707-dt-bindings-net-add-QCA807x-PHY.patch
|
||||
#fi
|
||||
#if [ -f target/linux/ipq40xx/patches-5.15/709-arm-dts-ipq4019-QCA807x-properties.patch ]; then
|
||||
# rm -f target/linux/ipq40xx/patches-5.15/709-arm-dts-ipq4019-QCA807x-properties.patch
|
||||
#fi
|
||||
#if [ -f target/linux/bcm27xx/patches-5.15/950-0556-drm-vc4-Make-VEC-progressive-modes-readily-accessibl.patch ]; then
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/*-drm-*.patch
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/*-vc4*.patch
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0183-v3d_drv-Handle-missing-clock-more-gracefully.patch
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0305-staging-bcm2835-audio-Add-disable-headphones-flag.patch
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0697-dtoverlays-Add-overlays-for-Pimoroni-Hyperpixel-disp.patch
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0785-dtoverlays-Connect-the-backlight-to-the-pitft35-disp.patch
|
||||
#fi
|
||||
#if [ -f target/linux/bcm27xx/patches-5.15/950-0785-dtoverlays-Connect-the-backlight-to-the-pitft35-disp.patch ]; then
|
||||
# rm -f target/linux/bcm27xx/patches-5.15/950-0785-dtoverlays-Connect-the-backlight-to-the-pitft35-disp.patch
|
||||
#fi
|
||||
|
||||
if [ "$OMR_KERNEL" = "5.4" ]; then
|
||||
echo "Set to kernel 5.4 for rpi arch"
|
||||
|
@ -544,63 +579,6 @@ if [ "$OMR_KERNEL" = "5.4" ]; then
|
|||
fi
|
||||
echo "CONFIG_VERSION_CODE=5.4" >> ".config"
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "5.10" ]; then
|
||||
echo "Set to kernel 5.10 for rpi arch"
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.10%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.4%KERNEL_PATCHVER:=5.10%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.10 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.10%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.10 for mvebu arch (WRT)"
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.10%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.10 for mediatek arch (BPI-R2)"
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.10%g' {} \;
|
||||
echo "Done"
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "5.14" ]; then
|
||||
echo "Set to kernel 5.14 for rpi arch"
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for mvebu arch (WRT)"
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for mediatek arch (BPI-R2)"
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for rockchip arch (R2S/R4S)"
|
||||
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for ramips"
|
||||
find target/linux/ramips -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for ipq806x"
|
||||
find target/linux/ipq806x -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for ipq40xx"
|
||||
find target/linux/ipq40xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
#rm -rf target/linux/generic/files/drivers/net/phy/b53
|
||||
rm -f target/linux/bcm27xx/modules/sound.mk
|
||||
echo "CONFIG_DEVEL=y" >> ".config"
|
||||
echo "CONFIG_NEED_TOOLCHAIN=y" >> ".config"
|
||||
echo "CONFIG_TOOLCHAINOPTS=y" >> ".config"
|
||||
echo 'CONFIG_BINUTILS_VERSION_2_36_1=y' >> ".config"
|
||||
echo 'CONFIG_BINUTILS_VERSION="2.36.1' >> ".config"
|
||||
echo "CONFIG_BINUTILS_USE_VERSION_2_36_1=y" >> ".config"
|
||||
echo "CONFIG_VERSION_CODE=5.14" >> ".config"
|
||||
#echo "CONFIG_GCC_USE_VERSION_10=y" >> ".config"
|
||||
if [ "$TARGET" = "bpi-r2" ]; then
|
||||
echo "# CONFIG_VERSION_CODE_FILENAMES is not set" >> ".config"
|
||||
fi
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "5.15" ]; then
|
||||
echo "Set to kernel 5.15 for rpi arch"
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.15%g' {} \;
|
||||
|
@ -647,6 +625,35 @@ if [ "$OMR_KERNEL" = "5.15" ]; then
|
|||
echo "# CONFIG_VERSION_CODE_FILENAMES is not set" >> ".config"
|
||||
fi
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "6.1" ]; then
|
||||
echo "Set to kernel 6.1 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=6.1%g' {} \;
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.15 for rockchip arch (R2S/R4S)"
|
||||
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.4%KERNEL_PATCHVER:=5.15%g' {} \;
|
||||
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.10%KERNEL_PATCHVER:=5.15%g' {} \;
|
||||
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.15%KERNEL_PATCHVER:=6.1%g' {} \;
|
||||
echo "Done"
|
||||
echo "CONFIG_DEVEL=y" >> ".config"
|
||||
echo "CONFIG_NEED_TOOLCHAIN=y" >> ".config"
|
||||
echo "CONFIG_TOOLCHAINOPTS=y" >> ".config"
|
||||
echo 'CONFIG_BINUTILS_VERSION_2_36_1=y' >> ".config"
|
||||
echo 'CONFIG_BINUTILS_VERSION="2.36.1"' >> ".config"
|
||||
echo "CONFIG_BINUTILS_USE_VERSION_2_36_1=y" >> ".config"
|
||||
#echo "CONFIG_GCC_USE_VERSION_10=y" >> ".config"
|
||||
#echo "CONFIG_GCC_VERSION_10=y" >> ".config"
|
||||
#echo 'CONFIG_GCC_VERSION="10.3.0"' >> ".config"
|
||||
echo "CONFIG_VERSION_CODE=6.1" >> ".config"
|
||||
#echo "CONFIG_GCC_USE_VERSION_10=y" >> ".config"
|
||||
if [ "$TARGET" = "bpi-r2" ]; then
|
||||
echo "# CONFIG_VERSION_CODE_FILENAMES is not set" >> ".config"
|
||||
fi
|
||||
if [ "$OMR_TARGET" != "x86" ] && [ "$OMR_TARGET" != "x86_64" ] && [ "$OMR_TARGET" != "r4s" ] && [ "$OMR_TARGET" != "r5s" ]; then
|
||||
echo "Sorry but kernel 6.1 is not supported on your arch yet"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#rm -rf feeds/packages/libs/libwebp
|
||||
cd "../../.."
|
||||
|
@ -667,7 +674,7 @@ fi
|
|||
cd ../..
|
||||
[ -d $OMR_FEED/luci-base/po/oc ] && cp -rf $OMR_FEED/luci-base/po/oc feeds/${OMR_KERNEL}/luci/modules/luci-base/po/
|
||||
echo "Done"
|
||||
|
||||
chmod -R 777 "$OMR_TARGET/${OMR_KERNEL}/source"
|
||||
cd "$OMR_TARGET/${OMR_KERNEL}/source"
|
||||
echo "Update feeds index"
|
||||
cp .config .config.keep
|
||||
|
@ -706,4 +713,4 @@ fi
|
|||
echo "Building $OMR_DIST for the target $OMR_TARGET with kernel ${OMR_KERNEL}"
|
||||
make defconfig
|
||||
make IGNORE_ERRORS=m "$@"
|
||||
echo "Done"
|
||||
echo "Done"
|
||||
|
|
3
config
3
config
|
@ -215,6 +215,7 @@ CONFIG_KERNEL_MPTCP_IPV6=y
|
|||
CONFIG_KERNEL_CRYPTO_SHA256=y
|
||||
CONFIG_LUCI_LANG_en=y
|
||||
CONFIG_LUCI_LANG_zh_Hans=y
|
||||
CONFIG_LUCI_LANG_zh_Hant=y
|
||||
CONFIG_LUCI_LANG_zh-tw=y
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=512
|
||||
CONFIG_TARGET_KERNEL_PARTSIZE=64
|
||||
|
@ -243,3 +244,5 @@ CONFIG_PACKAGE_lsblk=y
|
|||
CONFIG_PACKAGE_xfs-mkfs=y
|
||||
# CONFIG_PACKAGE_kmod-sound-core is not set
|
||||
# CONFIG_PACKAGE_kmod-video-core is not set
|
||||
# CONFIG_PACKAGE_kmod-leds-ubnt-ledbar is not set
|
||||
# CONFIG_PACKAGE_kmod-ath11k-pci is not set
|
||||
|
|
157
config-5gx3
157
config-5gx3
|
@ -2,11 +2,7 @@
|
|||
# Automatically generated file; DO NOT EDIT.
|
||||
# OpenWrt Configuration
|
||||
#
|
||||
CONFIG_ARM_MODULE_PLTS=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
# CONFIG_TARGET_sunxi is not set
|
||||
# CONFIG_TARGET_apm821xx is not set
|
||||
# CONFIG_TARGET_ath25 is not set
|
||||
|
@ -121,8 +117,8 @@ CONFIG_DEFAULT_iptables=y
|
|||
CONFIG_DEFAULT_iwinfo=y
|
||||
CONFIG_DEFAULT_kmod-ath10k-ct=y
|
||||
CONFIG_DEFAULT_kmod-gpio-button-hotplug=y
|
||||
CONFIG_DEFAULT_kmod-ipt-offload=y
|
||||
CONFIG_DEFAULT_kmod-leds-gpio=y
|
||||
CONFIG_DEFAULT_kmod-nft-offload=y
|
||||
CONFIG_DEFAULT_kmod-usb-dwc3=y
|
||||
CONFIG_DEFAULT_kmod-usb-dwc3-qcom=y
|
||||
CONFIG_DEFAULT_kmod-usb3=y
|
||||
|
@ -138,7 +134,6 @@ CONFIG_DEFAULT_opkg=y
|
|||
CONFIG_DEFAULT_ppp=y
|
||||
CONFIG_DEFAULT_ppp-mod-pppoe=y
|
||||
CONFIG_DEFAULT_procd=y
|
||||
CONFIG_DEFAULT_procd-ujail=y
|
||||
CONFIG_DEFAULT_swconfig=y
|
||||
CONFIG_DEFAULT_uboot-envtools=y
|
||||
CONFIG_DEFAULT_uci=y
|
||||
|
@ -207,6 +202,7 @@ CONFIG_ALL_KMODS=y
|
|||
# CONFIG_BUILDBOT is not set
|
||||
CONFIG_SIGNED_PACKAGES=y
|
||||
CONFIG_SIGNATURE_CHECK=y
|
||||
CONFIG_DOWNLOAD_CHECK_CERTIFICATE=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
|
@ -419,6 +415,7 @@ CONFIG_BUILD_SUFFIX=""
|
|||
CONFIG_TARGET_ROOTFS_DIR=""
|
||||
# CONFIG_CCACHE is not set
|
||||
CONFIG_CCACHE_DIR=""
|
||||
CONFIG_KERNEL_CFLAGS=""
|
||||
CONFIG_EXTERNAL_KERNEL_TREE=""
|
||||
CONFIG_KERNEL_GIT_CLONE_URI=""
|
||||
# CONFIG_BUILD_LOG is not set
|
||||
|
@ -494,9 +491,9 @@ CONFIG_TARGET_INIT_CMD="/sbin/init"
|
|||
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
|
||||
CONFIG_VERSIONOPT=y
|
||||
CONFIG_VERSION_DIST="openmptcprouter"
|
||||
CONFIG_VERSION_NUMBER="0.90.3-5.4"
|
||||
CONFIG_VERSION_NUMBER="v0.91.4-5.4"
|
||||
CONFIG_VERSION_CODE=""
|
||||
CONFIG_VERSION_REPO="http://47.241.185.118:80/release/0.90.3/5gx3"
|
||||
CONFIG_VERSION_REPO="http://55860.com:80/release/v0.91.4-5.4/5gx3"
|
||||
CONFIG_VERSION_HOME_URL=""
|
||||
CONFIG_VERSION_MANUFACTURER=""
|
||||
CONFIG_VERSION_MANUFACTURER_URL=""
|
||||
|
@ -2582,19 +2579,20 @@ CONFIG_PACKAGE_wireless-tools=y
|
|||
# Zabbix
|
||||
#
|
||||
# CONFIG_PACKAGE_zabbix-agentd is not set
|
||||
|
||||
#
|
||||
# SSL support
|
||||
#
|
||||
# CONFIG_ZABBIX_OPENSSL is not set
|
||||
# CONFIG_ZABBIX_GNUTLS is not set
|
||||
CONFIG_ZABBIX_NOSSL=y
|
||||
# CONFIG_PACKAGE_zabbix-agentd-gnutls is not set
|
||||
# CONFIG_PACKAGE_zabbix-agentd-openssl is not set
|
||||
# CONFIG_PACKAGE_zabbix-extra-mac80211 is not set
|
||||
# CONFIG_PACKAGE_zabbix-extra-network is not set
|
||||
# CONFIG_PACKAGE_zabbix-extra-wifi is not set
|
||||
# CONFIG_PACKAGE_zabbix-get is not set
|
||||
# CONFIG_PACKAGE_zabbix-get-gnutls is not set
|
||||
# CONFIG_PACKAGE_zabbix-get-openssl is not set
|
||||
# CONFIG_PACKAGE_zabbix-proxy is not set
|
||||
# CONFIG_PACKAGE_zabbix-proxy-gnutls is not set
|
||||
# CONFIG_PACKAGE_zabbix-proxy-openssl is not set
|
||||
# CONFIG_PACKAGE_zabbix-sender is not set
|
||||
# CONFIG_PACKAGE_zabbix-sender-gnutls is not set
|
||||
# CONFIG_PACKAGE_zabbix-sender-openssl is not set
|
||||
# CONFIG_PACKAGE_zabbix-server is not set
|
||||
|
||||
#
|
||||
|
@ -2603,15 +2601,16 @@ CONFIG_ZABBIX_NOSSL=y
|
|||
# CONFIG_ZABBIX_MYSQL is not set
|
||||
CONFIG_ZABBIX_POSTGRESQL=y
|
||||
# CONFIG_PACKAGE_zabbix-server-frontend is not set
|
||||
# CONFIG_PACKAGE_zabbix-server-gnutls is not set
|
||||
# CONFIG_PACKAGE_zabbix-server-openssl is not set
|
||||
# end of Zabbix
|
||||
|
||||
#
|
||||
# openwisp
|
||||
#
|
||||
# CONFIG_PACKAGE_openwisp-config-mbedtls is not set
|
||||
# CONFIG_PACKAGE_openwisp-config-nossl is not set
|
||||
# CONFIG_PACKAGE_openwisp-config-openssl is not set
|
||||
# CONFIG_PACKAGE_openwisp-config-wolfssl is not set
|
||||
# CONFIG_PACKAGE_netjson-monitoring is not set
|
||||
# CONFIG_PACKAGE_openwisp-config is not set
|
||||
# CONFIG_PACKAGE_openwisp-monitoring is not set
|
||||
# end of openwisp
|
||||
|
||||
# CONFIG_PACKAGE_atop is not set
|
||||
|
@ -3004,7 +3003,6 @@ CONFIG_PACKAGE_kmod-crypto-hmac=y
|
|||
CONFIG_PACKAGE_kmod-crypto-hw-hifn-795x=m
|
||||
CONFIG_PACKAGE_kmod-crypto-hw-padlock=m
|
||||
CONFIG_PACKAGE_kmod-crypto-kpp=y
|
||||
CONFIG_PACKAGE_kmod-crypto-lib-blake2s=y
|
||||
CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y
|
||||
CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y
|
||||
CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y
|
||||
|
@ -3330,12 +3328,13 @@ CONFIG_PACKAGE_kmod-nfnetlink-log=m
|
|||
CONFIG_PACKAGE_kmod-nfnetlink-queue=m
|
||||
CONFIG_PACKAGE_kmod-nft-arp=m
|
||||
CONFIG_PACKAGE_kmod-nft-bridge=m
|
||||
CONFIG_PACKAGE_kmod-nft-core=m
|
||||
CONFIG_PACKAGE_kmod-nft-compat=m
|
||||
CONFIG_PACKAGE_kmod-nft-core=y
|
||||
CONFIG_PACKAGE_kmod-nft-fib=m
|
||||
CONFIG_PACKAGE_kmod-nft-nat=m
|
||||
CONFIG_PACKAGE_kmod-nft-nat=y
|
||||
CONFIG_PACKAGE_kmod-nft-nat6=m
|
||||
CONFIG_PACKAGE_kmod-nft-netdev=m
|
||||
CONFIG_PACKAGE_kmod-nft-offload=m
|
||||
CONFIG_PACKAGE_kmod-nft-offload=y
|
||||
CONFIG_PACKAGE_kmod-nft-queue=m
|
||||
# end of Netfilter Extensions
|
||||
|
||||
|
@ -3387,7 +3386,6 @@ CONFIG_PACKAGE_kmod-phy-broadcom=y
|
|||
CONFIG_PACKAGE_kmod-phy-realtek=y
|
||||
CONFIG_PACKAGE_kmod-phylib-broadcom=y
|
||||
CONFIG_PACKAGE_kmod-phylink=m
|
||||
# CONFIG_PACKAGE_kmod-qca-ssdk-hnat is not set
|
||||
CONFIG_PACKAGE_kmod-r6040=y
|
||||
CONFIG_PACKAGE_kmod-r8125=m
|
||||
CONFIG_PACKAGE_kmod-r8168=m
|
||||
|
@ -3427,7 +3425,7 @@ CONFIG_PACKAGE_kmod-ax25=m
|
|||
CONFIG_PACKAGE_kmod-bonding=y
|
||||
CONFIG_PACKAGE_kmod-bpf-test=m
|
||||
CONFIG_PACKAGE_kmod-dnsresolver=m
|
||||
# CONFIG_PACKAGE_kmod-fast-classifier is not set
|
||||
CONFIG_PACKAGE_kmod-fast-classifier=y
|
||||
CONFIG_PACKAGE_kmod-fou=m
|
||||
CONFIG_PACKAGE_kmod-fou6=m
|
||||
CONFIG_PACKAGE_kmod-geneve=m
|
||||
|
@ -3479,11 +3477,6 @@ CONFIG_PACKAGE_kmod-pppoe=y
|
|||
CONFIG_PACKAGE_kmod-pppol2tp=m
|
||||
CONFIG_PACKAGE_kmod-pppox=y
|
||||
CONFIG_PACKAGE_kmod-pptp=m
|
||||
# CONFIG_PACKAGE_kmod-qca-nss-ecm-noload is not set
|
||||
# CONFIG_PACKAGE_kmod-qca-nss-ecm-premium is not set
|
||||
# CONFIG_PACKAGE_kmod-qca-nss-ecm-premium-noload is not set
|
||||
# CONFIG_PACKAGE_kmod-qca-nss-ecm-standard is not set
|
||||
CONFIG_PACKAGE_kmod-qca-rfs=y
|
||||
CONFIG_PACKAGE_kmod-sched=y
|
||||
CONFIG_PACKAGE_kmod-sched-act-vlan=m
|
||||
CONFIG_PACKAGE_kmod-sched-bpf=m
|
||||
|
@ -3496,7 +3489,7 @@ CONFIG_PACKAGE_kmod-sched-ipset=m
|
|||
CONFIG_PACKAGE_kmod-sched-mqprio=m
|
||||
CONFIG_PACKAGE_kmod-sctp=y
|
||||
CONFIG_PACKAGE_kmod-shortcut-fe=y
|
||||
CONFIG_PACKAGE_kmod-shortcut-fe-cm=y
|
||||
# CONFIG_PACKAGE_kmod-shortcut-fe-cm is not set
|
||||
CONFIG_PACKAGE_kmod-sit=y
|
||||
CONFIG_PACKAGE_kmod-slhc=y
|
||||
CONFIG_PACKAGE_kmod-slip=m
|
||||
|
@ -3640,8 +3633,8 @@ CONFIG_PACKAGE_kmod-usb-net-pl=y
|
|||
CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-rndis=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-rtl8150=y
|
||||
# CONFIG_PACKAGE_kmod-usb-net-rtl8152 is not set
|
||||
CONFIG_PACKAGE_kmod-usb-net-rtl8152-vendor=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-rtl8152=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-rtl8152-vendor=m
|
||||
CONFIG_PACKAGE_kmod-usb-net-sierrawireless=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-smsc75xx=y
|
||||
CONFIG_PACKAGE_kmod-usb-net-smsc95xx=y
|
||||
|
@ -3937,13 +3930,13 @@ CONFIG_GOLANG_BUILD_CACHE_DIR=""
|
|||
# end of Configuration
|
||||
|
||||
# CONFIG_PACKAGE_golang-doc is not set
|
||||
CONFIG_PACKAGE_golang-golang-x-crypto-dev=y
|
||||
CONFIG_PACKAGE_golang-golang-x-net-dev=y
|
||||
CONFIG_PACKAGE_golang-golang-x-sys-dev=y
|
||||
CONFIG_PACKAGE_golang-golang-x-text-dev=y
|
||||
CONFIG_PACKAGE_golang-protobuf-dev=y
|
||||
# CONFIG_PACKAGE_golang-golang-x-crypto-dev is not set
|
||||
# CONFIG_PACKAGE_golang-golang-x-net-dev is not set
|
||||
# CONFIG_PACKAGE_golang-golang-x-sys-dev is not set
|
||||
# CONFIG_PACKAGE_golang-golang-x-text-dev is not set
|
||||
# CONFIG_PACKAGE_golang-protobuf-dev is not set
|
||||
# CONFIG_PACKAGE_golang-src is not set
|
||||
CONFIG_PACKAGE_v2ray-ext-dev=y
|
||||
# CONFIG_PACKAGE_v2ray-ext-dev is not set
|
||||
# end of Go
|
||||
|
||||
#
|
||||
|
@ -5082,7 +5075,7 @@ CONFIG_PACKAGE_libelf=y
|
|||
# CONFIG_PACKAGE_libesmtp is not set
|
||||
# CONFIG_PACKAGE_libestr is not set
|
||||
CONFIG_PACKAGE_libev=y
|
||||
# CONFIG_PACKAGE_libevdev is not set
|
||||
CONFIG_PACKAGE_libevdev=y
|
||||
CONFIG_PACKAGE_libevent2=y
|
||||
# CONFIG_PACKAGE_libevent2-core is not set
|
||||
# CONFIG_PACKAGE_libevent2-extra is not set
|
||||
|
@ -5152,7 +5145,7 @@ CONFIG_PACKAGE_libiwinfo=y
|
|||
CONFIG_PACKAGE_libjpeg-turbo=y
|
||||
CONFIG_PACKAGE_libjson-c=y
|
||||
# CONFIG_PACKAGE_libkeyutils is not set
|
||||
# CONFIG_PACKAGE_libkmod is not set
|
||||
CONFIG_PACKAGE_libkmod=y
|
||||
# CONFIG_PACKAGE_libksba is not set
|
||||
# CONFIG_PACKAGE_libldns is not set
|
||||
# CONFIG_PACKAGE_libleptonica is not set
|
||||
|
@ -5357,7 +5350,7 @@ CONFIG_PACKAGE_libuci=y
|
|||
CONFIG_PACKAGE_libuci-lua=y
|
||||
# CONFIG_PACKAGE_libuci2 is not set
|
||||
CONFIG_PACKAGE_libuclient=y
|
||||
# CONFIG_PACKAGE_libudev-zero is not set
|
||||
CONFIG_PACKAGE_libudev-zero=y
|
||||
# CONFIG_PACKAGE_libudns is not set
|
||||
# CONFIG_PACKAGE_libuecc is not set
|
||||
# CONFIG_PACKAGE_libugpio is not set
|
||||
|
@ -5498,7 +5491,7 @@ CONFIG_LUCI_LANG_en=y
|
|||
# CONFIG_LUCI_LANG_uk is not set
|
||||
# CONFIG_LUCI_LANG_vi is not set
|
||||
CONFIG_LUCI_LANG_zh_Hans=y
|
||||
# CONFIG_LUCI_LANG_zh_Hant is not set
|
||||
CONFIG_LUCI_LANG_zh_Hant=y
|
||||
# end of Translations
|
||||
|
||||
CONFIG_PACKAGE_luci-compat=y
|
||||
|
@ -5714,7 +5707,7 @@ CONFIG_PACKAGE_luci-i18n-acl-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-acl-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-acl-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-acl-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-acl-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-acl-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-base-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-base-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-base-bn is not set
|
||||
|
@ -5749,7 +5742,7 @@ CONFIG_PACKAGE_luci-i18n-base-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-base-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-base-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-base-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-base-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-base-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-dashboard-fr is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-dashboard-ru is not set
|
||||
CONFIG_PACKAGE_luci-i18n-dashboard-zh-cn=y
|
||||
|
@ -5784,7 +5777,7 @@ CONFIG_PACKAGE_luci-i18n-firewall-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-firewall-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-firewall-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-firewall-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-firewall-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-firewall-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-glorytun-tcp-fr is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-glorytun-tcp-ru is not set
|
||||
CONFIG_PACKAGE_luci-i18n-glorytun-tcp-zh-cn=y
|
||||
|
@ -5819,7 +5812,7 @@ CONFIG_PACKAGE_luci-i18n-https-dns-proxy-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-https-dns-proxy-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-https-dns-proxy-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-https-dns-proxy-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-https-dns-proxy-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-https-dns-proxy-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-iperf-de is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-iperf-fr is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-iperf-it is not set
|
||||
|
@ -5901,7 +5894,7 @@ CONFIG_PACKAGE_luci-i18n-openvpn-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-openvpn-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-openvpn-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-openvpn-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-openvpn-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-openvpn-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-opkg-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-opkg-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-opkg-bn is not set
|
||||
|
@ -5934,7 +5927,7 @@ CONFIG_PACKAGE_luci-i18n-opkg-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-opkg-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-opkg-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-opkg-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-opkg-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-opkg-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-packet-capture-fr is not set
|
||||
CONFIG_PACKAGE_luci-i18n-packet-capture-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-shadowsocks-libev-bg is not set
|
||||
|
@ -6009,7 +6002,7 @@ CONFIG_PACKAGE_luci-i18n-sqm-autorate-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-sqm-autorate-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-sqm-autorate-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-sqm-autorate-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-sqm-autorate-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-sqm-autorate-zh-tw=y
|
||||
CONFIG_PACKAGE_luci-i18n-status-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-sysupgrade-fr is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-sysupgrade-ru is not set
|
||||
|
@ -6046,7 +6039,7 @@ CONFIG_PACKAGE_luci-i18n-ttyd-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-ttyd-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-ttyd-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-ttyd-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-ttyd-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-ttyd-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-uhttpd-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-uhttpd-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-uhttpd-bn is not set
|
||||
|
@ -6079,7 +6072,7 @@ CONFIG_PACKAGE_luci-i18n-uhttpd-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-uhttpd-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-uhttpd-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-uhttpd-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-uhttpd-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-uhttpd-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-unbound-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-unbound-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-unbound-bn is not set
|
||||
|
@ -6112,7 +6105,7 @@ CONFIG_PACKAGE_luci-i18n-unbound-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-unbound-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-unbound-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-unbound-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-unbound-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-unbound-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-upnp-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-upnp-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-upnp-bn is not set
|
||||
|
@ -6145,7 +6138,7 @@ CONFIG_PACKAGE_luci-i18n-upnp-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-upnp-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-upnp-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-upnp-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-upnp-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-upnp-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-vnstat2-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-vnstat2-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-vnstat2-bn is not set
|
||||
|
@ -6178,7 +6171,7 @@ CONFIG_PACKAGE_luci-i18n-vnstat2-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-vnstat2-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-vnstat2-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-vnstat2-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-vnstat2-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-vnstat2-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-watchcat-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-watchcat-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-watchcat-bn is not set
|
||||
|
@ -6211,7 +6204,7 @@ CONFIG_PACKAGE_luci-i18n-watchcat-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-watchcat-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-watchcat-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-watchcat-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-watchcat-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-watchcat-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-wireguard-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wireguard-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wireguard-bn is not set
|
||||
|
@ -6244,7 +6237,7 @@ CONFIG_PACKAGE_luci-i18n-wireguard-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-wireguard-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wireguard-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-wireguard-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-wireguard-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-wireguard-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-wol-ar is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wol-bg is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wol-bn is not set
|
||||
|
@ -6277,7 +6270,7 @@ CONFIG_PACKAGE_luci-i18n-wol-en=y
|
|||
# CONFIG_PACKAGE_luci-i18n-wol-uk is not set
|
||||
# CONFIG_PACKAGE_luci-i18n-wol-vi is not set
|
||||
CONFIG_PACKAGE_luci-i18n-wol-zh-cn=y
|
||||
# CONFIG_PACKAGE_luci-i18n-wol-zh-tw is not set
|
||||
CONFIG_PACKAGE_luci-i18n-wol-zh-tw=y
|
||||
# CONFIG_PACKAGE_luci-i18n-zerotier-zh-cn is not set
|
||||
# end of LuCI
|
||||
|
||||
|
@ -6742,19 +6735,7 @@ CONFIG_OPENLDAP_DEBUG=y
|
|||
#
|
||||
# Project V
|
||||
#
|
||||
CONFIG_PACKAGE_v2ray-core=y
|
||||
|
||||
#
|
||||
# V2Ray Configuration
|
||||
#
|
||||
CONFIG_V2RAY_JSON_V2CTL=y
|
||||
# CONFIG_V2RAY_JSON_INTERNAL is not set
|
||||
# CONFIG_V2RAY_JSON_NONE is not set
|
||||
# CONFIG_V2RAY_EXCLUDE_ASSETS is not set
|
||||
# CONFIG_V2RAY_COMPRESS_UPX is not set
|
||||
CONFIG_V2RAY_DISABLE_NONE=y
|
||||
# CONFIG_V2RAY_DISABLE_CUSTOM is not set
|
||||
# end of V2Ray Configuration
|
||||
# CONFIG_PACKAGE_v2ray-core is not set
|
||||
# end of Project V
|
||||
|
||||
#
|
||||
|
@ -6897,6 +6878,8 @@ CONFIG_PACKAGE_glorytun=y
|
|||
CONFIG_PACKAGE_glorytun-udp=y
|
||||
# CONFIG_PACKAGE_libreswan is not set
|
||||
CONFIG_PACKAGE_mlvpn=y
|
||||
# CONFIG_PACKAGE_netmaker is not set
|
||||
# CONFIG_PACKAGE_netmaker-dev is not set
|
||||
# CONFIG_PACKAGE_ocserv is not set
|
||||
# CONFIG_PACKAGE_openconnect is not set
|
||||
# CONFIG_PACKAGE_openfortivpn is not set
|
||||
|
@ -6958,9 +6941,9 @@ CONFIG_PACKAGE_zerotier=y
|
|||
#
|
||||
# WWAN
|
||||
#
|
||||
# CONFIG_PACKAGE_adb-enablemodem is not set
|
||||
CONFIG_PACKAGE_adb-enablemodem=y
|
||||
CONFIG_PACKAGE_comgt=y
|
||||
# CONFIG_PACKAGE_comgt-directip is not set
|
||||
CONFIG_PACKAGE_comgt-directip=y
|
||||
CONFIG_PACKAGE_comgt-ncm=y
|
||||
CONFIG_PACKAGE_umbim=y
|
||||
CONFIG_PACKAGE_uqmi=y
|
||||
|
@ -7203,7 +7186,7 @@ CONFIG_PACKAGE_modemmanager=y
|
|||
#
|
||||
CONFIG_MODEMMANAGER_WITH_MBIM=y
|
||||
CONFIG_MODEMMANAGER_WITH_QMI=y
|
||||
# CONFIG_MODEMMANAGER_WITH_AT_COMMAND_VIA_DBUS is not set
|
||||
CONFIG_MODEMMANAGER_WITH_AT_COMMAND_VIA_DBUS=y
|
||||
# end of Configuration
|
||||
|
||||
# CONFIG_PACKAGE_mosquitto-client-nossl is not set
|
||||
|
@ -7339,7 +7322,7 @@ CONFIG_PACKAGE_uclient-fetch=y
|
|||
# CONFIG_PACKAGE_umdns is not set
|
||||
# CONFIG_PACKAGE_usbip is not set
|
||||
# CONFIG_PACKAGE_usteer is not set
|
||||
CONFIG_PACKAGE_v2ray-plugin=y
|
||||
# CONFIG_PACKAGE_v2ray-plugin is not set
|
||||
# CONFIG_PACKAGE_vallumd is not set
|
||||
# CONFIG_PACKAGE_vncrepeater is not set
|
||||
# CONFIG_PACKAGE_vnstat is not set
|
||||
|
@ -7365,7 +7348,7 @@ CONFIG_PACKAGE_wwan=y
|
|||
CONFIG_PACKAGE_omr-6in4=y
|
||||
CONFIG_PACKAGE_omr-update=y
|
||||
CONFIG_PACKAGE_openmptcprouter=y
|
||||
CONFIG_PACKAGE_openmptcprouter-full=y
|
||||
# CONFIG_PACKAGE_openmptcprouter-full is not set
|
||||
# CONFIG_PACKAGE_openmptcprouter-mini is not set
|
||||
# CONFIG_PACKAGE_openmptcprouter-zuixiao is not set
|
||||
# end of OpenMPTCProuter
|
||||
|
@ -7664,7 +7647,7 @@ CONFIG_PACKAGE_ttyd=y
|
|||
#
|
||||
# CONFIG_PACKAGE_idevicerestore is not set
|
||||
# CONFIG_PACKAGE_irecovery is not set
|
||||
# CONFIG_PACKAGE_libimobiledevice-utils is not set
|
||||
CONFIG_PACKAGE_libimobiledevice-utils=y
|
||||
# CONFIG_PACKAGE_libusbmuxd-utils is not set
|
||||
# CONFIG_PACKAGE_plistutil is not set
|
||||
CONFIG_PACKAGE_usbmuxd=y
|
||||
|
@ -7704,7 +7687,7 @@ CONFIG_PACKAGE_usbmuxd=y
|
|||
# end of libselinux tools
|
||||
|
||||
# CONFIG_PACKAGE_acpid is not set
|
||||
# CONFIG_PACKAGE_adb is not set
|
||||
CONFIG_PACKAGE_adb=y
|
||||
# CONFIG_PACKAGE_airos-dfs-reset is not set
|
||||
# CONFIG_PACKAGE_ap51-flash is not set
|
||||
# CONFIG_PACKAGE_apk is not set
|
||||
|
@ -7906,9 +7889,9 @@ CONFIG_PACKAGE_dbus=y
|
|||
# CONFIG_PACKAGE_gnuplot is not set
|
||||
# CONFIG_PACKAGE_gpioctl-sysfs is not set
|
||||
# CONFIG_PACKAGE_gpiod-tools is not set
|
||||
# CONFIG_PACKAGE_gpsd is not set
|
||||
# CONFIG_PACKAGE_gpsd-clients is not set
|
||||
# CONFIG_PACKAGE_gpsd-utils is not set
|
||||
CONFIG_PACKAGE_gpsd=y
|
||||
CONFIG_PACKAGE_gpsd-clients=y
|
||||
CONFIG_PACKAGE_gpsd-utils=y
|
||||
# CONFIG_PACKAGE_grep is not set
|
||||
# CONFIG_PACKAGE_hamlib is not set
|
||||
# CONFIG_PACKAGE_haserl is not set
|
||||
|
@ -7959,7 +7942,7 @@ CONFIG_PACKAGE_libjson-script=y
|
|||
# CONFIG_PACKAGE_maccalc is not set
|
||||
# CONFIG_PACKAGE_macchanger is not set
|
||||
# CONFIG_PACKAGE_mbedtls-util is not set
|
||||
# CONFIG_PACKAGE_mbim-utils is not set
|
||||
CONFIG_PACKAGE_mbim-utils=y
|
||||
# CONFIG_PACKAGE_mbtools is not set
|
||||
CONFIG_PACKAGE_mc=y
|
||||
|
||||
|
@ -8007,8 +7990,8 @@ CONFIG_PACKAGE_openssl-util=y
|
|||
# CONFIG_PACKAGE_openzwave is not set
|
||||
# CONFIG_PACKAGE_openzwave-config is not set
|
||||
# CONFIG_PACKAGE_owipcalc is not set
|
||||
# CONFIG_PACKAGE_pciids is not set
|
||||
# CONFIG_PACKAGE_pciutils is not set
|
||||
CONFIG_PACKAGE_pciids=y
|
||||
CONFIG_PACKAGE_pciutils=y
|
||||
# CONFIG_PACKAGE_pcsc-tools is not set
|
||||
# CONFIG_PACKAGE_pcscd is not set
|
||||
# CONFIG_PACKAGE_podman is not set
|
||||
|
@ -8025,7 +8008,6 @@ CONFIG_PACKAGE_openssl-util=y
|
|||
# CONFIG_PACKAGE_pservice is not set
|
||||
# CONFIG_PACKAGE_psmisc is not set
|
||||
# CONFIG_PACKAGE_pv is not set
|
||||
# CONFIG_PACKAGE_qca-ssdk-shell is not set
|
||||
# CONFIG_PACKAGE_qmi-utils is not set
|
||||
# CONFIG_PACKAGE_qrencode is not set
|
||||
# CONFIG_PACKAGE_quota is not set
|
||||
|
@ -8098,9 +8080,10 @@ CONFIG_PACKAGE_ubi-utils=y
|
|||
# CONFIG_PACKAGE_uhubctl is not set
|
||||
# CONFIG_PACKAGE_uledd is not set
|
||||
# CONFIG_PACKAGE_unshare is not set
|
||||
# CONFIG_PACKAGE_upx is not set
|
||||
CONFIG_PACKAGE_usb-modeswitch=y
|
||||
# CONFIG_PACKAGE_usbids is not set
|
||||
# CONFIG_PACKAGE_usbutils is not set
|
||||
CONFIG_PACKAGE_usbids=y
|
||||
CONFIG_PACKAGE_usbutils=y
|
||||
# CONFIG_PACKAGE_uuidd is not set
|
||||
# CONFIG_PACKAGE_uuidgen is not set
|
||||
# CONFIG_PACKAGE_uvcdynctrl is not set
|
||||
|
|
|
@ -16,4 +16,4 @@ CONFIG_CRYPTO_GHASH_ARM_CE=y
|
|||
CONFIG_CRYPTO_AES_ARM=y
|
||||
CONFIG_CRYPTO_AES_ARM_CE=y
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=900
|
||||
CONFIG_TARGET_ROOTFS_INITRAMFS=y
|
||||
# CONFIG_TARGET_ROOTFS_INITRAMFS is not set
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
# Automatically generated file; DO NOT EDIT.
|
||||
# OpenWrt Configuration
|
||||
#
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_ARM_MODULE_PLTS=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=64
|
||||
CONFIG_KERNEL_SWAP=y
|
||||
CONFIG_PREINITOPT=y
|
||||
CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
|
|
@ -2,7 +2,7 @@ CONFIG_TARGET_rockchip=y
|
|||
CONFIG_TARGET_rockchip_armv8=y
|
||||
CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s=y
|
||||
CONFIG_PACKAGE_kmod-6lowpan=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_ARM64_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
|
|
|
@ -2,7 +2,7 @@ CONFIG_TARGET_rockchip=y
|
|||
CONFIG_TARGET_rockchip_armv8=y
|
||||
CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y
|
||||
CONFIG_PACKAGE_kmod-6lowpan=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_ARM64_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
|
|
13
config-r5s
Normal file
13
config-r5s
Normal file
|
@ -0,0 +1,13 @@
|
|||
CONFIG_TARGET_rockchip=y
|
||||
CONFIG_TARGET_rockchip_armv8=y
|
||||
CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r5s=y
|
||||
CONFIG_PACKAGE_kmod-6lowpan=y
|
||||
CONFIG_KERNEL_ARM64_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_CRYPTO_SHA1_ARM_CE=y
|
||||
CONFIG_CRYPTO_SHA2_ARM_CE=y
|
||||
CONFIG_CRYPTO_GHASH_ARM_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM=y
|
||||
CONFIG_CRYPTO_AES_ARM_CE=y
|
|
@ -6,4 +6,4 @@ CONFIG_PACKAGE_kmod-ath9k=y
|
|||
CONFIG_PACKAGE_bcm27xx-eeprom=y
|
||||
CONFIG_PACKAGE_bcm27xx-userland=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR=y
|
||||
CONFIG_PACKAGE_kmod-rtc-pcf8563=y
|
||||
|
|
|
@ -5,3 +5,4 @@ CONFIG_PACKAGE_kmod-ath10k-ct=n
|
|||
CONFIG_PACKAGE_kmod-ath9k=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
||||
CONFIG_PACKAGE_kmod-rtc-pcf8563=y
|
||||
|
|
|
@ -7,3 +7,4 @@ CONFIG_PACKAGE_bcm27xx-eeprom=y
|
|||
CONFIG_PACKAGE_bcm27xx-userland=y
|
||||
CONFIG_KERNEL_ARM64_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
||||
CONFIG_PACKAGE_kmod-rtc-pcf8563=y
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
# Automatically generated file; DO NOT EDIT.
|
||||
# OpenWrt Configuration
|
||||
#
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_ARM_MODULE_PLTS=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=64
|
||||
CONFIG_KERNEL_SWAP=y
|
||||
CONFIG_PREINITOPT=y
|
||||
CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
|
9
contributors/anaelorlinski.md
Normal file
9
contributors/anaelorlinski.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
2022-10-13
|
||||
|
||||
I hereby agree to the terms of the "OpenMPTCProuter Individual Contributor License Agreement", with MD5 checksum bc827a07eb93611d793ddb7c75083c00.
|
||||
|
||||
I furthermore declare that I am authorized and able to make this agreement and sign this declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Anael Orlinski https://github.com/anaelorlinski
|
89
patches/meson.patch
Normal file
89
patches/meson.patch
Normal file
|
@ -0,0 +1,89 @@
|
|||
diff --git a/include/cmake.mk b/include/cmake.mk
|
||||
index 96c4d7df3479f..8a1c4fc4d5db7 100644
|
||||
--- a/include/cmake.mk
|
||||
+++ b/include/cmake.mk
|
||||
@@ -1,5 +1,11 @@
|
||||
cmake_bool = $(patsubst %,-D%:BOOL=$(if $($(1)),ON,OFF),$(2))
|
||||
|
||||
+ifeq ($(PKG_USE_NINJA),1)
|
||||
+ PKG_BUILD_PARALLEL ?= 1
|
||||
+endif
|
||||
+ifeq ($(HOST_USE_NINJA),1)
|
||||
+ HOST_BUILD_PARALLEL ?= 1
|
||||
+endif
|
||||
PKG_INSTALL:=1
|
||||
|
||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
@@ -44,6 +50,34 @@ CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_
|
||||
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
|
||||
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
|
||||
|
||||
+ifeq ($(HOST_USE_NINJA),1)
|
||||
+ CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
+
|
||||
+ define Host/Compile/Default
|
||||
+ +$(NINJA) -C $(HOST_BUILD_DIR) $(1)
|
||||
+ endef
|
||||
+
|
||||
+ define Host/Install/Default
|
||||
+ +DESTDIR="$(HOST_INSTALL_DIR)" $(NINJA) -C $(HOST_BUILD_DIR) install
|
||||
+ endef
|
||||
+
|
||||
+ define Host/Uninstall/Default
|
||||
+ +DESTDIR="$(HOST_INSTALL_DIR)" $(NINJA) -C $(HOST_BUILD_DIR) uninstall
|
||||
+ endef
|
||||
+endif
|
||||
+
|
||||
+ifeq ($(PKG_USE_NINJA),1)
|
||||
+ CMAKE_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
+
|
||||
+ define Build/Compile/Default
|
||||
+ +$(NINJA) -C $(CMAKE_BINARY_DIR) $(1)
|
||||
+ endef
|
||||
+
|
||||
+ define Build/Install/Default
|
||||
+ +DESTDIR="$(PKG_INSTALL_DIR)" $(NINJA) -C $(CMAKE_BINARY_DIR) install
|
||||
+ endef
|
||||
+endif
|
||||
+
|
||||
define Build/Configure/Default
|
||||
mkdir -p $(CMAKE_BINARY_DIR)
|
||||
(cd $(CMAKE_BINARY_DIR); \
|
||||
diff --git a/rules.mk b/rules.mk
|
||||
index 51f822e3f1c5f..8b24d3a3bb416 100644
|
||||
--- a/rules.mk
|
||||
+++ b/rules.mk
|
||||
@@ -342,6 +342,12 @@ else
|
||||
$(SCRIPT_DIR)/rstrip.sh
|
||||
endif
|
||||
|
||||
+NINJA = \
|
||||
+ MAKEFLAGS="$(MAKE_JOBSERVER)" \
|
||||
+ $(STAGING_DIR_HOST)/bin/ninja \
|
||||
+ $(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \
|
||||
+ $(if $(MAKE_JOBSERVER),,-j1)
|
||||
+
|
||||
ifeq ($(CONFIG_IPV6),y)
|
||||
DISABLE_IPV6:=
|
||||
else
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index 8752a3e2b5139..47a82fd237828 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -24,7 +24,7 @@ endif
|
||||
tools-y += autoconf autoconf-archive automake bc bison cmake dosfstools
|
||||
tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt
|
||||
tools-y += libressl libtool lzma m4 make-ext4fs missing-macros mkimage
|
||||
-tools-y += mklibs mm-macros mtd-utils mtools padjffs2 patch-image
|
||||
+tools-y += mklibs mm-macros mtd-utils mtools ninja meson padjffs2 patch-image
|
||||
tools-y += patchelf pkgconf quilt squashfskit4 sstrip zip zlib zstd
|
||||
tools-$(BUILD_B43_TOOLS) += b43-tools
|
||||
tools-$(BUILD_ISL) += isl
|
||||
@@ -57,6 +57,7 @@ $(curdir)/libressl/compile := $(curdir)/pkgconf/compile
|
||||
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
|
||||
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
|
||||
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
|
||||
+$(curdir)/meson/compile := $(curdir)/ninja/compile
|
||||
$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile
|
||||
$(curdir)/mkimage/compile += $(curdir)/libressl/compile
|
||||
$(curdir)/mklibs/compile := $(curdir)/libtool/compile
|
202
root/include/kernel-defaults.mk
Normal file
202
root/include/kernel-defaults.mk
Normal file
|
@ -0,0 +1,202 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
|
||||
ifdef CONFIG_STRIP_KERNEL_EXPORTS
|
||||
KERNEL_MAKEOPTS_IMAGE += \
|
||||
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
|
||||
endif
|
||||
|
||||
INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt
|
||||
|
||||
ifneq (,$(KERNEL_CC))
|
||||
KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
|
||||
endif
|
||||
|
||||
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
|
||||
|
||||
# defined in quilt.mk
|
||||
Kernel/Patch:=$(Kernel/Patch/Default)
|
||||
|
||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||
LINUX_CAT:=xzcat
|
||||
else
|
||||
LINUX_CAT:=gzip -dc
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Kernel/Patch)
|
||||
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
|
||||
endef
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
endef
|
||||
endif
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
mkdir -p $(KERNEL_BUILD_DIR)
|
||||
if [ -d $(LINUX_DIR) ]; then \
|
||||
rmdir $(LINUX_DIR); \
|
||||
fi
|
||||
ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
|
||||
if [ -d $(LINUX_DIR)/user_headers ]; then \
|
||||
rm -rf $(LINUX_DIR)/user_headers; \
|
||||
fi
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_CPIO)),"")
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v -e INITRAMFS -e CONFIG_RD_ -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE="$(strip $(TARGET_DIR) $(INITRAMFS_EXTRA_FILES))"' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE="$(call qstrip,$(CONFIG_EXTERNAL_CPIO))"' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
define Kernel/SetInitramfs
|
||||
rm -f $(LINUX_DIR)/.config.prev
|
||||
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
||||
$(call Kernel/SetInitramfs/PreConfigure)
|
||||
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config
|
||||
else
|
||||
echo "# CONFIG_INITRAMFS_FORCE is not set" >> $(LINUX_DIR)/.config
|
||||
endif
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),CONFIG_INITRAMFS_COMPRESSION_LZMA=y\nCONFIG_RD_LZMA=y,# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set\n# CONFIG_RD_LZMA is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),CONFIG_INITRAMFS_COMPRESSION_LZ4=y\nCONFIG_RD_LZ4=y,# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_RD_LZ4 is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_ZSTD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
endif
|
||||
|
||||
define Kernel/SetNoInitramfs
|
||||
mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
|
||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
|
||||
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
|
||||
echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set
|
||||
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config.set
|
||||
endef
|
||||
|
||||
define Kernel/Configure/Default
|
||||
rm -f $(LINUX_DIR)/localversion
|
||||
$(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
|
||||
# copy CONFIG_KERNEL_* settings over to .config.target
|
||||
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> $(LINUX_DIR)/.config.target
|
||||
$(SCRIPT_DIR)/package-metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
|
||||
$(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set
|
||||
$(call Kernel/SetNoInitramfs)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/modules
|
||||
cmp -s $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev || { \
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
|
||||
}
|
||||
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
||||
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic
|
||||
endef
|
||||
|
||||
define Kernel/Configure/Initramfs
|
||||
$(call Kernel/SetInitramfs)
|
||||
endef
|
||||
|
||||
define Kernel/CompileModules/Default
|
||||
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
||||
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
# If .config did not change, use the previous timestamp to avoid package rebuilds
|
||||
cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \
|
||||
mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \
|
||||
$(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save
|
||||
endef
|
||||
|
||||
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
|
||||
|
||||
# AMD64 shares the location with x86
|
||||
ifeq ($(LINUX_KARCH),x86_64)
|
||||
IMAGES_DIR:=../../x86/boot
|
||||
endif
|
||||
|
||||
define Kernel/CopyImage
|
||||
cmp -s $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug || { \
|
||||
$(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1); \
|
||||
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \
|
||||
$(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug; \
|
||||
$(foreach k, \
|
||||
$(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out vmlinux dtbs,$(KERNELNAME))), \
|
||||
$(CP) $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/$(IMAGES_DIR)/$(k) $(KERNEL_BUILD_DIR)/$(k)$(1); \
|
||||
) \
|
||||
}
|
||||
endef
|
||||
|
||||
# Always add "modules" so a proper Module.symvers file is written that
|
||||
# also contains symbols from the kernel modules. Without these symbols
|
||||
# external packages that depend on exported symbols from kernel modules
|
||||
# will fail to build.
|
||||
define Kernel/CompileImage/Default
|
||||
rm -f $(TARGET_DIR)/init
|
||||
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
$(call Kernel/CopyImage)
|
||||
endef
|
||||
|
||||
# Here as well, always add "modules", see comment above.
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
define Kernel/CompileImage/Initramfs
|
||||
$(call Kernel/Configure/Initramfs)
|
||||
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
endif
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
endif
|
||||
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
$(call Kernel/CopyImage,-initramfs)
|
||||
endef
|
||||
else
|
||||
define Kernel/CompileImage/Initramfs
|
||||
endef
|
||||
endif
|
||||
|
||||
define Kernel/Clean/Default
|
||||
rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.configured
|
||||
rm -f $(LINUX_KERNEL)
|
||||
$(_SINGLE)$(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
|
||||
endef
|
|
@ -6,8 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
|||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .203
|
||||
LINUX_VERSION-5.15 = .63
|
||||
LINUX_VERSION-5.4 = .225
|
||||
LINUX_VERSION-5.15 = .86
|
||||
LINUX_VERSION-6.1 = .10
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
|
||||
LINUX_KERNEL_HASH-5.4.182 = b2f1201f64f010e9e3c85d6f303a559a7944a80a0244a86b8f5035bd23f1f40d
|
||||
|
@ -21,6 +22,15 @@ LINUX_KERNEL_HASH-5.15.29 = 5905e684602c47ae95746d4003cb834335e5451aca4ac7c3013f
|
|||
LINUX_KERNEL_HASH-5.15.36 = 36345db17a937c197c72ca9c7f34c262b3a12f927c237ff7770193014e29c690
|
||||
LINUX_KERNEL_HASH-5.15.50 = 554d507d37a23810fe8c83912761e4a4f73c40794bc685ff7ca98042fe1bd70f
|
||||
LINUX_KERNEL_HASH-5.15.63 = 6dd3cd1e5a629d0002bc6c6ec7e8ea96710104f38664122dd56c83dfd4eb7341
|
||||
LINUX_KERNEL_HASH-5.15.77 = 142f841f33796a84c62fae2f2b96d2120bd8bbf9e0aac4ce157692cdb0afe9f9
|
||||
LINUX_KERNEL_HASH-5.15.78 = 0db99f7347a38c27b8c155f3c9c8b260011aea0a4ded85ee95e6095b1e69a499
|
||||
LINUX_KERNEL_HASH-6.1 = 2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb
|
||||
LINUX_KERNEL_HASH-5.15.83 = 40590843c04c85789105157f69efbd71a4efe87ae2568e40d1b7258c3f747ff3
|
||||
LINUX_KERNEL_HASH-6.1.3 = 6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317
|
||||
LINUX_KERNEL_HASH-5.4.225 = 59f596f6714317955cf481590babcf015aff2bc1900bd8e8dc8f7af73bc560aa
|
||||
LINUX_KERNEL_HASH-5.15.86 = 80fcd9efa443502de9e2750f6dfb59e8de43a5d87a6d2be09dca748d79b5f2ee
|
||||
LINUX_KERNEL_HASH-6.1.8 = b60bb53ab8ba370a270454b11e93d41af29126fc72bd6ede517673e2e57b816d
|
||||
LINUX_KERNEL_HASH-6.1.10 = 0be2919ba91cf5873a4cb4d429de78aad0469120d624e333a43b4b011d74d19d
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
|
146
root/include/meson.mk
Normal file
146
root/include/meson.mk
Normal file
|
@ -0,0 +1,146 @@
|
|||
# To build your package using meson:
|
||||
#
|
||||
# include $(INCLUDE_DIR)/meson.mk
|
||||
# MESON_ARGS+=-Dfoo -Dbar=baz
|
||||
#
|
||||
# To pass additional environment variables to meson:
|
||||
#
|
||||
# MESON_VARS+=FOO=bar
|
||||
#
|
||||
# Default configure/compile/install targets are provided, but can be
|
||||
# overwritten if required:
|
||||
#
|
||||
# define Build/Configure
|
||||
# $(call Build/Configure/Meson)
|
||||
# ...
|
||||
# endef
|
||||
#
|
||||
# same for Build/Compile and Build/Install
|
||||
#
|
||||
# Host packages are built in the same fashion, just use these vars instead:
|
||||
#
|
||||
# MESON_HOST_ARGS+=-Dfoo -Dbar=baz
|
||||
# MESON_HOST_VARS+=FOO=bar
|
||||
|
||||
MESON_DIR:=$(STAGING_DIR_HOST)/lib/meson
|
||||
|
||||
MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/openwrt-build
|
||||
MESON_HOST_VARS:=
|
||||
MESON_HOST_ARGS:=
|
||||
|
||||
MESON_BUILD_DIR:=$(PKG_BUILD_DIR)/openwrt-build
|
||||
MESON_VARS:=
|
||||
MESON_ARGS:=
|
||||
|
||||
ifneq ($(findstring i386,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="x86"
|
||||
else ifneq ($(findstring powerpc64,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="ppc64"
|
||||
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="ppc"
|
||||
else ifneq ($(findstring mips64el,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="mips64"
|
||||
else ifneq ($(findstring mipsel,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="mips"
|
||||
else ifneq ($(findstring armeb,$(CONFIG_ARCH)),)
|
||||
MESON_ARCH:="arm"
|
||||
else
|
||||
MESON_ARCH:=$(CONFIG_ARCH)
|
||||
endif
|
||||
|
||||
# this is undefined for just x64_64
|
||||
ifeq ($(origin CPU_TYPE),undefined)
|
||||
MESON_CPU:="generic"
|
||||
else
|
||||
MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
|
||||
endif
|
||||
|
||||
define Meson
|
||||
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1)
|
||||
endef
|
||||
|
||||
define Meson/CreateNativeFile
|
||||
$(STAGING_DIR_HOST)/bin/sed \
|
||||
-e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \
|
||||
-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
|
||||
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
|
||||
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
|
||||
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
|
||||
-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@PREFIX@|$(HOST_BUILD_PREFIX)|" \
|
||||
< $(MESON_DIR)/openwrt-native.txt.in \
|
||||
> $(1)
|
||||
endef
|
||||
|
||||
define Meson/CreateCrossFile
|
||||
$(STAGING_DIR_HOST)/bin/sed \
|
||||
-e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \
|
||||
-e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \
|
||||
-e "s|@AR@|$(TARGET_AR)|" \
|
||||
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
|
||||
-e "s|@NM@|$(TARGET_NM)|" \
|
||||
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
|
||||
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
|
||||
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
|
||||
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@ARCH@|$(MESON_ARCH)|" \
|
||||
-e "s|@CPU@|$(MESON_CPU)|" \
|
||||
-e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \
|
||||
< $(MESON_DIR)/openwrt-cross.txt.in \
|
||||
> $(1)
|
||||
endef
|
||||
|
||||
define Host/Configure/Meson
|
||||
$(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt)
|
||||
$(call Meson, \
|
||||
--native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
|
||||
$(MESON_HOST_ARGS) \
|
||||
$(MESON_HOST_BUILD_DIR) \
|
||||
$(MESON_HOST_BUILD_DIR)/.., \
|
||||
$(MESON_HOST_VARS))
|
||||
endef
|
||||
|
||||
define Host/Compile/Meson
|
||||
+$(NINJA) -C $(MESON_HOST_BUILD_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Host/Install/Meson
|
||||
+$(NINJA) -C $(MESON_HOST_BUILD_DIR) install
|
||||
endef
|
||||
|
||||
define Host/Uninstall/Meson
|
||||
+$(NINJA) -C $(MESON_HOST_BUILD_DIR) uninstall || true
|
||||
endef
|
||||
|
||||
define Build/Configure/Meson
|
||||
$(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt)
|
||||
$(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt)
|
||||
$(call Meson, \
|
||||
--buildtype plain \
|
||||
--native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
|
||||
--cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \
|
||||
$(MESON_ARGS) \
|
||||
$(MESON_BUILD_DIR) \
|
||||
$(MESON_BUILD_DIR)/.., \
|
||||
$(MESON_VARS))
|
||||
endef
|
||||
|
||||
define Build/Compile/Meson
|
||||
+$(NINJA) -C $(MESON_BUILD_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Build/Install/Meson
|
||||
+DESTDIR="$(PKG_INSTALL_DIR)" $(NINJA) -C $(MESON_BUILD_DIR) install
|
||||
endef
|
||||
|
||||
Host/Configure=$(call Host/Configure/Meson)
|
||||
Host/Compile=$(call Host/Compile/Meson)
|
||||
Host/Install=$(call Host/Install/Meson)
|
||||
Host/Uninstall=$(call Host/Uninstall/Meson)
|
||||
Build/Configure=$(call Build/Configure/Meson)
|
||||
Build/Compile=$(call Build/Compile/Meson)
|
||||
Build/Install=$(call Build/Install/Meson)
|
|
@ -34,6 +34,6 @@
|
|||
*/
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
55860.com QQ 175338181 weixin:xinyangla
|
||||
55860.com QQ 175338101 weixin:xinyangla
|
||||
(%C)
|
||||
------------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-rockchip-vendor
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
|
||||
PKG_SOURCE_DATE:=2022-08-01
|
||||
PKG_SOURCE_VERSION:=b0c100f1a260d807df450019774993c761beb79d
|
||||
PKG_MIRROR_HASH:=17723ac8f6ec446c759444ee29ba4fe544cebb3785e26d8e10c91c54b9df3f1a
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
MAKE_PATH:=$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/arm-trusted-firmware-rockchip-vendor
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware for Rockchip
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3328
|
||||
$(Package/arm-trusted-firmware-rockchip-vendor)
|
||||
DEPENDS:=@TARGET_rockchip_armv8
|
||||
VARIANT:=rk3328
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3399
|
||||
$(Package/arm-trusted-firmware-rockchip-vendor)
|
||||
DEPENDS:=@TARGET_rockchip_armv8
|
||||
VARIANT:=rk3399
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3568
|
||||
$(Package/arm-trusted-firmware-rockchip-vendor)
|
||||
DEPENDS:=@TARGET_rockchip_armv8
|
||||
VARIANT:=rk3568
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3588
|
||||
$(Package/arm-trusted-firmware-rockchip-vendor)
|
||||
DEPENDS:=@TARGET_rockchip_armv8
|
||||
VARIANT:=rk3588
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(SED) 's,$$$$(PKG_BUILD_DIR),$(PKG_BUILD_DIR),g' $(PKG_BUILD_DIR)/trust.ini
|
||||
$(SED) 's,$$$$(VARIANT),$(BUILD_VARIANT),g' $(PKG_BUILD_DIR)/trust.ini
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(CURDIR)/pack-firmware.sh build $(BUILD_VARIANT) '$(PKG_BUILD_DIR)'
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(CURDIR)/pack-firmware.sh install $(BUILD_VARIANT) '$(PKG_BUILD_DIR)' '$(STAGING_DIR_IMAGE)'
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3328/install
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3399/install
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3568/install
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rk3588/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-rk3328))
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-rk3399))
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-rk3568))
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-rk3588))
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
ACTION="$1"
|
||||
VARIANT="$2"
|
||||
PKG_BUILD_DIR="$3"
|
||||
STAGING_DIR_IMAGE="$4"
|
||||
|
||||
case "$VARIANT" in
|
||||
"rk3328")
|
||||
ATF="rk33/rk322xh_bl31_v1.49.elf"
|
||||
DDR="rk33/rk3328_ddr_333MHz_v1.19.bin"
|
||||
LOADER="rk33/rk322xh_miniloader_v2.50.bin"
|
||||
;;
|
||||
"rk3399")
|
||||
ATF="rk33/rk3399_bl31_v1.35.elf"
|
||||
DDR="rk33/rk3399_ddr_800MHz_v1.27.bin"
|
||||
LOADER="rk33/rk3399_miniloader_v1.26.bin"
|
||||
;;
|
||||
"rk3568")
|
||||
ATF="rk35/rk3568_bl31_v1.28.elf"
|
||||
DDR="rk35/rk3568_ddr_1560MHz_v1.13.bin"
|
||||
;;
|
||||
"rk3588")
|
||||
ATF="rk35/rk3588_bl31_v1.27.elf"
|
||||
DDR="rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin"
|
||||
;;
|
||||
*)
|
||||
echo -e "Not compatible with your platform: $VARIANT."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
set -x
|
||||
if [ "$ACTION" == "build" ]; then
|
||||
case "$VARIANT" in
|
||||
rk33*)
|
||||
"$PKG_BUILD_DIR"/tools/mkimage -n "$VARIANT" -T "rksd" -d "$PKG_BUILD_DIR/bin/$DDR" "$PKG_BUILD_DIR/$VARIANT-idbloader.bin"
|
||||
cat "$PKG_BUILD_DIR/bin/$LOADER" >> "$PKG_BUILD_DIR/$VARIANT-idbloader.bin"
|
||||
"$PKG_BUILD_DIR/tools/trust_merger" --replace "bl31.elf" "$PKG_BUILD_DIR/bin/$ATF" "$PKG_BUILD_DIR/trust.ini"
|
||||
;;
|
||||
esac
|
||||
elif [ "$ACTION" == "install" ]; then
|
||||
mkdir -p "$STAGING_DIR_IMAGE"
|
||||
cp -fp "$PKG_BUILD_DIR/bin/$ATF" "$STAGING_DIR_IMAGE"/
|
||||
case "$VARIANT" in
|
||||
rk33*)
|
||||
cp -fp "$PKG_BUILD_DIR/tools/loaderimage" "$STAGING_DIR_IMAGE"/
|
||||
cp -fp "$PKG_BUILD_DIR/$VARIANT-idbloader.bin" "$STAGING_DIR_IMAGE"/
|
||||
cp -fp "$PKG_BUILD_DIR/$VARIANT-trust.bin" "$STAGING_DIR_IMAGE"/
|
||||
;;
|
||||
rk35*)
|
||||
cp -fp "$PKG_BUILD_DIR/bin/$DDR" "$STAGING_DIR_IMAGE"/
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo -e "Unknown operation: $ACTION."
|
||||
exit 1
|
||||
fi
|
||||
set +x
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[VERSION]
|
||||
MAJOR=1
|
||||
MINOR=0
|
||||
[BL30_OPTION]
|
||||
SEC=0
|
||||
[BL31_OPTION]
|
||||
SEC=1
|
||||
PATH=bl31.elf
|
||||
ADDR=0x10000
|
||||
[BL32_OPTION]
|
||||
SEC=0
|
||||
[BL33_OPTION]
|
||||
SEC=0
|
||||
[OUTPUT]
|
||||
PATH=$(PKG_BUILD_DIR)/$(VARIANT)-trust.bin
|
49
root/package/boot/arm-trusted-firmware-rockchip/Makefile
Normal file
49
root/package/boot/arm-trusted-firmware-rockchip/Makefile
Normal file
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# Copyright (C) 2020 Tobias Maedel <openwrt@tbspace.de>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-rockchip
|
||||
PKG_VERSION:=2.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=atf-v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/atf-builds/atf/releases/download/v$(PKG_VERSION)/atf-v$(PKG_VERSION).tar.gz?
|
||||
PKG_HASH:=bf352298743aed594cf2958dd588e06ab6713fc514bb6f809bf55a85a87134c1
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=license.md
|
||||
|
||||
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
|
||||
|
||||
MAKE_PATH:=$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/arm-trusted-firmware-rockchip
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware for Rockchip
|
||||
DEPENDS:=@TARGET_rockchip_armv8
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) -p $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/rk*.elf $(STAGING_DIR_IMAGE)/
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-rockchip/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-rockchip))
|
|
@ -5,10 +5,10 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2021.01
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=2022.07
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
|
||||
PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e
|
||||
|
||||
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
|
||||
|
||||
|
@ -24,20 +24,86 @@ endef
|
|||
|
||||
# RK3328 boards
|
||||
|
||||
define U-Boot/nanopi-r2c-rk3328
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R2C
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2c
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r2c-rk3328:arm-trusted-firmware-rk3328
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk322xh_bl31_v1.49.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r2s-rk3328
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R2S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2s
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:arm-trusted-firmware-rockchip
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
|
||||
ATF:=rk3328_bl31.elf
|
||||
OF_PLATDATA:=$(1)
|
||||
friendlyarm_nanopi-r2s \
|
||||
friendlyarm_nanopi-neo3
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:arm-trusted-firmware-rk3328
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk322xh_bl31_v1.49.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi-r1-plus-rk3328
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Orange Pi R1 Plus
|
||||
BUILD_DEVICES:= \
|
||||
xunlong_orangepi-r1-plus
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi-r1-plus-rk3328:arm-trusted-firmware-rk3328
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk322xh_bl31_v1.49.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi-r1-plus-lts-rk3328
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Orange Pi R1 Plus LTS
|
||||
BUILD_DEVICES:= \
|
||||
xunlong_orangepi-r1-plus-lts
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi-r1-plus-lts-rk3328:arm-trusted-firmware-rk3328
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk322xh_bl31_v1.49.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
|
||||
# RK3399 boards
|
||||
|
||||
define U-Boot/guangmiao-g4c-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=GuangMiao G4C
|
||||
BUILD_DEVICES:= \
|
||||
sharevdi_guangmiao-g4c
|
||||
DEPENDS:=+PACKAGE_u-boot-guangmiao-g4c-rk3399:arm-trusted-firmware-rockchip
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
|
||||
ATF:=rk3399_bl31.elf
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4s-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R4S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4s
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r4s-rk3399:arm-trusted-firmware-rk3399
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk3399_bl31_v1.35.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4se-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R4SE
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4se
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r4se-rk3399:arm-trusted-firmware-rk3399
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk3399_bl31_v1.35.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/rock-pi-4-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Rock Pi 4
|
||||
|
@ -58,10 +124,152 @@ define U-Boot/rockpro64-rk3399
|
|||
ATF:=rk3399_bl31.elf
|
||||
endef
|
||||
|
||||
define U-Boot/rongpin-king3399-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Rongpin King3399
|
||||
BUILD_DEVICES:= \
|
||||
rongpin_king3399
|
||||
DEPENDS:=+PACKAGE_u-boot-rongpin-king3399-rk3399:arm-trusted-firmware-rk3399
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk3399_bl31_v1.35.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/rocktech-mpc1903-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Rocktech MPC1903
|
||||
BUILD_DEVICES:= \
|
||||
rocktech_mpc1903
|
||||
DEPENDS:=+PACKAGE_u-boot-rocktech-mpc1903-rk3399:arm-trusted-firmware-rk3399
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk3399_bl31_v1.35.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
# RK3568 boards
|
||||
|
||||
define U-Boot/mrkaio-m68s-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Mrkaio M68S
|
||||
BUILD_DEVICES:= \
|
||||
ezpro_mrkaio-m68s
|
||||
DEPENDS:=+PACKAGE_u-boot-mrkaio-m68s-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/opc-h68k-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=OPC-H68K Board
|
||||
BUILD_DEVICES:= \
|
||||
hinlink_opc-h66k \
|
||||
hinlink_opc-h68k
|
||||
DEPENDS:=+PACKAGE_u-boot-opc-h68k-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
|
||||
BUILD_DEVICES:= \
|
||||
ariaboard_photonicat
|
||||
DEPENDS:=+PACKAGE_u-boot-photonicat-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/radxa-e25-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Radxa E25
|
||||
BUILD_DEVICES:= \
|
||||
radxa_e25
|
||||
DEPENDS:=+PACKAGE_u-boot-radxa-e25-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/rock-3a-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=ROCK3 Model A
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-3a
|
||||
DEPENDS:=+PACKAGE_u-boot-rock-3a-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/r66s-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=R66S/R68S
|
||||
BUILD_DEVICES:= \
|
||||
fastrhino_r66s \
|
||||
fastrhino_r68s
|
||||
DEPENDS:=+PACKAGE_u-boot-r66s-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/station-p2-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=StationP2
|
||||
BUILD_DEVICES:= \
|
||||
firefly_station-p2
|
||||
DEPENDS:=+PACKAGE_u-boot-station-p2-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/nanopi-r5s-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R5S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r5s
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r5s-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/nanopi-r5c-rk3568
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R5C
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r5c
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r5c-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
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
mrkaio-m68s-rk3568 \
|
||||
opc-h68k-rk3568 \
|
||||
photonicat-rk3568 \
|
||||
radxa-e25-rk3568 \
|
||||
rock-3a-rk3568 \
|
||||
r66s-rk3568 \
|
||||
station-p2-rk3568 \
|
||||
guangmiao-g4c-rk3399 \
|
||||
nanopi-r4s-rk3399 \
|
||||
nanopi-r4se-rk3399 \
|
||||
nanopi-r5s-rk3568 \
|
||||
nanopi-r5c-rk3568 \
|
||||
rock-pi-4-rk3399 \
|
||||
rockpro64-rk3399 \
|
||||
nanopi-r2s-rk3328
|
||||
rongpin-king3399-rk3399 \
|
||||
rocktech-mpc1903-rk3399 \
|
||||
nanopi-r2c-rk3328 \
|
||||
nanopi-r2s-rk3328 \
|
||||
orangepi-r1-plus-rk3328 \
|
||||
orangepi-r1-plus-lts-rk3328
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
|
@ -71,22 +279,23 @@ UBOOT_MAKE_FLAGS += \
|
|||
define Build/Configure
|
||||
$(call Build/Configure/U-Boot)
|
||||
|
||||
ifneq ($(OF_PLATDATA),)
|
||||
mkdir -p $(PKG_BUILD_DIR)/tpl/dts
|
||||
mkdir -p $(PKG_BUILD_DIR)/include/generated
|
||||
|
||||
$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-platdata.c $(PKG_BUILD_DIR)/tpl/dts/dt-platdata.c
|
||||
$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-structs-gen.h $(PKG_BUILD_DIR)/include/generated/dt-structs-gen.h
|
||||
endif
|
||||
|
||||
$(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
|
||||
$(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
|
||||
echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config
|
||||
ifneq ($(DDR),)
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(DDR) $(PKG_BUILD_DIR)/ram_init.bin
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
ifneq ($(USE_RKBIN),)
|
||||
$(STAGING_DIR_IMAGE)/loaderimage --pack --uboot $(PKG_BUILD_DIR)/u-boot-dtb.bin $(PKG_BUILD_DIR)/uboot.img 0x200000
|
||||
$(CP) $(PKG_BUILD_DIR)/uboot.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.img
|
||||
else
|
||||
$(CP) $(PKG_BUILD_DIR)/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
From 9b92a43a4f5acf4cba14fd9d473b3120688532dc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 19 Dec 2021 08:10:24 -0500
|
||||
Subject: [PATCH 01/11] rockchip: rk3568: add boot device detection
|
||||
|
||||
Enable spl to detect which device it was booted from.
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3568/rk3568.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <dm.h>
|
||||
#include <asm/armv8/mmu.h>
|
||||
#include <asm/io.h>
|
||||
+#include <asm/arch-rockchip/bootrom.h>
|
||||
#include <asm/arch-rockchip/grf_rk3568.h>
|
||||
#include <asm/arch-rockchip/hardware.h>
|
||||
#include <dt-bindings/clock/rk3568-cru.h>
|
||||
@@ -23,6 +24,7 @@
|
||||
#define SGRF_SOC_CON4 0x10
|
||||
#define EMMC_HPROT_SECURE_CTRL 0x03
|
||||
#define SDMMC0_HPROT_SECURE_CTRL 0x01
|
||||
+
|
||||
/* PMU_GRF_GPIO0D_IOMUX_L */
|
||||
enum {
|
||||
GPIO0D1_SHIFT = 4,
|
||||
@@ -43,6 +45,12 @@ enum {
|
||||
UART2_IO_SEL_M0 = 0,
|
||||
};
|
||||
|
||||
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
|
||||
+ [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe310000",
|
||||
+ [BROM_BOOTSOURCE_SPINOR] = "/spi@fe300000/flash@0",
|
||||
+ [BROM_BOOTSOURCE_SD] = "/mmc@fe2b0000",
|
||||
+};
|
||||
+
|
||||
static struct mm_region rk3568_mem_map[] = {
|
||||
{
|
||||
.virt = 0x0UL,
|
|
@ -0,0 +1,52 @@
|
|||
From 09d877cf076cbb67c79054e12bbb7c63a91faa71 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 19 Dec 2021 08:11:56 -0500
|
||||
Subject: [PATCH 02/11] rockchip: rk3568: enable automatic power savings
|
||||
|
||||
Enable automatic clock gating, solves the 7c temperature difference on
|
||||
SoQuartz.
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3568/rk3568.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
--- a/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
@@ -25,6 +25,15 @@
|
||||
#define EMMC_HPROT_SECURE_CTRL 0x03
|
||||
#define SDMMC0_HPROT_SECURE_CTRL 0x01
|
||||
|
||||
+#define PMU_BASE_ADDR 0xfdd90000
|
||||
+#define PMU_NOC_AUTO_CON0 (0x70)
|
||||
+#define PMU_NOC_AUTO_CON1 (0x74)
|
||||
+#define EDP_PHY_GRF_BASE 0xfdcb0000
|
||||
+#define EDP_PHY_GRF_CON0 (EDP_PHY_GRF_BASE + 0x00)
|
||||
+#define EDP_PHY_GRF_CON10 (EDP_PHY_GRF_BASE + 0x28)
|
||||
+#define CPU_GRF_BASE 0xfdc30000
|
||||
+#define GRF_CORE_PVTPLL_CON0 (0x10)
|
||||
+
|
||||
/* PMU_GRF_GPIO0D_IOMUX_L */
|
||||
enum {
|
||||
GPIO0D1_SHIFT = 4,
|
||||
@@ -99,6 +108,20 @@ void board_debug_uart_init(void)
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
+ /*
|
||||
+ * When perform idle operation, corresponding clock can
|
||||
+ * be opened or gated automatically.
|
||||
+ */
|
||||
+ writel(0xffffffff, PMU_BASE_ADDR + PMU_NOC_AUTO_CON0);
|
||||
+ writel(0x000f000f, PMU_BASE_ADDR + PMU_NOC_AUTO_CON1);
|
||||
+
|
||||
+ /* Disable eDP phy by default */
|
||||
+ writel(0x00070007, EDP_PHY_GRF_CON10);
|
||||
+ writel(0x0ff10ff1, EDP_PHY_GRF_CON0);
|
||||
+
|
||||
+ /* Set core pvtpll ring length */
|
||||
+ writel(0x00ff002b, CPU_GRF_BASE + GRF_CORE_PVTPLL_CON0);
|
||||
+
|
||||
/* Set the emmc sdmmc0 to secure */
|
||||
rk_clrreg(SGRF_BASE + SGRF_SOC_CON4, (EMMC_HPROT_SECURE_CTRL << 11
|
||||
| SDMMC0_HPROT_SECURE_CTRL << 4));
|
|
@ -1,32 +0,0 @@
|
|||
From 55273cf6079ddd3b006da69f0113c2c66c03f17e Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Tue, 14 Jul 2020 22:44:22 +0200
|
||||
Subject: [PATCH] spl: remove dtoc of-pdata generation
|
||||
|
||||
Remove the dtoc of-pdata generation. This generation is dependant on
|
||||
libpython-dev. As OpenWrt does not ship with this dependency, use
|
||||
pre-generated pdata files and remove the generation from the
|
||||
build-process.
|
||||
|
||||
This only affects RK3328 boards.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
scripts/Makefile.spl | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
--- a/scripts/Makefile.spl
|
||||
+++ b/scripts/Makefile.spl
|
||||
@@ -321,12 +321,6 @@ PHONY += dts_dir
|
||||
dts_dir:
|
||||
$(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts)
|
||||
|
||||
-include/generated/dt-structs-gen.h: $(obj)/$(SPL_BIN).dtb dts_dir FORCE
|
||||
- $(call if_changed,dtoch)
|
||||
-
|
||||
-$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir FORCE
|
||||
- $(call if_changed,dtocc)
|
||||
-
|
||||
ifdef CONFIG_SAMSUNG
|
||||
ifdef CONFIG_VAR_SIZE_SPL
|
||||
VAR_SIZE_PARAM = --vs
|
|
@ -0,0 +1,47 @@
|
|||
From ddbcec939789d1f7264134b3628ffb649ec88168 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 19 Dec 2021 08:20:33 -0500
|
||||
Subject: [PATCH 03/11] Makefile: rockchip: HACK: build rk3568 images
|
||||
|
||||
This is a hack to build rk3568 images.
|
||||
It seems makefile can't cope with the format mkimage expects for
|
||||
multiple file entries, so hack around the situation.
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
Makefile | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1047,6 +1047,9 @@ quiet_cmd_mkimage = MKIMAGE $@
|
||||
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
|
||||
>$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
|
||||
|
||||
+cmd_mkimage_combined = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $(COMBINED_FILE):$< $@ \
|
||||
+ >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
|
||||
+
|
||||
quiet_cmd_mkfitimage = MKIMAGE $@
|
||||
cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) \
|
||||
-f $(U_BOOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@ \
|
||||
@@ -1491,6 +1494,7 @@ u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_
|
||||
ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
|
||||
|
||||
# TPL + SPL
|
||||
+ifneq ($(CONFIG_SYS_SOC),$(filter $(CONFIG_SYS_SOC),"rk3568" "rk3566"))
|
||||
ifeq ($(CONFIG_SPL)$(CONFIG_TPL),yy)
|
||||
MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T rksd
|
||||
tpl/u-boot-tpl-rockchip.bin: tpl/u-boot-tpl.bin FORCE
|
||||
@@ -1502,6 +1506,12 @@ MKIMAGEFLAGS_idbloader.img = -n $(CONFIG
|
||||
idbloader.img: spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
endif
|
||||
+else
|
||||
+MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T rksd
|
||||
+COMBINED_FILE = ram_init.bin
|
||||
+idbloader.img: spl/u-boot-spl.bin FORCE
|
||||
+ $(call if_changed,mkimage_combined)
|
||||
+endif
|
||||
|
||||
ifeq ($(CONFIG_ARM64),y)
|
||||
OBJCOPYFLAGS_u-boot-rockchip.bin = -I binary -O binary \
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,50 @@
|
|||
From 01e8a38985a90043abddc5c5bcd049c74bb29a53 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 19 Dec 2021 18:52:18 -0500
|
||||
Subject: [PATCH 05/11] rockchip: rk356x: HACK: fix sdmmc support
|
||||
|
||||
HACK: lock mmc0 to initial frequency and disable dw-mmc control of power
|
||||
line.
|
||||
|
||||
The sdmmc on quartz64-a is powered by the sdmmc0 power line, which is
|
||||
active low.
|
||||
Even though it is set as a gpio, it still seems to be triggered by the
|
||||
dw-mmc driver toggling the power line.
|
||||
Downstream fixes this by setting this to "0" instead of "1" using
|
||||
kconfigs.
|
||||
|
||||
Also, for some reason the controller will only operate at initial
|
||||
frequencies.
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi | 4 +++-
|
||||
drivers/mmc/dw_mmc.c | 3 ++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
@@ -13,8 +13,10 @@
|
||||
};
|
||||
|
||||
&sdmmc0 {
|
||||
+ max-frequency = <400000>;
|
||||
+ bus-width = <4>;
|
||||
u-boot,dm-spl;
|
||||
- status = "okay";
|
||||
+ u-boot,spl-fifo-mode;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
--- a/drivers/mmc/dw_mmc.c
|
||||
+++ b/drivers/mmc/dw_mmc.c
|
||||
@@ -529,7 +529,8 @@ static int dwmci_init(struct mmc *mmc)
|
||||
if (host->board_init)
|
||||
host->board_init(host);
|
||||
|
||||
- dwmci_writel(host, DWMCI_PWREN, 1);
|
||||
+// dwmci_writel(host, DWMCI_PWREN, 1);
|
||||
+ dwmci_writel(host, DWMCI_PWREN, 0);
|
||||
|
||||
if (!dwmci_wait_reset(host, DWMCI_RESET_ALL)) {
|
||||
debug("%s[%d] Fail-reset!!\n", __func__, __LINE__);
|
|
@ -0,0 +1,214 @@
|
|||
From 9f623c0e96fc7c3b5c9b7a81f0a3017c47033ec7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 19 Dec 2021 18:57:36 -0500
|
||||
Subject: [PATCH 06/11] rockchip: rk356x: add quartz64-a board
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3568/Kconfig | 12 ++-
|
||||
board/pine64/quartz64-a-rk3566/Kconfig | 15 ++++
|
||||
board/pine64/quartz64-a-rk3566/Makefile | 4 +
|
||||
.../quartz64-a-rk3566/quartz64-a-rk3566.c | 1 +
|
||||
configs/quartz64-a-rk3566_defconfig | 77 +++++++++++++++++++
|
||||
include/configs/quartz64-a-rk3566.h | 14 ++++
|
||||
include/dt-bindings/power/rk3568-power.h | 32 ++++++++
|
||||
7 files changed, 154 insertions(+), 1 deletion(-)
|
||||
create mode 100644 board/pine64/quartz64-a-rk3566/Kconfig
|
||||
create mode 100644 board/pine64/quartz64-a-rk3566/Makefile
|
||||
create mode 100644 board/pine64/quartz64-a-rk3566/quartz64-a-rk3566.c
|
||||
create mode 100644 configs/quartz64-a-rk3566_defconfig
|
||||
create mode 100644 include/configs/quartz64-a-rk3566.h
|
||||
create mode 100644 include/dt-bindings/power/rk3568-power.h
|
||||
|
||||
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
@@ -1,11 +1,20 @@
|
||||
if ROCKCHIP_RK3568
|
||||
|
||||
+choice
|
||||
+ prompt "RK3568/RK3566 board select"
|
||||
+
|
||||
config TARGET_EVB_RK3568
|
||||
bool "RK3568 evaluation board"
|
||||
- select BOARD_LATE_INIT
|
||||
help
|
||||
RK3568 EVB is a evaluation board for Rockchp RK3568.
|
||||
|
||||
+config TARGET_QUARTZ64_A_RK3566
|
||||
+ bool "Quartz64 Model A RK3566 development board"
|
||||
+ help
|
||||
+ Quartz64 Model A RK3566 is a development board from Pine64.
|
||||
+
|
||||
+endchoice
|
||||
+
|
||||
config ROCKCHIP_BOOT_MODE_REG
|
||||
default 0xfdc20200
|
||||
|
||||
@@ -19,5 +28,6 @@ config SYS_MALLOC_F_LEN
|
||||
default 0x2000
|
||||
|
||||
source "board/rockchip/evb_rk3568/Kconfig"
|
||||
+source "board/pine64/quartz64-a-rk3566/Kconfig"
|
||||
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/board/pine64/quartz64-a-rk3566/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+if TARGET_QUARTZ64_A_RK3566
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "quartz64-a-rk3566"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "pine64"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "quartz64-a-rk3566"
|
||||
+
|
||||
+config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
+ def_bool y
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/pine64/quartz64-a-rk3566/Makefile
|
||||
@@ -0,0 +1,4 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+
|
||||
+obj-y += quartz64-a-rk3566.o
|
||||
--- /dev/null
|
||||
+++ b/board/pine64/quartz64-a-rk3566/quartz64-a-rk3566.c
|
||||
@@ -0,0 +1 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
--- /dev/null
|
||||
+++ b/configs/quartz64-a-rk3566_defconfig
|
||||
@@ -0,0 +1,77 @@
|
||||
+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="rk3566-quartz64-a"
|
||||
+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_QUARTZ64_A_RK3566=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_DEFAULT_FDT_FILE="rockchip/rk3566-quartz64-a.dtb"
|
||||
+# 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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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_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_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_ROCKCHIP_GPIO=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_ERRNO_STR=y
|
||||
--- /dev/null
|
||||
+++ b/include/configs/quartz64-a-rk3566.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+
|
||||
+#ifndef __QUARTZ64_A_RK3566_H
|
||||
+#define __QUARTZ64_A_RK3566_H
|
||||
+
|
||||
+#include <configs/rk3568_common.h>
|
||||
+
|
||||
+#define CONFIG_SUPPORT_EMMC_RPMB
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
+
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/include/dt-bindings/power/rk3568-power.h
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+#ifndef __DT_BINDINGS_POWER_RK3568_POWER_H__
|
||||
+#define __DT_BINDINGS_POWER_RK3568_POWER_H__
|
||||
+
|
||||
+/* VD_CORE */
|
||||
+#define RK3568_PD_CPU_0 0
|
||||
+#define RK3568_PD_CPU_1 1
|
||||
+#define RK3568_PD_CPU_2 2
|
||||
+#define RK3568_PD_CPU_3 3
|
||||
+#define RK3568_PD_CORE_ALIVE 4
|
||||
+
|
||||
+/* VD_PMU */
|
||||
+#define RK3568_PD_PMU 5
|
||||
+
|
||||
+/* VD_NPU */
|
||||
+#define RK3568_PD_NPU 6
|
||||
+
|
||||
+/* VD_GPU */
|
||||
+#define RK3568_PD_GPU 7
|
||||
+
|
||||
+/* VD_LOGIC */
|
||||
+#define RK3568_PD_VI 8
|
||||
+#define RK3568_PD_VO 9
|
||||
+#define RK3568_PD_RGA 10
|
||||
+#define RK3568_PD_VPU 11
|
||||
+#define RK3568_PD_CENTER 12
|
||||
+#define RK3568_PD_RKVDEC 13
|
||||
+#define RK3568_PD_RKVENC 14
|
||||
+#define RK3568_PD_PIPE 15
|
||||
+#define RK3568_PD_LOGIC_ALIVE 16
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,755 @@
|
|||
From 3a4d973a743bc76cc734db9616f9053f45fa922f Mon Sep 17 00:00:00 2001
|
||||
From: Jianqun Xu <jay.xu@rock-chips.com>
|
||||
Date: Thu, 28 May 2020 11:01:58 +0800
|
||||
Subject: [PATCH 07/11] gpio/rockchip: rk_gpio support v2 gpio controller
|
||||
|
||||
The v2 gpio controller add write enable bit for some register,
|
||||
such as data register, data direction register and so on.
|
||||
|
||||
This patch support v2 gpio controller by redefine the read and
|
||||
write operation functions.
|
||||
|
||||
Also adds support for the rk3568 pinctrl device.
|
||||
|
||||
Squash all fixes into this commit.
|
||||
|
||||
Change-Id: I2adbcca06a37c48e6f494b89833cd034ba0dae29
|
||||
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/include/asm/arch-rockchip/gpio.h | 36 ++
|
||||
drivers/gpio/Kconfig | 13 +
|
||||
drivers/gpio/rk_gpio.c | 89 ++++-
|
||||
drivers/pinctrl/rockchip/Makefile | 1 +
|
||||
drivers/pinctrl/rockchip/pinctrl-rk3568.c | 360 ++++++++++++++++++
|
||||
.../pinctrl/rockchip/pinctrl-rockchip-core.c | 11 +-
|
||||
drivers/pinctrl/rockchip/pinctrl-rockchip.h | 42 ++
|
||||
7 files changed, 530 insertions(+), 22 deletions(-)
|
||||
create mode 100644 drivers/pinctrl/rockchip/pinctrl-rk3568.c
|
||||
|
||||
--- a/arch/arm/include/asm/arch-rockchip/gpio.h
|
||||
+++ b/arch/arm/include/asm/arch-rockchip/gpio.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef _ASM_ARCH_GPIO_H
|
||||
#define _ASM_ARCH_GPIO_H
|
||||
|
||||
+#ifndef CONFIG_ROCKCHIP_GPIO_V2
|
||||
struct rockchip_gpio_regs {
|
||||
u32 swport_dr;
|
||||
u32 swport_ddr;
|
||||
@@ -23,6 +24,41 @@ struct rockchip_gpio_regs {
|
||||
u32 ls_sync;
|
||||
};
|
||||
check_member(rockchip_gpio_regs, ls_sync, 0x60);
|
||||
+#else
|
||||
+struct rockchip_gpio_regs {
|
||||
+ u32 swport_dr_l; /* ADDRESS OFFSET: 0x0000 */
|
||||
+ u32 swport_dr_h; /* ADDRESS OFFSET: 0x0004 */
|
||||
+ u32 swport_ddr_l; /* ADDRESS OFFSET: 0x0008 */
|
||||
+ u32 swport_ddr_h; /* ADDRESS OFFSET: 0x000c */
|
||||
+ u32 int_en_l; /* ADDRESS OFFSET: 0x0010 */
|
||||
+ u32 int_en_h; /* ADDRESS OFFSET: 0x0014 */
|
||||
+ u32 int_mask_l; /* ADDRESS OFFSET: 0x0018 */
|
||||
+ u32 int_mask_h; /* ADDRESS OFFSET: 0x001c */
|
||||
+ u32 int_type_l; /* ADDRESS OFFSET: 0x0020 */
|
||||
+ u32 int_type_h; /* ADDRESS OFFSET: 0x0024 */
|
||||
+ u32 int_polarity_l; /* ADDRESS OFFSET: 0x0028 */
|
||||
+ u32 int_polarity_h; /* ADDRESS OFFSET: 0x002c */
|
||||
+ u32 int_bothedge_l; /* ADDRESS OFFSET: 0x0030 */
|
||||
+ u32 int_bothedge_h; /* ADDRESS OFFSET: 0x0034 */
|
||||
+ u32 debounce_l; /* ADDRESS OFFSET: 0x0038 */
|
||||
+ u32 debounce_h; /* ADDRESS OFFSET: 0x003c */
|
||||
+ u32 dbclk_div_en_l; /* ADDRESS OFFSET: 0x0040 */
|
||||
+ u32 dbclk_div_en_h; /* ADDRESS OFFSET: 0x0044 */
|
||||
+ u32 dbclk_div_con; /* ADDRESS OFFSET: 0x0048 */
|
||||
+ u32 reserved004c; /* ADDRESS OFFSET: 0x004c */
|
||||
+ u32 int_status; /* ADDRESS OFFSET: 0x0050 */
|
||||
+ u32 reserved0054; /* ADDRESS OFFSET: 0x0054 */
|
||||
+ u32 int_rawstatus; /* ADDRESS OFFSET: 0x0058 */
|
||||
+ u32 reserved005c; /* ADDRESS OFFSET: 0x005c */
|
||||
+ u32 port_eoi_l; /* ADDRESS OFFSET: 0x0060 */
|
||||
+ u32 port_eoi_h; /* ADDRESS OFFSET: 0x0064 */
|
||||
+ u32 reserved0068[2]; /* ADDRESS OFFSET: 0x0068 */
|
||||
+ u32 ext_port; /* ADDRESS OFFSET: 0x0070 */
|
||||
+ u32 reserved0074; /* ADDRESS OFFSET: 0x0074 */
|
||||
+ u32 ver_id; /* ADDRESS OFFSET: 0x0078 */
|
||||
+};
|
||||
+check_member(rockchip_gpio_regs, ver_id, 0x0078);
|
||||
+#endif
|
||||
|
||||
enum gpio_pu_pd {
|
||||
GPIO_PULL_NORMAL = 0,
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -341,6 +341,19 @@ config ROCKCHIP_GPIO
|
||||
The GPIOs for a device are defined in the device tree with one node
|
||||
for each bank.
|
||||
|
||||
+config ROCKCHIP_GPIO_V2
|
||||
+ bool "Rockchip GPIO driver version 2.0"
|
||||
+ depends on ROCKCHIP_GPIO
|
||||
+ default n
|
||||
+ help
|
||||
+ Support GPIO access on Rockchip SoCs. The GPIOs are arranged into
|
||||
+ a number of banks (different for each SoC type) each with 32 GPIOs.
|
||||
+ The GPIOs for a device are defined in the device tree with one node
|
||||
+ for each bank.
|
||||
+
|
||||
+ Support version 2.0 GPIO controller, which support write enable bits
|
||||
+ for some registers, such as dr, ddr.
|
||||
+
|
||||
config SANDBOX_GPIO
|
||||
bool "Enable sandbox GPIO driver"
|
||||
depends on SANDBOX && DM && DM_GPIO
|
||||
--- a/drivers/gpio/rk_gpio.c
|
||||
+++ b/drivers/gpio/rk_gpio.c
|
||||
@@ -2,12 +2,15 @@
|
||||
/*
|
||||
* (C) Copyright 2015 Google, Inc
|
||||
*
|
||||
- * (C) Copyright 2008-2014 Rockchip Electronics
|
||||
+ * (C) Copyright 2008-2020 Rockchip Electronics
|
||||
* Peter, Software Engineering, <superpeter.cai@gmail.com>.
|
||||
+ * Jianqun Xu, Software Engineering, <jay.xu@rock-chips.com>.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
+#include <dm/of_access.h>
|
||||
+#include <dm/device_compat.h>
|
||||
#include <syscon.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/gpio.h>
|
||||
@@ -17,12 +20,34 @@
|
||||
#include <dm/pinctrl.h>
|
||||
#include <dt-bindings/clock/rk3288-cru.h>
|
||||
|
||||
-enum {
|
||||
- ROCKCHIP_GPIOS_PER_BANK = 32,
|
||||
-};
|
||||
+#include "../pinctrl/rockchip/pinctrl-rockchip.h"
|
||||
|
||||
#define OFFSET_TO_BIT(bit) (1UL << (bit))
|
||||
|
||||
+#ifdef CONFIG_ROCKCHIP_GPIO_V2
|
||||
+#define REG_L(R) (R##_l)
|
||||
+#define REG_H(R) (R##_h)
|
||||
+#define READ_REG(REG) ((readl(REG_L(REG)) & 0xFFFF) | \
|
||||
+ ((readl(REG_H(REG)) & 0xFFFF) << 16))
|
||||
+#define WRITE_REG(REG, VAL) \
|
||||
+{\
|
||||
+ writel(((VAL) & 0xFFFF) | 0xFFFF0000, REG_L(REG)); \
|
||||
+ writel((((VAL) & 0xFFFF0000) >> 16) | 0xFFFF0000, REG_H(REG));\
|
||||
+}
|
||||
+#define CLRBITS_LE32(REG, MASK) WRITE_REG(REG, READ_REG(REG) & ~(MASK))
|
||||
+#define SETBITS_LE32(REG, MASK) WRITE_REG(REG, READ_REG(REG) | (MASK))
|
||||
+#define CLRSETBITS_LE32(REG, MASK, VAL) WRITE_REG(REG, \
|
||||
+ (READ_REG(REG) & ~(MASK)) | (VAL))
|
||||
+
|
||||
+#else
|
||||
+#define READ_REG(REG) readl(REG)
|
||||
+#define WRITE_REG(REG, VAL) writel(VAL, REG)
|
||||
+#define CLRBITS_LE32(REG, MASK) clrbits_le32(REG, MASK)
|
||||
+#define SETBITS_LE32(REG, MASK) setbits_le32(REG, MASK)
|
||||
+#define CLRSETBITS_LE32(REG, MASK, VAL) clrsetbits_le32(REG, MASK, VAL)
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
struct rockchip_gpio_priv {
|
||||
struct rockchip_gpio_regs *regs;
|
||||
struct udevice *pinctrl;
|
||||
@@ -35,7 +60,7 @@ static int rockchip_gpio_direction_input
|
||||
struct rockchip_gpio_priv *priv = dev_get_priv(dev);
|
||||
struct rockchip_gpio_regs *regs = priv->regs;
|
||||
|
||||
- clrbits_le32(®s->swport_ddr, OFFSET_TO_BIT(offset));
|
||||
+ CLRBITS_LE32(®s->swport_ddr, OFFSET_TO_BIT(offset));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -47,8 +72,8 @@ static int rockchip_gpio_direction_outpu
|
||||
struct rockchip_gpio_regs *regs = priv->regs;
|
||||
int mask = OFFSET_TO_BIT(offset);
|
||||
|
||||
- clrsetbits_le32(®s->swport_dr, mask, value ? mask : 0);
|
||||
- setbits_le32(®s->swport_ddr, mask);
|
||||
+ CLRSETBITS_LE32(®s->swport_dr, mask, value ? mask : 0);
|
||||
+ SETBITS_LE32(®s->swport_ddr, mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -68,7 +93,7 @@ static int rockchip_gpio_set_value(struc
|
||||
struct rockchip_gpio_regs *regs = priv->regs;
|
||||
int mask = OFFSET_TO_BIT(offset);
|
||||
|
||||
- clrsetbits_le32(®s->swport_dr, mask, value ? mask : 0);
|
||||
+ CLRSETBITS_LE32(®s->swport_dr, mask, value ? mask : 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -86,8 +111,8 @@ static int rockchip_gpio_get_function(st
|
||||
ret = pinctrl_get_gpio_mux(priv->pinctrl, priv->bank, offset);
|
||||
if (ret)
|
||||
return ret;
|
||||
- is_output = readl(®s->swport_ddr) & OFFSET_TO_BIT(offset);
|
||||
-
|
||||
+ is_output = READ_REG(®s->swport_ddr) & OFFSET_TO_BIT(offset);
|
||||
+
|
||||
return is_output ? GPIOF_OUTPUT : GPIOF_INPUT;
|
||||
#endif
|
||||
}
|
||||
@@ -142,19 +167,49 @@ static int rockchip_gpio_probe(struct ud
|
||||
{
|
||||
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
|
||||
struct rockchip_gpio_priv *priv = dev_get_priv(dev);
|
||||
- char *end;
|
||||
- int ret;
|
||||
+ struct rockchip_pinctrl_priv *pctrl_priv;
|
||||
+ struct rockchip_pin_bank *bank;
|
||||
+ char *end = NULL;
|
||||
+ static int gpio;
|
||||
+ int id = -1, ret;
|
||||
|
||||
priv->regs = dev_read_addr_ptr(dev);
|
||||
ret = uclass_first_device_err(UCLASS_PINCTRL, &priv->pinctrl);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "failed to get pinctrl device %d\n", ret);
|
||||
return ret;
|
||||
+ }
|
||||
+
|
||||
+ pctrl_priv = dev_get_priv(priv->pinctrl);
|
||||
+ if (!pctrl_priv) {
|
||||
+ dev_err(dev, "failed to get pinctrl priv\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
|
||||
- uc_priv->gpio_count = ROCKCHIP_GPIOS_PER_BANK;
|
||||
end = strrchr(dev->name, '@');
|
||||
- priv->bank = trailing_strtoln(dev->name, end);
|
||||
- priv->name[0] = 'A' + priv->bank;
|
||||
- uc_priv->bank_name = priv->name;
|
||||
+ if (end)
|
||||
+ id = trailing_strtoln(dev->name, end);
|
||||
+ else
|
||||
+ dev_read_alias_seq(dev, &id);
|
||||
+
|
||||
+ if (id < 0)
|
||||
+ id = gpio++;
|
||||
+
|
||||
+ if (id >= pctrl_priv->ctrl->nr_banks) {
|
||||
+ dev_err(dev, "bank id invalid\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ bank = &pctrl_priv->ctrl->pin_banks[id];
|
||||
+ if (bank->bank_num != id) {
|
||||
+ dev_err(dev, "bank id mismatch with pinctrl\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ priv->bank = bank->bank_num;
|
||||
+ uc_priv->gpio_count = bank->nr_pins;
|
||||
+ uc_priv->gpio_base = bank->pin_base;
|
||||
+ uc_priv->bank_name = bank->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/pinctrl/rockchip/Makefile
|
||||
+++ b/drivers/pinctrl/rockchip/Makefile
|
||||
@@ -14,4 +14,5 @@ obj-$(CONFIG_ROCKCHIP_RK3308) += pinctrl
|
||||
obj-$(CONFIG_ROCKCHIP_RK3328) += pinctrl-rk3328.o
|
||||
obj-$(CONFIG_ROCKCHIP_RK3368) += pinctrl-rk3368.o
|
||||
obj-$(CONFIG_ROCKCHIP_RK3399) += pinctrl-rk3399.o
|
||||
+obj-$(CONFIG_ROCKCHIP_RK3568) += pinctrl-rk3568.o
|
||||
obj-$(CONFIG_ROCKCHIP_RV1108) += pinctrl-rv1108.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3568.c
|
||||
@@ -0,0 +1,360 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2020 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
+#include <dm.h>
|
||||
+#include <dm/pinctrl.h>
|
||||
+#include <regmap.h>
|
||||
+#include <syscon.h>
|
||||
+
|
||||
+#include "pinctrl-rockchip.h"
|
||||
+
|
||||
+static struct rockchip_mux_route_data rk3568_mux_route_data[] = {
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PB3, RK_FUNC_2, 0x0300, RK_GENMASK_VAL(0, 0, 0)), /* CAN0 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PA1, RK_FUNC_4, 0x0300, RK_GENMASK_VAL(0, 0, 1)), /* CAN0 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA1, RK_FUNC_3, 0x0300, RK_GENMASK_VAL(2, 2, 0)), /* CAN1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC3, RK_FUNC_3, 0x0300, RK_GENMASK_VAL(2, 2, 1)), /* CAN1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PB5, RK_FUNC_3, 0x0300, RK_GENMASK_VAL(4, 4, 0)), /* CAN2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PB2, RK_FUNC_4, 0x0300, RK_GENMASK_VAL(4, 4, 1)), /* CAN2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC4, RK_FUNC_1, 0x0300, RK_GENMASK_VAL(6, 6, 0)), /* EDPDP_HPDIN IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PC2, RK_FUNC_2, 0x0300, RK_GENMASK_VAL(6, 6, 1)), /* EDPDP_HPDIN IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PB1, RK_FUNC_3, 0x0300, RK_GENMASK_VAL(8, 8, 0)), /* GMAC1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PA7, RK_FUNC_3, 0x0300, RK_GENMASK_VAL(8, 8, 1)), /* GMAC1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PD1, RK_FUNC_1, 0x0300, RK_GENMASK_VAL(10, 10, 0)), /* HDMITX IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PC7, RK_FUNC_1, 0x0300, RK_GENMASK_VAL(10, 10, 1)), /* HDMITX IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PB6, RK_FUNC_1, 0x0300, RK_GENMASK_VAL(14, 14, 0)), /* I2C2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PB4, RK_FUNC_1, 0x0300, RK_GENMASK_VAL(14, 14, 1)), /* I2C2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA0, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(0, 0, 0)), /* I2C3 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PB6, RK_FUNC_4, 0x0304, RK_GENMASK_VAL(0, 0, 1)), /* I2C3 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PB2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(2, 2, 0)), /* I2C4 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PB1, RK_FUNC_2, 0x0304, RK_GENMASK_VAL(2, 2, 1)), /* I2C4 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PB4, RK_FUNC_4, 0x0304, RK_GENMASK_VAL(4, 4, 0)), /* I2C5 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PD0, RK_FUNC_2, 0x0304, RK_GENMASK_VAL(4, 4, 1)), /* I2C5 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(6, 6, 0)), /* PWM4 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(6, 6, 1)), /* PWM4 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(8, 8, 0)), /* PWM5 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(8, 8, 1)), /* PWM5 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(10, 10, 0)), /* PWM6 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(10, 10, 1)), /* PWM6 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(12, 12, 0)), /* PWM7 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(12, 12, 1)), /* PWM7 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(14, 14, 0)), /* PWM8 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0304, RK_GENMASK_VAL(14, 14, 1)), /* PWM8 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(0, 0, 0)), /* PWM9 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(0, 0, 1)), /* PWM9 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(2, 2, 0)), /* PWM10 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(2, 2, 1)), /* PWM10 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(4, 4, 0)), /* PWM11 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(4, 4, 1)), /* PWM11 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(6, 6, 0)), /* PWM12 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(6, 6, 1)), /* PWM12 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(8, 8, 0)), /* PWM13 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(8, 8, 1)), /* PWM13 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(10, 10, 0)), /* PWM14 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(10, 10, 1)), /* PWM14 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(12, 12, 0)), /* PWM15 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0308, RK_GENMASK_VAL(12, 12, 1)), /* PWM15 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_3, 0x0308, RK_GENMASK_VAL(14, 14, 0)), /* SDMMC2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PA5, RK_FUNC_5, 0x0308, RK_GENMASK_VAL(14, 14, 1)), /* SDMMC2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PB5, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(0, 0, 0)), /* SPI0 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD3, RK_FUNC_3, 0x030c, RK_GENMASK_VAL(0, 0, 1)), /* SPI0 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PB5, RK_FUNC_3, 0x030c, RK_GENMASK_VAL(2, 2, 0)), /* SPI1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PC3, RK_FUNC_3, 0x030c, RK_GENMASK_VAL(2, 2, 1)), /* SPI1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PC1, RK_FUNC_4, 0x030c, RK_GENMASK_VAL(4, 4, 0)), /* SPI2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PA0, RK_FUNC_3, 0x030c, RK_GENMASK_VAL(4, 4, 1)), /* SPI2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PB3, RK_FUNC_4, 0x030c, RK_GENMASK_VAL(6, 6, 0)), /* SPI3 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC2, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(6, 6, 1)), /* SPI3 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PB4, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(8, 8, 0)), /* UART1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PD1, RK_FUNC_1, 0x030c, RK_GENMASK_VAL(8, 8, 1)), /* UART1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PD1, RK_FUNC_1, 0x030c, RK_GENMASK_VAL(10, 10, 0)), /* UART2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PD5, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(10, 10, 1)), /* UART2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA1, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(12, 12, 0)), /* UART3 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PB7, RK_FUNC_4, 0x030c, RK_GENMASK_VAL(12, 12, 1)), /* UART3 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA6, RK_FUNC_2, 0x030c, RK_GENMASK_VAL(14, 14, 0)), /* UART4 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PB2, RK_FUNC_4, 0x030c, RK_GENMASK_VAL(14, 14, 1)), /* UART4 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PA2, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(0, 0, 0)), /* UART5 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PC2, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(0, 0, 1)), /* UART5 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PA4, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(2, 2, 0)), /* UART6 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PD5, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(2, 2, 1)), /* UART6 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PA6, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(5, 4, 0)), /* UART7 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PC4, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(5, 4, 1)), /* UART7 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD2, RK_FUNC_1, 0x0310, RK_GENMASK_VAL(5, 4, 2)), /* UART7 IO mux selection M2 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PC5, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(6, 6, 0)), /* UART8 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD7, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(6, 6, 1)), /* UART8 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PB0, RK_FUNC_3, 0x0310, RK_GENMASK_VAL(9, 8, 0)), /* UART9 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC5, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(9, 8, 1)), /* UART9 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PA4, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(9, 8, 2)), /* UART9 IO mux selection M2 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA2, RK_FUNC_1, 0x0310, RK_GENMASK_VAL(11, 10, 0)), /* I2S1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PC6, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(11, 10, 1)), /* I2S1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD0, RK_FUNC_5, 0x0310, RK_GENMASK_VAL(11, 10, 2)), /* I2S1 IO mux selection M2 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PC1, RK_FUNC_1, 0x0310, RK_GENMASK_VAL(12, 12, 0)), /* I2S2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PB6, RK_FUNC_5, 0x0310, RK_GENMASK_VAL(12, 12, 1)), /* I2S2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PA2, RK_FUNC_4, 0x0310, RK_GENMASK_VAL(14, 14, 0)), /* I2S3 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC2, RK_FUNC_5, 0x0310, RK_GENMASK_VAL(14, 14, 1)), /* I2S3 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA6, RK_FUNC_3, 0x0314, RK_GENMASK_VAL(0, 0, 0)), /* PDM IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO3, RK_PD6, RK_FUNC_5, 0x0314, RK_GENMASK_VAL(0, 0, 1)), /* PDM IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PA5, RK_FUNC_3, 0x0314, RK_GENMASK_VAL(3, 2, 0)), /* PCIE20 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD0, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(3, 2, 1)), /* PCIE20 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PB0, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(3, 2, 2)), /* PCIE20 IO mux selection M2 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PA4, RK_FUNC_3, 0x0314, RK_GENMASK_VAL(5, 4, 0)), /* PCIE30X1 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD2, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(5, 4, 1)), /* PCIE30X1 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO1, RK_PA5, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(5, 4, 2)), /* PCIE30X1 IO mux selection M2 */
|
||||
+ MR_TOPGRF(RK_GPIO0, RK_PA6, RK_FUNC_2, 0x0314, RK_GENMASK_VAL(7, 6, 0)), /* PCIE30X2 IO mux selection M0 */
|
||||
+ MR_TOPGRF(RK_GPIO2, RK_PD4, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(7, 6, 1)), /* PCIE30X2 IO mux selection M1 */
|
||||
+ MR_TOPGRF(RK_GPIO4, RK_PC2, RK_FUNC_4, 0x0314, RK_GENMASK_VAL(7, 6, 2)), /* PCIE30X2 IO mux selection M2 */
|
||||
+};
|
||||
+
|
||||
+static int rk3568_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
||||
+{
|
||||
+ struct rockchip_pinctrl_priv *priv = bank->priv;
|
||||
+ int iomux_num = (pin / 8);
|
||||
+ struct regmap *regmap;
|
||||
+ int reg, ret, mask;
|
||||
+ u8 bit;
|
||||
+ u32 data;
|
||||
+
|
||||
+ debug("setting mux of GPIO%d-%d to %d\n", bank->bank_num, pin, mux);
|
||||
+
|
||||
+ if (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU)
|
||||
+ regmap = priv->regmap_pmu;
|
||||
+ else
|
||||
+ regmap = priv->regmap_base;
|
||||
+
|
||||
+ reg = bank->iomux[iomux_num].offset;
|
||||
+ if ((pin % 8) >= 4)
|
||||
+ reg += 0x4;
|
||||
+ bit = (pin % 4) * 4;
|
||||
+ mask = 0xf;
|
||||
+
|
||||
+ data = (mask << (bit + 16));
|
||||
+ data |= (mux & mask) << bit;
|
||||
+ ret = regmap_write(regmap, reg, data);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#define RK3568_PULL_PMU_OFFSET 0x20
|
||||
+#define RK3568_PULL_GRF_OFFSET 0x80
|
||||
+#define RK3568_PULL_BITS_PER_PIN 2
|
||||
+#define RK3568_PULL_PINS_PER_REG 8
|
||||
+#define RK3568_PULL_BANK_STRIDE 0x10
|
||||
+
|
||||
+static void rk3568_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl_priv *info = bank->priv;
|
||||
+
|
||||
+ if (bank->bank_num == 0) {
|
||||
+ *regmap = info->regmap_pmu;
|
||||
+ *reg = RK3568_PULL_PMU_OFFSET;
|
||||
+ *reg += bank->bank_num * RK3568_PULL_BANK_STRIDE;
|
||||
+ } else {
|
||||
+ *regmap = info->regmap_base;
|
||||
+ *reg = RK3568_PULL_GRF_OFFSET;
|
||||
+ *reg += (bank->bank_num - 1) * RK3568_PULL_BANK_STRIDE;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3568_PULL_PINS_PER_REG) * 4);
|
||||
+ *bit = (pin_num % RK3568_PULL_PINS_PER_REG);
|
||||
+ *bit *= RK3568_PULL_BITS_PER_PIN;
|
||||
+}
|
||||
+
|
||||
+#define RK3568_DRV_PMU_OFFSET 0x70
|
||||
+#define RK3568_DRV_GRF_OFFSET 0x200
|
||||
+#define RK3568_DRV_BITS_PER_PIN 8
|
||||
+#define RK3568_DRV_PINS_PER_REG 2
|
||||
+#define RK3568_DRV_BANK_STRIDE 0x40
|
||||
+
|
||||
+static void rk3568_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl_priv *info = bank->priv;
|
||||
+
|
||||
+ /* The first 32 pins of the first bank are located in PMU */
|
||||
+ if (bank->bank_num == 0) {
|
||||
+ *regmap = info->regmap_pmu;
|
||||
+ *reg = RK3568_DRV_PMU_OFFSET;
|
||||
+ } else {
|
||||
+ *regmap = info->regmap_base;
|
||||
+ *reg = RK3568_DRV_GRF_OFFSET;
|
||||
+ *reg += (bank->bank_num - 1) * RK3568_DRV_BANK_STRIDE;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3568_DRV_PINS_PER_REG) * 4);
|
||||
+ *bit = (pin_num % RK3568_DRV_PINS_PER_REG);
|
||||
+ *bit *= RK3568_DRV_BITS_PER_PIN;
|
||||
+}
|
||||
+
|
||||
+#define RK3568_SCHMITT_BITS_PER_PIN 2
|
||||
+#define RK3568_SCHMITT_PINS_PER_REG 8
|
||||
+#define RK3568_SCHMITT_BANK_STRIDE 0x10
|
||||
+#define RK3568_SCHMITT_GRF_OFFSET 0xc0
|
||||
+#define RK3568_SCHMITT_PMUGRF_OFFSET 0x30
|
||||
+
|
||||
+static int rk3568_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl_priv *info = bank->priv;
|
||||
+
|
||||
+ if (bank->bank_num == 0) {
|
||||
+ *regmap = info->regmap_pmu;
|
||||
+ *reg = RK3568_SCHMITT_PMUGRF_OFFSET;
|
||||
+ } else {
|
||||
+ *regmap = info->regmap_base;
|
||||
+ *reg = RK3568_SCHMITT_GRF_OFFSET;
|
||||
+ *reg += (bank->bank_num - 1) * RK3568_SCHMITT_BANK_STRIDE;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3568_SCHMITT_PINS_PER_REG) * 4);
|
||||
+ *bit = pin_num % RK3568_SCHMITT_PINS_PER_REG;
|
||||
+ *bit *= RK3568_SCHMITT_BITS_PER_PIN;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rk3568_set_pull(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, int pull)
|
||||
+{
|
||||
+ struct regmap *regmap;
|
||||
+ int reg, ret;
|
||||
+ u8 bit, type;
|
||||
+ u32 data;
|
||||
+
|
||||
+ if (pull == PIN_CONFIG_BIAS_PULL_PIN_DEFAULT)
|
||||
+ return -ENOTSUPP;
|
||||
+
|
||||
+ rk3568_calc_pull_reg_and_bit(bank, pin_num, ®map, ®, &bit);
|
||||
+ type = bank->pull_type[pin_num / 8];
|
||||
+ ret = rockchip_translate_pull_value(type, pull);
|
||||
+ if (ret < 0) {
|
||||
+ debug("unsupported pull setting %d\n", pull);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* enable the write to the equivalent lower bits */
|
||||
+ data = ((1 << ROCKCHIP_PULL_BITS_PER_PIN) - 1) << (bit + 16);
|
||||
+
|
||||
+ data |= (ret << bit);
|
||||
+ ret = regmap_write(regmap, reg, data);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk3568_set_drive(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, int strength)
|
||||
+{
|
||||
+ struct regmap *regmap;
|
||||
+ int reg;
|
||||
+ u32 data;
|
||||
+ u8 bit;
|
||||
+ int drv = (1 << (strength + 1)) - 1;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ rk3568_calc_drv_reg_and_bit(bank, pin_num, ®map, ®, &bit);
|
||||
+
|
||||
+ /* enable the write to the equivalent lower bits */
|
||||
+ data = ((1 << RK3568_DRV_BITS_PER_PIN) - 1) << (bit + 16);
|
||||
+ data |= (drv << bit);
|
||||
+
|
||||
+ ret = regmap_write(regmap, reg, data);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (bank->bank_num == 1 && pin_num == 21)
|
||||
+ reg = 0x0840;
|
||||
+ else if (bank->bank_num == 2 && pin_num == 2)
|
||||
+ reg = 0x0844;
|
||||
+ else if (bank->bank_num == 2 && pin_num == 8)
|
||||
+ reg = 0x0848;
|
||||
+ else if (bank->bank_num == 3 && pin_num == 0)
|
||||
+ reg = 0x084c;
|
||||
+ else if (bank->bank_num == 3 && pin_num == 6)
|
||||
+ reg = 0x0850;
|
||||
+ else if (bank->bank_num == 4 && pin_num == 0)
|
||||
+ reg = 0x0854;
|
||||
+ else
|
||||
+ return 0;
|
||||
+
|
||||
+ data = ((1 << RK3568_DRV_BITS_PER_PIN) - 1) << 16;
|
||||
+ data |= drv;
|
||||
+
|
||||
+ return regmap_write(regmap, reg, data);
|
||||
+}
|
||||
+
|
||||
+static int rk3568_set_schmitt(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, int enable)
|
||||
+{
|
||||
+ struct regmap *regmap;
|
||||
+ int reg;
|
||||
+ u32 data;
|
||||
+ u8 bit;
|
||||
+
|
||||
+ rk3568_calc_schmitt_reg_and_bit(bank, pin_num, ®map, ®, &bit);
|
||||
+
|
||||
+ /* enable the write to the equivalent lower bits */
|
||||
+ data = ((1 << RK3568_SCHMITT_BITS_PER_PIN) - 1) << (bit + 16);
|
||||
+ data |= (enable << bit);
|
||||
+
|
||||
+ return regmap_write(regmap, reg, data);
|
||||
+}
|
||||
+static struct rockchip_pin_bank rk3568_pin_banks[] = {
|
||||
+ PIN_BANK_IOMUX_FLAGS(0, 32, "gpio0", IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT),
|
||||
+ PIN_BANK_IOMUX_FLAGS(1, 32, "gpio1", IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT),
|
||||
+ PIN_BANK_IOMUX_FLAGS(2, 32, "gpio2", IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT),
|
||||
+ PIN_BANK_IOMUX_FLAGS(3, 32, "gpio3", IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT),
|
||||
+ PIN_BANK_IOMUX_FLAGS(4, 32, "gpio4", IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT),
|
||||
+};
|
||||
+
|
||||
+static const struct rockchip_pin_ctrl rk3568_pin_ctrl = {
|
||||
+ .pin_banks = rk3568_pin_banks,
|
||||
+ .nr_banks = ARRAY_SIZE(rk3568_pin_banks),
|
||||
+ .nr_pins = 160,
|
||||
+ .grf_mux_offset = 0x0,
|
||||
+ .pmu_mux_offset = 0x0,
|
||||
+ .iomux_routes = rk3568_mux_route_data,
|
||||
+ .niomux_routes = ARRAY_SIZE(rk3568_mux_route_data),
|
||||
+ .set_mux = rk3568_set_mux,
|
||||
+ .set_pull = rk3568_set_pull,
|
||||
+ .set_drive = rk3568_set_drive,
|
||||
+ .set_schmitt = rk3568_set_schmitt,
|
||||
+};
|
||||
+
|
||||
+static const struct udevice_id rk3568_pinctrl_ids[] = {
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3568-pinctrl",
|
||||
+ .data = (ulong)&rk3568_pin_ctrl
|
||||
+ },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+U_BOOT_DRIVER(pinctrl_rk3568) = {
|
||||
+ .name = "rockchip_rk3568_pinctrl",
|
||||
+ .id = UCLASS_PINCTRL,
|
||||
+ .of_match = rk3568_pinctrl_ids,
|
||||
+ .priv_auto = sizeof(struct rockchip_pinctrl_priv),
|
||||
+ .ops = &rockchip_pinctrl_ops,
|
||||
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
+ .bind = dm_scan_fdt_dev,
|
||||
+#endif
|
||||
+ .probe = rockchip_pinctrl_probe,
|
||||
+};
|
||||
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
|
||||
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
|
||||
@@ -400,7 +400,7 @@ static int rockchip_pinctrl_set_state(st
|
||||
int prop_len, param;
|
||||
const u32 *data;
|
||||
ofnode node;
|
||||
-#ifdef CONFIG_OF_LIVE
|
||||
+#if CONFIG_IS_ENABLED(OF_LIVE)
|
||||
const struct device_node *np;
|
||||
struct property *pp;
|
||||
#else
|
||||
@@ -440,7 +440,7 @@ static int rockchip_pinctrl_set_state(st
|
||||
node = ofnode_get_by_phandle(conf);
|
||||
if (!ofnode_valid(node))
|
||||
return -ENODEV;
|
||||
-#ifdef CONFIG_OF_LIVE
|
||||
+#if CONFIG_IS_ENABLED(OF_LIVE)
|
||||
np = ofnode_to_np(node);
|
||||
for (pp = np->properties; pp; pp = pp->next) {
|
||||
prop_name = pp->name;
|
||||
@@ -515,13 +515,14 @@ static struct rockchip_pin_ctrl *rockchi
|
||||
|
||||
/* preset iomux offset value, set new start value */
|
||||
if (iom->offset >= 0) {
|
||||
- if (iom->type & IOMUX_SOURCE_PMU)
|
||||
+ if ((iom->type & IOMUX_SOURCE_PMU) || (iom->type & IOMUX_L_SOURCE_PMU))
|
||||
pmu_offs = iom->offset;
|
||||
else
|
||||
grf_offs = iom->offset;
|
||||
} else { /* set current iomux offset */
|
||||
- iom->offset = (iom->type & IOMUX_SOURCE_PMU) ?
|
||||
- pmu_offs : grf_offs;
|
||||
+ iom->offset = ((iom->type & IOMUX_SOURCE_PMU) ||
|
||||
+ (iom->type & IOMUX_L_SOURCE_PMU)) ?
|
||||
+ pmu_offs : grf_offs;
|
||||
}
|
||||
|
||||
/* preset drv offset value, set new start value */
|
||||
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
|
||||
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
|
||||
@@ -6,9 +6,13 @@
|
||||
#ifndef __DRIVERS_PINCTRL_ROCKCHIP_H
|
||||
#define __DRIVERS_PINCTRL_ROCKCHIP_H
|
||||
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
+#define RK_GENMASK_VAL(h, l, v) \
|
||||
+ (GENMASK(((h) + 16), ((l) + 16)) | (((v) << (l)) & GENMASK((h), (l))))
|
||||
+
|
||||
/**
|
||||
* Encode variants of iomux registers into a type variable
|
||||
*/
|
||||
@@ -18,6 +22,8 @@
|
||||
#define IOMUX_UNROUTED BIT(3)
|
||||
#define IOMUX_WIDTH_3BIT BIT(4)
|
||||
#define IOMUX_8WIDTH_2BIT BIT(5)
|
||||
+#define IOMUX_WRITABLE_32BIT BIT(6)
|
||||
+#define IOMUX_L_SOURCE_PMU BIT(7)
|
||||
|
||||
/**
|
||||
* Defined some common pins constants
|
||||
@@ -63,6 +69,21 @@ enum rockchip_pin_pull_type {
|
||||
};
|
||||
|
||||
/**
|
||||
+ * enum mux route register type, should be invalid/default/topgrf/pmugrf.
|
||||
+ * INVALID: means do not need to set mux route
|
||||
+ * DEFAULT: means same regmap as pin iomux
|
||||
+ * TOPGRF: means mux route setting in topgrf
|
||||
+ * PMUGRF: means mux route setting in pmugrf
|
||||
+ */
|
||||
+enum rockchip_pin_route_type {
|
||||
+ ROUTE_TYPE_DEFAULT = 0,
|
||||
+ ROUTE_TYPE_TOPGRF = 1,
|
||||
+ ROUTE_TYPE_PMUGRF = 2,
|
||||
+
|
||||
+ ROUTE_TYPE_INVALID = -1,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
* @drv_type: drive strength variant using rockchip_perpin_drv_type
|
||||
* @offset: if initialized to -1 it will be autocalculated, by specifying
|
||||
* an initial offset value the relevant source offset can be reset
|
||||
@@ -220,6 +241,25 @@ struct rockchip_pin_bank {
|
||||
.pull_type[3] = pull3, \
|
||||
}
|
||||
|
||||
+#define PIN_BANK_MUX_ROUTE_FLAGS(ID, PIN, FUNC, REG, VAL, FLAG) \
|
||||
+ { \
|
||||
+ .bank_num = ID, \
|
||||
+ .pin = PIN, \
|
||||
+ .func = FUNC, \
|
||||
+ .route_offset = REG, \
|
||||
+ .route_val = VAL, \
|
||||
+ .route_type = FLAG, \
|
||||
+ }
|
||||
+
|
||||
+#define MR_DEFAULT(ID, PIN, FUNC, REG, VAL) \
|
||||
+ PIN_BANK_MUX_ROUTE_FLAGS(ID, PIN, FUNC, REG, VAL, ROUTE_TYPE_DEFAULT)
|
||||
+
|
||||
+#define MR_TOPGRF(ID, PIN, FUNC, REG, VAL) \
|
||||
+ PIN_BANK_MUX_ROUTE_FLAGS(ID, PIN, FUNC, REG, VAL, ROUTE_TYPE_TOPGRF)
|
||||
+
|
||||
+#define MR_PMUGRF(ID, PIN, FUNC, REG, VAL) \
|
||||
+ PIN_BANK_MUX_ROUTE_FLAGS(ID, PIN, FUNC, REG, VAL, ROUTE_TYPE_PMUGRF)
|
||||
+
|
||||
/**
|
||||
* struct rockchip_mux_recalced_data: recalculate a pin iomux data.
|
||||
* @num: bank number.
|
||||
@@ -241,6 +281,7 @@ struct rockchip_mux_recalced_data {
|
||||
* @bank_num: bank number.
|
||||
* @pin: index at register or used to calc index.
|
||||
* @func: the min pin.
|
||||
+ * @route_type: the register type.
|
||||
* @route_offset: the max pin.
|
||||
* @route_val: the register offset.
|
||||
*/
|
||||
@@ -248,6 +289,7 @@ struct rockchip_mux_route_data {
|
||||
u8 bank_num;
|
||||
u8 pin;
|
||||
u8 func;
|
||||
+ enum rockchip_pin_route_type route_type : 8;
|
||||
u32 route_offset;
|
||||
u32 route_val;
|
||||
};
|
|
@ -0,0 +1,22 @@
|
|||
From 16cc17fc2cf2f308f5ac20b829d427114c6e59fa Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Mon, 20 Dec 2021 08:50:48 -0500
|
||||
Subject: [PATCH 08/11] rockchip: allow sdmmc at full speed
|
||||
|
||||
Adding pinctrl and gpio support fixed quartz64-a sdmmc.
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
@@ -13,7 +13,6 @@
|
||||
};
|
||||
|
||||
&sdmmc0 {
|
||||
- max-frequency = <400000>;
|
||||
bus-width = <4>;
|
||||
u-boot,dm-spl;
|
||||
u-boot,spl-fifo-mode;
|
|
@ -0,0 +1,25 @@
|
|||
From d3b3e9c1045e9fa0aff987a036b30cf380809e35 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Mon, 20 Dec 2021 10:11:52 -0500
|
||||
Subject: [PATCH 09/11] rockchip: defconfig: add gpio-v2 to quartz64
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
configs/quartz64-a-rk3566_defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/configs/quartz64-a-rk3566_defconfig
|
||||
+++ b/configs/quartz64-a-rk3566_defconfig
|
||||
@@ -42,10 +42,12 @@ CONFIG_CMD_REGULATOR=y
|
||||
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
|
|
@ -0,0 +1,97 @@
|
|||
From 981df845d960a9078893dad88e1dd82dfcb4a148 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Wed, 22 Dec 2021 19:40:32 -0500
|
||||
Subject: [PATCH 10/11] rockchip: rk356x: enable usb2 support on quartz64-a
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi | 22 ++++++++++++++++++++++
|
||||
configs/quartz64-a-rk3566_defconfig | 17 +++++++++++++++++
|
||||
include/configs/quartz64-a-rk3566.h | 3 +++
|
||||
3 files changed, 42 insertions(+)
|
||||
|
||||
--- a/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-quartz64-a-u-boot.dtsi
|
||||
@@ -12,12 +12,34 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
&sdmmc0 {
|
||||
bus-width = <4>;
|
||||
u-boot,dm-spl;
|
||||
u-boot,spl-fifo-mode;
|
||||
};
|
||||
|
||||
+&usb_host0_ehci {
|
||||
+ vbus-supply = <&vcc5v0_usb20_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ vbus-supply = <&vcc5v0_usb20_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ vbus-supply = <&vcc5v0_usb20_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ vbus-supply = <&vcc5v0_usb20_host>;
|
||||
+};
|
||||
+
|
||||
&uart2 {
|
||||
clock-frequency = <24000000>;
|
||||
u-boot,dm-spl;
|
||||
--- a/configs/quartz64-a-rk3566_defconfig
|
||||
+++ b/configs/quartz64-a-rk3566_defconfig
|
||||
@@ -22,6 +22,7 @@ CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-quartz64-a.dtb"
|
||||
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
@@ -35,6 +36,7 @@ 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
|
||||
@@ -76,4 +78,19 @@ 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
|
||||
--- a/include/configs/quartz64-a-rk3566.h
|
||||
+++ b/include/configs/quartz64-a-rk3566.h
|
||||
@@ -11,4 +11,7 @@
|
||||
"stdout=serial,vidconsole\0" \
|
||||
"stderr=serial,vidconsole\0"
|
||||
|
||||
+#define CONFIG_USB_OHCI_NEW
|
||||
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
+
|
||||
#endif
|
|
@ -0,0 +1,173 @@
|
|||
From ea6da572fe3cee637319f1e7e588c059622c815e Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Wed, 22 Dec 2021 19:52:38 -0500
|
||||
Subject: [PATCH 11/11] rockchip: rk356x: attempt to fix ram detection
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3568/rk3568.c | 29 ++++++++++++++++++++++++
|
||||
arch/arm/mach-rockchip/sdram.c | 31 ++++++++++++++------------
|
||||
common/board_f.c | 7 ++++++
|
||||
configs/quartz64-a-rk3566_defconfig | 1 +
|
||||
include/configs/rk3568_common.h | 5 +++++
|
||||
5 files changed, 59 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
+#include <fdt_support.h>
|
||||
#include <asm/armv8/mmu.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
@@ -135,3 +136,31 @@ int arch_cpu_init(void)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+#ifdef CONFIG_OF_SYSTEM_SETUP
|
||||
+int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
+{
|
||||
+ int ret;
|
||||
+ int areas = 1;
|
||||
+ u64 start[2], size[2];
|
||||
+
|
||||
+ /* Reserve the io address space. */
|
||||
+ if (gd->ram_top > SDRAM_UPPER_ADDR_MIN) {
|
||||
+ start[0] = gd->bd->bi_dram[0].start;
|
||||
+ size[0] = SDRAM_LOWER_ADDR_MAX - gd->bd->bi_dram[0].start;
|
||||
+
|
||||
+ /* Add the upper 4GB address space */
|
||||
+ start[1] = SDRAM_UPPER_ADDR_MIN;
|
||||
+ size[1] = gd->ram_top - SDRAM_UPPER_ADDR_MIN;
|
||||
+ areas = 2;
|
||||
+
|
||||
+ ret = fdt_set_usable_memory(blob, start, size, areas);
|
||||
+ if (ret) {
|
||||
+ printf("Cannot set usable memory\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+};
|
||||
+#endif
|
||||
--- a/arch/arm/mach-rockchip/sdram.c
|
||||
+++ b/arch/arm/mach-rockchip/sdram.c
|
||||
@@ -3,6 +3,8 @@
|
||||
* Copyright (C) 2017 Rockchip Electronics Co., Ltd.
|
||||
*/
|
||||
|
||||
+#define DEBUG
|
||||
+
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <init.h>
|
||||
@@ -98,8 +100,7 @@ size_t rockchip_sdram_size(phys_addr_t r
|
||||
SYS_REG_COL_MASK);
|
||||
cs1_col = cs0_col;
|
||||
bk = 3 - ((sys_reg2 >> SYS_REG_BK_SHIFT(ch)) & SYS_REG_BK_MASK);
|
||||
- if ((sys_reg3 >> SYS_REG_VERSION_SHIFT &
|
||||
- SYS_REG_VERSION_MASK) == 0x2) {
|
||||
+ if ((sys_reg3 >> SYS_REG_VERSION_SHIFT & SYS_REG_VERSION_MASK) >= 0x2) {
|
||||
cs1_col = 9 + (sys_reg3 >> SYS_REG_CS1_COL_SHIFT(ch) &
|
||||
SYS_REG_CS1_COL_MASK);
|
||||
if (((sys_reg3 >> SYS_REG_EXTEND_CS0_ROW_SHIFT(ch) &
|
||||
@@ -136,7 +137,7 @@ size_t rockchip_sdram_size(phys_addr_t r
|
||||
SYS_REG_BW_MASK));
|
||||
row_3_4 = sys_reg2 >> SYS_REG_ROW_3_4_SHIFT(ch) &
|
||||
SYS_REG_ROW_3_4_MASK;
|
||||
- if (dram_type == DDR4) {
|
||||
+ if ((dram_type == DDR4) && (sys_reg3 >> SYS_REG_VERSION_SHIFT & SYS_REG_VERSION_MASK) != 0x3){
|
||||
dbw = (sys_reg2 >> SYS_REG_DBW_SHIFT(ch)) &
|
||||
SYS_REG_DBW_MASK;
|
||||
bg = (dbw == 2) ? 2 : 1;
|
||||
@@ -150,15 +151,11 @@ size_t rockchip_sdram_size(phys_addr_t r
|
||||
chipsize_mb = chipsize_mb * 3 / 4;
|
||||
size_mb += chipsize_mb;
|
||||
if (rank > 1)
|
||||
- debug("rank %d cs0_col %d cs1_col %d bk %d cs0_row %d\
|
||||
- cs1_row %d bw %d row_3_4 %d\n",
|
||||
- rank, cs0_col, cs1_col, bk, cs0_row,
|
||||
- cs1_row, bw, row_3_4);
|
||||
+ debug("rank=%d cs0_col=%d cs1_col=%d bk=%d cs0_row=%d cs1_row=%d bg=%d bw=%d row_3_4=%d\n",
|
||||
+ rank, cs0_col, cs1_col, bk, cs0_row, cs1_row, bg, bw, row_3_4);
|
||||
else
|
||||
- debug("rank %d cs0_col %d bk %d cs0_row %d\
|
||||
- bw %d row_3_4 %d\n",
|
||||
- rank, cs0_col, bk, cs0_row,
|
||||
- bw, row_3_4);
|
||||
+ debug("rank %d cs0_col %d bk %d cs0_row %d bw %d row_3_4 %d\n",
|
||||
+ rank, cs0_col, bk, cs0_row, bw, row_3_4);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -176,9 +173,11 @@ size_t rockchip_sdram_size(phys_addr_t r
|
||||
* 2. update board_get_usable_ram_top() and dram_init_banksize()
|
||||
* to reserve memory for peripheral space after previous update.
|
||||
*/
|
||||
+
|
||||
+#ifndef __aarch64__
|
||||
if (size_mb > (SDRAM_MAX_SIZE >> 20))
|
||||
size_mb = (SDRAM_MAX_SIZE >> 20);
|
||||
-
|
||||
+#endif
|
||||
return (size_t)size_mb << 20;
|
||||
}
|
||||
|
||||
@@ -208,6 +207,10 @@ int dram_init(void)
|
||||
ulong board_get_usable_ram_top(ulong total_size)
|
||||
{
|
||||
unsigned long top = CONFIG_SYS_SDRAM_BASE + SDRAM_MAX_SIZE;
|
||||
-
|
||||
- return (gd->ram_top > top) ? top : gd->ram_top;
|
||||
+#ifdef SDRAM_UPPER_ADDR_MIN
|
||||
+ if (gd->ram_top > SDRAM_UPPER_ADDR_MIN)
|
||||
+ return gd->ram_top;
|
||||
+ else
|
||||
+#endif
|
||||
+ return (gd->ram_top > top) ? top : gd->ram_top;
|
||||
}
|
||||
--- a/common/board_f.c
|
||||
+++ b/common/board_f.c
|
||||
@@ -345,7 +345,14 @@ static int setup_dest_addr(void)
|
||||
#endif
|
||||
gd->ram_top = gd->ram_base + get_effective_memsize();
|
||||
gd->ram_top = board_get_usable_ram_top(gd->mon_len);
|
||||
+#ifdef SDRAM_LOWER_ADDR_MAX
|
||||
+ if (gd->ram_top > SDRAM_LOWER_ADDR_MAX)
|
||||
+ gd->relocaddr = SDRAM_LOWER_ADDR_MAX;
|
||||
+ else
|
||||
+ gd->relocaddr = gd->ram_top;
|
||||
+#else
|
||||
gd->relocaddr = gd->ram_top;
|
||||
+#endif
|
||||
debug("Ram top: %08lX\n", (ulong)gd->ram_top);
|
||||
#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500))
|
||||
/*
|
||||
--- a/configs/quartz64-a-rk3566_defconfig
|
||||
+++ b/configs/quartz64-a-rk3566_defconfig
|
||||
@@ -21,6 +21,7 @@ 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/rk3566-quartz64-a.dtb"
|
||||
# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
--- a/include/configs/rk3568_common.h
|
||||
+++ b/include/configs/rk3568_common.h
|
||||
@@ -24,6 +24,11 @@
|
||||
#define CONFIG_SYS_SDRAM_BASE 0
|
||||
#define SDRAM_MAX_SIZE 0xf0000000
|
||||
|
||||
+#ifdef CONFIG_OF_SYSTEM_SETUP
|
||||
+#define SDRAM_LOWER_ADDR_MAX 0xf0000000
|
||||
+#define SDRAM_UPPER_ADDR_MIN 0x100000000
|
||||
+#endif
|
||||
+
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
#define ENV_MEM_LAYOUT_SETTINGS \
|
||||
"scriptaddr=0x00c00000\0" \
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,795 @@
|
|||
From 89d609d74e4ef84e0e3d399d8763b268b60302fc Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Sat, 28 May 2022 20:19:38 -0400
|
||||
Subject: [PATCH] rockchip: rk356x: add bpi r2 pro board
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3568-bpi-r2-pro-u-boot.dtsi | 47 ++
|
||||
arch/arm/dts/rk3568-bpi-r2-pro.dts | 532 ++++++++++++++++++
|
||||
arch/arm/mach-rockchip/rk3568/Kconfig | 6 +
|
||||
board/rockchip/bpi-r2-pro-rk3568/Kconfig | 15 +
|
||||
board/rockchip/bpi-r2-pro-rk3568/Makefile | 7 +
|
||||
.../bpi-r2-pro-rk3568/bpi-r2-pro-rk3568.c | 4 +
|
||||
configs/bpi-r2-pro-rk3568_defconfig | 97 ++++
|
||||
include/configs/bpi-r2-pro-rk3568.h | 15 +
|
||||
9 files changed, 724 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3568-bpi-r2-pro-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3568-bpi-r2-pro.dts
|
||||
create mode 100644 board/rockchip/bpi-r2-pro-rk3568/Kconfig
|
||||
create mode 100644 board/rockchip/bpi-r2-pro-rk3568/Makefile
|
||||
create mode 100644 board/rockchip/bpi-r2-pro-rk3568/bpi-r2-pro-rk3568.c
|
||||
create mode 100644 configs/bpi-r2-pro-rk3568_defconfig
|
||||
create mode 100644 include/configs/bpi-r2-pro-rk3568.h
|
||||
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -164,6 +164,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399pro-rock-pi-n10.dtb
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
+ rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
rk3566-quartz64-a.dtb
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-bpi-r2-pro-u-boot.dtsi
|
||||
@@ -0,0 +1,47 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+#include "rk3568-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = &uart2;
|
||||
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ u-boot,dm-spl;
|
||||
+ u-boot,spl-fifo-mode;
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ vbus-supply = <&vcc5v0_usb_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ vbus-supply = <&vcc5v0_usb_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ vbus-supply = <&vcc5v0_usb_host>;
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ vbus-supply = <&vcc5v0_usb_host>;
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ clock-frequency = <24000000>;
|
||||
+ u-boot,dm-spl;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-bpi-r2-pro.dts
|
||||
@@ -0,0 +1,532 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Author: Frank Wunderlich <frank-w@public-files.de>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include "rk3568.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
|
||||
+ compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac0;
|
||||
+ ethernet1 = &gmac1;
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+
|
||||
+ chosen: chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&blue_led_pin &green_led_pin>;
|
||||
+
|
||||
+ blue_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ default-state = "off";
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
+ gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ green_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ default-state = "on";
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
+ gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dc_12v: dc-12v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dc_12v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb: vcc5v0_usb {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_host: vcc5v0-usb-host {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
+ regulator-name = "vcc5v0_usb_host";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg: vcc5v0-usb-otg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||
+ regulator-name = "vcc5v0_usb_otg";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0 {
|
||||
+ /* used for USB3 */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ /* used for USB3 */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2 {
|
||||
+ /* used for SATA */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac0 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-mode = "rgmii";
|
||||
+ 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;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+ tx_delay = <0x4f>;
|
||||
+ rx_delay = <0x0f>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ pause;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ 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;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+
|
||||
+ tx_delay = <0x3c>;
|
||||
+ rx_delay = <0x2f>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+ regulator-always-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c5 {
|
||||
+ /* pin 3 (SDA) + 4 (SCL) of header con2 */
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ leds {
|
||||
+ blue_led_pin: blue-led-pin {
|
||||
+ rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ green_led_pin: green-led-pin {
|
||||
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int: pmic_int {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en: vcc5v0_usb_host_en {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_3v3>;
|
||||
+ vccio5-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm8 {
|
||||
+ /* fan 5v - gnd - pwm */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm10 {
|
||||
+ /* pin 7 of header con2 */
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pwm11 {
|
||||
+ /* pin 15 of header con2 */
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&pwm13 {
|
||||
+ /* pin 24 of header con2 */
|
||||
+ /* shared with uart9 */
|
||||
+ pinctrl-0 = <&pwm13m1_pins>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ /* pin 8 (TX) + 10 (RX) (RTS:16, CTS:18) of header con2 */
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ /* debug-uart */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart7 {
|
||||
+ /* pin 11 (TX) + 13 (RX) of header con2 */
|
||||
+ pinctrl-0 = <&uart7m1_xfer>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
@@ -3,6 +3,11 @@ if ROCKCHIP_RK3568
|
||||
choice
|
||||
prompt "RK3568/RK3566 board select"
|
||||
|
||||
+config TARGET_BPI_R2_PRO_RK3568
|
||||
+ bool "Banana Pi R2 Pro RK3566 development board"
|
||||
+ help
|
||||
+ Banana Pi R2 Pro is a development board Rockchp RK3568.
|
||||
+
|
||||
config TARGET_EVB_RK3568
|
||||
bool "RK3568 evaluation board"
|
||||
help
|
||||
@@ -27,6 +32,7 @@ config SYS_SOC
|
||||
config SYS_MALLOC_F_LEN
|
||||
default 0x2000
|
||||
|
||||
+source "board/rockchip/bpi-r2-pro-rk3568/Kconfig"
|
||||
source "board/rockchip/evb_rk3568/Kconfig"
|
||||
source "board/pine64/quartz64-a-rk3566/Kconfig"
|
||||
|
||||
--- /dev/null
|
||||
+++ b/board/rockchip/bpi-r2-pro-rk3568/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+if TARGET_BPI_R2_PRO_RK3568
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "bpi-r2-pro-rk3568"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "rockchip"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "bpi-r2-pro-rk3568"
|
||||
+
|
||||
+config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
+ def_bool y
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/rockchip/bpi-r2-pro-rk3568/Makefile
|
||||
@@ -0,0 +1,7 @@
|
||||
+#
|
||||
+# (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+#
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+
|
||||
+obj-y += bpi-r2-pro-rk3568.o
|
||||
--- /dev/null
|
||||
+++ b/board/rockchip/bpi-r2-pro-rk3568/bpi-r2-pro-rk3568.c
|
||||
@@ -0,0 +1,4 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
--- /dev/null
|
||||
+++ b/configs/bpi-r2-pro-rk3568_defconfig
|
||||
@@ -0,0 +1,97 @@
|
||||
+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-bpi-r2-pro"
|
||||
+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_BPI_R2_PRO_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-bpi-r2-pro.dtb"
|
||||
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
+# 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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
||||
--- /dev/null
|
||||
+++ b/include/configs/bpi-r2-pro-rk3568.h
|
||||
@@ -0,0 +1,15 @@
|
||||
+#ifndef __BPI_R2_PRO_RK3568_H
|
||||
+#define __BPI_R2_PRO_RK3568_H
|
||||
+
|
||||
+#include <configs/rk3568_common.h>
|
||||
+
|
||||
+#define CONFIG_SUPPORT_EMMC_RPMB
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
+
|
||||
+#define CONFIG_USB_OHCI_NEW
|
||||
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,690 @@
|
|||
From 443eb96a82563a3b38a3c9548853a5a266dfd072 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Sun, 29 May 2022 06:09:59 -0400
|
||||
Subject: [PATCH] uboot: add Radxa ROCK 3A board
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 3 +-
|
||||
arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 25 +
|
||||
arch/arm/dts/rk3568-rock-3a.dts | 525 ++++++++++++++++++++
|
||||
arch/arm/mach-rockchip/rk3568/Kconfig | 6 +
|
||||
board/radxa/rock-3a-rk3568/Kconfig | 15 +
|
||||
board/radxa/rock-3a-rk3568/Makefile | 4 +
|
||||
board/radxa/rock-3a-rk3568/rock-3a-rk3568.c | 1 +
|
||||
configs/rock-3a-rk3568_defconfig | 97 ++++
|
||||
include/configs/rock-3a-rk3568.h | 17 +
|
||||
9 files changed, 692 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3568-rock-3a.dts
|
||||
create mode 100644 configs/rock-3a-rk3568_defconfig
|
||||
create mode 100644 include/configs/rock-3a-rk3568.h
|
||||
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -166,7 +166,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
- rk3566-quartz64-a.dtb
|
||||
+ rk3566-quartz64-a.dtb \
|
||||
+ rk3568-rock-3a.dtb
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RV1108) += \
|
||||
rv1108-elgin-r1.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
|
||||
@@ -0,0 +1,24 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+#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-rock-3a.dts
|
||||
@@ -0,0 +1,525 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include "rk3568.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Radxa ROCK3 Model A";
|
||||
+ compatible = "radxa,rock3a", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac1;
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+
|
||||
+ chosen: chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_user: led-0 {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_user_en>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "Analog RK809";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_8ch>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk809>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc12v_dcin: vcc12v-dcin {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc12v_dcin";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb: vcc5v0-usb {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_host: vcc5v0-usb-host {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
+ regulator-name = "vcc5v0_usb_host";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_hub: vcc5v0-usb-hub-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_hub_en>;
|
||||
+ regulator-name = "vcc5v0_usb_hub";
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||
+ regulator-name = "vcc5v0_usb_otg";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m1_miim
|
||||
+ &gmac1m1_tx_bus2
|
||||
+ &gmac1m1_rx_bus2
|
||||
+ &gmac1m1_rgmii_clk
|
||||
+ &gmac1m1_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ mic-in-differential;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s1_8ch {
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <ð_phy_rst>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ ethernet {
|
||||
+ eth_phy_rst: eth_phy_rst {
|
||||
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_user_en: led_user_en {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int: pmic_int {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en: vcc5v0_usb_host_en {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc5v0_usb_hub_en: vcc5v0_usb_hub_en {
|
||||
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio2-supply = <&vcc_1v8>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_1v8>;
|
||||
+ vccio5-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ vqmmc-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/rock-3a-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-rock-3a"
|
||||
+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-rock-3a.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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
|
@ -0,0 +1,247 @@
|
|||
From 872197ee382688701f85fc486a14dc02d2113811 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Tue, 31 May 2022 00:51:23 -0400
|
||||
Subject: [PATCH] uboot: add NanoPi R5S board
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 25 +++++
|
||||
arch/arm/dts/rk3568-nanopi-r5s.dts | 9 ++
|
||||
arch/arm/mach-rockchip/rk3568/Kconfig | 6 ++
|
||||
board/friendlyelec/nanopi-r5s-rk3568/Kconfig | 15 +++
|
||||
board/friendlyelec/nanopi-r5s-rk3568/Makefile | 4 +
|
||||
.../nanopi-r5s-rk3568/nanopi-r5s-rk3568.c | 4 +
|
||||
configs/nanopi-r5s-rk3568_defconfig | 97 +++++++++++++++++++
|
||||
include/configs/nanopi-r5s-rk3568.h | 17 ++++
|
||||
9 files changed, 178 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3568-nanopi-r5s.dts
|
||||
create mode 100644 board/friendlyelec/nanopi-r5s-rk3568/Kconfig
|
||||
create mode 100644 board/friendlyelec/nanopi-r5s-rk3568/Makefile
|
||||
create mode 100644 board/friendlyelec/nanopi-r5s-rk3568/nanopi-r5s-rk3568.c
|
||||
create mode 100644 configs/nanopi-r5s-rk3568_defconfig
|
||||
create mode 100644 include/configs/nanopi-r5s-rk3568.h
|
||||
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -166,6 +166,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-nanopi-r5s.dtb \
|
||||
rk3566-quartz64-a.dtb \
|
||||
rk3568-rock-3a.dtb
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
|
||||
@@ -0,0 +1,25 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+#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,dm-spl;
|
||||
+ u-boot,spl-fifo-mode;
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ clock-frequency = <24000000>;
|
||||
+ u-boot,dm-spl;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-nanopi-r5s.dts
|
||||
@@ -0,0 +1,9 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3568-evb.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R5S";
|
||||
+ compatible = "friendlyelec,nanopi-r5s", "rockchip,rk3568";
|
||||
+};
|
||||
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
@@ -13,6 +13,11 @@ config TARGET_EVB_RK3568
|
||||
help
|
||||
RK3568 EVB is a evaluation board for Rockchp RK3568.
|
||||
|
||||
+config TARGET_NANOPI_R5S_RK3568
|
||||
+ bool "NanoPi R5S board"
|
||||
+ help
|
||||
+ NanoPi R5S FriendlyElec is a board for Rockchp RK3568.
|
||||
+
|
||||
config TARGET_QUARTZ64_A_RK3566
|
||||
bool "Quartz64 Model A RK3566 development board"
|
||||
help
|
||||
@@ -39,6 +44,7 @@ config SYS_MALLOC_F_LEN
|
||||
|
||||
source "board/rockchip/bpi-r2-pro-rk3568/Kconfig"
|
||||
source "board/rockchip/evb_rk3568/Kconfig"
|
||||
+source "board/friendlyelec/nanopi-r5s-rk3568/Kconfig"
|
||||
source "board/pine64/quartz64-a-rk3566/Kconfig"
|
||||
source "board/radxa/rock-3a-rk3568/Kconfig"
|
||||
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5s-rk3568/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+if TARGET_NANOPI_R5S_RK3568
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "nanopi-r5s-rk3568"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "friendlyelec"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "nanopi-r5s-rk3568"
|
||||
+
|
||||
+config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
+ def_bool y
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5s-rk3568/Makefile
|
||||
@@ -0,0 +1,4 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+
|
||||
+obj-y += nanopi-r5s-rk3568.o
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5s-rk3568/nanopi-r5s-rk3568.c
|
||||
@@ -0,0 +1,4 @@
|
||||
+ // SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ *
|
||||
+ */
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r5s-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-nanopi-r5s"
|
||||
+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_NANOPI_R5S_RK3568=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
|
||||
+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-nanopi-r5s.dtb"
|
||||
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
+# 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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
||||
--- /dev/null
|
||||
+++ b/include/configs/nanopi-r5s-rk3568.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+
|
||||
+#ifndef __NANOPI_R5S_RK3568_H
|
||||
+#define __NANOPI_R5S_RK3568_H
|
||||
+
|
||||
+#include <configs/rk3568_common.h>
|
||||
+
|
||||
+#define CONFIG_SUPPORT_EMMC_RPMB
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,42 @@
|
|||
From c9a8a3b5fb4ae210c5a5acb1538b0e961c5d1421 Mon Sep 17 00:00:00 2001
|
||||
From: Tang Yun ping <typ@rock-chips.com>
|
||||
Date: Wed, 23 Jun 2021 19:48:59 +0800
|
||||
Subject: [PATCH] rk356x: ddr: fix dbw detect bug
|
||||
|
||||
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
|
||||
Change-Id: Ifadad00853eb0ad43a68f12335fd243e6a1bc04b
|
||||
---
|
||||
drivers/ram/rockchip/sdram_common.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/ram/rockchip/sdram_common.c
|
||||
+++ b/drivers/ram/rockchip/sdram_common.c
|
||||
@@ -299,22 +299,22 @@ int sdram_detect_dbw(struct sdram_cap_info *cap_info, u32 dram_type)
|
||||
bw = cap_info->bw;
|
||||
cs_cap = (1 << (row + col + bk + bw - 20));
|
||||
if (bw == 2) {
|
||||
- if (cs_cap <= 0x2000000) /* 256Mb */
|
||||
+ if (cs_cap <= 0x20) /* 256Mb */
|
||||
die_bw_0 = (col < 9) ? 2 : 1;
|
||||
- else if (cs_cap <= 0x10000000) /* 2Gb */
|
||||
+ else if (cs_cap <= 0x100) /* 2Gb */
|
||||
die_bw_0 = (col < 10) ? 2 : 1;
|
||||
- else if (cs_cap <= 0x40000000) /* 8Gb */
|
||||
+ else if (cs_cap <= 0x400) /* 8Gb */
|
||||
die_bw_0 = (col < 11) ? 2 : 1;
|
||||
else
|
||||
die_bw_0 = (col < 12) ? 2 : 1;
|
||||
if (cs > 1) {
|
||||
row = cap_info->cs1_row;
|
||||
cs_cap = (1 << (row + col + bk + bw - 20));
|
||||
- if (cs_cap <= 0x2000000) /* 256Mb */
|
||||
+ if (cs_cap <= 0x20) /* 256Mb */
|
||||
die_bw_0 = (col < 9) ? 2 : 1;
|
||||
- else if (cs_cap <= 0x10000000) /* 2Gb */
|
||||
+ else if (cs_cap <= 0x100) /* 2Gb */
|
||||
die_bw_0 = (col < 10) ? 2 : 1;
|
||||
- else if (cs_cap <= 0x40000000) /* 8Gb */
|
||||
+ else if (cs_cap <= 0x400) /* 8Gb */
|
||||
die_bw_0 = (col < 11) ? 2 : 1;
|
||||
else
|
||||
die_bw_0 = (col < 12) ? 2 : 1;
|
|
@ -0,0 +1,44 @@
|
|||
From c7496009386dbac8f8d18a94258031f30683d7c6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 20 Feb 2022 07:59:02 -0500
|
||||
Subject: [PATCH] gpio: rockchip: fix building for spl
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
drivers/gpio/rk_gpio.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/common/spl/Kconfig
|
||||
+++ b/common/spl/Kconfig
|
||||
@@ -454,6 +454,11 @@ config SPL_FIT_IMAGE_TINY
|
||||
ensure this information is available to the next image
|
||||
invoked).
|
||||
|
||||
+config SPL_ADC
|
||||
+ bool "Support ADC drivers in SPL"
|
||||
+ help
|
||||
+ Enable ADC drivers in SPL.
|
||||
+
|
||||
config SPL_CACHE
|
||||
bool "Support CACHE drivers"
|
||||
help
|
||||
--- a/drivers/Makefile
|
||||
+++ b/drivers/Makefile
|
||||
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
+obj-$(CONFIG_$(SPL_)ADC) += adc/
|
||||
obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/
|
||||
obj-$(CONFIG_$(SPL_TPL_)BUTTON) += button/
|
||||
obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache/
|
||||
--- a/drivers/gpio/rk_gpio.c
|
||||
+++ b/drivers/gpio/rk_gpio.c
|
||||
@@ -118,7 +118,7 @@ static int rockchip_gpio_get_function(struct udevice *dev, unsigned offset)
|
||||
}
|
||||
|
||||
/* Simple SPL interface to GPIOs */
|
||||
-#ifdef CONFIG_SPL_BUILD
|
||||
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ROCKCHIP_GPIO_V2)
|
||||
|
||||
enum {
|
||||
PULL_NONE_1V8 = 0,
|
|
@ -0,0 +1,28 @@
|
|||
From 5011ceb0da47f7c3d54d20b45b7df884e6e92ac5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 20 Feb 2022 07:58:38 -0500
|
||||
Subject: [PATCH] clk: rockchip: rk3568: fix reset handler
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
drivers/clk/rockchip/clk_rk3568.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk_rk3568.c
|
||||
+++ b/drivers/clk/rockchip/clk_rk3568.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <asm/arch-rockchip/clock.h>
|
||||
#include <asm/arch-rockchip/hardware.h>
|
||||
#include <asm/io.h>
|
||||
+#include <dm/device-internal.h>
|
||||
#include <dm/lists.h>
|
||||
#include <dt-bindings/clock/rk3568-cru.h>
|
||||
|
||||
@@ -2934,6 +2935,7 @@ static int rk3568_clk_bind(struct udevice *dev)
|
||||
glb_srst_fst);
|
||||
priv->glb_srst_snd_value = offsetof(struct rk3568_cru,
|
||||
glb_srsr_snd);
|
||||
+ dev_set_priv(sys_child, priv);
|
||||
}
|
||||
|
||||
#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
|
|
@ -0,0 +1,144 @@
|
|||
From 79cb33b9da0c9475486ca0759341057854b25e38 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Sun, 20 Feb 2022 07:57:50 -0500
|
||||
Subject: [PATCH] rockchip: handle bootrom mode in spl
|
||||
|
||||
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/Makefile | 6 +--
|
||||
arch/arm/mach-rockchip/boot_mode.c | 4 +-
|
||||
arch/arm/mach-rockchip/rk3568/rk3568.c | 54 +++++++++++++++++++++++++-
|
||||
3 files changed, 59 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-rockchip/Makefile
|
||||
+++ b/arch/arm/mach-rockchip/Makefile
|
||||
@@ -15,13 +15,13 @@ obj-tpl-$(CONFIG_ROCKCHIP_PX30) += px30-board-tpl.o
|
||||
|
||||
obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o
|
||||
|
||||
-ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
|
||||
-
|
||||
# Always include boot_mode.o, as we bypass it (i.e. turn it off)
|
||||
# inside of boot_mode.c when CONFIG_BOOT_MODE_REG is 0. This way,
|
||||
# we can have the preprocessor correctly recognise both 0x0 and 0
|
||||
# meaning "turn it off".
|
||||
-obj-y += boot_mode.o
|
||||
+obj-$(CONFIG_ARCH_ROCKCHIP) += boot_mode.o
|
||||
+
|
||||
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
|
||||
obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
|
||||
obj-$(CONFIG_MISC_INIT_R) += misc.o
|
||||
endif
|
||||
--- a/arch/arm/mach-rockchip/boot_mode.c
|
||||
+++ b/arch/arm/mach-rockchip/boot_mode.c
|
||||
@@ -51,7 +51,7 @@ __weak int rockchip_dnl_key_pressed(void)
|
||||
ret = -ENODEV;
|
||||
uclass_foreach_dev(dev, uc) {
|
||||
if (!strncmp(dev->name, "saradc", 6)) {
|
||||
- ret = adc_channel_single_shot(dev->name, 1, &val);
|
||||
+ ret = adc_channel_single_shot(dev->name, 0, &val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,7 @@ int setup_boot_mode(void)
|
||||
boot_mode = readl(reg);
|
||||
debug("%s: boot mode 0x%08x\n", __func__, boot_mode);
|
||||
|
||||
+#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
|
||||
/* Clear boot mode */
|
||||
writel(BOOT_NORMAL, reg);
|
||||
|
||||
@@ -102,6 +103,7 @@ int setup_boot_mode(void)
|
||||
env_set("preboot", "setenv preboot; ums mmc 0");
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/rk3568.c
|
||||
@@ -9,19 +9,30 @@
|
||||
#include <asm/armv8/mmu.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
+#include <asm/arch-rockchip/boot_mode.h>
|
||||
#include <asm/arch-rockchip/grf_rk3568.h>
|
||||
#include <asm/arch-rockchip/hardware.h>
|
||||
#include <dt-bindings/clock/rk3568-cru.h>
|
||||
|
||||
#define PMUGRF_BASE 0xfdc20000
|
||||
#define GRF_BASE 0xfdc60000
|
||||
+#define GRF_GPIO1B_IOMUX_H 0x0c
|
||||
+#define GRF_GPIO1C_IOMUX_L 0x10
|
||||
+#define GRF_GPIO1C_IOMUX_H 0x14
|
||||
+#define GRF_GPIO1D_IOMUX_L 0x18
|
||||
+#define GRF_GPIO1D_IOMUX_H 0x1c
|
||||
+#define GRF_GPIO2A_IOMUX_L 0x20
|
||||
#define GRF_GPIO1B_DS_2 0x218
|
||||
#define GRF_GPIO1B_DS_3 0x21c
|
||||
#define GRF_GPIO1C_DS_0 0x220
|
||||
#define GRF_GPIO1C_DS_1 0x224
|
||||
#define GRF_GPIO1C_DS_2 0x228
|
||||
#define GRF_GPIO1C_DS_3 0x22c
|
||||
-#define SGRF_BASE 0xFDD18000
|
||||
+#define GRF_GPIO1D_DS_0 0x230
|
||||
+#define GRF_GPIO1D_DS_1 0x234
|
||||
+#define GRF_GPIO1D_DS_2 0x238
|
||||
+#define SGRF_BASE 0xfdd18000
|
||||
+#define SGRF_SOC_CON3 0x0c
|
||||
#define SGRF_SOC_CON4 0x10
|
||||
#define EMMC_HPROT_SECURE_CTRL 0x03
|
||||
#define SDMMC0_HPROT_SECURE_CTRL 0x01
|
||||
@@ -133,6 +144,24 @@ int arch_cpu_init(void)
|
||||
writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_1);
|
||||
writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_2);
|
||||
writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_3);
|
||||
+
|
||||
+ /* emmc, sfc, and sdmmc iomux */
|
||||
+ writel((0x7777UL << 16) | (0x1111), GRF_BASE + GRF_GPIO1B_IOMUX_H);
|
||||
+ writel((0x7777UL << 16) | (0x1111), GRF_BASE + GRF_GPIO1C_IOMUX_L);
|
||||
+ writel((0x7777UL << 16) | (0x2111), GRF_BASE + GRF_GPIO1C_IOMUX_H);
|
||||
+ writel((0x7777UL << 16) | (0x1111), GRF_BASE + GRF_GPIO1D_IOMUX_L);
|
||||
+ writel((0x7777UL << 16) | (0x1111), GRF_BASE + GRF_GPIO1D_IOMUX_H);
|
||||
+ writel((0x7777UL << 16) | (0x1111), GRF_BASE + GRF_GPIO2A_IOMUX_L);
|
||||
+
|
||||
+ /* set the fspi d0~3 cs0 to level 2 */
|
||||
+ writel(0x3f000700, GRF_BASE + GRF_GPIO1C_DS_3);
|
||||
+ writel(0x3f000700, GRF_BASE + GRF_GPIO1D_DS_0);
|
||||
+ writel(0x3f3f0707, GRF_BASE + GRF_GPIO1D_DS_1);
|
||||
+ writel(0x003f0007, GRF_BASE + GRF_GPIO1D_DS_2);
|
||||
+
|
||||
+ /* Set the fspi to secure */
|
||||
+ writel(((0x1 << 14) << 16) | (0x0 << 14), SGRF_BASE + SGRF_SOC_CON3);
|
||||
+
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -164,3 +193,26 @@ int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
return 0;
|
||||
};
|
||||
#endif
|
||||
+
|
||||
+#ifdef CONFIG_SPL_BUILD
|
||||
+
|
||||
+void __weak led_setup(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void spl_board_init(void)
|
||||
+{
|
||||
+ led_setup();
|
||||
+
|
||||
+#if defined(SPL_DM_REGULATOR)
|
||||
+ /*
|
||||
+ * Turning the eMMC and SPI back on (if disabled via the Qseven
|
||||
+ * BIOS_ENABLE) signal is done through a always-on regulator).
|
||||
+ */
|
||||
+ if (regulators_enable_boot_on(false))
|
||||
+ debug("%s: Cannot enable boot on regulator\n", __func__);
|
||||
+#endif
|
||||
+
|
||||
+ setup_boot_mode();
|
||||
+}
|
||||
+#endif
|
|
@ -0,0 +1,282 @@
|
|||
From cd6a45a41fb2c19884ac87afade87b4d53601929 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rini <trini@konsulko.com>
|
||||
Date: Sat, 25 Jun 2022 11:02:31 -0400
|
||||
Subject: [PATCH] Convert CONFIG_USB_OHCI_NEW et al to Kconfig
|
||||
|
||||
This converts the following to Kconfig:
|
||||
CONFIG_SYS_OHCI_SWAP_REG_ACCESS
|
||||
CONFIG_SYS_USB_OHCI_CPU_INIT
|
||||
CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
|
||||
CONFIG_SYS_USB_OHCI_SLOT_NAME
|
||||
CONFIG_USB_ATMEL
|
||||
CONFIG_USB_ATMEL_CLK_SEL_PLLB
|
||||
CONFIG_USB_ATMEL_CLK_SEL_UPLL
|
||||
CONFIG_USB_OHCI_LPC32XX
|
||||
CONFIG_USB_OHCI_NEW
|
||||
|
||||
Signed-off-by: Tom Rini <trini@konsulko.com>
|
||||
---
|
||||
|
||||
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
|
||||
index 4d6d235cb125..c81437300c74 100644
|
||||
--- a/configs/evb-rk3328_defconfig
|
||||
+++ b/configs/evb-rk3328_defconfig
|
||||
@@ -99,6 +99,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
|
||||
index 41793ca7e486..15c2e1698c20 100644
|
||||
--- a/configs/nanopi-r2s-rk3328_defconfig
|
||||
+++ b/configs/nanopi-r2s-rk3328_defconfig
|
||||
@@ -102,6 +102,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
|
||||
index ab25abc1a031..43b90c7879b7 100644
|
||||
--- a/configs/roc-cc-rk3328_defconfig
|
||||
+++ b/configs/roc-cc-rk3328_defconfig
|
||||
@@ -108,6 +108,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
|
||||
index 1d51a267b93a..7d95e171f7f4 100644
|
||||
--- a/configs/rock-pi-e-rk3328_defconfig
|
||||
+++ b/configs/rock-pi-e-rk3328_defconfig
|
||||
@@ -109,6 +109,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
|
||||
index 640fe558d414..bc333a5e2a6a 100644
|
||||
--- a/configs/rock64-rk3328_defconfig
|
||||
+++ b/configs/rock64-rk3328_defconfig
|
||||
@@ -106,6 +106,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
|
||||
index 78e50dbfbcb7..bb5b2143691d 100644
|
||||
--- a/configs/rock960-rk3399_defconfig
|
||||
+++ b/configs/rock960-rk3399_defconfig
|
||||
@@ -74,6 +74,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_KEYBOARD=y
|
||||
CONFIG_USB_HOST_ETHER=y
|
||||
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
|
||||
index 4d2a5b32e31c..ef28fe6a937a 100644
|
||||
--- a/configs/rockpro64-rk3399_defconfig
|
||||
+++ b/configs/rockpro64-rk3399_defconfig
|
||||
@@ -87,6 +87,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GENERIC=y
|
||||
CONFIG_USB_KEYBOARD=y
|
||||
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
|
||||
index 0b82c2fdaf71..31ae9f74e7ac 100644
|
||||
--- a/drivers/usb/host/Kconfig
|
||||
+++ b/drivers/usb/host/Kconfig
|
||||
@@ -297,10 +297,17 @@ config USB_EHCI_TXFIFO_THRESH
|
||||
Enables support for the on-chip EHCI controller on FSL chips.
|
||||
endif # USB_EHCI_HCD
|
||||
|
||||
+config USB_OHCI_NEW
|
||||
+ bool
|
||||
+
|
||||
+config SYS_USB_OHCI_CPU_INIT
|
||||
+ bool
|
||||
+
|
||||
config USB_OHCI_HCD
|
||||
bool "OHCI HCD (USB 1.1) support"
|
||||
depends on DM && OF_CONTROL
|
||||
select USB_HOST
|
||||
+ select USB_OHCI_NEW
|
||||
---help---
|
||||
The Open Host Controller Interface (OHCI) is a standard for accessing
|
||||
USB 1.1 host controller hardware. It does more in hardware than Intel's
|
||||
@@ -332,6 +339,19 @@ config USB_OHCI_DA8XX
|
||||
|
||||
endif # USB_OHCI_HCD
|
||||
|
||||
+config SYS_USB_OHCI_SLOT_NAME
|
||||
+ string "Display name for the OHCI controller"
|
||||
+ depends on USB_OHCI_NEW && !DM_USB
|
||||
+
|
||||
+config SYS_USB_OHCI_MAX_ROOT_PORTS
|
||||
+ int "Maximal number of ports of the root hub"
|
||||
+ depends on USB_OHCI_NEW
|
||||
+ default 1 if ARCH_SUNXI
|
||||
+
|
||||
+config SYS_OHCI_SWAP_REG_ACCESS
|
||||
+ bool "Perform byte swapping on OHCI controller register accesses"
|
||||
+ depends on USB_OHCI_NEW
|
||||
+
|
||||
config USB_UHCI_HCD
|
||||
bool "UHCI HCD (most Intel and VIA) support"
|
||||
select USB_HOST
|
||||
@@ -381,3 +401,27 @@ config USB_R8A66597_HCD
|
||||
---help---
|
||||
This enables support for the on-chip Renesas R8A66597 USB 2.0
|
||||
controller, present in various RZ and SH SoCs.
|
||||
+
|
||||
+config USB_ATMEL
|
||||
+ bool "AT91 OHCI USB support"
|
||||
+ depends on ARCH_AT91
|
||||
+ select SYS_USB_OHCI_CPU_INIT
|
||||
+ select USB_OHCI_NEW
|
||||
+
|
||||
+choice
|
||||
+ prompt "Clock for OHCI"
|
||||
+ depends on USB_ATMEL
|
||||
+
|
||||
+config USB_ATMEL_CLK_SEL_PLLB
|
||||
+ bool "PLLB"
|
||||
+
|
||||
+config USB_ATMEL_CLK_SEL_UPLL
|
||||
+ bool "UPLL"
|
||||
+
|
||||
+endchoice
|
||||
+
|
||||
+config USB_OHCI_LPC32XX
|
||||
+ bool "LPC32xx USB OHCI support"
|
||||
+ depends on ARCH_LPC32XX
|
||||
+ select SYS_USB_OHCI_CPU_INIT
|
||||
+ select USB_OHCI_NEW
|
||||
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
|
||||
index 8ceabaf45c1b..9b955c1bd678 100644
|
||||
--- a/drivers/usb/host/ohci-at91.c
|
||||
+++ b/drivers/usb/host/ohci-at91.c
|
||||
@@ -5,9 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
-
|
||||
-#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
|
||||
-
|
||||
#include <asm/arch/clk.h>
|
||||
|
||||
int usb_cpu_init(void)
|
||||
@@ -65,5 +62,3 @@ int usb_cpu_init_fail(void)
|
||||
{
|
||||
return usb_cpu_stop();
|
||||
}
|
||||
-
|
||||
-#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
|
||||
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
|
||||
index 163f0ef17b11..5d23058aaf6a 100644
|
||||
--- a/drivers/usb/host/ohci-generic.c
|
||||
+++ b/drivers/usb/host/ohci-generic.c
|
||||
@@ -14,10 +14,6 @@
|
||||
#include <reset.h>
|
||||
#include "ohci.h"
|
||||
|
||||
-#if !defined(CONFIG_USB_OHCI_NEW)
|
||||
-# error "Generic OHCI driver requires CONFIG_USB_OHCI_NEW"
|
||||
-#endif
|
||||
-
|
||||
struct generic_ohci {
|
||||
ohci_t ohci;
|
||||
struct clk *clocks; /* clock list */
|
||||
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
|
||||
index a38cd25eb85f..7699f2e6b15a 100644
|
||||
--- a/drivers/usb/host/ohci.h
|
||||
+++ b/drivers/usb/host/ohci.h
|
||||
@@ -151,7 +151,7 @@ struct ohci_hcca {
|
||||
* Maximum number of root hub ports.
|
||||
*/
|
||||
#ifndef CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
|
||||
-# error "CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS undefined!"
|
||||
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
|
||||
index 492b7b4df128..b7e850370b31 100644
|
||||
--- a/include/configs/evb_rk3399.h
|
||||
+++ b/include/configs/evb_rk3399.h
|
||||
@@ -15,7 +15,4 @@
|
||||
|
||||
#define SDRAM_BANK_SIZE (2UL << 30)
|
||||
|
||||
-#define CONFIG_USB_OHCI_NEW
|
||||
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
-
|
||||
#endif
|
||||
diff --git a/include/configs/gru.h b/include/configs/gru.h
|
||||
index b1084bb21d4d..be2dc79968c0 100644
|
||||
--- a/include/configs/gru.h
|
||||
+++ b/include/configs/gru.h
|
||||
@@ -13,7 +13,4 @@
|
||||
|
||||
#include <configs/rk3399_common.h>
|
||||
|
||||
-#define CONFIG_USB_OHCI_NEW
|
||||
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
-
|
||||
#endif
|
||||
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
|
||||
index 90183579202d..165b78ff3309 100644
|
||||
--- a/include/configs/rk3328_common.h
|
||||
+++ b/include/configs/rk3328_common.h
|
||||
@@ -30,8 +30,4 @@
|
||||
"partitions=" PARTS_DEFAULT \
|
||||
BOOTENV
|
||||
|
||||
-/* rockchip ohci host driver */
|
||||
-#define CONFIG_USB_OHCI_NEW
|
||||
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
|
||||
-
|
||||
#endif
|
||||
diff --git a/include/configs/rock960_rk3399.h b/include/configs/rock960_rk3399.h
|
||||
index 2edad710284f..6099d2fa55a6 100644
|
||||
--- a/include/configs/rock960_rk3399.h
|
||||
+++ b/include/configs/rock960_rk3399.h
|
||||
@@ -14,7 +14,4 @@
|
||||
#include <configs/rk3399_common.h>
|
||||
|
||||
#define SDRAM_BANK_SIZE (2UL << 30)
|
||||
-
|
||||
-#define CONFIG_USB_OHCI_NEW
|
||||
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
#endif
|
||||
diff --git a/include/configs/rockpro64_rk3399.h b/include/configs/rockpro64_rk3399.h
|
||||
index 903e9df527c1..9195b9b99e41 100644
|
||||
--- a/include/configs/rockpro64_rk3399.h
|
||||
+++ b/include/configs/rockpro64_rk3399.h
|
||||
@@ -14,7 +14,4 @@
|
||||
#include <configs/rk3399_common.h>
|
||||
|
||||
#define SDRAM_BANK_SIZE (2UL << 30)
|
||||
-
|
||||
-#define CONFIG_USB_OHCI_NEW
|
||||
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
#endif
|
|
@ -1,290 +0,0 @@
|
|||
From b69b9f3f54732c303939eb748aad97cd4cf60168 Mon Sep 17 00:00:00 2001
|
||||
From: Xiaobo Tian <peterwillcn@gmail.com>
|
||||
Date: Sat, 27 Feb 2021 22:39:11 +0800
|
||||
Subject: [PATCH] arm64: rk3399: Add support NanoPi R4s
|
||||
|
||||
NanoPi R4s is SBC base on Rockchip RK3399 hexa-core processor with
|
||||
dual-Core Cortex-A72 and Mali-T864 GPU with 4GiB(LPDDR4) of RAM, SD card support,
|
||||
including 2 gigabit ethernet(RTL8211E 1Gbps - RTL8111H 1Gbps) and 2 USB 3.0 port.
|
||||
port.It also has two GPIO headers which allows further peripherals to be used.
|
||||
|
||||
The devicetree file is taken of the rk3399 nanopi4 Linux kernel [1].
|
||||
|
||||
[1] https://github.com/torvalds/linux/commit/e7a095908227fb3ccc86d001d9e13c9ae2bef8e6
|
||||
|
||||
Signed-off-by: xiaobo <peterwillcn@gmail.com>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi | 16 +++
|
||||
arch/arm/dts/rk3399-nanopi-r4s.dts | 138 +++++++++++++++++++++
|
||||
board/rockchip/evb_rk3399/MAINTAINERS | 6 +
|
||||
configs/nanopi-r4s-rk3399_defconfig | 62 +++++++++
|
||||
5 files changed, 223 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3399-nanopi-r4s.dts
|
||||
create mode 100644 configs/nanopi-r4s-rk3399_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index dd4d4efed31..0a139473811 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -132,6 +132,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399-nanopi-m4.dtb \
|
||||
rk3399-nanopi-m4-2gb.dtb \
|
||||
rk3399-nanopi-neo4.dtb \
|
||||
+ rk3399-nanopi-r4s.dtb \
|
||||
rk3399-orangepi.dtb \
|
||||
rk3399-pinebook-pro.dtb \
|
||||
rk3399-puma-haikou.dtb \
|
||||
diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 00000000000..cd1642527ba
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
|
||||
@@ -0,0 +1,16 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * RK3399-based FriendlyElec boards device tree source
|
||||
+ *
|
||||
+ * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
|
||||
+ *
|
||||
+ * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2018 Collabora Ltd.
|
||||
+ * Copyright (c) 2019 Arm Ltd.
|
||||
+ * Copyright (C) 2020 Xiaobo <peterwillcn@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+#include "rk3399-nanopi4-u-boot.dtsi"
|
||||
+#include "rk3399-sdram-lpddr4-100.dtsi"
|
||||
diff --git a/arch/arm/dts/rk3399-nanopi-r4s.dts b/arch/arm/dts/rk3399-nanopi-r4s.dts
|
||||
new file mode 100644
|
||||
index 00000000000..6f2cf17bf1b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-nanopi-r4s.dts
|
||||
@@ -0,0 +1,138 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
|
||||
+ *
|
||||
+ * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2018 Collabora Ltd.
|
||||
+ * Copyright (c) 2019 Arm Ltd.
|
||||
+ * Copyright (C) 2020 Xiaobo <peterwillcn@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3399-nanopi4.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R4S";
|
||||
+ compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet1 = &r8169;
|
||||
+ };
|
||||
+
|
||||
+ vdd_5v: vdd-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_5v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ fan: pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ cooling-levels = <0 12 18 255>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ fan-supply = <&vdd_5v>;
|
||||
+ pwms = <&pwm1 0 50000 0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ temperature = <55000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+
|
||||
+ cpu_hot: cpu_hot {
|
||||
+ temperature = <65000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map2 {
|
||||
+ trip = <&cpu_warm>;
|
||||
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
|
||||
+ };
|
||||
+
|
||||
+ map3 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&fusb0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&leds {
|
||||
+ lan_led: led-1 {
|
||||
+ gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "nanopi-r4s:green:lan";
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-2 {
|
||||
+ gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "nanopi-r4s:green:wan";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&leds_gpio {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ max-link-speed = <1>;
|
||||
+ num-lanes = <1>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ pcie@0 {
|
||||
+ reg = <0x00000000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ r8169: pcie@0,0 {
|
||||
+ reg = <0x000000 0 0 0 0>;
|
||||
+ local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ host-index-min = <1>;
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ phy-supply = <&vdd_5v>;
|
||||
+};
|
||||
+
|
||||
+&u2phy1_host {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&vcc3v3_sys {
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+};
|
||||
diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS
|
||||
index 4c889e06a63..3b9d60eccd4 100644
|
||||
--- a/board/rockchip/evb_rk3399/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3399/MAINTAINERS
|
||||
@@ -55,6 +55,12 @@ S: Maintained
|
||||
F: configs/nanopi-neo4-rk3399_defconfig
|
||||
F: arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi
|
||||
|
||||
+NANOPI-R4S
|
||||
+M: Xiaobo Tian <peterwillcn@gmail.com>
|
||||
+S: Maintained
|
||||
+F: configs/nanopi-r4s-rk3399_defconfig
|
||||
+F: arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
|
||||
+
|
||||
ORANGEPI-RK3399
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig
|
||||
new file mode 100644
|
||||
index 00000000000..0a3c28b0126
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r4s-rk3399_defconfig
|
||||
@@ -0,0 +1,62 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4s.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4s"
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=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_KEYBOARD=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,166 @@
|
|||
--- a/include/image.h
|
||||
+++ b/include/image.h
|
||||
@@ -1020,21 +1020,6 @@ int fit_image_hash_get_value(const void
|
||||
|
||||
int fit_set_timestamp(void *fit, int noffset, time_t timestamp);
|
||||
|
||||
-/**
|
||||
- * fit_pre_load_data() - add public key to fdt blob
|
||||
- *
|
||||
- * Adds public key to the node pre load.
|
||||
- *
|
||||
- * @keydir: Directory containing keys
|
||||
- * @keydest: FDT blob to write public key
|
||||
- * @fit: Pointer to the FIT format image header
|
||||
- *
|
||||
- * returns:
|
||||
- * 0, on success
|
||||
- * < 0, on failure
|
||||
- */
|
||||
-int fit_pre_load_data(const char *keydir, void *keydest, void *fit);
|
||||
-
|
||||
int fit_cipher_data(const char *keydir, void *keydest, void *fit,
|
||||
const char *comment, int require_keys,
|
||||
const char *engine_id, const char *cmdname);
|
||||
--- a/tools/fit_image.c
|
||||
+++ b/tools/fit_image.c
|
||||
@@ -59,9 +59,6 @@ static int fit_add_file_data(struct imag
|
||||
ret = fit_set_timestamp(ptr, 0, time);
|
||||
}
|
||||
|
||||
- if (!ret)
|
||||
- ret = fit_pre_load_data(params->keydir, dest_blob, ptr);
|
||||
-
|
||||
if (!ret) {
|
||||
ret = fit_cipher_data(params->keydir, dest_blob, ptr,
|
||||
params->comment,
|
||||
--- a/tools/image-host.c
|
||||
+++ b/tools/image-host.c
|
||||
@@ -14,11 +14,6 @@
|
||||
#include <image.h>
|
||||
#include <version.h>
|
||||
|
||||
-#include <openssl/pem.h>
|
||||
-#include <openssl/evp.h>
|
||||
-
|
||||
-#define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig"
|
||||
-
|
||||
/**
|
||||
* fit_set_hash_value - set hash value in requested has node
|
||||
* @fit: pointer to the FIT format image header
|
||||
@@ -1116,115 +1111,6 @@ static int fit_config_add_verification_d
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * 0) open file (open)
|
||||
- * 1) read certificate (PEM_read_X509)
|
||||
- * 2) get public key (X509_get_pubkey)
|
||||
- * 3) provide der format (d2i_RSAPublicKey)
|
||||
- */
|
||||
-static int read_pub_key(const char *keydir, const void *name,
|
||||
- unsigned char **pubkey, int *pubkey_len)
|
||||
-{
|
||||
- char path[1024];
|
||||
- EVP_PKEY *key = NULL;
|
||||
- X509 *cert;
|
||||
- FILE *f;
|
||||
- int ret;
|
||||
-
|
||||
- memset(path, 0, 1024);
|
||||
- snprintf(path, sizeof(path), "%s/%s.crt", keydir, (char *)name);
|
||||
-
|
||||
- /* Open certificate file */
|
||||
- f = fopen(path, "r");
|
||||
- if (!f) {
|
||||
- fprintf(stderr, "Couldn't open RSA certificate: '%s': %s\n",
|
||||
- path, strerror(errno));
|
||||
- return -EACCES;
|
||||
- }
|
||||
-
|
||||
- /* Read the certificate */
|
||||
- cert = NULL;
|
||||
- if (!PEM_read_X509(f, &cert, NULL, NULL)) {
|
||||
- printf("Couldn't read certificate");
|
||||
- ret = -EINVAL;
|
||||
- goto err_cert;
|
||||
- }
|
||||
-
|
||||
- /* Get the public key from the certificate. */
|
||||
- key = X509_get_pubkey(cert);
|
||||
- if (!key) {
|
||||
- printf("Couldn't read public key\n");
|
||||
- ret = -EINVAL;
|
||||
- goto err_pubkey;
|
||||
- }
|
||||
-
|
||||
- /* Get DER form */
|
||||
- ret = i2d_PublicKey(key, pubkey);
|
||||
- if (ret < 0) {
|
||||
- printf("Couldn't get DER form\n");
|
||||
- ret = -EINVAL;
|
||||
- goto err_pubkey;
|
||||
- }
|
||||
-
|
||||
- *pubkey_len = ret;
|
||||
- ret = 0;
|
||||
-
|
||||
-err_pubkey:
|
||||
- X509_free(cert);
|
||||
-err_cert:
|
||||
- fclose(f);
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-int fit_pre_load_data(const char *keydir, void *keydest, void *fit)
|
||||
-{
|
||||
- int pre_load_noffset;
|
||||
- const void *algo_name;
|
||||
- const void *key_name;
|
||||
- unsigned char *pubkey = NULL;
|
||||
- int ret, pubkey_len;
|
||||
-
|
||||
- if (!keydir || !keydest || !fit)
|
||||
- return 0;
|
||||
-
|
||||
- /* Search node pre-load sig */
|
||||
- pre_load_noffset = fdt_path_offset(keydest, IMAGE_PRE_LOAD_PATH);
|
||||
- if (pre_load_noffset < 0) {
|
||||
- ret = 0;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- algo_name = fdt_getprop(keydest, pre_load_noffset, "algo-name", NULL);
|
||||
- key_name = fdt_getprop(keydest, pre_load_noffset, "key-name", NULL);
|
||||
-
|
||||
- /* Check that all mandatory properties are present */
|
||||
- if (!algo_name || !key_name) {
|
||||
- if (!algo_name)
|
||||
- printf("The property algo-name is missing in the node %s\n",
|
||||
- IMAGE_PRE_LOAD_PATH);
|
||||
- if (!key_name)
|
||||
- printf("The property key-name is missing in the node %s\n",
|
||||
- IMAGE_PRE_LOAD_PATH);
|
||||
- ret = -EINVAL;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- /* Read public key */
|
||||
- ret = read_pub_key(keydir, key_name, &pubkey, &pubkey_len);
|
||||
- if (ret < 0)
|
||||
- goto out;
|
||||
-
|
||||
- /* Add the public key to the device tree */
|
||||
- ret = fdt_setprop(keydest, pre_load_noffset, "public-key",
|
||||
- pubkey, pubkey_len);
|
||||
- if (ret)
|
||||
- printf("Can't set public-key in node %s (ret = %d)\n",
|
||||
- IMAGE_PRE_LOAD_PATH, ret);
|
||||
-
|
||||
- out:
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
int fit_cipher_data(const char *keydir, void *keydest, void *fit,
|
||||
const char *comment, int require_keys,
|
||||
const char *engine_id, const char *cmdname)
|
|
@ -0,0 +1,125 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -413,13 +413,7 @@ PERL = perl
|
||||
PYTHON ?= python
|
||||
PYTHON2 = python2
|
||||
PYTHON3 ?= python3
|
||||
-
|
||||
-# The devicetree compiler and pylibfdt are automatically built unless DTC is
|
||||
-# provided. If DTC is provided, it is assumed the pylibfdt is available too.
|
||||
-DTC_INTREE := $(objtree)/scripts/dtc/dtc
|
||||
-DTC ?= $(DTC_INTREE)
|
||||
-DTC_MIN_VERSION := 010406
|
||||
-
|
||||
+DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
CHECK = sparse
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
@@ -2070,29 +2064,9 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
-# Check dtc and pylibfdt, if DTC is provided, else build them
|
||||
PHONY += scripts_dtc
|
||||
scripts_dtc: scripts_basic
|
||||
- $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \
|
||||
- $(MAKE) $(build)=scripts/dtc; \
|
||||
- else \
|
||||
- if ! $(DTC) -v >/dev/null; then \
|
||||
- echo '*** Failed to check dtc version: $(DTC)'; \
|
||||
- false; \
|
||||
- else \
|
||||
- if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \
|
||||
- echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \
|
||||
- false; \
|
||||
- else \
|
||||
- if [ -n "$(CONFIG_PYLIBFDT)" ]; then \
|
||||
- if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \
|
||||
- echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \
|
||||
- false; \
|
||||
- fi; \
|
||||
- fi; \
|
||||
- fi; \
|
||||
- fi; \
|
||||
- fi
|
||||
+ $(Q)$(MAKE) $(build)=scripts/dtc
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_cpp_lds = LDS $@
|
||||
--- a/doc/build/gcc.rst
|
||||
+++ b/doc/build/gcc.rst
|
||||
@@ -131,27 +131,6 @@ Further important build parameters are
|
||||
* O=<dir> - generate all output files in directory <dir>, including .config
|
||||
* V=1 - verbose build
|
||||
|
||||
-Devicetree compiler
|
||||
-~~~~~~~~~~~~~~~~~~~
|
||||
-
|
||||
-Boards that use `CONFIG_OF_CONTROL` (i.e. almost all of them) need the
|
||||
-devicetree compiler (dtc). Those with `CONFIG_PYLIBFDT` need pylibfdt, a Python
|
||||
-library for accessing devicetree data. Suitable versions of these are included
|
||||
-in the U-Boot tree in `scripts/dtc` and built automatically as needed.
|
||||
-
|
||||
-To use the system versions of these, use the DTC parameter, for example
|
||||
-
|
||||
-.. code-block:: bash
|
||||
-
|
||||
- DTC=/usr/bin/dtc make
|
||||
-
|
||||
-In this case, dtc and pylibfdt are not built. The build checks that the version
|
||||
-of dtc is new enough. It also makes sure that pylibfdt is present, if needed
|
||||
-(see `scripts_dtc` in the Makefile).
|
||||
-
|
||||
-Note that the :doc:`tools` are always built with the included version of libfdt
|
||||
-so it is not possible to build U-Boot tools with a system libfdt, at present.
|
||||
-
|
||||
Other build targets
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
--- a/dts/Kconfig
|
||||
+++ b/dts/Kconfig
|
||||
@@ -5,6 +5,9 @@
|
||||
config SUPPORT_OF_CONTROL
|
||||
bool
|
||||
|
||||
+config DTC
|
||||
+ bool
|
||||
+
|
||||
config PYLIBFDT
|
||||
bool
|
||||
|
||||
@@ -21,6 +24,7 @@ menu "Device Tree Control"
|
||||
|
||||
config OF_CONTROL
|
||||
bool "Run-time configuration via Device Tree"
|
||||
+ select DTC
|
||||
select OF_LIBFDT if !OF_PLATDATA
|
||||
select OF_REAL if !OF_PLATDATA
|
||||
help
|
||||
--- a/scripts/Makefile
|
||||
+++ b/scripts/Makefile
|
||||
@@ -10,3 +10,4 @@ always := $(hostprogs-y)
|
||||
|
||||
# Let clean descend into subdirs
|
||||
subdir- += basic kconfig dtc
|
||||
+subdir-$(CONFIG_DTC) += dtc
|
||||
--- a/scripts/dtc-version.sh
|
||||
+++ b/scripts/dtc-version.sh
|
||||
@@ -10,16 +10,11 @@
|
||||
dtc="$*"
|
||||
|
||||
if [ ${#dtc} -eq 0 ]; then
|
||||
- echo "Error: No dtc command specified"
|
||||
+ echo "Error: No dtc command specified."
|
||||
printf "Usage:\n\t$0 <dtc-command>\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-if ! which $dtc >/dev/null ; then
|
||||
- echo "Error: Cannot find dtc: $dtc"
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
|
||||
MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
|
||||
PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)
|
|
@ -0,0 +1,10 @@
|
|||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -119,7 +119,6 @@ dumpimage-mkimage-objs := aisimage.o \
|
||||
imximage.o \
|
||||
imx8image.o \
|
||||
imx8mimage.o \
|
||||
- kwbimage.o \
|
||||
lib/md5.o \
|
||||
lpc32xximage.o \
|
||||
mxsimage.o \
|
|
@ -0,0 +1,27 @@
|
|||
From 2114d68b3c755ec8043ae9e43ac8e9753e0cec84 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Sun, 17 Jan 2021 15:26:09 -0500
|
||||
Subject: [PATCH] rockpro64: disable CONFIG_USE_PREBOOT
|
||||
|
||||
On commit https://github.com/u-boot/u-boot/commit/f81f9f0ebac596bae7f27db095f4f0272b606cc3
|
||||
CONFIG_USE_PREBOOT was enabled on the RockPro64.
|
||||
|
||||
When the board is booting, U-Boot hangs as soon as it disables the USB
|
||||
controller. This is a workaround until a final solution is deployed
|
||||
upstream.
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
configs/rockpro64-rk3399_defconfig | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/configs/rockpro64-rk3399_defconfig
|
||||
+++ b/configs/rockpro64-rk3399_defconfig
|
||||
@@ -12,7 +12,6 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64"
|
||||
CONFIG_DEBUG_UART=y
|
||||
-CONFIG_USE_PREBOOT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_MISC_INIT_R=y
|
|
@ -0,0 +1,740 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -124,6 +124,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399-ficus.dtb \
|
||||
rk3399-firefly.dtb \
|
||||
rk3399-gru-bob.dtb \
|
||||
+ rk3399-guangmiao-g4c.dtb \
|
||||
rk3399-gru-kevin.dtb \
|
||||
rk3399-khadas-edge.dtb \
|
||||
rk3399-khadas-edge-captain.dtb \
|
||||
--- /dev/null
|
||||
+++ b/configs/guangmiao-g4c-rk3399_defconfig
|
||||
@@ -0,0 +1,57 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-guangmiao-g4c.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-guangmiao-g4c"
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=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_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-guangmiao-g4c-u-boot.dtsi
|
||||
@@ -0,0 +1,18 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+#include "rk3399-u-boot.dtsi"
|
||||
+#include "rk3399-sdram-lpddr4-100.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
|
||||
+};
|
||||
+
|
||||
+&vdd_log {
|
||||
+ regulator-init-microvolt = <950000>;
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-guangmiao-g4c.dts
|
||||
@@ -0,0 +1,646 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SHAREVDI GuangMiao G4C";
|
||||
+ compatible = "sharevdi,guangmiao-g4c", "rockchip,rk3399";
|
||||
+
|
||||
+ /delete-node/ display-subsystem;
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ clkin_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "clkin_gmac";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sys: vcc-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-name = "vcc_sys";
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_0v9: vcc-0v9 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+ regulator-name = "vcc_0v9";
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_host0: vcc5v0-host0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc5v0_host0";
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_log: vdd-log {
|
||||
+ compatible = "pwm-regulator";
|
||||
+ pwms = <&pwm2 0 25000 1>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ regulator-name = "vdd_log";
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ autorepeat;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+
|
||||
+ reset {
|
||||
+ debounce-interval = <100>;
|
||||
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan_led_pin>, <&status_led_pin>, <&wan_led_pin>;
|
||||
+
|
||||
+ lan_led: led-lan {
|
||||
+ gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan";
|
||||
+ };
|
||||
+
|
||||
+ status_led: led-status {
|
||||
+ gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:status";
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-wan {
|
||||
+ gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:wan";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clock-parents = <&clkin_gmac>;
|
||||
+ assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
+ clock_in_out = "input";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_pmeb>, <&phy_rstb>;
|
||||
+ phy-handle = <&rtl8211e>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc3v3_s3>;
|
||||
+ tx_delay = <0x28>;
|
||||
+ rx_delay = <0x11>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ rtl8211e: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ interrupt-parent = <&gpio3>;
|
||||
+ interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <30000>;
|
||||
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-rising-time-ns = <160>;
|
||||
+ i2c-scl-falling-time-ns = <30>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu_b: regulator@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ reg = <0x40>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&cpu_b_sleep>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_cpu_b";
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: regulator@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ reg = <0x41>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gpu_sleep>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ clock-output-names = "rtc_clko_soc", "rtc_clko_wifi";
|
||||
+ #clock-cells = <1>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc_sys>;
|
||||
+ vcc2-supply = <&vcc_sys>;
|
||||
+ vcc3-supply = <&vcc_sys>;
|
||||
+ vcc4-supply = <&vcc_sys>;
|
||||
+ vcc6-supply = <&vcc_sys>;
|
||||
+ vcc7-supply = <&vcc_sys>;
|
||||
+ vcc8-supply = <&vcc_3v0>;
|
||||
+ vcc9-supply = <&vcc_sys>;
|
||||
+ vcc10-supply = <&vcc_sys>;
|
||||
+ vcc11-supply = <&vcc_sys>;
|
||||
+ vcc12-supply = <&vcc_sys>;
|
||||
+ vddio-supply = <&vcc_3v0>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_center: DCDC_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_l: DCDC_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-name = "vdd_cpu_l";
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_vldo1: LDO_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_vldo1";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_vldo2: LDO_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_vldo2";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sdio: LDO_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc_sdio";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcc3v0_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v5: LDO_REG6 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vcc_1v5";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1500000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_codec: LDO_REG7 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcca1v8_codec";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: LDO_REG8 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s3: SWITCH_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s3";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s0: SWITCH_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s0";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ i2c-scl-rising-time-ns = <450>;
|
||||
+ i2c-scl-falling-time-ns = <15>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ bt656-supply = <&vcc_1v8>;
|
||||
+ audio-supply = <&vcca1v8_codec>;
|
||||
+ sdmmc-supply = <&vcc_sdio>;
|
||||
+ gpio1830-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie_phy {
|
||||
+ assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
|
||||
+ assigned-clock-rates = <100000000>;
|
||||
+ assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ ep-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ max-link-speed = <1>;
|
||||
+ num-lanes = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_clkreqnb_cpm>;
|
||||
+ vpcie0v9-supply = <&vcc_0v9>;
|
||||
+ vpcie1v8-supply = <&vcca_1v8>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_sys>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gpio-leds {
|
||||
+ lan_led_pin: lan-led-pin {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ status_led_pin: status-led-pin {
|
||||
+ rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led_pin: wan-led-pin {
|
||||
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gmac {
|
||||
+ phy_intb: phy-intb {
|
||||
+ rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ phy_pmeb: phy-pmeb {
|
||||
+ rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ phy_rstb: phy-rstb {
|
||||
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ cpu_b_sleep: cpu-b-sleep {
|
||||
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ gpu_sleep: gpu-sleep {
|
||||
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio {
|
||||
+ bt_reg_on_h: bt-reg-on-h {
|
||||
+ /* external pullup to VCC1V8_PMUPLL */
|
||||
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+ sdmmc0_det_l: sdmmc0-det-l {
|
||||
+ rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmu1830-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ pinctrl-names = "active";
|
||||
+ pinctrl-0 = <&pwm2_pin_pull_down>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
|
||||
+ vqmmc-supply = <&vcc_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_host0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_host {
|
||||
+ phy-supply = <&vcc5v0_host0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_1 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -0,0 +1,174 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -109,6 +109,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||
rk3328-evb.dtb \
|
||||
rk3328-nanopi-r2s.dtb \
|
||||
+ rk3328-orangepi-r1-plus.dtb \
|
||||
rk3328-roc-cc.dtb \
|
||||
rk3328-rock64.dtb \
|
||||
rk3328-rock-pi-e.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||
@@ -0,0 +1,1 @@
|
||||
+#include "rk3328-nanopi-r2s-u-boot.dtsi"
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus.dts
|
||||
@@ -0,0 +1,38 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+#include "rk3328-nanopi-r2s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi R1 Plus";
|
||||
+ compatible = "xunlong,orangepi-r1-plus", "rockchip,rk3328";
|
||||
+};
|
||||
+
|
||||
+&lan_led {
|
||||
+ label = "orangepi-r1-plus:green:lan";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <10000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sys_led {
|
||||
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "orangepi-r1-plus:red:sys";
|
||||
+};
|
||||
+
|
||||
+&sys_led_pin {
|
||||
+ rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&wan_led {
|
||||
+ label = "orangepi-r1-plus:green:wan";
|
||||
+};
|
||||
--- a/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
@@ -12,6 +12,13 @@ F: configs/nanopi-r2s-rk3328_defconfig
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s.dts
|
||||
|
||||
+ORANGEPI-R1-PLUS-RK3328
|
||||
+M: Shenzhen Xunlong Software CO.,Limited <zhao_steven@263.net>
|
||||
+S: Maintained
|
||||
+F: configs/orangepi-r1-plus-rk3328_defconfig
|
||||
+F: arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||
+F: arch/arm/dts/rk3328-orangepi-r1-plus.dts
|
||||
+
|
||||
ROC-RK3328-CC
|
||||
M: Loic Devulder <ldevulder@suse.com>
|
||||
M: Chen-Yu Tsai <wens@csie.org>
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi-r1-plus-rk3328_defconfig
|
||||
@@ -0,0 +1,100 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3328=y
|
||||
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYSINFO=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb"
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_I2C_SUPPORT=y
|
||||
+CONFIG_SPL_POWER_SUPPORT=y
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_TPL_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus"
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_TPL_OF_PLATDATA=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_TPL_DM=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_TPL_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_TPL_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_DM_REGULATOR=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_TPL_RAM=y
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_TPL_SYSRESET is not set
|
||||
+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_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
+CONFIG_USB_DWC2=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+# CONFIG_USB_DWC3_GADGET is not set
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_TPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,146 @@
|
|||
From 68836b81f7d6328a1a5a6cce5a00bf4010f742e5 Mon Sep 17 00:00:00 2001
|
||||
From: baiywt <baiywt_gj@163.com>
|
||||
Date: Wed, 24 Nov 2021 19:59:38 +0800
|
||||
Subject: [PATCH] Add support for Orangepi R1 Plus LTS
|
||||
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts | 7 ++
|
||||
configs/orangepi-r1-plus-lts-rk3328_defconfig | 98 +++++++++++++++++++
|
||||
3 files changed, 106 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts
|
||||
create mode 100644 configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index adfe6c3f..3d4e0f59 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -110,6 +110,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||
rk3328-evb.dtb \
|
||||
rk3328-nanopi-r2s.dtb \
|
||||
rk3328-orangepi-r1-plus.dtb \
|
||||
+ rk3328-orangepi-r1-plus-lts.dtb \
|
||||
rk3328-roc-cc.dtb \
|
||||
rk3328-rock64.dtb \
|
||||
rk3328-rock-pi-e.dtb
|
||||
diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts b/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts
|
||||
new file mode 100644
|
||||
index 00000000..e6225b0c
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts
|
||||
@@ -0,0 +1,7 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+#include "rk3328-orangepi-r1-plus.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi R1 Plus LTS";
|
||||
+ compatible = "xunlong,orangepi-r1-plus-lts", "rockchip,rk3328";
|
||||
+};
|
||||
diff --git a/configs/orangepi-r1-plus-lts-rk3328_defconfig b/configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||
new file mode 100644
|
||||
index 00000000..3cb3b5c3
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||
@@ -0,0 +1,100 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3328=y
|
||||
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYSINFO=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus-lts.dtb"
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_I2C_SUPPORT=y
|
||||
+CONFIG_SPL_POWER_SUPPORT=y
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_TPL_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus-lts"
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_TPL_OF_PLATDATA=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_TPL_DM=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_TPL_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_TPL_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_DM_REGULATOR=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_TPL_RAM=y
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_TPL_SYSRESET is not set
|
||||
+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_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
+CONFIG_USB_DWC2=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+# CONFIG_USB_DWC3_GADGET is not set
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_TPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
--
|
||||
2.25.1
|
|
@ -0,0 +1,184 @@
|
|||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index d3e89ca3ba..d5f64ac432 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -108,6 +108,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||
rk3328-evb.dtb \
|
||||
+ rk3328-nanopi-r2c.dtb \
|
||||
rk3328-nanopi-r2s.dtb \
|
||||
rk3328-orangepi-r1-plus.dtb \
|
||||
rk3328-roc-cc.dtb \
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 0000000000..c2e86d0f0e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi
|
||||
@@ -0,0 +1,7 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
|
||||
+ * (C) Copyright 2021 Tianling Shen
|
||||
+ */
|
||||
+
|
||||
+#include "rk3328-nanopi-r2s-u-boot.dtsi"
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2c.dts b/arch/arm/dts/rk3328-nanopi-r2c.dts
|
||||
new file mode 100644
|
||||
index 0000000000..adf91a0306
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2c.dts
|
||||
@@ -0,0 +1,47 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2021 Tianling Shen <cnsztl@immortalwrt.org>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3328-nanopi-r2s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R2C";
|
||||
+ compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
|
||||
+};
|
||||
+
|
||||
+&gmac2io {
|
||||
+ phy-handle = <&yt8521s>;
|
||||
+
|
||||
+ mdio {
|
||||
+ /delete-node/ ethernet-phy@1;
|
||||
+
|
||||
+ yt8521s: ethernet-phy@3 {
|
||||
+ compatible = "ethernet-phy-id0000.011a",
|
||||
+ "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <3>;
|
||||
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <50000>;
|
||||
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&lan_led {
|
||||
+ label = "nanopi-r2c:green:lan";
|
||||
+};
|
||||
+
|
||||
+&sys_led {
|
||||
+ label = "nanopi-r2c:red:sys";
|
||||
+};
|
||||
+
|
||||
+&wan_led {
|
||||
+ label = "nanopi-r2c:green:wan";
|
||||
+};
|
||||
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..7bc7a3274f
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r2c-rk3328_defconfig
|
||||
@@ -0,0 +1,100 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2c"
|
||||
+CONFIG_ROCKCHIP_RK3328=y
|
||||
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_I2C_SUPPORT=y
|
||||
+CONFIG_SPL_POWER_SUPPORT=y
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_TPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_TPL_OF_PLATDATA=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_TPL_DM=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_TPL_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_TPL_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_DM_REGULATOR=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_TPL_RAM=y
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSINFO=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_TPL_SYSRESET is not set
|
||||
+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_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
+CONFIG_USB_DWC2=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+# CONFIG_USB_DWC3_GADGET is not set
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_TPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,113 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -157,6 +157,7 @@
|
||||
rk3399-nanopi-m4b.dtb \
|
||||
rk3399-nanopi-neo4.dtb \
|
||||
rk3399-nanopi-r4s.dtb \
|
||||
+ rk3399-nanopi-r4se.dtb \
|
||||
rk3399-orangepi.dtb \
|
||||
rk3399-pinebook-pro.dtb \
|
||||
rk3399-puma-haikou.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-nanopi-r4se.dts
|
||||
@@ -0,0 +1,32 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * FriendlyElec NanoPC-T4 board device tree source
|
||||
+ *
|
||||
+ * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2018 Collabora Ltd.
|
||||
+ *
|
||||
+ * Copyright (c) 2020 Jensen Huang <jensenhuang@friendlyarm.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3399-nanopi-r4s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R4SE";
|
||||
+ compatible = "friendlyarm,nanopi-r4se", "rockchip,rk3399";
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&sdmmc {
|
||||
+ pinctrl-0 = <&sdmmc_cd>;
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r4se-rk3399_defconfig
|
||||
@@ -0,0 +1,65 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4se"
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4se.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=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_KEYBOARD=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,68 @@
|
|||
--- /dev/null
|
||||
+++ b/configs/rongpin-king3399-rk3399_defconfig
|
||||
@@ -0,0 +1,65 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4se"
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4se.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=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_KEYBOARD=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,784 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -165,6 +165,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399-rock-pi-4b.dtb \
|
||||
rk3399-rock-pi-4c.dtb \
|
||||
rk3399-rock960.dtb \
|
||||
+ rk3399-mpc1903.dtb \
|
||||
rk3399-rockpro64.dtb \
|
||||
rk3399pro-rock-pi-n10.dtb
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-mpc1903.dts
|
||||
@@ -0,0 +1,688 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Rocktech MPC1903";
|
||||
+ compatible = "rocktech,mpc1903", "rockchip,rk3399";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ clkin_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "clkin_gmac";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ vcc12v_dcin: dc-12v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc12v_dcin";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_enable_h>;
|
||||
+ reset-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_host: vcc5v0-host-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_host_en>;
|
||||
+ regulator-name = "vcc5v0_host";
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_lan: vcc-phy-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_lan";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_log: vdd-log {
|
||||
+ compatible = "pwm-regulator";
|
||||
+ pwms = <&pwm2 0 25000 1>;
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&status_led_pin>;
|
||||
+
|
||||
+ status_led: led-status-led {
|
||||
+ label = "status_led";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hub_control {
|
||||
+ compatible = "rocktech,hub-control";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hub_pwr>;
|
||||
+ hub-pwr-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
+ assigned-clock-parents = <&clkin_gmac>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-supply = <&vcc_lan>;
|
||||
+ phy-mode = "rmgii";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 50000>;
|
||||
+ tx_delay = <0x28>;
|
||||
+ rx_delay = <0x11>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c3>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_i2c_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-rising-time-ns = <168>;
|
||||
+ i2c-scl-falling-time-ns = <4>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk808-clkout2";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc5v0_sys>;
|
||||
+ vcc2-supply = <&vcc5v0_sys>;
|
||||
+ vcc3-supply = <&vcc5v0_sys>;
|
||||
+ vcc4-supply = <&vcc5v0_sys>;
|
||||
+ vcc6-supply = <&vcc5v0_sys>;
|
||||
+ vcc7-supply = <&vcc5v0_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc5v0_sys>;
|
||||
+ vcc10-supply = <&vcc5v0_sys>;
|
||||
+ vcc11-supply = <&vcc5v0_sys>;
|
||||
+ vcc12-supply = <&vcc3v3_sys>;
|
||||
+ vddio-supply = <&vcc_3v0>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_center: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_l: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_cpu_l";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gen_1v8: LDO_REG1 {
|
||||
+ regulator-name = "gen_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gen_3v0: LDO_REG2 {
|
||||
+ regulator-name = "gen_3v0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vcc1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sdio: LDO_REG4 {
|
||||
+ regulator-name = "vcc_sdio";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca3v0_codec: LDO_REG5 {
|
||||
+ regulator-name = "vcca3v0_codec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v5: LDO_REG6 {
|
||||
+ regulator-name = "vcc_1v5";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_codec: LDO_REG7 {
|
||||
+ regulator-name = "vcc1v8_codec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: LDO_REG8 {
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s3: SWITCH_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s3";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s0: SWITCH_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s0";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_b: regulator@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ reg = <0x40>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vsel1_pin>;
|
||||
+ regulator-name = "vdd_cpu_b";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: regulator@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ reg = <0x41>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vsel2_pin>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rtc: pcf85263@51 {
|
||||
+ compatible = "nxp,pcf85263";
|
||||
+ reg = <0x51>;
|
||||
+ pinctrl-0 = <&rtc_int>;
|
||||
+ rtc_int_gpio = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ i2c-scl-rising-time-ns = <300>;
|
||||
+ i2c-scl-falling-time-ns = <15>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ i2c-scl-rising-time-ns = <600>;
|
||||
+ i2c-scl-falling-time-ns = <20>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c6 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s0 {
|
||||
+ rockchip,i2s-broken-burst-len;
|
||||
+ rockchip,playback-channels = <8>;
|
||||
+ rockchip,capture-channels = <8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s2 {
|
||||
+ rockchip,bclk-fs = <128>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bt656-supply = <&vcc_3v0>;
|
||||
+ audio-supply = <&vcc1v8_codec>;
|
||||
+ sdmmc-supply = <&vcc_sdio>;
|
||||
+ gpio1830-supply = <&vcc_3v0>;
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pmu1830-supply = <&vcc_3v0>;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ bt {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ vsel1_pin: vsel1-pin {
|
||||
+ rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ vsel2_pin: vsel2-pin {
|
||||
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb2 {
|
||||
+ vcc5v0_host_en: vcc5v0-host-en {
|
||||
+ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ hub_pwr: hub-pwr {
|
||||
+ rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ wifi_enable_h: wifi-enable-h {
|
||||
+ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rtc {
|
||||
+ rtc_int: rtc-int {
|
||||
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ led {
|
||||
+ status_led_pin: status-led-pin {
|
||||
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ power_key: power-key {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vcc_1v8>;
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ bus-width = <4>;
|
||||
+ clock-frequency = <50000000>;
|
||||
+ cap-sdio-irq;
|
||||
+ cap-sd-highspeed;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ clock-freq-min-max = <400000 150000000>;
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ supports-sd;
|
||||
+ disable-wp;
|
||||
+ num-slots = <1>;
|
||||
+ vqmmc-supply = <&vcc_sdio>;
|
||||
+ max-frequency = <150000000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+ non-removable;
|
||||
+ supports-emmc;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+ rockchip,hw-tshut-temp = <120000>;
|
||||
+ /* tshut mode 0:CRU 1:GPIO */
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ /* tshut polarity 0:LOW 1:HIGH */
|
||||
+ rockchip,hw-tshut-polarity = <1>;
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_1 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-mpc1903-u-boot.dtsi
|
||||
@@ -0,0 +1,14 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+#include "rk3399-u-boot.dtsi"
|
||||
+#include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/rocktech-mpc1903-rk3399_defconfig
|
||||
@@ -0,0 +1,63 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-mpc1903.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-mpc1903"
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=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_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,406 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-mrkaio-m68s.dtb \
|
||||
rk3568-nanopi-r5s.dtb \
|
||||
rk3566-quartz64-a.dtb \
|
||||
rk3568-rock-3a.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-mrkaio-m68s-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-mrkaio-m68s.dts
|
||||
@@ -0,0 +1,268 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+#include "rk3568-evb.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "EZPRO Mrkaio M68S";
|
||||
+ compatible = "ezpro,mrkaio-m68s", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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 = <712500>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>;
|
||||
+ rockchip,system-power-controller;
|
||||
+
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ pmic {
|
||||
+ pmic_int: pmic_int {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/mrkaio-m68s-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-mrkaio-m68s"
|
||||
+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-mrkaio-m68s.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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
|
@ -0,0 +1,415 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-opc-h68k.dtb \
|
||||
rk3568-mrkaio-m68s.dtb \
|
||||
rk3568-nanopi-r5s.dtb \
|
||||
rk3566-quartz64-a.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-opc-h68k-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-opc-h68k.dts
|
||||
@@ -0,0 +1,277 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+#include "rk3568-evb.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "HINLINK OPC-H68K Board";
|
||||
+ compatible = "hinlink,opc-h68k", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ mic-in-differential;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ pmic {
|
||||
+ pmic_int: pmic_int {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/opc-h68k-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-opc-h68k"
|
||||
+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-opc-h68k.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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
|
@ -0,0 +1,140 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-bpi-r2-pro.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-r66s.dtb \
|
||||
rk3568-opc-h68k.dtb \
|
||||
rk3568-mrkaio-m68s.dtb \
|
||||
rk3568-nanopi-r5s.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-r66s-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-r66s.dts
|
||||
@@ -0,0 +1,2 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+#include "rk3568-evb.dts"
|
||||
--- /dev/null
|
||||
+++ b/configs/r66s-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-r66s"
|
||||
+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-r66s.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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
|
@ -0,0 +1,77 @@
|
|||
From 18e3719c5d5b1573c29d137c1244ca23277750b2 Mon Sep 17 00:00:00 2001
|
||||
From: huangjf <hjf@t-chip.com.cn>
|
||||
Date: Thu, 7 Apr 2022 16:22:56 +0800
|
||||
Subject: [PATCH] rockchip: rk3568: Add support for Station P2
|
||||
|
||||
---
|
||||
configs/station-p2-rk3568_defconfig | 59 +++++++++++++++++++++++++++++
|
||||
1 file changed, 59 insertions(+)
|
||||
create mode 100644 configs/station-p2-rk3568_defconfig
|
||||
|
||||
diff --git a/configs/station-p2-rk3568_defconfig b/configs/station-p2-rk3568_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..435be99edf
|
||||
--- /dev/null
|
||||
+++ b/configs/station-p2-rk3568_defconfig
|
||||
@@ -0,0 +1,59 @@
|
||||
+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-evb"
|
||||
+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_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb.dtb"
|
||||
+# 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_ATF=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_SDMA=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_REGULATOR_PWM=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_ERRNO_STR=y
|
||||
--
|
||||
2.20.1
|
|
@ -0,0 +1,154 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -177,7 +177,8 @@ rk3568-evb.dtb \
|
||||
rk3568-mrkaio-m68s.dtb \
|
||||
rk3568-nanopi-r5s.dtb \
|
||||
rk3566-quartz64-a.dtb \
|
||||
- rk3568-rock-3a.dtb
|
||||
+ rk3568-rock-3a.dtb \
|
||||
+ rk3568-radxa-e25.dtb
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RV1108) += \
|
||||
rv1108-elgin-r1.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-radxa-e25-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-radxa-e25.dts
|
||||
@@ -0,0 +1,13 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+#include "rk3568-evb.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Radxa E25";
|
||||
+ compatible = "radxa,e25", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/radxa-e25-rk3568_defconfig
|
||||
@@ -0,0 +1,99 @@
|
||||
+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-radxa-e25"
|
||||
+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-radxa-e25.dtb"
|
||||
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=1
|
||||
+# 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_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_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
|
|
@ -0,0 +1,224 @@
|
|||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -179,7 +179,8 @@
|
||||
rk3568-photonicat.dtb \
|
||||
rk3566-quartz64-a.dtb \
|
||||
rk3568-rock-3a.dtb \
|
||||
- rk3568-radxa-e25.dtb
|
||||
+ rk3568-radxa-e25.dtb \
|
||||
+ rk3568-nanopi-r5c.dtb
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RV1108) += \
|
||||
rv1108-elgin-r1.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-nanopi-r5c.dts
|
||||
@@ -0,0 +1,9 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3568-evb.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R5C";
|
||||
+ compatible = "friendlyelec,nanopi-r5c", "rockchip,rk3568";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi
|
||||
@@ -0,0 +1,25 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+#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,dm-spl;
|
||||
+ u-boot,spl-fifo-mode;
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ clock-frequency = <24000000>;
|
||||
+ u-boot,dm-spl;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
@@ -18,6 +18,11 @@
|
||||
help
|
||||
NanoPi R5S FriendlyElec is a board for Rockchp RK3568.
|
||||
|
||||
+config TARGET_NANOPI_R5C_RK3568
|
||||
+ bool "NanoPi R5C board"
|
||||
+ help
|
||||
+ NanoPi R5C FriendlyElec is a board for Rockchp RK3568.
|
||||
+
|
||||
config TARGET_QUARTZ64_A_RK3566
|
||||
bool "Quartz64 Model A RK3566 development board"
|
||||
help
|
||||
@@ -40,6 +45,7 @@
|
||||
source "board/rockchip/bpi-r2-pro-rk3568/Kconfig"
|
||||
source "board/rockchip/evb_rk3568/Kconfig"
|
||||
source "board/friendlyelec/nanopi-r5s-rk3568/Kconfig"
|
||||
+source "board/friendlyelec/nanopi-r5c-rk3568/Kconfig"
|
||||
source "board/pine64/quartz64-a-rk3566/Kconfig"
|
||||
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5c-rk3568/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+if TARGET_NANOPI_R5C_RK3568
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "nanopi-r5c-rk3568"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "friendlyelec"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "nanopi-r5c-rk3568"
|
||||
+
|
||||
+config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
+ def_bool y
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5c-rk3568/Makefile
|
||||
@@ -0,0 +1,4 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+
|
||||
+obj-y += nanopi-r5c-rk3568.o
|
||||
--- /dev/null
|
||||
+++ b/board/friendlyelec/nanopi-r5c-rk3568/nanopi-r5c-rk3568.c
|
||||
@@ -0,0 +1,4 @@
|
||||
+ // SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ *
|
||||
+ */
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r5c-rk3568_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
+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-nanopi-r5c"
|
||||
+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_NANOPI_R5C_RK3568=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
|
||||
+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-nanopi-r5c.dtb"
|
||||
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
+# 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_ATF=y
|
||||
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=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
|
||||
--- /dev/null
|
||||
+++ b/include/configs/nanopi-r5c-rk3568.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+
|
||||
+#ifndef __NANOPI_R5C_RK3568_H
|
||||
+#define __NANOPI_R5C_RK3568_H
|
||||
+
|
||||
+#include <configs/rk3568_common.h>
|
||||
+
|
||||
+#define CONFIG_SUPPORT_EMMC_RPMB
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
+
|
||||
+#endif
|
|
@ -1,127 +0,0 @@
|
|||
/*
|
||||
* DO NOT MODIFY
|
||||
*
|
||||
* Declares the U_BOOT_DRIVER() records and platform data.
|
||||
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||
*/
|
||||
|
||||
/* Allow use of U_BOOT_DRVINFO() in this file */
|
||||
#define DT_PLAT_C
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <dt-structs.h>
|
||||
|
||||
/* Node /clock-controller@ff440000 index 0 */
|
||||
static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
|
||||
.reg = {0xff440000, 0x1000},
|
||||
.rockchip_grf = 0x3a,
|
||||
};
|
||||
U_BOOT_DRVINFO(clock_controller_at_ff440000) = {
|
||||
.name = "rockchip_rk3328_cru",
|
||||
.plat = &dtv_clock_controller_at_ff440000,
|
||||
.plat_size = sizeof(dtv_clock_controller_at_ff440000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/* Node /dmc index 1 */
|
||||
static struct dtd_rockchip_rk3328_dmc dtv_dmc = {
|
||||
.reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
|
||||
0xff720000, 0x1000, 0xff798000, 0x1000},
|
||||
.rockchip_sdram_params = {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0,
|
||||
0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15,
|
||||
0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0,
|
||||
0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8,
|
||||
0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8,
|
||||
0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104,
|
||||
0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114,
|
||||
0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184,
|
||||
0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240,
|
||||
0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff,
|
||||
0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c,
|
||||
0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
|
||||
0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
|
||||
0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
|
||||
0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||
0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
|
||||
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||
0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
|
||||
0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
|
||||
0x77, 0x77, 0x79, 0x9},
|
||||
};
|
||||
U_BOOT_DRVINFO(dmc) = {
|
||||
.name = "rockchip_rk3328_dmc",
|
||||
.plat = &dtv_dmc,
|
||||
.plat_size = sizeof(dtv_dmc),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/* Node /mmc@ff500000 index 2 */
|
||||
static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = {
|
||||
.bus_width = 0x4,
|
||||
.cap_sd_highspeed = true,
|
||||
.clocks = {
|
||||
{0, {317}},
|
||||
{0, {33}},
|
||||
{0, {74}},
|
||||
{0, {78}},},
|
||||
.disable_wp = true,
|
||||
.fifo_depth = 0x100,
|
||||
.interrupts = {0x0, 0xc, 0x4},
|
||||
.max_frequency = 0x8f0d180,
|
||||
.pinctrl_0 = {0x47, 0x48, 0x49, 0x4a},
|
||||
.pinctrl_names = "default",
|
||||
.reg = {0xff500000, 0x4000},
|
||||
.sd_uhs_sdr104 = true,
|
||||
.sd_uhs_sdr12 = true,
|
||||
.sd_uhs_sdr25 = true,
|
||||
.sd_uhs_sdr50 = true,
|
||||
.u_boot_spl_fifo_mode = true,
|
||||
.vmmc_supply = 0x4b,
|
||||
.vqmmc_supply = 0x1e,
|
||||
};
|
||||
U_BOOT_DRVINFO(mmc_at_ff500000) = {
|
||||
.name = "rockchip_rk3288_dw_mshc",
|
||||
.plat = &dtv_mmc_at_ff500000,
|
||||
.plat_size = sizeof(dtv_mmc_at_ff500000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/* Node /serial@ff130000 index 3 */
|
||||
static struct dtd_ns16550_serial dtv_serial_at_ff130000 = {
|
||||
.clock_frequency = 0x16e3600,
|
||||
.clocks = {
|
||||
{0, {40}},
|
||||
{0, {212}},},
|
||||
.dma_names = {"tx", "rx"},
|
||||
.dmas = {0x10, 0x6, 0x10, 0x7},
|
||||
.interrupts = {0x0, 0x39, 0x4},
|
||||
.pinctrl_0 = 0x26,
|
||||
.pinctrl_names = "default",
|
||||
.reg = {0xff130000, 0x100},
|
||||
.reg_io_width = 0x4,
|
||||
.reg_shift = 0x2,
|
||||
};
|
||||
U_BOOT_DRVINFO(serial_at_ff130000) = {
|
||||
.name = "ns16550_serial",
|
||||
.plat = &dtv_serial_at_ff130000,
|
||||
.plat_size = sizeof(dtv_serial_at_ff130000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/* Node /syscon@ff100000 index 4 */
|
||||
static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
|
||||
.reg = {0xff100000, 0x1000},
|
||||
};
|
||||
U_BOOT_DRVINFO(syscon_at_ff100000) = {
|
||||
.name = "rockchip_rk3328_grf",
|
||||
.plat = &dtv_syscon_at_ff100000,
|
||||
.plat_size = sizeof(dtv_syscon_at_ff100000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* DO NOT MODIFY
|
||||
*
|
||||
* This file was generated by dtoc from a .dtb (device tree binary) file.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <linux/libfdt.h>
|
||||
struct dtd_ns16550_serial {
|
||||
fdt32_t clock_frequency;
|
||||
struct phandle_1_arg clocks[2];
|
||||
const char * dma_names[2];
|
||||
fdt32_t dmas[4];
|
||||
fdt32_t interrupts[3];
|
||||
fdt32_t pinctrl_0;
|
||||
const char * pinctrl_names;
|
||||
fdt64_t reg[2];
|
||||
fdt32_t reg_io_width;
|
||||
fdt32_t reg_shift;
|
||||
};
|
||||
struct dtd_regulator_fixed {
|
||||
fdt32_t gpio[3];
|
||||
fdt32_t pinctrl_0;
|
||||
const char * pinctrl_names;
|
||||
bool regulator_boot_on;
|
||||
fdt32_t regulator_max_microvolt;
|
||||
fdt32_t regulator_min_microvolt;
|
||||
const char * regulator_name;
|
||||
fdt32_t vin_supply;
|
||||
};
|
||||
struct dtd_rockchip_gpio_bank {
|
||||
struct phandle_1_arg clocks[1];
|
||||
bool gpio_controller;
|
||||
bool interrupt_controller;
|
||||
fdt32_t interrupts[3];
|
||||
fdt64_t reg[2];
|
||||
};
|
||||
struct dtd_rockchip_rk3288_dw_mshc {
|
||||
fdt32_t bus_width;
|
||||
bool cap_sd_highspeed;
|
||||
struct phandle_1_arg clocks[4];
|
||||
bool disable_wp;
|
||||
fdt32_t fifo_depth;
|
||||
fdt32_t interrupts[3];
|
||||
fdt32_t max_frequency;
|
||||
fdt32_t pinctrl_0[4];
|
||||
const char * pinctrl_names;
|
||||
fdt64_t reg[2];
|
||||
bool sd_uhs_sdr104;
|
||||
bool sd_uhs_sdr12;
|
||||
bool sd_uhs_sdr25;
|
||||
bool sd_uhs_sdr50;
|
||||
bool u_boot_spl_fifo_mode;
|
||||
fdt32_t vmmc_supply;
|
||||
fdt32_t vqmmc_supply;
|
||||
};
|
||||
struct dtd_rockchip_rk3328_cru {
|
||||
fdt64_t reg[2];
|
||||
fdt32_t rockchip_grf;
|
||||
};
|
||||
struct dtd_rockchip_rk3328_dmc {
|
||||
fdt64_t reg[12];
|
||||
fdt32_t rockchip_sdram_params[196];
|
||||
};
|
||||
struct dtd_rockchip_rk3328_grf {
|
||||
fdt64_t reg[2];
|
||||
};
|
||||
struct dtd_rockchip_rk3328_pinctrl {
|
||||
bool ranges;
|
||||
fdt32_t rockchip_grf;
|
||||
};
|
486
root/package/firmware/cypress-firmware/Makefile
Normal file
486
root/package/firmware/cypress-firmware/Makefile
Normal file
|
@ -0,0 +1,486 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cypress-firmware
|
||||
PKG_VERSION:=5.10.9-2022_0909
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Infineon/ifx-linux-firmware/
|
||||
PKG_MIRROR_HASH:=944faae3a80013f1a963b6692d7f50a38c97edcf91fd163de521df755e6922b5
|
||||
PKG_SOURCE_VERSION:=release-v$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
PKG_LICENSE_FILES:=LICENCE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/cypress-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=https://community.infineon.com/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
# Cypress 43012 SDIO Firmware
|
||||
define Package/cypress-firmware-43012-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43012 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43012-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43012-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac43012-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43012-sdio))
|
||||
|
||||
# Cypress 43340 SDIO Firmware
|
||||
define Package/cypress-firmware-43340-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43340 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43340-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43340-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43340-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43340-sdio.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43340-sdio))
|
||||
|
||||
# Cypress 43362 SDIO Firmware
|
||||
define Package/cypress-firmware-43362-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43362 FullMac SDIO firmware
|
||||
PROVIDES:=brcmfmac-firmware-43362-sdio
|
||||
CONFLICTS:=brcmfmac-firmware-43362-sdio
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43362-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43362-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43362-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43362-sdio.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43362-sdio))
|
||||
|
||||
# Cypress 4339 SDIO Firmware
|
||||
define Package/cypress-firmware-4339-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4339 FullMac SDIO firmware
|
||||
PROVIDES:=brcmfmac-firmware-4339-sdio
|
||||
CONFLICTS:=brcmfmac-firmware-4339-sdio
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4339-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4339-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4339-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4339-sdio))
|
||||
|
||||
# Cypress 43430 SDIO Firmware
|
||||
define Package/cypress-firmware-43430-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43430 FullMac SDIO firmware
|
||||
PROVIDES:=brcmfmac-firmware-43430-sdio
|
||||
CONFLICTS:=brcmfmac-firmware-43430-sdio
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43430-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43430-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac43430-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43430-sdio))
|
||||
|
||||
# Cypress 43439 SDIO Firmware
|
||||
define Package/cypress-firmware-43439-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43439 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43439-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43439-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43439-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43439-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43439-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac43439-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43439-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43439-sdio))
|
||||
|
||||
# Cypress 43455 SDIO Firmware
|
||||
define Package/cypress-firmware-43455-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43455 FullMac SDIO firmware
|
||||
PROVIDES:=brcmfmac-firmware-43455-sdio
|
||||
CONFLICTS:=brcmfmac-firmware-43455-sdio
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43455-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43455-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac43455-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43455-sdio))
|
||||
|
||||
# Cypress 4354 SDIO Firmware
|
||||
define Package/cypress-firmware-4354-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4354 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4354-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4354-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4354-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4354-sdio))
|
||||
|
||||
# Cypress 4356 PCIe Firmware
|
||||
define Package/cypress-firmware-4356-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4356 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4356-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4356-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4356-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4356-pcie))
|
||||
|
||||
# Cypress 4356 SDIO Firmware
|
||||
define Package/cypress-firmware-4356-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4356 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4356-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4356-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4356-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4356-sdio))
|
||||
|
||||
# Cypress 43570 PCIe Firmware
|
||||
define Package/cypress-firmware-43570-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43570 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43570-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac43570-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac43570-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43570-pcie))
|
||||
|
||||
# Cypress 4373 PCIe Firmware
|
||||
define Package/cypress-firmware-4373-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4373 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4373-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-pcie.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-pcie.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-pcie.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4373-pcie))
|
||||
|
||||
# Cypress 4373 SDIO Firmware
|
||||
define Package/cypress-firmware-4373-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4373 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4373-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4373-sdio))
|
||||
|
||||
# Cypress 4373 USB Firmware
|
||||
define Package/cypress-firmware-4373-usb
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4373 FullMac USB firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4373-usb/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-usb.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373-usb.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-usb.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac4373.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4373-usb))
|
||||
|
||||
# Cypress 54591 PCIe Firmware
|
||||
define Package/cypress-firmware-54591-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW54591 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-54591-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac54591-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac54591-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-54591-pcie))
|
||||
|
||||
# Cypress 54591 SDIO Firmware
|
||||
define Package/cypress-firmware-54591-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW54591 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-54591-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-sdio.bin \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac54591-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-sdio.bin
|
||||
$(LN) \
|
||||
../cypress/cyfmac54591-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-54591-sdio))
|
||||
|
||||
# Cypress 55560 PCIe Firmware
|
||||
define Package/cypress-firmware-55560-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW55560 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-55560-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac55560-pcie.trxse \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac55560-pcie.trxse \
|
||||
$(1)/lib/firmware/brcm/brcmfmac55560-pcie.trxse
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-55560-pcie))
|
||||
|
||||
# Cypress 55572 PCIe Firmware
|
||||
define Package/cypress-firmware-55572-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW55572 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-55572-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac55572-pcie.trxse \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac55572-pcie.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac55572-pcie.trxse \
|
||||
$(1)/lib/firmware/brcm/brcmfmac55572-pcie.trxse
|
||||
$(LN) \
|
||||
../cypress/cyfmac55572-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac55572-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-55572-pcie))
|
||||
|
||||
# Cypress 55572 SDIO Firmware
|
||||
define Package/cypress-firmware-55572-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW55572 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-55572-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/cypress
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac55572-sdio.trxse \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac55572-sdio.clm_blob \
|
||||
$(1)/lib/firmware/cypress/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(LN) \
|
||||
../cypress/cyfmac55572-sdio.trxse \
|
||||
$(1)/lib/firmware/brcm/brcmfmac55572-sdio.trxse
|
||||
$(LN) \
|
||||
../cypress/cyfmac55572-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac55572-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-55572-sdio))
|
185
root/package/kernel/bcm27xx-gpu-fw/Makefile
Normal file
185
root/package/kernel/bcm27xx-gpu-fw/Makefile
Normal file
|
@ -0,0 +1,185 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-gpu-fw
|
||||
PKG_VERSION:=2021-08-19
|
||||
PKG_RELEASE:=25e2b597ebfb2495eab4816a276758dcc6ea21f1
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
|
||||
RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
|
||||
|
||||
define Download/LICENCE_broadcom
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=LICENCE.broadcom
|
||||
HASH:=c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b
|
||||
endef
|
||||
$(eval $(call Download,LICENCE_broadcom))
|
||||
|
||||
define Download/bootcode_bin
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=bootcode.bin
|
||||
HASH:=36fba28838867f26670a0cd1de340da62e13171cfdec0e7822737e849b3c0681
|
||||
endef
|
||||
$(eval $(call Download,bootcode_bin))
|
||||
|
||||
define Download/fixup_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup.dat
|
||||
HASH:=b06aa43aa668d6982de66044299d1b0dd6b449ec321dd83742aa1eb68774e15b
|
||||
endef
|
||||
$(eval $(call Download,fixup_dat))
|
||||
|
||||
define Download/fixup_cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_cd.dat
|
||||
HASH:=fff4fd9fbb691100be46269f554acd866eac8cfef39082e03ac12f70fbfe9d95
|
||||
endef
|
||||
$(eval $(call Download,fixup_cd_dat))
|
||||
|
||||
define Download/fixup_x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_x.dat
|
||||
HASH:=d74f97ae37cd476e6d4c8e466c3013be49e891e63b9aabc0c9b7637d85068cd0
|
||||
endef
|
||||
$(eval $(call Download,fixup_x_dat))
|
||||
|
||||
define Download/fixup4_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4.dat
|
||||
HASH:=a607f4dc3000c188f8daaa3417c70a9e5ecc039fae36ba46807c00294f89cd24
|
||||
endef
|
||||
$(eval $(call Download,fixup4_dat))
|
||||
|
||||
define Download/fixup4cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4cd.dat
|
||||
HASH:=fff4fd9fbb691100be46269f554acd866eac8cfef39082e03ac12f70fbfe9d95
|
||||
endef
|
||||
$(eval $(call Download,fixup4cd_dat))
|
||||
|
||||
define Download/fixup4x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4x.dat
|
||||
HASH:=14ba09cba83d82a158481a7267fad06ada73c26c3a27dfd34694955f11ba6e27
|
||||
endef
|
||||
$(eval $(call Download,fixup4x_dat))
|
||||
|
||||
define Download/start_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start.elf
|
||||
HASH:=8bee170c56529bf1666ad4afdd18ae18c7123e7a2fd30e2992cd0d9a01fa63ee
|
||||
endef
|
||||
$(eval $(call Download,start_elf))
|
||||
|
||||
define Download/start_cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_cd.elf
|
||||
HASH:=27d9354ff1af79a521527a288fe736f7337f91bca12bbc177c80e29dbbef0ffd
|
||||
endef
|
||||
$(eval $(call Download,start_cd_elf))
|
||||
|
||||
define Download/start_x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_x.elf
|
||||
HASH:=499bfdf3deba7bb0a033d2a4487b7f05bce45de2692c7c6dabc4a456237fd438
|
||||
endef
|
||||
$(eval $(call Download,start_x_elf))
|
||||
|
||||
define Download/start4_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4.elf
|
||||
HASH:=158bf783090223626cf45794bf679a3fadbf64bba55b76e3349b94e01be34202
|
||||
endef
|
||||
$(eval $(call Download,start4_elf))
|
||||
|
||||
define Download/start4cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4cd.elf
|
||||
HASH:=c4912701f620cdd9e44bbacbfc4adb4be1b6fb7ccf81f6029ce2115511970cc0
|
||||
endef
|
||||
$(eval $(call Download,start4cd_elf))
|
||||
|
||||
define Download/start4x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4x.elf
|
||||
HASH:=3eb1adb5dfef21da0a16679ef65314a64196a67c6fca3422df8bc721d6b6fa94
|
||||
endef
|
||||
$(eval $(call Download,start4x_elf))
|
||||
|
||||
define Package/bcm27xx-gpu-fw
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_bcm27xx
|
||||
TITLE:=bcm27xx-gpu-fw
|
||||
DEFAULT:=y if TARGET_bcm27xx
|
||||
endef
|
||||
|
||||
define Package/bcm27xx-gpu-fw/description
|
||||
GPU and kernel boot firmware for bcm27xx.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-LICENCE.broadcom $(PKG_BUILD_DIR)/LICENCE.broadcom
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-bootcode.bin $(PKG_BUILD_DIR)/bootcode.bin
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup.dat $(PKG_BUILD_DIR)/fixup.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_cd.dat $(PKG_BUILD_DIR)/fixup_cd.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_x.dat $(PKG_BUILD_DIR)/fixup_x.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4.dat $(PKG_BUILD_DIR)/fixup4.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4cd.dat $(PKG_BUILD_DIR)/fixup4cd.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4x.dat $(PKG_BUILD_DIR)/fixup4x.dat
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start.elf $(PKG_BUILD_DIR)/start.elf
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_x.elf $(PKG_BUILD_DIR)/start_x.elf
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4.elf $(PKG_BUILD_DIR)/start4.elf
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4cd.elf $(PKG_BUILD_DIR)/start4cd.elf
|
||||
$(CP) $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4x.elf $(PKG_BUILD_DIR)/start4x.elf
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/bcm27xx-gpu-fw/install
|
||||
true
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(CP) $(PKG_BUILD_DIR)/bootcode.bin $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/LICENCE.broadcom $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start_cd.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start_x.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start4.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start4cd.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/start4x.elf $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup.dat $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup_x.dat $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup4.dat $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup4cd.dat $(KERNEL_BUILD_DIR)
|
||||
$(CP) $(PKG_BUILD_DIR)/fixup4x.dat $(KERNEL_BUILD_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bcm27xx-gpu-fw))
|
|
@ -0,0 +1,14 @@
|
|||
--- a/smb1pdu.c
|
||||
+++ b/smb1pdu.c
|
||||
@@ -5851,7 +5851,11 @@ static int smb_populate_readdir_entry(struct ksmbd_conn *conn, int info_level,
|
||||
*
|
||||
* Return: 0 on success, otherwise -EINVAL
|
||||
*/
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+static bool ksmbd_fill_dirent(struct dir_context *ctx, const char *name, int namlen,
|
||||
+#else
|
||||
static int ksmbd_fill_dirent(struct dir_context *ctx, const char *name, int namlen,
|
||||
+#endif
|
||||
loff_t offset, u64 ino, unsigned int d_type)
|
||||
{
|
||||
struct ksmbd_readdir_data *buf =
|
|
@ -1110,13 +1110,13 @@ define KernelPackage/nft-offload
|
|||
DEPENDS:=@IPV6 +kmod-nf-flow +kmod-nft-nat
|
||||
KCONFIG:= \
|
||||
CONFIG_NF_FLOW_TABLE_INET \
|
||||
CONFIG_NF_FLOW_TABLE_IPV4 \
|
||||
CONFIG_NF_FLOW_TABLE_IPV6 \
|
||||
CONFIG_NF_FLOW_TABLE_IPV4@lt5.17 \
|
||||
CONFIG_NF_FLOW_TABLE_IPV6@lt5.17 \
|
||||
CONFIG_NFT_FLOW_OFFLOAD
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/netfilter/nf_flow_table_inet.ko \
|
||||
$(LINUX_DIR)/net/ipv4/netfilter/nf_flow_table_ipv4.ko \
|
||||
$(LINUX_DIR)/net/ipv6/netfilter/nf_flow_table_ipv6.ko \
|
||||
$(LINUX_DIR)/net/ipv4/netfilter/nf_flow_table_ipv4.ko@lt5.17 \
|
||||
$(LINUX_DIR)/net/ipv6/netfilter/nf_flow_table_ipv6.ko@lt5.17 \
|
||||
$(LINUX_DIR)/net/netfilter/nft_flow_offload.ko
|
||||
AUTOLOAD:=$(call AutoProbe,nf_flow_table_inet nf_flow_table_ipv4 nf_flow_table_ipv6 nft_flow_offload)
|
||||
endef
|
||||
|
|
1461
root/package/kernel/linux/modules/netsupport.mk
Normal file
1461
root/package/kernel/linux/modules/netsupport.mk
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,54 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8812au-ct
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/greearb/rtl8812AU_8821AU_linux.git
|
||||
#PKG_MIRROR_HASH:=aee819df4ba83251b59bd1d4f412287b27105e5de9284bb09579f0e1a1538328
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-09-14
|
||||
PKG_SOURCE_VERSION:=39df55967b7de9f6c9600017b724303f95a8b9e2
|
||||
|
||||
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
#PKG_EXTMOD_SUBDIRS:=rtl8812au-ct
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/rtl8812au-ct
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/rtl8812au.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8812au)
|
||||
PROVIDES:=kmod-rtl8812au
|
||||
endef
|
||||
|
||||
NOSTDINC_FLAGS := \
|
||||
$(KERNEL_NOSTDINC_FLAGS) \
|
||||
-I$(PKG_BUILD_DIR) \
|
||||
-I$(PKG_BUILD_DIR)/include \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||
-include backport/backport.h
|
||||
|
||||
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtl8812au-ct))
|
|
@ -0,0 +1,68 @@
|
|||
--- /dev/null
|
||||
+++ b/include/linux/compiler-gcc12.h
|
||||
@@ -0,0 +1,65 @@
|
||||
+#ifndef __LINUX_COMPILER_H
|
||||
+#error "Please don't include <linux/compiler-gcc7.h> directly, include <linux/compiler.h> instead."
|
||||
+#endif
|
||||
+
|
||||
+#define __used __attribute__((__used__))
|
||||
+#define __must_check __attribute__((warn_unused_result))
|
||||
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
+
|
||||
+/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
+ to them will be unlikely. This means a lot of manual unlikely()s
|
||||
+ are unnecessary now for any paths leading to the usual suspects
|
||||
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
+ older compilers]
|
||||
+
|
||||
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
+ in the preprocessor, but we can live with this because they're unreleased.
|
||||
+ Maketime probing would be overkill here.
|
||||
+
|
||||
+ gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
+ a special section, but I don't see any sense in this right now in
|
||||
+ the kernel context */
|
||||
+#define __cold __attribute__((__cold__))
|
||||
+
|
||||
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
+
|
||||
+#ifndef __CHECKER__
|
||||
+# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
+# define __compiletime_error(message) __attribute__((error(message)))
|
||||
+#endif /* __CHECKER__ */
|
||||
+
|
||||
+/*
|
||||
+ * Mark a position in code as unreachable. This can be used to
|
||||
+ * suppress control flow warnings after asm blocks that transfer
|
||||
+ * control elsewhere.
|
||||
+ *
|
||||
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
+ * this in the preprocessor, but we can live with this because they're
|
||||
+ * unreleased. Really, we need to have autoconf for the kernel.
|
||||
+ */
|
||||
+#define unreachable() __builtin_unreachable()
|
||||
+
|
||||
+/* Mark a function definition as prohibited from being cloned. */
|
||||
+#define __noclone __attribute__((__noclone__))
|
||||
+
|
||||
+/*
|
||||
+ * Tell the optimizer that something else uses this function or variable.
|
||||
+ */
|
||||
+#define __visible __attribute__((externally_visible))
|
||||
+
|
||||
+/*
|
||||
+ * GCC 'asm goto' miscompiles certain code sequences:
|
||||
+ *
|
||||
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
+ *
|
||||
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
+ *
|
||||
+ * (asm goto is automatically volatile - the naming reflects this.)
|
||||
+ */
|
||||
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
+#define __HAVE_BUILTIN_BSWAP32__
|
||||
+#define __HAVE_BUILTIN_BSWAP64__
|
||||
+#define __HAVE_BUILTIN_BSWAP16__
|
||||
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
|
@ -0,0 +1,59 @@
|
|||
From e9aef3d90b4bd11fccbde3741f2396ea05a9f386 Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Wed, 30 Nov 2022 23:28:26 +0100
|
||||
Subject: [PATCH] net: add netdev_sw_irq_coalesce_default_on()
|
||||
|
||||
Add a helper for drivers wanting to set SW IRQ coalescing
|
||||
by default. The related sysfs attributes can be used to
|
||||
override the default values.
|
||||
|
||||
Follow Jakub's suggestion and put this functionality into
|
||||
net core so that drivers wanting to use software interrupt
|
||||
coalescing per default don't have to open-code it.
|
||||
|
||||
Note that this function needs to be called before the
|
||||
netdevice is registered.
|
||||
|
||||
Suggested-by: Jakub Kicinski <kuba@kernel.org>
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
include/linux/netdevice.h | 1 +
|
||||
net/core/dev.c | 16 ++++++++++++++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -78,6 +78,7 @@ struct xdp_buff;
|
||||
void synchronize_net(void);
|
||||
void netdev_set_default_ethtool_ops(struct net_device *dev,
|
||||
const struct ethtool_ops *ops);
|
||||
+void netdev_sw_irq_coalesce_default_on(struct net_device *dev);
|
||||
|
||||
/* Backlog congestion levels */
|
||||
#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10535,6 +10535,22 @@ void netdev_set_default_ethtool_ops(stru
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);
|
||||
|
||||
+/**
|
||||
+ * netdev_sw_irq_coalesce_default_on() - enable SW IRQ coalescing by default
|
||||
+ * @dev: netdev to enable the IRQ coalescing on
|
||||
+ *
|
||||
+ * Sets a conservative default for SW IRQ coalescing. Users can use
|
||||
+ * sysfs attributes to override the default values.
|
||||
+ */
|
||||
+void netdev_sw_irq_coalesce_default_on(struct net_device *dev)
|
||||
+{
|
||||
+ WARN_ON(dev->reg_state == NETREG_REGISTERED);
|
||||
+
|
||||
+ dev->gro_flush_timeout = 20000;
|
||||
+ dev->napi_defer_hard_irqs = 1;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(netdev_sw_irq_coalesce_default_on);
|
||||
+
|
||||
void netdev_freemem(struct net_device *dev)
|
||||
{
|
||||
char *addr = (char *)dev - dev->padded;
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,56 @@
|
|||
From fd4f7a449938ffd21bf2f5a1708d811cc5f3daa5 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Kirjanov <dkirjanov@suse.de>
|
||||
Date: Thu, 27 Oct 2022 21:45:02 +0300
|
||||
Subject: [PATCH 2/4] drivers: net: convert to boolean for the mac_managed_pm
|
||||
flag
|
||||
|
||||
Signed-off-by: Dennis Kirjanov <dkirjanov@suse.de>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/freescale/fec_main.c | 2 +-
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
|
||||
drivers/net/usb/asix_devices.c | 4 ++--
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/freescale/fec_main.c
|
||||
+++ b/drivers/net/ethernet/freescale/fec_main.c
|
||||
@@ -2226,7 +2226,7 @@ static int fec_enet_mii_probe(struct net
|
||||
fep->link = 0;
|
||||
fep->full_duplex = 0;
|
||||
|
||||
- phy_dev->mac_managed_pm = 1;
|
||||
+ phy_dev->mac_managed_pm = true;
|
||||
|
||||
phy_attached_info(phy_dev);
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5018,7 +5018,7 @@ static int r8169_mdio_register(struct rt
|
||||
return -EUNATCH;
|
||||
}
|
||||
|
||||
- tp->phydev->mac_managed_pm = 1;
|
||||
+ tp->phydev->mac_managed_pm = true;
|
||||
|
||||
phy_support_asym_pause(tp->phydev);
|
||||
|
||||
--- a/drivers/net/usb/asix_devices.c
|
||||
+++ b/drivers/net/usb/asix_devices.c
|
||||
@@ -700,7 +700,7 @@ static int ax88772_init_phy(struct usbne
|
||||
}
|
||||
|
||||
phy_suspend(priv->phydev);
|
||||
- priv->phydev->mac_managed_pm = 1;
|
||||
+ priv->phydev->mac_managed_pm = true;
|
||||
|
||||
phy_attached_info(priv->phydev);
|
||||
|
||||
@@ -720,7 +720,7 @@ static int ax88772_init_phy(struct usbne
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- priv->phydev_int->mac_managed_pm = 1;
|
||||
+ priv->phydev_int->mac_managed_pm = true;
|
||||
phy_suspend(priv->phydev_int);
|
||||
|
||||
return 0;
|
|
@ -0,0 +1,38 @@
|
|||
From fd149c4ab09b01136c7e80db020eed59a3385d24 Mon Sep 17 00:00:00 2001
|
||||
From: Juhee Kang <claudiajkang@gmail.com>
|
||||
Date: Wed, 30 Nov 2022 01:12:44 +0900
|
||||
Subject: [PATCH 3/4] r8169: use tp_to_dev instead of open code
|
||||
|
||||
The open code is defined as a helper function(tp_to_dev) on r8169_main.c,
|
||||
which the open code is &tp->pci_dev->dev. The helper function was added
|
||||
in commit 1e1205b7d3e9 ("r8169: add helper tp_to_dev"). And then later,
|
||||
commit f1e911d5d0df ("r8169: add basic phylib support") added
|
||||
r8169_phylink_handler function but it didn't use the helper function.
|
||||
Thus, tp_to_dev() replaces the open code. This patch doesn't change logic.
|
||||
|
||||
Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
|
||||
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20221129161244.5356-1-claudiajkang@gmail.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -4559,12 +4559,13 @@ static int rtl8169_poll(struct napi_stru
|
||||
static void r8169_phylink_handler(struct net_device *ndev)
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(ndev);
|
||||
+ struct device *d = tp_to_dev(tp);
|
||||
|
||||
if (netif_carrier_ok(ndev)) {
|
||||
rtl_link_chg_patch(tp);
|
||||
- pm_request_resume(&tp->pci_dev->dev);
|
||||
+ pm_request_resume(d);
|
||||
} else {
|
||||
- pm_runtime_idle(&tp->pci_dev->dev);
|
||||
+ pm_runtime_idle(d);
|
||||
}
|
||||
|
||||
phy_print_status(tp->phydev);
|
|
@ -0,0 +1,33 @@
|
|||
From 74ec605a11b7ecf68036c3f086f684bbe7381353 Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Wed, 30 Nov 2022 23:30:15 +0100
|
||||
Subject: [PATCH 4/4] r8169: enable GRO software interrupt coalescing per
|
||||
default
|
||||
|
||||
There are reports about r8169 not reaching full line speed on certain
|
||||
systems (e.g. SBC's) with a 2.5Gbps link.
|
||||
There was a time when hardware interrupt coalescing was enabled per
|
||||
default, but this was changed due to ASPM-related issues on few systems.
|
||||
So let's use software interrupt coalescing instead and enable it
|
||||
using new function netdev_sw_irq_coalesce_default_on().
|
||||
|
||||
Even with these conservative settings interrupt load on my 1Gbps test
|
||||
system reduced significantly.
|
||||
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5283,6 +5283,8 @@ static int rtl_init_one(struct pci_dev *
|
||||
dev->hw_features |= NETIF_F_RXALL;
|
||||
dev->hw_features |= NETIF_F_RXFCS;
|
||||
|
||||
+ netdev_sw_irq_coalesce_default_on(dev);
|
||||
+
|
||||
/* configure chip for default features */
|
||||
rtl8169_set_features(dev, dev->features);
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
From 63db0cb35e1cb3b3c134906d1062f65513fdda2d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 4 Oct 2022 10:37:09 +0200
|
||||
Subject: [PATCH] mtd: core: simplify (a bit) code find partition-matching
|
||||
dynamic OF node
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
1. Don't hardcode "partition-" string twice
|
||||
2. Use simpler logic & use ->name to avoid of_property_read_string()
|
||||
3. Use mtd_get_of_node() helper
|
||||
|
||||
Cc: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20221004083710.27704-1-zajec5@gmail.com
|
||||
---
|
||||
drivers/mtd/mtdcore.c | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -551,18 +551,16 @@ static void mtd_check_of_node(struct mtd
|
||||
struct device_node *partitions, *parent_dn, *mtd_dn = NULL;
|
||||
const char *pname, *prefix = "partition-";
|
||||
int plen, mtd_name_len, offset, prefix_len;
|
||||
- struct mtd_info *parent;
|
||||
bool found = false;
|
||||
|
||||
/* Check if MTD already has a device node */
|
||||
- if (dev_of_node(&mtd->dev))
|
||||
+ if (mtd_get_of_node(mtd))
|
||||
return;
|
||||
|
||||
/* Check if a partitions node exist */
|
||||
if (!mtd_is_partition(mtd))
|
||||
return;
|
||||
- parent = mtd->parent;
|
||||
- parent_dn = of_node_get(dev_of_node(&parent->dev));
|
||||
+ parent_dn = of_node_get(mtd_get_of_node(mtd->parent));
|
||||
if (!parent_dn)
|
||||
return;
|
||||
|
||||
@@ -575,15 +573,15 @@ static void mtd_check_of_node(struct mtd
|
||||
|
||||
/* Search if a partition is defined with the same name */
|
||||
for_each_child_of_node(partitions, mtd_dn) {
|
||||
- offset = 0;
|
||||
-
|
||||
/* Skip partition with no/wrong prefix */
|
||||
- if (!of_node_name_prefix(mtd_dn, "partition-"))
|
||||
+ if (!of_node_name_prefix(mtd_dn, prefix))
|
||||
continue;
|
||||
|
||||
/* Label have priority. Check that first */
|
||||
- if (of_property_read_string(mtd_dn, "label", &pname)) {
|
||||
- of_property_read_string(mtd_dn, "name", &pname);
|
||||
+ if (!of_property_read_string(mtd_dn, "label", &pname)) {
|
||||
+ offset = 0;
|
||||
+ } else {
|
||||
+ pname = mtd_dn->name;
|
||||
offset = prefix_len;
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From ddb8cefb7af288950447ca6eeeafb09977dab56f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 4 Oct 2022 10:37:10 +0200
|
||||
Subject: [PATCH] mtd: core: try to find OF node for every MTD partition
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
So far this feature was limited to the top-level "nvmem-cells" node.
|
||||
There are multiple parsers creating partitions and subpartitions
|
||||
dynamically. Extend that code to handle them too.
|
||||
|
||||
This allows finding partition-* node for every MTD (sub)partition.
|
||||
|
||||
Random example:
|
||||
|
||||
partitions {
|
||||
compatible = "brcm,bcm947xx-cfe-partitions";
|
||||
|
||||
partition-firmware {
|
||||
compatible = "brcm,trx";
|
||||
|
||||
partition-loader {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Cc: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20221004083710.27704-2-zajec5@gmail.com
|
||||
---
|
||||
drivers/mtd/mtdcore.c | 18 ++++++------------
|
||||
1 file changed, 6 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -551,20 +551,22 @@ static void mtd_check_of_node(struct mtd
|
||||
struct device_node *partitions, *parent_dn, *mtd_dn = NULL;
|
||||
const char *pname, *prefix = "partition-";
|
||||
int plen, mtd_name_len, offset, prefix_len;
|
||||
- bool found = false;
|
||||
|
||||
/* Check if MTD already has a device node */
|
||||
if (mtd_get_of_node(mtd))
|
||||
return;
|
||||
|
||||
- /* Check if a partitions node exist */
|
||||
if (!mtd_is_partition(mtd))
|
||||
return;
|
||||
+
|
||||
parent_dn = of_node_get(mtd_get_of_node(mtd->parent));
|
||||
if (!parent_dn)
|
||||
return;
|
||||
|
||||
- partitions = of_get_child_by_name(parent_dn, "partitions");
|
||||
+ if (mtd_is_partition(mtd->parent))
|
||||
+ partitions = of_node_get(parent_dn);
|
||||
+ else
|
||||
+ partitions = of_get_child_by_name(parent_dn, "partitions");
|
||||
if (!partitions)
|
||||
goto exit_parent;
|
||||
|
||||
@@ -588,19 +590,11 @@ static void mtd_check_of_node(struct mtd
|
||||
plen = strlen(pname) - offset;
|
||||
if (plen == mtd_name_len &&
|
||||
!strncmp(mtd->name, pname + offset, plen)) {
|
||||
- found = true;
|
||||
+ mtd_set_of_node(mtd, mtd_dn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- if (!found)
|
||||
- goto exit_partitions;
|
||||
-
|
||||
- /* Set of_node only for nvmem */
|
||||
- if (of_device_is_compatible(mtd_dn, "nvmem-cells"))
|
||||
- mtd_set_of_node(mtd, mtd_dn);
|
||||
-
|
||||
-exit_partitions:
|
||||
of_node_put(partitions);
|
||||
exit_parent:
|
||||
of_node_put(parent_dn);
|
|
@ -0,0 +1,47 @@
|
|||
From 26422ac78e9d8767bd4aabfbae616b15edbf6a1b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 22 Oct 2022 23:13:18 +0200
|
||||
Subject: [PATCH] mtd: core: set ROOT_DEV for partitions marked as rootfs in DT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This adds support for "linux,rootfs" binding that is used to mark flash
|
||||
partition containing rootfs. It's useful for devices using device tree
|
||||
that don't have bootloader passing root info in cmdline.
|
||||
|
||||
Signed-off-by: Rafa? Mi?ecki <rafal@milecki.pl>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20221022211318.32009-2-zajec5@gmail.com
|
||||
---
|
||||
drivers/mtd/mtdcore.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/leds.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/nvmem-provider.h>
|
||||
+#include <linux/root_dev.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
@@ -737,6 +738,17 @@ int add_mtd_device(struct mtd_info *mtd)
|
||||
not->add(mtd);
|
||||
|
||||
mutex_unlock(&mtd_table_mutex);
|
||||
+
|
||||
+ if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) {
|
||||
+ if (IS_BUILTIN(CONFIG_MTD)) {
|
||||
+ pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name);
|
||||
+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index);
|
||||
+ } else {
|
||||
+ pr_warn("mtd: can't set mtd%d (%s) as root device - mtd must be builtin\n",
|
||||
+ mtd->index, mtd->name);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* We _know_ we aren't being removed, because
|
||||
our caller is still holding us here. So none
|
||||
of this try_ nonsense, and no bitching about it
|
|
@ -0,0 +1,229 @@
|
|||
From aec4d5f5ffd0f0092bd9dc21ea90e0bc237d4b74 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 15 Oct 2022 11:29:50 +0200
|
||||
Subject: [PATCH] mtd: parsers: add TP-Link SafeLoader partitions table parser
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This parser deals with most TP-Link home routers. It reads info about
|
||||
partitions and registers them in the MTD subsystem.
|
||||
|
||||
Example from TP-Link Archer C5 V2:
|
||||
|
||||
spi-nor spi0.0: s25fl128s1 (16384 Kbytes)
|
||||
15 tplink-safeloader partitions found on MTD device spi0.0
|
||||
Creating 15 MTD partitions on "spi0.0":
|
||||
0x000000000000-0x000000040000 : "fs-uboot"
|
||||
0x000000040000-0x000000440000 : "os-image"
|
||||
0x000000440000-0x000000e40000 : "rootfs"
|
||||
0x000000e40000-0x000000e40200 : "default-mac"
|
||||
0x000000e40200-0x000000e40400 : "pin"
|
||||
0x000000e40400-0x000000e40600 : "product-info"
|
||||
0x000000e50000-0x000000e60000 : "partition-table"
|
||||
0x000000e60000-0x000000e60200 : "soft-version"
|
||||
0x000000e61000-0x000000e70000 : "support-list"
|
||||
0x000000e70000-0x000000e80000 : "profile"
|
||||
0x000000e80000-0x000000e90000 : "default-config"
|
||||
0x000000e90000-0x000000ee0000 : "user-config"
|
||||
0x000000ee0000-0x000000fe0000 : "log"
|
||||
0x000000fe0000-0x000000ff0000 : "radio_bk"
|
||||
0x000000ff0000-0x000001000000 : "radio"
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20221015092950.27467-2-zajec5@gmail.com
|
||||
---
|
||||
drivers/mtd/parsers/Kconfig | 15 +++
|
||||
drivers/mtd/parsers/Makefile | 1 +
|
||||
drivers/mtd/parsers/tplink_safeloader.c | 150 ++++++++++++++++++++++++
|
||||
3 files changed, 166 insertions(+)
|
||||
create mode 100644 drivers/mtd/parsers/tplink_safeloader.c
|
||||
|
||||
--- a/drivers/mtd/parsers/Kconfig
|
||||
+++ b/drivers/mtd/parsers/Kconfig
|
||||
@@ -123,6 +123,21 @@ config MTD_AFS_PARTS
|
||||
for your particular device. It won't happen automatically. The
|
||||
'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
|
||||
|
||||
+config MTD_PARSER_TPLINK_SAFELOADER
|
||||
+ tristate "TP-Link Safeloader partitions parser"
|
||||
+ depends on MTD && (ARCH_BCM_5301X || ATH79 || SOC_MT7620 || SOC_MT7621 || COMPILE_TEST)
|
||||
+ help
|
||||
+ TP-Link home routers use flash partitions to store various data. Info
|
||||
+ about flash space layout is stored in a partitions table using a
|
||||
+ custom ASCII-based format.
|
||||
+
|
||||
+ That format was first found in devices with SafeLoader bootloader and
|
||||
+ was named after it. Later it was adapted to CFE and U-Boot
|
||||
+ bootloaders.
|
||||
+
|
||||
+ This driver reads partitions table, parses it and creates MTD
|
||||
+ partitions.
|
||||
+
|
||||
config MTD_PARSER_TRX
|
||||
tristate "Parser for TRX format partitions"
|
||||
depends on MTD && (BCM47XX || ARCH_BCM_5301X || ARCH_MEDIATEK || RALINK || COMPILE_TEST)
|
||||
--- a/drivers/mtd/parsers/Makefile
|
||||
+++ b/drivers/mtd/parsers/Makefile
|
||||
@@ -10,6 +10,7 @@ ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908) +=
|
||||
ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
|
||||
obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
|
||||
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
||||
+obj-$(CONFIG_MTD_PARSER_TPLINK_SAFELOADER) += tplink_safeloader.o
|
||||
obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o
|
||||
obj-$(CONFIG_MTD_SERCOMM_PARTS) += scpart.o
|
||||
obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/parsers/tplink_safeloader.c
|
||||
@@ -0,0 +1,150 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+/*
|
||||
+ * Copyright © 2022 Rafał Miłecki <rafal@milecki.pl>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#define TPLINK_SAFELOADER_DATA_OFFSET 4
|
||||
+#define TPLINK_SAFELOADER_MAX_PARTS 32
|
||||
+
|
||||
+struct safeloader_cmn_header {
|
||||
+ __be32 size;
|
||||
+ uint32_t unused;
|
||||
+} __packed;
|
||||
+
|
||||
+static void *mtd_parser_tplink_safeloader_read_table(struct mtd_info *mtd)
|
||||
+{
|
||||
+ struct safeloader_cmn_header hdr;
|
||||
+ struct device_node *np;
|
||||
+ size_t bytes_read;
|
||||
+ size_t offset;
|
||||
+ size_t size;
|
||||
+ char *buf;
|
||||
+ int err;
|
||||
+
|
||||
+ np = mtd_get_of_node(mtd);
|
||||
+ if (mtd_is_partition(mtd))
|
||||
+ of_node_get(np);
|
||||
+ else
|
||||
+ np = of_get_child_by_name(np, "partitions");
|
||||
+
|
||||
+ if (of_property_read_u32(np, "partitions-table-offset", (u32 *)&offset)) {
|
||||
+ pr_err("Failed to get partitions table offset\n");
|
||||
+ goto err_put;
|
||||
+ }
|
||||
+
|
||||
+ err = mtd_read(mtd, offset, sizeof(hdr), &bytes_read, (uint8_t *)&hdr);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("Failed to read from %s at 0x%zx\n", mtd->name, offset);
|
||||
+ goto err_put;
|
||||
+ }
|
||||
+
|
||||
+ size = be32_to_cpu(hdr.size);
|
||||
+
|
||||
+ buf = kmalloc(size + 1, GFP_KERNEL);
|
||||
+ if (!buf)
|
||||
+ goto err_put;
|
||||
+
|
||||
+ err = mtd_read(mtd, offset + sizeof(hdr), size, &bytes_read, buf);
|
||||
+ if (err && !mtd_is_bitflip(err)) {
|
||||
+ pr_err("Failed to read from %s at 0x%zx\n", mtd->name, offset + sizeof(hdr));
|
||||
+ goto err_kfree;
|
||||
+ }
|
||||
+
|
||||
+ buf[size] = '\0';
|
||||
+
|
||||
+ of_node_put(np);
|
||||
+
|
||||
+ return buf;
|
||||
+
|
||||
+err_kfree:
|
||||
+ kfree(buf);
|
||||
+err_put:
|
||||
+ of_node_put(np);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static int mtd_parser_tplink_safeloader_parse(struct mtd_info *mtd,
|
||||
+ const struct mtd_partition **pparts,
|
||||
+ struct mtd_part_parser_data *data)
|
||||
+{
|
||||
+ struct mtd_partition *parts;
|
||||
+ char name[65];
|
||||
+ size_t offset;
|
||||
+ size_t bytes;
|
||||
+ char *buf;
|
||||
+ int idx;
|
||||
+ int err;
|
||||
+
|
||||
+ parts = kcalloc(TPLINK_SAFELOADER_MAX_PARTS, sizeof(*parts), GFP_KERNEL);
|
||||
+ if (!parts) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto err_out;
|
||||
+ }
|
||||
+
|
||||
+ buf = mtd_parser_tplink_safeloader_read_table(mtd);
|
||||
+ if (!buf) {
|
||||
+ err = -ENOENT;
|
||||
+ goto err_out;
|
||||
+ }
|
||||
+
|
||||
+ for (idx = 0, offset = TPLINK_SAFELOADER_DATA_OFFSET;
|
||||
+ idx < TPLINK_SAFELOADER_MAX_PARTS &&
|
||||
+ sscanf(buf + offset, "partition %64s base 0x%llx size 0x%llx%zn\n",
|
||||
+ name, &parts[idx].offset, &parts[idx].size, &bytes) == 3;
|
||||
+ idx++, offset += bytes + 1) {
|
||||
+ parts[idx].name = kstrdup(name, GFP_KERNEL);
|
||||
+ if (!parts[idx].name) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (idx == TPLINK_SAFELOADER_MAX_PARTS)
|
||||
+ pr_warn("Reached maximum number of partitions!\n");
|
||||
+
|
||||
+ kfree(buf);
|
||||
+
|
||||
+ *pparts = parts;
|
||||
+
|
||||
+ return idx;
|
||||
+
|
||||
+err_free:
|
||||
+ for (idx -= 1; idx >= 0; idx--)
|
||||
+ kfree(parts[idx].name);
|
||||
+err_out:
|
||||
+ return err;
|
||||
+};
|
||||
+
|
||||
+static void mtd_parser_tplink_safeloader_cleanup(const struct mtd_partition *pparts,
|
||||
+ int nr_parts)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < nr_parts; i++)
|
||||
+ kfree(pparts[i].name);
|
||||
+
|
||||
+ kfree(pparts);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id mtd_parser_tplink_safeloader_of_match_table[] = {
|
||||
+ { .compatible = "tplink,safeloader-partitions" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, mtd_parser_tplink_safeloader_of_match_table);
|
||||
+
|
||||
+static struct mtd_part_parser mtd_parser_tplink_safeloader = {
|
||||
+ .parse_fn = mtd_parser_tplink_safeloader_parse,
|
||||
+ .cleanup = mtd_parser_tplink_safeloader_cleanup,
|
||||
+ .name = "tplink-safeloader",
|
||||
+ .of_match_table = mtd_parser_tplink_safeloader_of_match_table,
|
||||
+};
|
||||
+module_mtd_part_parser(mtd_parser_tplink_safeloader);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
|
@ -328,6 +328,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
|
|||
# CONFIG_ARM64_ERRATUM_1508412 is not set
|
||||
# CONFIG_ARM64_ERRATUM_1530923 is not set
|
||||
# CONFIG_ARM64_ERRATUM_1542419 is not set
|
||||
# CONFIG_ARM64_ERRATUM_1742098 is not set
|
||||
# CONFIG_ARM64_ERRATUM_819472 is not set
|
||||
# CONFIG_ARM64_ERRATUM_824069 is not set
|
||||
# CONFIG_ARM64_ERRATUM_826319 is not set
|
||||
|
@ -337,6 +338,8 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
|
|||
# CONFIG_ARM64_ERRATUM_843419 is not set
|
||||
# CONFIG_ARM64_ERRATUM_845719 is not set
|
||||
# CONFIG_ARM64_ERRATUM_858921 is not set
|
||||
# CONFIG_ARM64_ERRATUM_2441007 is not set
|
||||
# CONFIG_ARM64_ERRATUM_2441009 is not set
|
||||
# CONFIG_ARM64_HW_AFDBM is not set
|
||||
# CONFIG_ARM64_LSE_ATOMICS is not set
|
||||
CONFIG_ARM64_MODULE_PLTS=y
|
||||
|
@ -409,6 +412,7 @@ CONFIG_ARM_MODULE_PLTS=y
|
|||
# CONFIG_ARM_PSCI_CHECKER is not set
|
||||
# CONFIG_ARM_PSCI_CPUIDLE is not set
|
||||
# CONFIG_ARM_PTDUMP_DEBUGFS is not set
|
||||
# CONFIG_ARM_RK3328_DMC_DEVFREQ is not set
|
||||
# CONFIG_ARM_SBSA_WATCHDOG is not set
|
||||
# CONFIG_ARM_SCPI_PROTOCOL is not set
|
||||
# CONFIG_ARM_SDE_INTERFACE is not set
|
||||
|
@ -2381,6 +2385,7 @@ CONFIG_HW_PERF_EVENTS=y
|
|||
# CONFIG_HW_RANDOM_PPC4XX is not set
|
||||
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
|
||||
CONFIG_HW_RANDOM_TPM=y
|
||||
# CONFIG_HW_RANDOM_ROCKCHIP is not set
|
||||
# CONFIG_HW_RANDOM_VIA is not set
|
||||
# CONFIG_HW_RANDOM_VIRTIO is not set
|
||||
# CONFIG_HW_RANDOM_XIPHERA is not set
|
||||
|
@ -2582,6 +2587,7 @@ CONFIG_INET=y
|
|||
# CONFIG_INET_ESPINTCP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_INET_TABLE_PERTURB_ORDER=16
|
||||
# CONFIG_INET_TCP_DIAG is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
# CONFIG_INET_UDP_DIAG is not set
|
||||
|
@ -7449,7 +7455,6 @@ CONFIG_MODPROBE_PATH="/sbin/modprobe"
|
|||
CONFIG_MODULE_COMPRESS_NONE=y
|
||||
# CONFIG_MPLS_IPTUNNEL is not set
|
||||
# CONFIG_MPLS_ROUTING is not set
|
||||
# CONFIG_MPTCP is not set
|
||||
# CONFIG_MSM_GCC_8953 is not set
|
||||
# CONFIG_MSM_MMCC_8994 is not set
|
||||
# CONFIG_MTD_MCHP48L640 is not set
|
||||
|
@ -7603,4 +7608,11 @@ CONFIG_SERIAL_8250_16550A_VARIANTS=y
|
|||
# CONFIG_WWAN_HWSIM is not set
|
||||
# CONFIG_ZERO_CALL_USED_REGS is not set
|
||||
# CONFIG_ZRAM_DEF_COMP_LZORLE is not set
|
||||
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
|
||||
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
|
||||
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_I2C_BRCMSTB is not set
|
||||
# CONFIG_NVMEM_ROCKCHIP_EFUSE is not set
|
||||
# CONFIG_NVMEM_QCOM_QFPROM is not set
|
||||
# CONFIG_NVMEM_ROCKCHIP_OTP is not set
|
||||
|
|
7935
root/target/linux/generic/config-6.1
Normal file
7935
root/target/linux/generic/config-6.1
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,37 +0,0 @@
|
|||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
||||
index a5e8374a8d71..e716395268fe 100644
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -256,5 +256,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
+#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
+#define QUECTEL_PRODUCT_RM500U_CN 0x0900
|
||||
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
|
||||
#define QUECTEL_PRODUCT_EC200T 0x6026
|
||||
#define QUECTEL_PRODUCT_RM500K 0x7001
|
||||
@@ -1159,6 +1160,11 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
|
||||
.driver_info = ZLP },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500U_CN, 0xff, 0, 0),
|
||||
+ .driver_info = ZLP },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
|
||||
index 709e3c59e340..0cb187def5bc 100644
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1087,6 +1087,8 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
|
||||
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */
|
||||
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0900)}, /* Quectel RM500U_CN */
|
||||
|
||||
/* 3. Combined interface devices matching on interface number */
|
||||
{QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */
|
|
@ -0,0 +1,42 @@
|
|||
From ba041eb8000e4a8f556ca641335894f7e7429dbb Mon Sep 17 00:00:00 2001
|
||||
From: Ailick <277498654@qq.com>
|
||||
Date: Sat, 21 Aug 2021 17:12:22 +0800
|
||||
Subject: [PATCH] net: patch linux kernel to support shortcut-fe-cm
|
||||
|
||||
---
|
||||
nf_conntrack_proto_udp.c | 3 ++-
|
||||
nf_conntrack_timeout.h | 2 +
|
||||
1 file changed, 2 insertion(+)
|
||||
|
||||
diff --git a/include/net/netfilter/nf_conntrack_timeout.h b/include/net/netfilter/nf_conntrack_timeout.h
|
||||
index 6dd7239..e1f6d69 100644
|
||||
--- a/include/net/netfilter/nf_conntrack_timeout.h
|
||||
+++ b/include/net/netfilter/nf_conntrack_timeout.h
|
||||
@@ -123,5 +123,7 @@ static inline void nf_ct_destroy_timeout(struct nf_conn *ct)
|
||||
extern struct nf_ct_timeout *(*nf_ct_timeout_find_get_hook)(struct net *net, const char *name);
|
||||
extern void (*nf_ct_timeout_put_hook)(struct nf_ct_timeout *timeout);
|
||||
#endif
|
||||
+
|
||||
+extern unsigned int *udp_get_timeouts(struct net *net);
|
||||
|
||||
#endif /* _NF_CONNTRACK_TIMEOUT_H */
|
||||
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
|
||||
index 7365b43..2238d55 100644
|
||||
--- a/net/netfilter/nf_conntrack_proto_udp.c
|
||||
+++ b/net/netfilter/nf_conntrack_proto_udp.c
|
||||
@@ -29,10 +29,11 @@ static const unsigned int udp_timeouts[UDP_CT_MAX] = {
|
||||
[UDP_CT_REPLIED] = 120*HZ,
|
||||
};
|
||||
|
||||
-static unsigned int *udp_get_timeouts(struct net *net)
|
||||
+unsigned int *udp_get_timeouts(struct net *net)
|
||||
{
|
||||
return nf_udp_pernet(net)->timeouts;
|
||||
}
|
||||
+EXPORT_SYMBOL(udp_get_timeouts);
|
||||
|
||||
static void udp_error_log(const struct sk_buff *skb,
|
||||
const struct nf_hook_state *state,
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
From eda40b8c8c82e0f2789d6bc8bf63846dce2e8f32 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
Date: Sat, 23 Mar 2019 09:29:49 +0000
|
||||
Subject: [PATCH] netfilter: connmark: introduce set-dscpmark
|
||||
|
||||
set-dscpmark is a method of storing the DSCP of an ip packet into
|
||||
conntrack mark. In combination with a suitable tc filter action
|
||||
(act_ctinfo) DSCP values are able to be stored in the mark on egress and
|
||||
restored on ingress across links that otherwise alter or bleach DSCP.
|
||||
|
||||
This is useful for qdiscs such as CAKE which are able to shape according
|
||||
to policies based on DSCP.
|
||||
|
||||
Ingress classification is traditionally a challenging task since
|
||||
iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT
|
||||
lookups, hence are unable to see internal IPv4 addresses as used on the
|
||||
typical home masquerading gateway.
|
||||
|
||||
x_tables CONNMARK set-dscpmark target solves the problem of storing the
|
||||
DSCP to the conntrack mark in a way suitable for the new act_ctinfo tc
|
||||
action to restore.
|
||||
|
||||
The set-dscpmark option accepts 2 parameters, a 32bit 'dscpmask' and a
|
||||
32bit 'statemask'. The dscp mask must be 6 contiguous bits and
|
||||
represents the area where the DSCP will be stored in the connmark. The
|
||||
state mask is a minimum 1 bit length mask that must not overlap with the
|
||||
dscpmask. It represents a flag which is set when the DSCP has been
|
||||
stored in the conntrack mark. This is useful to implement a 'one shot'
|
||||
iptables based classification where the 'complicated' iptables rules are
|
||||
only run once to classify the connection on initial (egress) packet and
|
||||
subsequent packets are all marked/restored with the same DSCP. A state
|
||||
mask of zero disables the setting of a status bit/s.
|
||||
|
||||
example syntax with a suitably modified iptables user space application:
|
||||
|
||||
iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --set-dscpmark 0xfc000000/0x01000000
|
||||
|
||||
Would store the DSCP in the top 6 bits of the 32bit mark field, and use
|
||||
the LSB of the top byte as the 'DSCP has been stored' marker.
|
||||
|
||||
|----0xFC----conntrack mark----000000---|
|
||||
| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0|
|
||||
| DSCP | unused | flag |unused |
|
||||
|-----------------------0x01---000000---|
|
||||
^ ^
|
||||
| |
|
||||
---| Conditional flag
|
||||
| set this when dscp
|
||||
|-ip diffserv-| stored in mark
|
||||
| 6 bits |
|
||||
|-------------|
|
||||
|
||||
an identically configured tc action to restore looks like:
|
||||
|
||||
tc filter show dev eth0 ingress
|
||||
filter parent ffff: protocol all pref 10 u32 chain 0
|
||||
filter parent ffff: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1
|
||||
filter parent ffff: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1: not_in_hw
|
||||
match 00000000/00000000 at 0
|
||||
action order 1: ctinfo zone 0 pipe
|
||||
index 2 ref 1 bind 1 dscp 0xfc000000/0x1000000
|
||||
|
||||
action order 2: mirred (Egress Redirect to device ifb4eth0) stolen
|
||||
index 1 ref 1 bind 1
|
||||
|
||||
|----0xFC----conntrack mark----000000---|
|
||||
| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0|
|
||||
| DSCP | unused | flag |unused |
|
||||
|-----------------------0x01---000000---|
|
||||
| |
|
||||
| |
|
||||
---| Conditional flag
|
||||
v only restore if set
|
||||
|-ip diffserv-|
|
||||
| 6 bits |
|
||||
|-------------|
|
||||
|
||||
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
---
|
||||
include/uapi/linux/netfilter/xt_connmark.h | 10 ++++
|
||||
net/netfilter/xt_connmark.c | 55 ++++++++++++++++++----
|
||||
2 files changed, 57 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/include/uapi/linux/netfilter/xt_connmark.h
|
||||
+++ b/include/uapi/linux/netfilter/xt_connmark.h
|
||||
@@ -20,6 +20,11 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
+ XT_CONNMARK_VALUE = (1 << 0),
|
||||
+ XT_CONNMARK_DSCP = (1 << 1)
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
D_SHIFT_LEFT = 0,
|
||||
D_SHIFT_RIGHT,
|
||||
};
|
||||
@@ -34,6 +39,11 @@ struct xt_connmark_tginfo2 {
|
||||
__u8 shift_dir, shift_bits, mode;
|
||||
};
|
||||
|
||||
+struct xt_connmark_tginfo3 {
|
||||
+ __u32 ctmark, ctmask, nfmask;
|
||||
+ __u8 shift_dir, shift_bits, mode, func;
|
||||
+};
|
||||
+
|
||||
struct xt_connmark_mtinfo1 {
|
||||
__u32 mark, mask;
|
||||
__u8 invert;
|
||||
--- a/net/netfilter/xt_connmark.c
|
||||
+++ b/net/netfilter/xt_connmark.c
|
||||
@@ -24,12 +24,13 @@ MODULE_ALIAS("ipt_connmark");
|
||||
MODULE_ALIAS("ip6t_connmark");
|
||||
|
||||
static unsigned int
|
||||
-connmark_tg_shift(struct sk_buff *skb, const struct xt_connmark_tginfo2 *info)
|
||||
+connmark_tg_shift(struct sk_buff *skb, const struct xt_connmark_tginfo3 *info)
|
||||
{
|
||||
enum ip_conntrack_info ctinfo;
|
||||
u_int32_t new_targetmark;
|
||||
struct nf_conn *ct;
|
||||
u_int32_t newmark;
|
||||
+ u_int8_t dscp;
|
||||
|
||||
ct = nf_ct_get(skb, &ctinfo);
|
||||
if (ct == NULL)
|
||||
@@ -37,12 +38,24 @@ connmark_tg_shift(struct sk_buff *skb, c
|
||||
|
||||
switch (info->mode) {
|
||||
case XT_CONNMARK_SET:
|
||||
- newmark = (ct->mark & ~info->ctmask) ^ info->ctmark;
|
||||
- if (info->shift_dir == D_SHIFT_RIGHT)
|
||||
- newmark >>= info->shift_bits;
|
||||
- else
|
||||
- newmark <<= info->shift_bits;
|
||||
+ newmark = ct->mark;
|
||||
+ if (info->func & XT_CONNMARK_VALUE) {
|
||||
+ newmark = (newmark & ~info->ctmask) ^ info->ctmark;
|
||||
+ if (info->shift_dir == D_SHIFT_RIGHT)
|
||||
+ newmark >>= info->shift_bits;
|
||||
+ else
|
||||
+ newmark <<= info->shift_bits;
|
||||
+ } else if (info->func & XT_CONNMARK_DSCP) {
|
||||
+ if (skb->protocol == htons(ETH_P_IP))
|
||||
+ dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
|
||||
+ else if (skb->protocol == htons(ETH_P_IPV6))
|
||||
+ dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2;
|
||||
+ else /* protocol doesn't have diffserv */
|
||||
+ break;
|
||||
|
||||
+ newmark = (newmark & ~info->ctmark) |
|
||||
+ (info->ctmask | (dscp << info->shift_bits));
|
||||
+ }
|
||||
if (ct->mark != newmark) {
|
||||
ct->mark = newmark;
|
||||
nf_conntrack_event_cache(IPCT_MARK, ct);
|
||||
@@ -81,20 +94,36 @@ static unsigned int
|
||||
connmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connmark_tginfo1 *info = par->targinfo;
|
||||
- const struct xt_connmark_tginfo2 info2 = {
|
||||
+ const struct xt_connmark_tginfo3 info3 = {
|
||||
.ctmark = info->ctmark,
|
||||
.ctmask = info->ctmask,
|
||||
.nfmask = info->nfmask,
|
||||
.mode = info->mode,
|
||||
+ .func = XT_CONNMARK_VALUE
|
||||
};
|
||||
|
||||
- return connmark_tg_shift(skb, &info2);
|
||||
+ return connmark_tg_shift(skb, &info3);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
connmark_tg_v2(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connmark_tginfo2 *info = par->targinfo;
|
||||
+ const struct xt_connmark_tginfo3 info3 = {
|
||||
+ .ctmark = info->ctmark,
|
||||
+ .ctmask = info->ctmask,
|
||||
+ .nfmask = info->nfmask,
|
||||
+ .mode = info->mode,
|
||||
+ .func = XT_CONNMARK_VALUE
|
||||
+ };
|
||||
+
|
||||
+ return connmark_tg_shift(skb, &info3);
|
||||
+}
|
||||
+
|
||||
+static unsigned int
|
||||
+connmark_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
+{
|
||||
+ const struct xt_connmark_tginfo3 *info = par->targinfo;
|
||||
|
||||
return connmark_tg_shift(skb, info);
|
||||
}
|
||||
@@ -165,6 +194,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.targetsize = sizeof(struct xt_connmark_tginfo2),
|
||||
.destroy = connmark_tg_destroy,
|
||||
.me = THIS_MODULE,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "CONNMARK",
|
||||
+ .revision = 3,
|
||||
+ .family = NFPROTO_UNSPEC,
|
||||
+ .checkentry = connmark_tg_check,
|
||||
+ .target = connmark_tg_v3,
|
||||
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
|
||||
+ .destroy = connmark_tg_destroy,
|
||||
+ .me = THIS_MODULE,
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
--- a/include/net/netfilter/nf_flow_table.h
|
||||
+++ b/include/net/netfilter/nf_flow_table.h
|
||||
@@ -160,6 +160,8 @@ struct nf_flow_table_hw {
|
||||
int nf_flow_table_hw_register(const struct nf_flow_table_hw *offload);
|
||||
void nf_flow_table_hw_unregister(const struct nf_flow_table_hw *offload);
|
||||
|
||||
+void nf_flow_table_acct(struct flow_offload *flow, struct sk_buff *skb, int dir);
|
||||
+
|
||||
extern struct work_struct nf_flow_offload_hw_work;
|
||||
|
||||
#define MODULE_ALIAS_NF_FLOWTABLE(family) \
|
||||
--- a/net/netfilter/nf_flow_table_core.c
|
||||
+++ b/net/netfilter/nf_flow_table_core.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <net/netfilter/nf_conntrack_core.h>
|
||||
#include <net/netfilter/nf_conntrack_l4proto.h>
|
||||
#include <net/netfilter/nf_conntrack_tuple.h>
|
||||
+#include <net/netfilter/nf_conntrack_acct.h>
|
||||
|
||||
struct flow_offload_entry {
|
||||
struct flow_offload flow;
|
||||
@@ -164,6 +165,22 @@ void flow_offload_free(struct flow_offlo
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(flow_offload_free);
|
||||
|
||||
+void nf_flow_table_acct(struct flow_offload *flow, struct sk_buff *skb, int dir)
|
||||
+{
|
||||
+ struct flow_offload_entry *entry;
|
||||
+ struct nf_conn_acct *acct;
|
||||
+
|
||||
+ entry = container_of(flow, struct flow_offload_entry, flow);
|
||||
+ acct = nf_conn_acct_find(entry->ct);
|
||||
+ if (acct) {
|
||||
+ struct nf_conn_counter *counter = acct->counter;
|
||||
+
|
||||
+ atomic64_inc(&counter[dir].packets);
|
||||
+ atomic64_add(skb->len, &counter[dir].bytes);
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(nf_flow_table_acct);
|
||||
+
|
||||
static u32 flow_offload_hash(const void *data, u32 len, u32 seed)
|
||||
{
|
||||
const struct flow_offload_tuple *tuple = data;
|
||||
--- a/net/netfilter/nf_flow_table_ip.c
|
||||
+++ b/net/netfilter/nf_flow_table_ip.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <net/ip6_route.h>
|
||||
#include <net/neighbour.h>
|
||||
#include <net/netfilter/nf_flow_table.h>
|
||||
+
|
||||
/* For layer 4 checksum field offset. */
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/udp.h>
|
||||
@@ -296,6 +297,7 @@ nf_flow_offload_ip_hook(void *priv, stru
|
||||
skb->dev = outdev;
|
||||
nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
|
||||
skb_dst_set_noref(skb, &rt->dst);
|
||||
+ nf_flow_table_acct(flow, skb, dir);
|
||||
neigh_xmit(NEIGH_ARP_TABLE, outdev, &nexthop, skb);
|
||||
|
||||
return NF_STOLEN;
|
||||
@@ -526,6 +528,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
|
||||
skb->dev = outdev;
|
||||
nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
|
||||
skb_dst_set_noref(skb, &rt->dst);
|
||||
+ nf_flow_table_acct(flow, skb, dir);
|
||||
neigh_xmit(NEIGH_ND_TABLE, outdev, nexthop, skb);
|
||||
|
||||
return NF_STOLEN;
|
|
@ -0,0 +1,589 @@
|
|||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 20 Feb 2018 15:56:02 +0100
|
||||
Subject: [PATCH] netfilter: add xt_OFFLOAD target
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
create mode 100644 net/netfilter/xt_OFFLOAD.c
|
||||
|
||||
--- a/net/ipv4/netfilter/Kconfig
|
||||
+++ b/net/ipv4/netfilter/Kconfig
|
||||
@@ -56,8 +56,6 @@ config NF_TABLES_ARP
|
||||
help
|
||||
This option enables the ARP support for nf_tables.
|
||||
|
||||
-endif # NF_TABLES
|
||||
-
|
||||
config NF_FLOW_TABLE_IPV4
|
||||
tristate "Netfilter flow table IPv4 module"
|
||||
depends on NF_FLOW_TABLE
|
||||
@@ -66,6 +64,8 @@ config NF_FLOW_TABLE_IPV4
|
||||
|
||||
To compile it as a module, choose M here.
|
||||
|
||||
+endif # NF_TABLES
|
||||
+
|
||||
config NF_DUP_IPV4
|
||||
tristate "Netfilter IPv4 packet duplication to alternate destination"
|
||||
depends on !NF_CONNTRACK || NF_CONNTRACK
|
||||
--- a/net/ipv6/netfilter/Kconfig
|
||||
+++ b/net/ipv6/netfilter/Kconfig
|
||||
@@ -45,7 +45,6 @@ config NFT_FIB_IPV6
|
||||
multicast or blackhole.
|
||||
|
||||
endif # NF_TABLES_IPV6
|
||||
-endif # NF_TABLES
|
||||
|
||||
config NF_FLOW_TABLE_IPV6
|
||||
tristate "Netfilter flow table IPv6 module"
|
||||
@@ -55,6 +54,8 @@ config NF_FLOW_TABLE_IPV6
|
||||
|
||||
To compile it as a module, choose M here.
|
||||
|
||||
+endif # NF_TABLES
|
||||
+
|
||||
config NF_DUP_IPV6
|
||||
tristate "Netfilter IPv6 packet duplication to alternate destination"
|
||||
depends on !NF_CONNTRACK || NF_CONNTRACK
|
||||
--- a/net/netfilter/Kconfig
|
||||
+++ b/net/netfilter/Kconfig
|
||||
@@ -690,8 +690,6 @@ config NFT_FIB_NETDEV
|
||||
|
||||
endif # NF_TABLES_NETDEV
|
||||
|
||||
-endif # NF_TABLES
|
||||
-
|
||||
config NF_FLOW_TABLE_INET
|
||||
tristate "Netfilter flow table mixed IPv4/IPv6 module"
|
||||
depends on NF_FLOW_TABLE
|
||||
@@ -700,11 +698,12 @@ config NF_FLOW_TABLE_INET
|
||||
|
||||
To compile it as a module, choose M here.
|
||||
|
||||
+endif # NF_TABLES
|
||||
+
|
||||
config NF_FLOW_TABLE
|
||||
tristate "Netfilter flow table module"
|
||||
depends on NETFILTER_INGRESS
|
||||
depends on NF_CONNTRACK
|
||||
- depends on NF_TABLES
|
||||
help
|
||||
This option adds the flow table core infrastructure.
|
||||
|
||||
@@ -993,6 +992,15 @@ config NETFILTER_XT_TARGET_NOTRACK
|
||||
depends on NETFILTER_ADVANCED
|
||||
select NETFILTER_XT_TARGET_CT
|
||||
|
||||
+config NETFILTER_XT_TARGET_FLOWOFFLOAD
|
||||
+ tristate '"FLOWOFFLOAD" target support'
|
||||
+ depends on NF_FLOW_TABLE
|
||||
+ depends on NETFILTER_INGRESS
|
||||
+ help
|
||||
+ This option adds a `FLOWOFFLOAD' target, which uses the nf_flow_offload
|
||||
+ module to speed up processing of packets by bypassing the usual
|
||||
+ netfilter chains
|
||||
+
|
||||
config NETFILTER_XT_TARGET_RATEEST
|
||||
tristate '"RATEEST" target support'
|
||||
depends on NETFILTER_ADVANCED
|
||||
--- a/net/netfilter/Makefile
|
||||
+++ b/net/netfilter/Makefile
|
||||
@@ -141,6 +141,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
|
||||
+obj-$(CONFIG_NETFILTER_XT_TARGET_FLOWOFFLOAD) += xt_FLOWOFFLOAD.o
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_HMARK) += xt_HMARK.o
|
||||
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
||||
@@ -0,0 +1,427 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Felix Fietkau <nbd@nbd.name>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/netfilter.h>
|
||||
+#include <linux/netfilter/xt_FLOWOFFLOAD.h>
|
||||
+#include <net/ip.h>
|
||||
+#include <net/netfilter/nf_conntrack.h>
|
||||
+#include <net/netfilter/nf_conntrack_extend.h>
|
||||
+#include <net/netfilter/nf_conntrack_helper.h>
|
||||
+#include <net/netfilter/nf_flow_table.h>
|
||||
+
|
||||
+static struct nf_flowtable nf_flowtable;
|
||||
+static HLIST_HEAD(hooks);
|
||||
+static DEFINE_SPINLOCK(hooks_lock);
|
||||
+static struct delayed_work hook_work;
|
||||
+
|
||||
+struct xt_flowoffload_hook {
|
||||
+ struct hlist_node list;
|
||||
+ struct nf_hook_ops ops;
|
||||
+ struct net *net;
|
||||
+ bool registered;
|
||||
+ bool used;
|
||||
+};
|
||||
+
|
||||
+static unsigned int
|
||||
+xt_flowoffload_net_hook(void *priv, struct sk_buff *skb,
|
||||
+ const struct nf_hook_state *state)
|
||||
+{
|
||||
+ switch (skb->protocol) {
|
||||
+ case htons(ETH_P_IP):
|
||||
+ return nf_flow_offload_ip_hook(priv, skb, state);
|
||||
+ case htons(ETH_P_IPV6):
|
||||
+ return nf_flow_offload_ipv6_hook(priv, skb, state);
|
||||
+ }
|
||||
+
|
||||
+ return NF_ACCEPT;
|
||||
+}
|
||||
+
|
||||
+int nf_flow_table_iterate(struct nf_flowtable *flow_table,
|
||||
+ void (*iter)(struct flow_offload *flow, void *data),
|
||||
+ void *data);
|
||||
+
|
||||
+static int
|
||||
+xt_flowoffload_create_hook(struct net_device *dev)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+ struct nf_hook_ops *ops;
|
||||
+
|
||||
+ hook = kzalloc(sizeof(*hook), GFP_ATOMIC);
|
||||
+ if (!hook)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ops = &hook->ops;
|
||||
+ ops->pf = NFPROTO_NETDEV;
|
||||
+ ops->hooknum = NF_NETDEV_INGRESS;
|
||||
+ ops->priority = 10;
|
||||
+ ops->priv = &nf_flowtable;
|
||||
+ ops->hook = xt_flowoffload_net_hook;
|
||||
+ ops->dev = dev;
|
||||
+
|
||||
+ hlist_add_head(&hook->list, &hooks);
|
||||
+ mod_delayed_work(system_power_efficient_wq, &hook_work, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct xt_flowoffload_hook *
|
||||
+flow_offload_lookup_hook(struct net_device *dev)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+
|
||||
+ hlist_for_each_entry(hook, &hooks, list) {
|
||||
+ if (hook->ops.dev == dev)
|
||||
+ return hook;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+xt_flowoffload_check_device(struct net_device *dev)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ hook = flow_offload_lookup_hook(dev);
|
||||
+ if (hook)
|
||||
+ hook->used = true;
|
||||
+ else
|
||||
+ xt_flowoffload_create_hook(dev);
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+xt_flowoffload_register_hooks(void)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+
|
||||
+restart:
|
||||
+ hlist_for_each_entry(hook, &hooks, list) {
|
||||
+ if (hook->registered)
|
||||
+ continue;
|
||||
+
|
||||
+ hook->registered = true;
|
||||
+ hook->net = dev_net(hook->ops.dev);
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+ nf_register_net_hook(hook->net, &hook->ops);
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ goto restart;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+xt_flowoffload_cleanup_hooks(void)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+
|
||||
+restart:
|
||||
+ hlist_for_each_entry(hook, &hooks, list) {
|
||||
+ if (hook->used || !hook->registered)
|
||||
+ continue;
|
||||
+
|
||||
+ hlist_del(&hook->list);
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+ nf_unregister_net_hook(hook->net, &hook->ops);
|
||||
+ kfree(hook);
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ goto restart;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+xt_flowoffload_check_hook(struct flow_offload *flow, void *data)
|
||||
+{
|
||||
+ struct flow_offload_tuple *tuple = &flow->tuplehash[0].tuple;
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+ bool *found = data;
|
||||
+ struct rtable *rt = (struct rtable *)tuple->dst_cache;
|
||||
+
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ hlist_for_each_entry(hook, &hooks, list) {
|
||||
+ if (hook->ops.dev->ifindex != tuple->iifidx &&
|
||||
+ hook->ops.dev->ifindex != rt->dst.dev->ifindex)
|
||||
+ continue;
|
||||
+
|
||||
+ hook->used = true;
|
||||
+ *found = true;
|
||||
+ }
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+xt_flowoffload_hook_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook;
|
||||
+ bool found = false;
|
||||
+ int err;
|
||||
+
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ xt_flowoffload_register_hooks();
|
||||
+ hlist_for_each_entry(hook, &hooks, list)
|
||||
+ hook->used = false;
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+
|
||||
+ err = nf_flow_table_iterate(&nf_flowtable, xt_flowoffload_check_hook,
|
||||
+ &found);
|
||||
+ if (err && err != -EAGAIN)
|
||||
+ goto out;
|
||||
+
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ xt_flowoffload_cleanup_hooks();
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+
|
||||
+out:
|
||||
+ if (found)
|
||||
+ queue_delayed_work(system_power_efficient_wq, &hook_work, HZ);
|
||||
+}
|
||||
+
|
||||
+static bool
|
||||
+xt_flowoffload_skip(struct sk_buff *skb, int family)
|
||||
+{
|
||||
+ if (skb_sec_path(skb))
|
||||
+ return true;
|
||||
+
|
||||
+ if (family == NFPROTO_IPV4) {
|
||||
+ const struct ip_options *opt = &(IPCB(skb)->opt);
|
||||
+
|
||||
+ if (unlikely(opt->optlen))
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+static struct dst_entry *
|
||||
+xt_flowoffload_dst(const struct nf_conn *ct, enum ip_conntrack_dir dir,
|
||||
+ const struct xt_action_param *par, int ifindex)
|
||||
+{
|
||||
+ struct dst_entry *dst = NULL;
|
||||
+ struct flowi fl;
|
||||
+
|
||||
+ memset(&fl, 0, sizeof(fl));
|
||||
+ switch (xt_family(par)) {
|
||||
+ case NFPROTO_IPV4:
|
||||
+ fl.u.ip4.daddr = ct->tuplehash[dir].tuple.src.u3.ip;
|
||||
+ fl.u.ip4.flowi4_oif = ifindex;
|
||||
+ break;
|
||||
+ case NFPROTO_IPV6:
|
||||
+ fl.u.ip6.saddr = ct->tuplehash[dir].tuple.dst.u3.in6;
|
||||
+ fl.u.ip6.daddr = ct->tuplehash[dir].tuple.src.u3.in6;
|
||||
+ fl.u.ip6.flowi6_oif = ifindex;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ nf_route(xt_net(par), &dst, &fl, false, xt_family(par));
|
||||
+
|
||||
+ return dst;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+xt_flowoffload_route(struct sk_buff *skb, const struct nf_conn *ct,
|
||||
+ const struct xt_action_param *par,
|
||||
+ struct nf_flow_route *route, enum ip_conntrack_dir dir)
|
||||
+{
|
||||
+ struct dst_entry *this_dst, *other_dst;
|
||||
+
|
||||
+ this_dst = xt_flowoffload_dst(ct, !dir, par, xt_out(par)->ifindex);
|
||||
+ other_dst = xt_flowoffload_dst(ct, dir, par, xt_in(par)->ifindex);
|
||||
+
|
||||
+ route->tuple[dir].dst = this_dst;
|
||||
+ route->tuple[!dir].dst = other_dst;
|
||||
+
|
||||
+ if (!this_dst || !other_dst)
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ if (dst_xfrm(this_dst) || dst_xfrm(other_dst))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int
|
||||
+flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
+{
|
||||
+ const struct xt_flowoffload_target_info *info = par->targinfo;
|
||||
+ struct tcphdr _tcph, *tcph = NULL;
|
||||
+ enum ip_conntrack_info ctinfo;
|
||||
+ enum ip_conntrack_dir dir;
|
||||
+ struct nf_flow_route route;
|
||||
+ struct flow_offload *flow = NULL;
|
||||
+ struct nf_conn *ct;
|
||||
+ struct net *net;
|
||||
+
|
||||
+ if (xt_flowoffload_skip(skb, xt_family(par)))
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ ct = nf_ct_get(skb, &ctinfo);
|
||||
+ if (ct == NULL)
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ switch (ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum) {
|
||||
+ case IPPROTO_TCP:
|
||||
+ if (ct->proto.tcp.state != TCP_CONNTRACK_ESTABLISHED)
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ tcph = skb_header_pointer(skb, par->thoff,
|
||||
+ sizeof(_tcph), &_tcph);
|
||||
+ if (unlikely(!tcph || tcph->fin || tcph->rst))
|
||||
+ return XT_CONTINUE;
|
||||
+ break;
|
||||
+ case IPPROTO_UDP:
|
||||
+ break;
|
||||
+ default:
|
||||
+ return XT_CONTINUE;
|
||||
+ }
|
||||
+
|
||||
+ if (nf_ct_ext_exist(ct, NF_CT_EXT_HELPER) ||
|
||||
+ ct->status & IPS_SEQ_ADJUST)
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ if (!nf_ct_is_confirmed(ct))
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ if (!xt_in(par) || !xt_out(par))
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ if (test_and_set_bit(IPS_OFFLOAD_BIT, &ct->status))
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+ dir = CTINFO2DIR(ctinfo);
|
||||
+
|
||||
+ if (xt_flowoffload_route(skb, ct, par, &route, dir) == 0)
|
||||
+ flow = flow_offload_alloc(ct, &route);
|
||||
+
|
||||
+ dst_release(route.tuple[dir].dst);
|
||||
+ dst_release(route.tuple[!dir].dst);
|
||||
+
|
||||
+ if (!flow)
|
||||
+ goto err_flow_route;
|
||||
+
|
||||
+ if (tcph) {
|
||||
+ ct->proto.tcp.seen[0].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
|
||||
+ ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
|
||||
+ }
|
||||
+
|
||||
+ if (flow_offload_add(&nf_flowtable, flow) < 0)
|
||||
+ goto err_flow_add;
|
||||
+
|
||||
+ xt_flowoffload_check_device(xt_in(par));
|
||||
+ xt_flowoffload_check_device(xt_out(par));
|
||||
+
|
||||
+ net = read_pnet(&nf_flowtable.ft_net);
|
||||
+ if (!net)
|
||||
+ write_pnet(&nf_flowtable.ft_net, xt_net(par));
|
||||
+
|
||||
+ if (info->flags & XT_FLOWOFFLOAD_HW)
|
||||
+ nf_flow_offload_hw_add(xt_net(par), flow, ct);
|
||||
+
|
||||
+ return XT_CONTINUE;
|
||||
+
|
||||
+err_flow_add:
|
||||
+ flow_offload_free(flow);
|
||||
+err_flow_route:
|
||||
+ clear_bit(IPS_OFFLOAD_BIT, &ct->status);
|
||||
+ return XT_CONTINUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int flowoffload_chk(const struct xt_tgchk_param *par)
|
||||
+{
|
||||
+ struct xt_flowoffload_target_info *info = par->targinfo;
|
||||
+
|
||||
+ if (info->flags & ~XT_FLOWOFFLOAD_MASK)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct xt_target offload_tg_reg __read_mostly = {
|
||||
+ .family = NFPROTO_UNSPEC,
|
||||
+ .name = "FLOWOFFLOAD",
|
||||
+ .revision = 0,
|
||||
+ .targetsize = sizeof(struct xt_flowoffload_target_info),
|
||||
+ .usersize = sizeof(struct xt_flowoffload_target_info),
|
||||
+ .checkentry = flowoffload_chk,
|
||||
+ .target = flowoffload_tg,
|
||||
+ .me = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int xt_flowoffload_table_init(struct nf_flowtable *table)
|
||||
+{
|
||||
+ table->flags = NF_FLOWTABLE_F_HW;
|
||||
+ nf_flow_table_init(table);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void xt_flowoffload_table_cleanup(struct nf_flowtable *table)
|
||||
+{
|
||||
+ nf_flow_table_free(table);
|
||||
+}
|
||||
+
|
||||
+static int flow_offload_netdev_event(struct notifier_block *this,
|
||||
+ unsigned long event, void *ptr)
|
||||
+{
|
||||
+ struct xt_flowoffload_hook *hook = NULL;
|
||||
+ struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
+
|
||||
+ if (event != NETDEV_UNREGISTER)
|
||||
+ return NOTIFY_DONE;
|
||||
+
|
||||
+ spin_lock_bh(&hooks_lock);
|
||||
+ hook = flow_offload_lookup_hook(dev);
|
||||
+ if (hook) {
|
||||
+ hlist_del(&hook->list);
|
||||
+ }
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+ if (hook) {
|
||||
+ nf_unregister_net_hook(hook->net, &hook->ops);
|
||||
+ kfree(hook);
|
||||
+ }
|
||||
+
|
||||
+ nf_flow_table_cleanup(dev);
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block flow_offload_netdev_notifier = {
|
||||
+ .notifier_call = flow_offload_netdev_event,
|
||||
+};
|
||||
+
|
||||
+static int __init xt_flowoffload_tg_init(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ register_netdevice_notifier(&flow_offload_netdev_notifier);
|
||||
+
|
||||
+ INIT_DELAYED_WORK(&hook_work, xt_flowoffload_hook_work);
|
||||
+
|
||||
+ ret = xt_flowoffload_table_init(&nf_flowtable);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = xt_register_target(&offload_tg_reg);
|
||||
+ if (ret)
|
||||
+ xt_flowoffload_table_cleanup(&nf_flowtable);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void __exit xt_flowoffload_tg_exit(void)
|
||||
+{
|
||||
+ xt_unregister_target(&offload_tg_reg);
|
||||
+ xt_flowoffload_table_cleanup(&nf_flowtable);
|
||||
+ unregister_netdevice_notifier(&flow_offload_netdev_notifier);
|
||||
+}
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+module_init(xt_flowoffload_tg_init);
|
||||
+module_exit(xt_flowoffload_tg_exit);
|
||||
--- a/net/netfilter/nf_flow_table_core.c
|
||||
+++ b/net/netfilter/nf_flow_table_core.c
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/ip6_route.h>
|
||||
-#include <net/netfilter/nf_tables.h>
|
||||
#include <net/netfilter/nf_flow_table.h>
|
||||
#include <net/netfilter/nf_conntrack.h>
|
||||
#include <net/netfilter/nf_conntrack_core.h>
|
||||
@@ -338,8 +337,7 @@ flow_offload_lookup(struct nf_flowtable
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(flow_offload_lookup);
|
||||
|
||||
-static int
|
||||
-nf_flow_table_iterate(struct nf_flowtable *flow_table,
|
||||
+int nf_flow_table_iterate(struct nf_flowtable *flow_table,
|
||||
void (*iter)(struct flow_offload *flow, void *data),
|
||||
void *data)
|
||||
{
|
||||
@@ -372,6 +370,7 @@ nf_flow_table_iterate(struct nf_flowtabl
|
||||
|
||||
return err;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(nf_flow_table_iterate);
|
||||
|
||||
static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
|
||||
{
|
||||
--- /dev/null
|
||||
+++ b/include/uapi/linux/netfilter/xt_FLOWOFFLOAD.h
|
||||
@@ -0,0 +1,17 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
+#ifndef _XT_FLOWOFFLOAD_H
|
||||
+#define _XT_FLOWOFFLOAD_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+enum {
|
||||
+ XT_FLOWOFFLOAD_HW = 1 << 0,
|
||||
+
|
||||
+ XT_FLOWOFFLOAD_MASK = XT_FLOWOFFLOAD_HW
|
||||
+};
|
||||
+
|
||||
+struct xt_flowoffload_target_info {
|
||||
+ __u32 flags;
|
||||
+};
|
||||
+
|
||||
+#endif /* _XT_FLOWOFFLOAD_H */
|
||||
--- a/include/net/netfilter/nf_flow_table.h
|
||||
+++ b/include/net/netfilter/nf_flow_table.h
|
||||
@@ -130,6 +130,10 @@ static inline void flow_offload_dead(str
|
||||
flow->flags |= FLOW_OFFLOAD_DYING;
|
||||
}
|
||||
|
||||
+int nf_flow_table_iterate(struct nf_flowtable *flow_table,
|
||||
+ void (*iter)(struct flow_offload *flow, void *data),
|
||||
+ void *data);
|
||||
+
|
||||
int nf_flow_snat_port(const struct flow_offload *flow,
|
||||
struct sk_buff *skb, unsigned int thoff,
|
||||
u8 protocol, enum flow_offload_tuple_dir dir);
|
File diff suppressed because it is too large
Load diff
|
@ -3244,14 +3244,14 @@ index be6d22b8190f..4943f96aade8 100644
|
|||
|
||||
/* Link BUFF into the send queue. */
|
||||
@@ -1743,13 +1750,12 @@ static u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now,
|
||||
static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now)
|
||||
u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now)
|
||||
{
|
||||
const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops;
|
||||
- u32 min_tso, tso_segs;
|
||||
-
|
||||
- min_tso = ca_ops->min_tso_segs ?
|
||||
- ca_ops->min_tso_segs(sk) :
|
||||
- sock_net(sk)->ipv4.sysctl_tcp_min_tso_segs;
|
||||
- READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_min_tso_segs);
|
||||
+ u32 tso_segs;
|
||||
|
||||
- tso_segs = tcp_tso_autosize(sk, mss_now, min_tso);
|
||||
|
|
|
@ -1,37 +1,52 @@
|
|||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
||||
index a5e8374a8d71..e716395268fe 100644
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -256,5 +256,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
+#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
+#define QUECTEL_PRODUCT_RM500U_CN 0x0900
|
||||
@@ -261,6 +261,7 @@
|
||||
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
|
||||
#define QUECTEL_PRODUCT_EC200T 0x6026
|
||||
#define QUECTEL_PRODUCT_RM500K 0x7001
|
||||
@@ -1159,6 +1160,11 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
|
||||
.driver_info = ZLP },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500U_CN, 0xff, 0, 0),
|
||||
+ .driver_info = ZLP },
|
||||
+#define QUECTEL_PRODUCT_RM500U 0x0900
|
||||
|
||||
#define CMOTECH_VENDOR_ID 0x16d8
|
||||
#define CMOTECH_PRODUCT_6001 0x6001
|
||||
@@ -605,6 +606,32 @@
|
||||
|
||||
|
||||
static const struct usb_device_id option_ids[] = {
|
||||
+#if 1 //Added by Quectel
|
||||
+ { USB_DEVICE(0x05C6, 0x9090) }, /* Quectel UC15 */
|
||||
+ { USB_DEVICE(0x05C6, 0x9003) }, /* Quectel UC20 */
|
||||
+ { USB_DEVICE(0x05C6, 0x9215) }, /* Quectel EC20(MDM9215) */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC20(MDM9x07)/EC25/EG25 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x030B) }, /* Quectel EG065K/EG060K */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0514) }, /* Quectel BL EG060K RNDIS Only */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EP12/EM12/EG16/EG18 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95/BG77/BG600L-M3/BC69 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0415) }, /* Quectel AG15 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0452) }, /* Quectel AG520 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0455) }, /* Quectel AG550 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0620) }, /* Quectel EG20 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500/RM500/RG510/RM510 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0801) }, /* Quectel RG520/RM520/SG520 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x6026) }, /* Quectel EC200 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x6120) }, /* Quectel UC200 */
|
||||
+ { USB_DEVICE(0x2C7C, 0x6000) }, /* Quectel EC200/UC200 */
|
||||
+ { .match_flags = USB_DEVICE_ID_MATCH_VENDOR, .idVendor = 0x2C7C }, /* Match All Quectel Modules */
|
||||
+#endif
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
|
||||
@@ -1179,6 +1206,7 @@
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
|
||||
index 709e3c59e340..0cb187def5bc 100644
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1087,6 +1087,8 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
|
||||
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */
|
||||
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0900)}, /* Quectel RM500U_CN */
|
||||
|
||||
/* 3. Combined interface devices matching on interface number */
|
||||
{QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
Index: linux-5.4.179/drivers/usb/serial/option.c
|
||||
===================================================================
|
||||
--- linux-5.4.179.orig/drivers/usb/serial/option.c
|
||||
+++ linux-5.4.179/drivers/usb/serial/option.c
|
||||
@@ -566,6 +566,17 @@ static void option_instat_callback(struc
|
||||
#define WETELECOM_PRODUCT_WMD300 0x6803
|
||||
|
||||
|
||||
+//david add Fibocom products
|
||||
+#define FIBOCOM_VENDOR_ID 0x2cb7
|
||||
+#define FIBOCOM_PRODUCT_L71X 0x0001
|
||||
+#define FIBOCOM_USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \
|
||||
+.match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
|
||||
+| USB_DEVICE_ID_MATCH_VENDOR, \
|
||||
+.idVendor = (vend), \
|
||||
+.bInterfaceClass = (cl), \
|
||||
+.bInterfaceSubClass = (sc), \
|
||||
+.bInterfaceProtocol = (pr)
|
||||
+
|
||||
/* Device flags */
|
||||
|
||||
/* Highest interface number which can be used with NCTRL() and RSVD() */
|
||||
@@ -585,6 +596,77 @@ static void option_instat_callback(struc
|
||||
|
||||
|
||||
static const struct usb_device_id option_ids[] = {
|
||||
+ { USB_DEVICE(0x2ecc, 0x3010) },/* td-tech 909s */
|
||||
+//fibocom L610
|
||||
+ { USB_DEVICE(0x1782, 0x4d11) , .driver_info = RSVD(4) },
|
||||
+ { USB_DEVICE(0x1782, 0x4d10) },
|
||||
+ {USB_DEVICE(0x2949, 0x7401), .driver_info = RSVD(1) },
|
||||
+ {USB_DEVICE(0x2949, 0x7402), .driver_info = RSVD(0) },
|
||||
+//add 5g quectel rm500q, foxconn T99W240T00, meige srm815
|
||||
+ { USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
|
||||
+ { USB_DEVICE(0x2C7C, 0x0900) }, /* Quectel RG500U RG200U */
|
||||
+ { USB_DEVICE(0x05C6, 0x90DB), .driver_info = RSVD(2)|RSVD(3)|RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x05C6, 0x90D5), .driver_info = RSVD(2)|RSVD(3) },
|
||||
+ { USB_DEVICE(0x2dee, 0x4d22), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+//add simcom a7600e
|
||||
+ { USB_DEVICE(0x1e0e, 0x9011), .driver_info = RSVD(0)|RSVD(1) },
|
||||
+//add U9300
|
||||
+ { USB_DEVICE(0x1c9e, 0x9b3c), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+//add ucloud m2
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x1782, 0x5d22, 0xff, 0x00, 0x00), .driver_info = RSVD(3) },
|
||||
+//add yuge clm920
|
||||
+ { USB_DEVICE(0x1286, 0x4e3c), .driver_info = RSVD(0)|RSVD(1) },
|
||||
+//add nodecom nl660
|
||||
+ { USB_DEVICE(0x1508, 0x1001), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+//add quectel product
|
||||
+ { USB_DEVICE(0x05C6, 0x9090), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x05C6, 0x9003), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x05C6, 0X9215), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x2c7c, 0x0125), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x2c7c, 0x0121), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+//add xin feng wei ye
|
||||
+ { USB_DEVICE(0x5c6, 0x5012), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x5c6, 0x5013), .driver_info = RSVD(4)|RSVD(5) },//gobinet id
|
||||
+//add em8000
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0x0532, 0xff, 0xff, 0xff), .driver_info = RSVD(6)|RSVD(7) },
|
||||
+//add end
|
||||
+//add fibocom L71x
|
||||
+ { FIBOCOM_USB_VENDOR_AND_INTERFACE_INFO(0x2cb7, 0xff, 0xff, 0xff) },
|
||||
+ { FIBOCOM_USB_VENDOR_AND_INTERFACE_INFO(0x2cb7, 0x0a, 0x00, 0xff) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0x0256, 0xff, 0xff, 0xff) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0x0579, 0xff, 0xff, 0xff), .driver_info = RSVD(0)|RSVD(1)|RSVD(5)|RSVD(6) },
|
||||
+//add end
|
||||
+//add mu709s
|
||||
+ { USB_DEVICE(0x12d1, 0x1c25) },
|
||||
+//add forege 630b
|
||||
+ { USB_DEVICE(0x05c6, 0x9025) },
|
||||
+//add kuanyi BM806U
|
||||
+ //{ USB_DEVICE(0x2020, 0x2033) },
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2033, 0xff), .driver_info = RSVD(4) },
|
||||
+//add forege 730
|
||||
+ { USB_DEVICE(0x05c6, 0xf601), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+//add Meig slm790
|
||||
+ { USB_DEVICE(0x2dee,0x4d20), .driver_info = RSVD(0) },
|
||||
+ { USB_DEVICE(0x2dee,0x4d57), .driver_info = RSVD(0) |RSVD(1)},
|
||||
+//add end
|
||||
+//add Quectel EC200T
|
||||
+ { USB_DEVICE(0x2c7c, 0x6026) },
|
||||
+//add end
|
||||
+//add Luat air720,air724
|
||||
+ { USB_DEVICE(0x1286,0x4e3d) },
|
||||
+ { USB_DEVICE(0x1782,0x4e00) },
|
||||
+//add end
|
||||
+//add N720 and N720V5
|
||||
+ { USB_DEVICE(0x2949,0x8247), .driver_info = RSVD(4)|RSVD(5) },
|
||||
+ { USB_DEVICE(0x2949,0x8241), .driver_info = RSVD(0)},
|
||||
+ { USB_DEVICE(0x2949,0x8242), .driver_info = RSVD(0)},
|
||||
+ { USB_DEVICE(0x2949,0x8243), .driver_info = RSVD(0)},
|
||||
+ { USB_DEVICE(0x2949,0x8700) },
|
||||
+//add end
|
||||
+//david add em7355 em7455(DELL 3P10Y)
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x1199, 0x9041, 0xff), .driver_info = RSVD(8)|RSVD(10)|RSVD(11) }, /* MC7305/MC7355 */
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x413c, 0x81b6, 0xff), .driver_info = RSVD(8)|RSVD(10)|RSVD(11) }, /* EM7455 */
|
||||
+//add end
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
|
|
@ -12,9 +12,9 @@
|
|||
struct list_head *br_ip_list);
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -826,6 +826,10 @@ struct sk_buff {
|
||||
@@ -827,6 +827,10 @@ struct sk_buff {
|
||||
#endif
|
||||
__u8 gro_skip:1;
|
||||
__u8 scm_io_uring:1;
|
||||
|
||||
+#ifdef CONFIG_SHORTCUT_FE
|
||||
+ __u8 fast_forwarded:1;
|
||||
|
@ -99,7 +99,7 @@
|
|||
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
if (!dev->eth_mangle_tx ||
|
||||
(skb = dev->eth_mangle_tx(dev, skb)) != NULL)
|
||||
@@ -4714,6 +4722,11 @@ void netdev_rx_handler_unregister(struct
|
||||
@@ -4715,6 +4723,11 @@ void netdev_rx_handler_unregister(struct
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
|||
/*
|
||||
* Limit the use of PFMEMALLOC reserves to those protocols that implement
|
||||
* the special handling of PFMEMALLOC skbs.
|
||||
@@ -4764,6 +4777,10 @@ static int __netif_receive_skb_core(stru
|
||||
@@ -4765,6 +4778,10 @@ static int __netif_receive_skb_core(stru
|
||||
int ret = NET_RX_DROP;
|
||||
__be16 type;
|
||||
|
||||
|
@ -119,10 +119,10 @@
|
|||
+ int (*fast_recv)(struct sk_buff *skb);
|
||||
+#endif
|
||||
+
|
||||
net_timestamp_check(!netdev_tstamp_prequeue, skb);
|
||||
net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb);
|
||||
|
||||
trace_netif_receive_skb(skb);
|
||||
@@ -4803,6 +4820,16 @@ another_round:
|
||||
@@ -4804,6 +4821,16 @@ another_round:
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
210
root/target/linux/generic/hack-6.1/204-module_strip.patch
Normal file
210
root/target/linux/generic/hack-6.1/204-module_strip.patch
Normal file
|
@ -0,0 +1,210 @@
|
|||
From a779a482fb9b9f8fcdf8b2519c789b4b9bb5dd05 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 7 Jul 2017 16:56:48 +0200
|
||||
Subject: build: add a hack for removing non-essential module info
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
include/linux/module.h | 13 ++++++++-----
|
||||
include/linux/moduleparam.h | 15 ++++++++++++---
|
||||
init/Kconfig | 7 +++++++
|
||||
kernel/module.c | 5 ++++-
|
||||
scripts/mod/modpost.c | 12 ++++++++++++
|
||||
5 files changed, 43 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -163,6 +163,7 @@ extern void cleanup_module(void);
|
||||
|
||||
/* Generic info of form tag = "info" */
|
||||
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
|
||||
+#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
|
||||
|
||||
/* For userspace: you can also call me... */
|
||||
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
|
||||
@@ -232,12 +233,12 @@ extern void cleanup_module(void);
|
||||
* Author(s), use "Name <email>" or just "Name", for multiple
|
||||
* authors use multiple MODULE_AUTHOR() statements/lines.
|
||||
*/
|
||||
-#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
|
||||
+#define MODULE_AUTHOR(_author) MODULE_INFO_STRIP(author, _author)
|
||||
|
||||
/* What your module does. */
|
||||
-#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||
+#define MODULE_DESCRIPTION(_description) MODULE_INFO_STRIP(description, _description)
|
||||
|
||||
-#ifdef MODULE
|
||||
+#if defined(MODULE) && !defined(CONFIG_MODULE_STRIPPED)
|
||||
/* Creates an alias so file2alias.c can find device table. */
|
||||
#define MODULE_DEVICE_TABLE(type, name) \
|
||||
extern typeof(name) __mod_##type##__##name##_device_table \
|
||||
@@ -264,7 +265,9 @@ extern typeof(name) __mod_##type##__##na
|
||||
*/
|
||||
|
||||
#if defined(MODULE) || !defined(CONFIG_SYSFS)
|
||||
-#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
|
||||
+#define MODULE_VERSION(_version) MODULE_INFO_STRIP(version, _version)
|
||||
+#elif defined(CONFIG_MODULE_STRIPPED)
|
||||
+#define MODULE_VERSION(_version) __MODULE_INFO_DISABLED(version)
|
||||
#else
|
||||
#define MODULE_VERSION(_version) \
|
||||
MODULE_INFO(version, _version); \
|
||||
@@ -287,7 +290,7 @@ extern typeof(name) __mod_##type##__##na
|
||||
/* Optional firmware file (or files) needed by the module
|
||||
* format is simply firmware file name. Multiple firmware
|
||||
* files require multiple MODULE_FIRMWARE() specifiers */
|
||||
-#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
|
||||
+#define MODULE_FIRMWARE(_firmware) MODULE_INFO_STRIP(firmware, _firmware)
|
||||
|
||||
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns))
|
||||
|
||||
--- a/include/linux/moduleparam.h
|
||||
+++ b/include/linux/moduleparam.h
|
||||
@@ -20,6 +20,16 @@
|
||||
/* Chosen so that structs with an unsigned long line up. */
|
||||
#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
|
||||
|
||||
+/* This struct is here for syntactic coherency, it is not used */
|
||||
+#define __MODULE_INFO_DISABLED(name) \
|
||||
+ struct __UNIQUE_ID(name) {}
|
||||
+
|
||||
+#ifdef CONFIG_MODULE_STRIPPED
|
||||
+#define __MODULE_INFO_STRIP(tag, name, info) __MODULE_INFO_DISABLED(name)
|
||||
+#else
|
||||
+#define __MODULE_INFO_STRIP(tag, name, info) __MODULE_INFO(tag, name, info)
|
||||
+#endif
|
||||
+
|
||||
#define __MODULE_INFO(tag, name, info) \
|
||||
static const char __UNIQUE_ID(name)[] \
|
||||
__used __section(".modinfo") __aligned(1) \
|
||||
@@ -31,7 +41,7 @@
|
||||
/* One for each parameter, describing how to use it. Some files do
|
||||
multiple of these per line, so can't just use MODULE_INFO. */
|
||||
#define MODULE_PARM_DESC(_parm, desc) \
|
||||
- __MODULE_INFO(parm, _parm, #_parm ":" desc)
|
||||
+ __MODULE_INFO_STRIP(parm, _parm, #_parm ":" desc)
|
||||
|
||||
struct kernel_param;
|
||||
|
||||
--- a/kernel/module/Kconfig
|
||||
+++ b/kernel/module/Kconfig
|
||||
@@ -290,4 +290,11 @@ config MODULES_TREE_LOOKUP
|
||||
def_bool y
|
||||
depends on PERF_EVENTS || TRACING || CFI_CLANG
|
||||
|
||||
+config MODULE_STRIPPED
|
||||
+ bool "Reduce module size"
|
||||
+ depends on MODULES
|
||||
+ help
|
||||
+ Remove module parameter descriptions, author info, version, aliases,
|
||||
+ device tables, etc.
|
||||
+
|
||||
endif # MODULES
|
||||
--- a/kernel/module/main.c
|
||||
+++ b/kernel/module/main.c
|
||||
@@ -988,6 +988,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
|
||||
|
||||
static const char vermagic[] = VERMAGIC_STRING;
|
||||
|
||||
+#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED)
|
||||
int try_to_force_load(struct module *mod, const char *reason)
|
||||
{
|
||||
#ifdef CONFIG_MODULE_FORCE_LOAD
|
||||
@@ -999,6 +1000,7 @@ int try_to_force_load(struct module *mod
|
||||
return -ENOEXEC;
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
static char *get_modinfo(const struct load_info *info, const char *tag);
|
||||
static char *get_next_modinfo(const struct load_info *info, const char *tag,
|
||||
@@ -1950,9 +1952,11 @@ static int setup_load_info(struct load_i
|
||||
|
||||
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
|
||||
{
|
||||
- const char *modmagic = get_modinfo(info, "vermagic");
|
||||
int err;
|
||||
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
+ const char *modmagic = get_modinfo(info, "vermagic");
|
||||
+
|
||||
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
|
||||
modmagic = NULL;
|
||||
|
||||
@@ -1973,6 +1977,7 @@ static int check_modinfo(struct module *
|
||||
mod->name);
|
||||
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
|
||||
}
|
||||
+#endif
|
||||
|
||||
check_modinfo_retpoline(mod, info);
|
||||
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1817,7 +1817,9 @@ static void read_symbols(const char *mod
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_symbol(mod, &info, sym, symname);
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
handle_moddevtable(mod, &info, sym, symname);
|
||||
+#endif
|
||||
}
|
||||
|
||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||
@@ -1980,8 +1982,10 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "BUILD_SALT;\n");
|
||||
buf_printf(b, "BUILD_LTO_INFO;\n");
|
||||
buf_printf(b, "\n");
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
|
||||
buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n");
|
||||
+#endif
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
|
||||
@@ -1995,8 +1999,10 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
|
||||
buf_printf(b, "};\n");
|
||||
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
if (!external_module)
|
||||
buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
|
||||
+#endif
|
||||
|
||||
buf_printf(b,
|
||||
"\n"
|
||||
@@ -2004,8 +2010,10 @@ static void add_header(struct buffer *b,
|
||||
"MODULE_INFO(retpoline, \"Y\");\n"
|
||||
"#endif\n");
|
||||
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
if (strstarts(mod->name, "drivers/staging"))
|
||||
buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n");
|
||||
+#endif
|
||||
|
||||
if (strstarts(mod->name, "tools/testing"))
|
||||
buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
|
||||
@@ -2101,11 +2109,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
if (mod->srcversion[0]) {
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "MODULE_INFO(srcversion, \"%s\");\n",
|
||||
mod->srcversion);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void write_buf(struct buffer *b, const char *fname)
|
||||
@@ -2191,7 +2201,9 @@ static void write_mod_c_file(struct modu
|
||||
add_exported_symbols(&buf, mod);
|
||||
add_versions(&buf, mod);
|
||||
add_depends(&buf, mod);
|
||||
+#ifndef CONFIG_MODULE_STRIPPED
|
||||
add_moddevtable(&buf, mod);
|
||||
+#endif
|
||||
add_srcversion(&buf, mod);
|
||||
|
||||
ret = snprintf(fname, sizeof(fname), "%s.mod.c", mod->name);
|
20
root/target/linux/generic/hack-6.1/205-kconfig-exit.patch
Normal file
20
root/target/linux/generic/hack-6.1/205-kconfig-exit.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
From 300d26562ce4dc427154cb247beb75db4b1f0774 Mon Sep 17 00:00:00 2001
|
||||
From: OpenWrt community <openwrt-devel@lists.openwrt.org>
|
||||
Date: Wed, 13 Jul 2022 13:29:57 +0200
|
||||
Subject: [PATCH] scripts/Kconfig: Kconfig exit
|
||||
|
||||
---
|
||||
scripts/kconfig/conf.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/scripts/kconfig/conf.c
|
||||
+++ b/scripts/kconfig/conf.c
|
||||
@@ -432,6 +432,8 @@ static int conf_sym(struct menu *menu)
|
||||
break;
|
||||
continue;
|
||||
case 0:
|
||||
+ if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED"))
|
||||
+ exit(1);
|
||||
newval = oldval;
|
||||
break;
|
||||
case '?':
|
3053
root/target/linux/generic/hack-6.1/210-darwin_scripts_include.patch
Normal file
3053
root/target/linux/generic/hack-6.1/210-darwin_scripts_include.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,22 @@
|
|||
From e44fc2af1ddc452b6659d08c16973d65c73b7d0a Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
Date: Wed, 5 Feb 2020 18:36:43 +0000
|
||||
Subject: [PATCH] file2alias: build on macos
|
||||
|
||||
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
---
|
||||
scripts/mod/file2alias.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/scripts/mod/file2alias.c
|
||||
+++ b/scripts/mod/file2alias.c
|
||||
@@ -38,6 +38,9 @@ typedef struct {
|
||||
__u8 b[16];
|
||||
} guid_t;
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+#define uuid_t compat_uuid_t
|
||||
+#endif
|
||||
/* backwards compatibility, don't use in new code */
|
||||
typedef struct {
|
||||
__u8 b[16];
|
|
@ -0,0 +1,93 @@
|
|||
From 48232d3d931c95953ce2ddfe7da7bb164aef6a73 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 7 Jul 2017 17:03:16 +0200
|
||||
Subject: fix portability of some includes files in tools/ used on the host
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
tools/include/tools/be_byteshift.h | 4 ++++
|
||||
tools/include/tools/le_byteshift.h | 4 ++++
|
||||
tools/include/tools/linux_types.h | 22 ++++++++++++++++++++++
|
||||
3 files changed, 30 insertions(+)
|
||||
create mode 100644 tools/include/tools/linux_types.h
|
||||
|
||||
--- a/tools/include/tools/be_byteshift.h
|
||||
+++ b/tools/include/tools/be_byteshift.h
|
||||
@@ -2,6 +2,10 @@
|
||||
#ifndef _TOOLS_BE_BYTESHIFT_H
|
||||
#define _TOOLS_BE_BYTESHIFT_H
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include "linux_types.h"
|
||||
+#endif
|
||||
+
|
||||
#include <stdint.h>
|
||||
|
||||
static inline uint16_t __get_unaligned_be16(const uint8_t *p)
|
||||
--- a/tools/include/tools/le_byteshift.h
|
||||
+++ b/tools/include/tools/le_byteshift.h
|
||||
@@ -2,6 +2,10 @@
|
||||
#ifndef _TOOLS_LE_BYTESHIFT_H
|
||||
#define _TOOLS_LE_BYTESHIFT_H
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include "linux_types.h"
|
||||
+#endif
|
||||
+
|
||||
#include <stdint.h>
|
||||
|
||||
static inline uint16_t __get_unaligned_le16(const uint8_t *p)
|
||||
--- /dev/null
|
||||
+++ b/tools/include/tools/linux_types.h
|
||||
@@ -0,0 +1,26 @@
|
||||
+#ifndef __LINUX_TYPES_H
|
||||
+#define __LINUX_TYPES_H
|
||||
+
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+typedef int8_t __s8;
|
||||
+typedef uint8_t __u8;
|
||||
+typedef uint8_t __be8;
|
||||
+typedef uint8_t __le8;
|
||||
+
|
||||
+typedef int16_t __s16;
|
||||
+typedef uint16_t __u16;
|
||||
+typedef uint16_t __be16;
|
||||
+typedef uint16_t __le16;
|
||||
+
|
||||
+typedef int32_t __s32;
|
||||
+typedef uint32_t __u32;
|
||||
+typedef uint32_t __be32;
|
||||
+typedef uint32_t __le32;
|
||||
+
|
||||
+typedef int64_t __s64;
|
||||
+typedef uint64_t __u64;
|
||||
+typedef uint64_t __be64;
|
||||
+typedef uint64_t __le64;
|
||||
+
|
||||
+#endif
|
||||
--- a/tools/include/linux/types.h
|
||||
+++ b/tools/include/linux/types.h
|
||||
@@ -10,8 +10,12 @@
|
||||
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
|
||||
#endif
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include <tools/linux_types.h>
|
||||
+#else
|
||||
#include <asm/types.h>
|
||||
#include <asm/posix_types.h>
|
||||
+#endif
|
||||
|
||||
struct page;
|
||||
struct kmem_cache;
|
||||
--- a/tools/perf/pmu-events/jevents.py
|
||||
+++ b/tools/perf/pmu-events/jevents.py
|
||||
@@ -684,6 +684,7 @@ def main() -> None:
|
||||
#include "util/header.h"
|
||||
#include "util/pmu.h"
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct compact_pmu_event {
|
|
@ -0,0 +1,24 @@
|
|||
From be9be95ff10e16a5b4ad36f903978d0cc5747024 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 7 Jul 2017 17:04:08 +0200
|
||||
Subject: kernel: fix linux/spi/spidev.h portability issues with musl
|
||||
|
||||
Felix will try to get this define included into musl
|
||||
|
||||
lede-commit: 795e7cf60de19e7a076a46874fab7bb88b43bbff
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
include/uapi/linux/spi/spidev.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/include/uapi/linux/spi/spidev.h
|
||||
+++ b/include/uapi/linux/spi/spidev.h
|
||||
@@ -93,7 +93,7 @@ struct spi_ioc_transfer {
|
||||
|
||||
/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
|
||||
#define SPI_MSGSIZE(N) \
|
||||
- ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
|
||||
+ ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << 13)) \
|
||||
? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
|
||||
#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue