From 3096fbd8d7cfffe026741d72e2b8f825138bf197 Mon Sep 17 00:00:00 2001 From: sydarn Date: Sun, 7 Apr 2024 14:54:32 +0200 Subject: [PATCH] rk3566: update u-boot --- projects/Rockchip/packages/u-boot/package.mk | 2 +- ...itional_boards_and_features_to_rgxx3.patch | 85 +++---------------- .../RK3566/002-v2-add-powkiddy-x55.patch | 10 +-- .../u-boot/patches/RK3566/004-rgb10max3.patch | 26 ------ 4 files changed, 17 insertions(+), 106 deletions(-) delete mode 100644 projects/Rockchip/packages/u-boot/patches/RK3566/004-rgb10max3.patch diff --git a/projects/Rockchip/packages/u-boot/package.mk b/projects/Rockchip/packages/u-boot/package.mk index a2f21887e..f4af8750d 100644 --- a/projects/Rockchip/packages/u-boot/package.mk +++ b/projects/Rockchip/packages/u-boot/package.mk @@ -20,7 +20,7 @@ case ${DEVICE} in ;; RK3566*) PKG_URL="https://github.com/u-boot/u-boot.git" - PKG_VERSION="e8f2404e093daf6cc3ac2b3233e3c6770d13e371" + PKG_VERSION="9cba29b19f43f9450117e8bc89e7dda691ed5ab5" PKG_GIT_CLONE_BRANCH="master" ;; RK3399) diff --git a/projects/Rockchip/packages/u-boot/patches/RK3566/001-v3-add_additional_boards_and_features_to_rgxx3.patch b/projects/Rockchip/packages/u-boot/patches/RK3566/001-v3-add_additional_boards_and_features_to_rgxx3.patch index ace6886dd..5c34ee00f 100644 --- a/projects/Rockchip/packages/u-boot/patches/RK3566/001-v3-add_additional_boards_and_features_to_rgxx3.patch +++ b/projects/Rockchip/packages/u-boot/patches/RK3566/001-v3-add_additional_boards_and_features_to_rgxx3.patch @@ -100,7 +100,7 @@ index eb8f65ae4..d2308768b 100644 return 0; } diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c -index d05502f67..e12a85a02 100644 +index 099eea60c3..043769dfe0 100644 --- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c +++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c @@ -5,6 +5,7 @@ @@ -109,24 +109,24 @@ index d05502f67..e12a85a02 100644 #include +#include #include + #include #include - #include -@@ -150,11 +151,14 @@ static const struct rg353_panel rg353_panel_details[] = { +@@ -220,12 +221,12 @@ void read_func_button(void) }; /* - * Start LED very early so user knows device is on. Set color +- * to red. + * Check if rockchip_dnl button is pressed and reboot into rockusb if -+ * true. Start LED very early so user knows device is on. Set color - * to red. ++ * true. Start LED very early so user knows device is on. Set color* */ void spl_board_init(void) { +- read_func_button(); + setup_boot_mode(); -+ + /* Set GPIO0_C5, GPIO0_C6, and GPIO0_C7 to output. */ writel(GPIO_WRITEMASK(GPIO_C7 | GPIO_C6 | GPIO_C5) | \ - (GPIO_C7 | GPIO_C6 | GPIO_C5), diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 6405374bc..bd3fe74fc 100644 --- a/common/spl/Kconfig @@ -146,80 +146,17 @@ index 6405374bc..bd3fe74fc 100644 bool "Support CACHE drivers" help diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig -index ed6643d9d..4e72f7581 100644 +index c8c9238f96..923c05d130 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig -@@ -3,6 +3,7 @@ CONFIG_SKIP_LOWLEVEL_INIT=y - CONFIG_COUNTER_FREQUENCY=24000000 - CONFIG_ARCH_ROCKCHIP=y - CONFIG_TEXT_BASE=0x00a00000 -+CONFIG_SPL_GPIO=y - CONFIG_SPL_LIBCOMMON_SUPPORT=y - CONFIG_SPL_LIBGENERIC_SUPPORT=y - CONFIG_NR_DRAM_BANKS=2 -@@ -24,7 +25,9 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART=y - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_FIT_SIGNATURE=y - CONFIG_SPL_LOAD_FIT=y -+CONFIG_LEGACY_IMAGE_FORMAT=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_OF_STDOUT_VIA_ALIAS=y - CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-anbernic-rgxx3.dtb" -@@ -32,7 +35,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-anbernic-rgxx3.dtb" - # CONFIG_DISPLAY_CPUINFO is not set - CONFIG_DISPLAY_BOARDINFO_LATE=y - CONFIG_BOARD_RNG_SEED=y --CONFIG_SPL_MAX_SIZE=0x20000 -+CONFIG_SPL_MAX_SIZE=0x40000 +@@ -31,6 +31,7 @@ CONFIG_SPL_MAX_SIZE=0x40000 CONFIG_SPL_PAD_TO=0x7f8000 - CONFIG_SPL_HAS_BSS_LINKER_SECTION=y - CONFIG_SPL_BSS_START_ADDR=0x4000000 -@@ -41,6 +44,8 @@ CONFIG_SPL_BOARD_INIT=y + CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set - # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set - CONFIG_SPL_STACK_R=y +CONFIG_SPL_ADC=y -+CONFIG_SPL_POWER=y + CONFIG_SPL_POWER=y CONFIG_SPL_ATF=y CONFIG_CMD_PWM=y - CONFIG_CMD_GPT=y -@@ -50,8 +55,10 @@ CONFIG_CMD_MMC=y - # CONFIG_SPL_DOS_PARTITION is not set - CONFIG_SPL_OF_CONTROL=y - CONFIG_OF_LIVE=y -+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y - # CONFIG_NET is not set -+CONFIG_SPL_DM_SEQ_ALIAS=y - CONFIG_SPL_REGMAP=y - CONFIG_SPL_SYSCON=y - CONFIG_SPL_CLK=y -@@ -67,13 +74,13 @@ CONFIG_MMC_SDHCI=y - CONFIG_MMC_SDHCI_SDMA=y - CONFIG_MMC_SDHCI_ROCKCHIP=y - CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY=y -+CONFIG_SPL_PINCTRL=y - CONFIG_DM_PMIC=y - CONFIG_DM_PMIC_FAN53555=y - CONFIG_PMIC_RK8XX=y --CONFIG_REGULATOR_PWM=y --CONFIG_DM_REGULATOR_GPIO=y -+CONFIG_SPL_DM_REGULATOR=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y - CONFIG_REGULATOR_RK8XX=y --CONFIG_DM_REGULATOR_SCMI=y - CONFIG_PWM_ROCKCHIP=y - CONFIG_SPL_RAM=y - # CONFIG_RAM_ROCKCHIP_DEBUG is not set -@@ -89,5 +96,6 @@ CONFIG_VIDEO_ROCKCHIP=y - CONFIG_DISPLAY_ROCKCHIP_DW_MIPI=y - CONFIG_VIDEO_BRIDGE=y - CONFIG_REGEX=y -+# CONFIG_RSA is not set - CONFIG_ERRNO_STR=y - # CONFIG_EFI_LOADER is not set diff --git a/drivers/Makefile b/drivers/Makefile index bf73b7718..81ba2c534 100644 --- a/drivers/Makefile diff --git a/projects/Rockchip/packages/u-boot/patches/RK3566/002-v2-add-powkiddy-x55.patch b/projects/Rockchip/packages/u-boot/patches/RK3566/002-v2-add-powkiddy-x55.patch index 91f6bfaa1..12a23616c 100644 --- a/projects/Rockchip/packages/u-boot/patches/RK3566/002-v2-add-powkiddy-x55.patch +++ b/projects/Rockchip/packages/u-boot/patches/RK3566/002-v2-add-powkiddy-x55.patch @@ -56,17 +56,17 @@ Signed-off-by: Chris Morgan create mode 100644 include/configs/powkiddy-x55-rk3566.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 5fc888680b..6e5cb7c3e9 100644 +index 2634bb4c9a..6d4df7bccc 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -172,6 +172,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ - +@@ -148,6 +148,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ + dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-anbernic-rgxx3.dtb \ + rk3566-powkiddy-x55.dtb \ + rk3566-pinetab2-v0.1.dtb \ + rk3566-pinetab2-v2.0.dtb \ rk3566-quartz64-a.dtb \ - rk3566-quartz64-b.dtb \ - rk3566-radxa-cm3-io.dtb \ diff --git a/arch/arm/dts/rk3566-powkiddy-x55-u-boot.dtsi b/arch/arm/dts/rk3566-powkiddy-x55-u-boot.dtsi new file mode 100644 index 0000000000..1a3089b598 diff --git a/projects/Rockchip/packages/u-boot/patches/RK3566/004-rgb10max3.patch b/projects/Rockchip/packages/u-boot/patches/RK3566/004-rgb10max3.patch deleted file mode 100644 index da07cc552..000000000 --- a/projects/Rockchip/packages/u-boot/patches/RK3566/004-rgb10max3.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c -index 194605ff06..ee498631ba 100644 ---- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c -+++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c -@@ -49,6 +49,7 @@ enum rgxx3_device_id { - RG353V, - RG503, - RGB30, -+ RGB10MAX3, - RK2023, - RGARCD, - /* Devices with duplicate ADC value */ -@@ -94,6 +95,13 @@ static const struct rg3xx_model rg3xx_model_details[] = { - .fdtfile = DTB_DIR "rk3566-powkiddy-rgb30.dtb", - .detect_panel = 0, - }, -+ [RGB10MAX3] = { -+ .adc_value = 765, /* Observed average from device */ -+ .board = "rk3566-powkiddy-rgb10max3", -+ .board_name = "RGB10MAX3", -+ .fdtfile = DTB_DIR "rk3566-powkiddy-rgb10max3.dtb", -+ .detect_panel = 0, -+ }, - [RK2023] = { - .adc_value = 635, /* Observed average from device */ - .board = "rk3566-powkiddy-rk2023",