RK3566-X55: Symlink u-boot patches
* Needed patches already exist and the additional 2 patches dont affect x55
This commit is contained in:
parent
ce73072663
commit
ee30369e17
3 changed files with 1 additions and 1640 deletions
1
projects/Rockchip/packages/u-boot/patches/RK3566-X55
Symbolic link
1
projects/Rockchip/packages/u-boot/patches/RK3566-X55
Symbolic link
|
@ -0,0 +1 @@
|
|||
RK3566
|
|
@ -1,257 +0,0 @@
|
|||
diff --git a/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi b/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
|
||||
index fa3df73c3..62a788a8e 100644
|
||||
--- a/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
|
||||
@@ -75,6 +75,12 @@
|
||||
/delete-property/ clock-names;
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ bootph-all;
|
||||
+ vref-supply = <&vcc_sys>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdhci {
|
||||
pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>,
|
||||
<&emmc_datastrobe>, <&emmc_rstnout>;
|
||||
@@ -87,3 +93,8 @@
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vcc_sys {
|
||||
+ bootph-all;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
|
||||
index 1dc92066b..ff089ae94 100644
|
||||
--- 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_ROCKCHIP_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
|
||||
+
|
||||
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
|
||||
obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
|
||||
obj-$(CONFIG_MISC_INIT_R) += misc.o
|
||||
endif
|
||||
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
|
||||
index eb8f65ae4..d2308768b 100644
|
||||
--- a/arch/arm/mach-rockchip/boot_mode.c
|
||||
+++ b/arch/arm/mach-rockchip/boot_mode.c
|
||||
@@ -38,6 +38,10 @@ void set_back_to_bootrom_dnl_flag(void)
|
||||
#define KEY_DOWN_MIN_VAL 0
|
||||
#define KEY_DOWN_MAX_VAL 30
|
||||
|
||||
+#ifndef RK_DNL_ADC_CHAN
|
||||
+#define RK_DNL_ADC_CHAN 1
|
||||
+#endif
|
||||
+
|
||||
__weak int rockchip_dnl_key_pressed(void)
|
||||
{
|
||||
unsigned int val;
|
||||
@@ -52,7 +56,8 @@ __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,
|
||||
+ RK_DNL_ADC_CHAN, &val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -73,11 +78,13 @@ __weak int rockchip_dnl_key_pressed(void)
|
||||
|
||||
void rockchip_dnl_mode_check(void)
|
||||
{
|
||||
+#if CONFIG_IS_ENABLED(ADC)
|
||||
if (rockchip_dnl_key_pressed()) {
|
||||
printf("download key pressed, entering download mode...");
|
||||
set_back_to_bootrom_dnl_flag();
|
||||
do_reset(NULL, 0, 0, NULL);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
int setup_boot_mode(void)
|
||||
@@ -90,6 +97,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);
|
||||
|
||||
@@ -103,6 +111,7 @@ int setup_boot_mode(void)
|
||||
env_set("preboot", "setenv preboot; ums mmc 0");
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
|
||||
index d05502f67..e12a85a02 100644
|
||||
--- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
|
||||
+++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <abuf.h>
|
||||
#include <adc.h>
|
||||
+#include <asm/arch-rockchip/boot_mode.h>
|
||||
#include <asm/io.h>
|
||||
#include <display.h>
|
||||
#include <dm.h>
|
||||
@@ -150,11 +151,14 @@ static const struct rg353_panel rg353_panel_details[] = {
|
||||
};
|
||||
|
||||
/*
|
||||
- * Start LED very early so user knows device is on. Set color
|
||||
+ * 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.
|
||||
*/
|
||||
void spl_board_init(void)
|
||||
{
|
||||
+ 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
|
||||
+++ b/common/spl/Kconfig
|
||||
@@ -595,6 +595,13 @@ config SPL_FIT_IMAGE_TINY
|
||||
ensure this information is available to the next image
|
||||
invoked).
|
||||
|
||||
+config SPL_ADC
|
||||
+ bool "Support ADC drivers"
|
||||
+ help
|
||||
+ Enable ADC drivers in SPL. These drivers can allow the reading of
|
||||
+ analog values from one or more channels. Enable this option to
|
||||
+ build the drivers in drivers/adc as part of an SPL build.
|
||||
+
|
||||
config SPL_CACHE
|
||||
bool "Support CACHE drivers"
|
||||
help
|
||||
diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig
|
||||
index ed6643d9d..4e72f7581 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
|
||||
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_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_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
|
||||
+++ b/drivers/Makefile
|
||||
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
+obj-$(CONFIG_$(SPL_)ADC) += adc/
|
||||
obj-$(CONFIG_$(SPL_TPL_)BIOSEMU) += bios_emulator/
|
||||
obj-$(CONFIG_$(SPL_TPL_)BLK) += block/
|
||||
obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/
|
||||
diff --git a/drivers/adc/Makefile b/drivers/adc/Makefile
|
||||
index 5336c8209..9eb07769b 100644
|
||||
--- a/drivers/adc/Makefile
|
||||
+++ b/drivers/adc/Makefile
|
||||
@@ -4,7 +4,7 @@
|
||||
# Przemyslaw Marczak <p.marczak@samsung.com>
|
||||
#
|
||||
|
||||
-obj-$(CONFIG_ADC) += adc-uclass.o
|
||||
+obj-$(CONFIG_$(SPL_)ADC) += adc-uclass.o
|
||||
obj-$(CONFIG_ADC_EXYNOS) += exynos-adc.o
|
||||
obj-$(CONFIG_ADC_SANDBOX) += sandbox.o
|
||||
obj-$(CONFIG_SARADC_ROCKCHIP) += rockchip-saradc.o
|
||||
diff --git a/include/configs/anbernic-rgxx3-rk3566.h b/include/configs/anbernic-rgxx3-rk3566.h
|
||||
index 3c4ea4e7d..2aaac55c0 100644
|
||||
--- a/include/configs/anbernic-rgxx3-rk3566.h
|
||||
+++ b/include/configs/anbernic-rgxx3-rk3566.h
|
||||
@@ -9,4 +9,6 @@
|
||||
"stdout=serial,vidconsole\0" \
|
||||
"stderr=serial,vidconsole\0"
|
||||
|
||||
+#define RK_DNL_ADC_CHAN 0
|
||||
+
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue