From 4e54a949ffba61711f6b70c4848979018928fe5a Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:25:10 +0000 Subject: [PATCH 1/2] RK3399 & RK3326: update kernel to 6.7.1 --- .../devices/RK3399/linux/linux.aarch64.conf | 60 ++++++------------- projects/Rockchip/packages/linux/package.mk | 5 +- .../linux/patches/RK3399/000-rk3399-dts.patch | 19 ++---- .../patches/RK3399/000-rk3399-ram.patch | 12 ++++ 4 files changed, 38 insertions(+), 58 deletions(-) create mode 100644 projects/Rockchip/packages/u-boot/patches/RK3399/000-rk3399-ram.patch diff --git a/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf b/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf index d64d296e2..1c9b82122 100644 --- a/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf +++ b/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf @@ -1,10 +1,10 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 6.7.0 Kernel Configuration +# Linux/arm64 6.7.1 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="aarch64-libreelec-linux-gnueabi-gcc-12.3.0 (GCC) 12.3.0" +CONFIG_CC_VERSION_TEXT="aarch64-libreelec-linux-gnueabi-gcc-12.3.1 (GCC) 12.3.1 20240103" CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=120300 +CONFIG_GCC_VERSION=120301 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y CONFIG_AS_VERSION=24100 @@ -464,8 +464,9 @@ CONFIG_AS_HAS_SHA3=y # CONFIG_ARM64_PTR_AUTH is not set CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y CONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y -# CONFIG_AS_HAS_ARMV8_3 is not set +CONFIG_AS_HAS_ARMV8_3=y CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y +CONFIG_AS_HAS_LDAPR=y # end of ARMv8.3 architectural features # @@ -598,6 +599,7 @@ CONFIG_HOTPLUG_CORE_SYNC=y CONFIG_HOTPLUG_CORE_SYNC_DEAD=y # CONFIG_KPROBES is not set CONFIG_JUMP_LABEL=y +# CONFIG_STATIC_KEYS_SELFTEST is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y @@ -730,11 +732,13 @@ CONFIG_MODPROBE_PATH="/sbin/modprobe" CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y # CONFIG_BLOCK_LEGACY_AUTOLOAD is not set +CONFIG_BLK_CGROUP_RWSTAT=y CONFIG_BLK_DEV_BSG_COMMON=y CONFIG_BLK_DEV_BSGLIB=y # CONFIG_BLK_DEV_INTEGRITY is not set # CONFIG_BLK_DEV_ZONED is not set CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_DEV_THROTTLING_LOW is not set # CONFIG_BLK_WBT is not set # CONFIG_BLK_CGROUP_IOLATENCY is not set # CONFIG_BLK_CGROUP_IOCOST is not set @@ -805,31 +809,7 @@ CONFIG_ARCH_INLINE_WRITE_UNLOCK=y CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_SPIN_TRYLOCK=y -CONFIG_INLINE_SPIN_TRYLOCK_BH=y -CONFIG_INLINE_SPIN_LOCK=y -CONFIG_INLINE_SPIN_LOCK_BH=y -CONFIG_INLINE_SPIN_LOCK_IRQ=y -CONFIG_INLINE_SPIN_LOCK_IRQSAVE=y -CONFIG_INLINE_SPIN_UNLOCK_BH=y -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_READ_LOCK=y -CONFIG_INLINE_READ_LOCK_BH=y -CONFIG_INLINE_READ_LOCK_IRQ=y -CONFIG_INLINE_READ_LOCK_IRQSAVE=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_BH=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_WRITE_LOCK=y -CONFIG_INLINE_WRITE_LOCK_BH=y -CONFIG_INLINE_WRITE_LOCK_IRQ=y -CONFIG_INLINE_WRITE_LOCK_IRQSAVE=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_BH=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y @@ -889,7 +869,6 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_HAVE_FAST_GUP=y CONFIG_ARCH_KEEP_MEMBLOCK=y -CONFIG_EXCLUSIVE_SYSTEM_RAM=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y # CONFIG_MEMORY_HOTPLUG is not set @@ -1379,6 +1358,7 @@ CONFIG_DEV_COREDUMP=y # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_SOC_BUS=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y @@ -2108,6 +2088,7 @@ CONFIG_I2C_DEMUX_PINCTRL=y # end of Multiplexer I2C Chip support CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m # # I2C Hardware Bus support @@ -2121,7 +2102,6 @@ CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_DESIGNWARE_CORE=y # CONFIG_I2C_DESIGNWARE_SLAVE is not set CONFIG_I2C_DESIGNWARE_PLATFORM=y -# CONFIG_I2C_DESIGNWARE_PCI is not set # CONFIG_I2C_EMEV2 is not set CONFIG_I2C_GPIO=m # CONFIG_I2C_GPIO_FAULT_INJECTOR is not set @@ -2169,6 +2149,7 @@ CONFIG_SPI_MEM=y CONFIG_SPI_BITBANG=y # CONFIG_SPI_CADENCE is not set # CONFIG_SPI_CADENCE_QUADSPI is not set +# CONFIG_SPI_CADENCE_XSPI is not set # CONFIG_SPI_DESIGNWARE is not set CONFIG_SPI_GPIO=y # CONFIG_SPI_FSL_SPI is not set @@ -2180,6 +2161,7 @@ CONFIG_SPI_ROCKCHIP=y CONFIG_SPI_ROCKCHIP_SFC=y # CONFIG_SPI_SC18IS602 is not set # CONFIG_SPI_SIFIVE is not set +# CONFIG_SPI_SN_F_OSPI is not set # CONFIG_SPI_MXIC is not set # CONFIG_SPI_XCOMM is not set # CONFIG_SPI_XILINX is not set @@ -2335,7 +2317,7 @@ CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_RESET_GPIO_RESTART=y # CONFIG_POWER_RESET_LTC2952 is not set -CONFIG_POWER_RESET_REGULATOR=y +# CONFIG_POWER_RESET_REGULATOR is not set # CONFIG_POWER_RESET_RESTART is not set # CONFIG_POWER_RESET_XGENE is not set CONFIG_POWER_RESET_SYSCON=y @@ -2416,7 +2398,6 @@ CONFIG_HWMON=y # CONFIG_SENSORS_AS370 is not set # CONFIG_SENSORS_ASC7621 is not set # CONFIG_SENSORS_AXI_FAN_CONTROL is not set -# CONFIG_SENSORS_ARM_SCMI is not set # CONFIG_SENSORS_ARM_SCPI is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_CORSAIR_CPRO is not set @@ -2557,15 +2538,13 @@ CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_OF=y CONFIG_THERMAL_WRITABLE_TRIPS=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y # CONFIG_THERMAL_GOV_BANG_BANG is not set # CONFIG_THERMAL_GOV_USER_SPACE is not set -CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y CONFIG_CPU_FREQ_THERMAL=y CONFIG_DEVFREQ_THERMAL=y @@ -2749,7 +2728,6 @@ CONFIG_REGULATOR_USERSPACE_CONSUMER=y # CONFIG_REGULATOR_88PG86X is not set # CONFIG_REGULATOR_ACT8865 is not set # CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_ARM_SCMI is not set # CONFIG_REGULATOR_AW37503 is not set # CONFIG_REGULATOR_DA9121 is not set # CONFIG_REGULATOR_DA9210 is not set @@ -4078,7 +4056,7 @@ CONFIG_MMC_DW_ROCKCHIP=y # CONFIG_MMC_VUB300 is not set # CONFIG_MMC_USHC is not set # CONFIG_MMC_USDHI6ROL0 is not set -# CONFIG_MMC_CQHCI is not set +CONFIG_MMC_CQHCI=y # CONFIG_MMC_HSQ is not set # CONFIG_MMC_MTK is not set # CONFIG_MMC_SDHCI_XENON is not set @@ -4421,7 +4399,6 @@ CONFIG_COMMON_CLK=y # CONFIG_LMK04832 is not set # CONFIG_COMMON_CLK_MAX9485 is not set CONFIG_COMMON_CLK_RK808=y -CONFIG_COMMON_CLK_SCMI=y CONFIG_COMMON_CLK_SCPI=y # CONFIG_COMMON_CLK_SI5341 is not set # CONFIG_COMMON_CLK_SI5351 is not set @@ -4822,7 +4799,6 @@ CONFIG_ROCKCHIP_SARADC=y # # IIO SCMI Sensors # -# CONFIG_IIO_SCMI is not set # end of IIO SCMI Sensors # @@ -5196,7 +5172,6 @@ CONFIG_PARTITION_PERCPU=y # CONFIG_IPACK_BUS is not set CONFIG_ARCH_HAS_RESET_CONTROLLER=y CONFIG_RESET_CONTROLLER=y -CONFIG_RESET_SCMI=y # CONFIG_RESET_SIMPLE is not set # CONFIG_RESET_TI_SYSCON is not set # CONFIG_RESET_TI_TPS380X is not set @@ -5939,6 +5914,8 @@ CONFIG_SGL_ALLOC=y # CONFIG_FORCE_NR_CPUS is not set CONFIG_CPU_RMAP=y CONFIG_DQL=y +CONFIG_GLOB=y +# CONFIG_GLOB_SELFTEST is not set CONFIG_NLATTR=y CONFIG_CLZ_TAB=y CONFIG_IRQ_POLL=y @@ -6040,7 +6017,6 @@ CONFIG_HAVE_KCSAN_COMPILER=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_SLUB_DEBUG is not set # CONFIG_PAGE_OWNER is not set -# CONFIG_PAGE_TABLE_CHECK is not set # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_RODATA_TEST is not set CONFIG_ARCH_HAS_DEBUG_WX=y diff --git a/projects/Rockchip/packages/linux/package.mk b/projects/Rockchip/packages/linux/package.mk index ce0285435..786f35830 100644 --- a/projects/Rockchip/packages/linux/package.mk +++ b/projects/Rockchip/packages/linux/package.mk @@ -36,8 +36,11 @@ case ${DEVICE} in PKG_GIT_CLONE_BRANCH="main" ;; RK3399|RK3326) - PKG_VERSION="6.7" +# PKG_VERSION="6.6.13" + PKG_VERSION="6.7.1" +# PKG_VERSION="6.8-rc1" PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz" +# PKG_URL="https://git.kernel.org/torvalds/t/linux-${PKG_VERSION}.tar.gz" ;; esac diff --git a/projects/Rockchip/packages/linux/patches/RK3399/000-rk3399-dts.patch b/projects/Rockchip/packages/linux/patches/RK3399/000-rk3399-dts.patch index 5c4014b2a..c637b023a 100644 --- a/projects/Rockchip/packages/linux/patches/RK3399/000-rk3399-dts.patch +++ b/projects/Rockchip/packages/linux/patches/RK3399/000-rk3399-dts.patch @@ -1,6 +1,6 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boot/dts/rockchip/Makefile ---- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-01-09 14:07:11.858381650 +0000 -+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-09 18:09:58.589953944 +0000 +--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-01-23 23:55:32.434476392 +0000 ++++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-25 01:21:59.078794990 +0000 @@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-li dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb @@ -11,8 +11,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ficus.dtb diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts --- linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 1970-01-01 00:00:00.000000000 +0000 -+++ linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 2024-01-09 18:09:58.589953944 +0000 -@@ -0,0 +1,1336 @@ ++++ linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 2024-01-25 01:22:30.031520037 +0000 +@@ -0,0 +1,1325 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. @@ -490,17 +490,6 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts lin + vin-supply = <&vcc12v_dcin>; + }; + -+ 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 = <1700000>; -+ vin-supply = <&vcc5v0_sys>; -+ }; -+ + vcc5v5_lcd: vcc5v5-lcd { + compatible = "regulator-fixed"; + enable-active-high; diff --git a/projects/Rockchip/packages/u-boot/patches/RK3399/000-rk3399-ram.patch b/projects/Rockchip/packages/u-boot/patches/RK3399/000-rk3399-ram.patch new file mode 100644 index 000000000..b5db554f6 --- /dev/null +++ b/projects/Rockchip/packages/u-boot/patches/RK3399/000-rk3399-ram.patch @@ -0,0 +1,12 @@ +diff -rupN u-boot.orig/arch/arm/dts/rk3399-evb.dts u-boot/arch/arm/dts/rk3399-evb.dts +--- u-boot.orig/arch/arm/dts/rk3399-evb.dts 2024-01-19 17:53:16.898246406 +0000 ++++ u-boot/arch/arm/dts/rk3399-evb.dts 2024-01-19 17:59:15.431212367 +0000 +@@ -6,6 +6,8 @@ + /dts-v1/; + #include + #include "rk3399.dtsi" ++#include "rk3399-u-boot.dtsi" ++#include "rk3399-sdram-lpddr4-100.dtsi" + + / { + model = "Rockchip RK3399 Evaluation Board"; From b8d2226d59bd69dd4ad7cc9fc874d0bd06943124 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:28:57 +0000 Subject: [PATCH 2/2] RK3399 & RK3326: update kernel to 6.7.1 --- projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf | 2 +- projects/Rockchip/packages/linux/package.mk | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf b/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf index 1c9b82122..78c930679 100644 --- a/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf +++ b/projects/Rockchip/devices/RK3399/linux/linux.aarch64.conf @@ -464,7 +464,7 @@ CONFIG_AS_HAS_SHA3=y # CONFIG_ARM64_PTR_AUTH is not set CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y CONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y -CONFIG_AS_HAS_ARMV8_3=y +# CONFIG_AS_HAS_ARMV8_3 is not set CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y CONFIG_AS_HAS_LDAPR=y # end of ARMv8.3 architectural features diff --git a/projects/Rockchip/packages/linux/package.mk b/projects/Rockchip/packages/linux/package.mk index 786f35830..37bd339cf 100644 --- a/projects/Rockchip/packages/linux/package.mk +++ b/projects/Rockchip/packages/linux/package.mk @@ -36,11 +36,8 @@ case ${DEVICE} in PKG_GIT_CLONE_BRANCH="main" ;; RK3399|RK3326) -# PKG_VERSION="6.6.13" PKG_VERSION="6.7.1" -# PKG_VERSION="6.8-rc1" PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz" -# PKG_URL="https://git.kernel.org/torvalds/t/linux-${PKG_VERSION}.tar.gz" ;; esac