From patchwork Tue Mar 3 15:08:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Smedegaard X-Patchwork-Id: 243182 List-Id: U-Boot discussion From: dr at jones.dk (Jonas Smedegaard) Date: Tue, 3 Mar 2020 16:08:00 +0100 Subject: [PATCH v3 1/2] sunxi: fix support board-specific CONFIG_PREBOOT Message-ID: <20200303150801.3365174-1-dr@jones.dk> commit 37304aaf60bf ("Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig") intended to support CONFIG_PREBOOT, but include/configs/sunxi-common.h hardcodes preboot as part of internally defined CONSOLE_STDIN_SETTINGS, silently ignoring any board-specific CONFIG_PREBOOT. This commit moves sunxi-specific CONFIG_PREBOOT to Kconfig, which supports board-specific override. Tested-by: Jonas Smedegaard Signed-off-by: Jonas Smedegaard Series-Cc: Jagan Teki Series-Cc: Lukasz Majewski Series-Cc: Andre Przywara Reviewed-by: Andre Przywara --- Changes in v3: - move default setting to KConfig, thanks to Andre Przywara and Lukasz Majewski Changes in v2: - Rephrase commit message to clarify relationship with KConfig entries --- arch/arm/mach-sunxi/Kconfig | 3 +++ include/configs/sunxi-common.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 3a3b673430..9f16d903a0 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -48,6 +48,9 @@ config DRAM_SUN50I_H6 Select this dram controller driver for some sun50i platforms, like H6. +config PREBOOT + default "usb start" if USB_KEYBOARD + config SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 0ef289fd64..69ef65193e 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -429,7 +429,6 @@ extern int soft_i2c_gpio_scl; #ifdef CONFIG_USB_KEYBOARD #define CONSOLE_STDIN_SETTINGS \ - "preboot=usb start\0" \ "stdin=serial,usbkbd\0" #else #define CONSOLE_STDIN_SETTINGS \ From patchwork Tue Mar 3 15:08:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Smedegaard X-Patchwork-Id: 243183 List-Id: U-Boot discussion From: dr at jones.dk (Jonas Smedegaard) Date: Tue, 3 Mar 2020 16:08:01 +0100 Subject: [PATCH v3 2/2] sun50i: a64: A64-Teres-I board detect builtin keyboard In-Reply-To: <20200303150801.3365174-1-dr@jones.dk> References: <20200303150801.3365174-1-dr@jones.dk> Message-ID: <20200303150801.3365174-2-dr@jones.dk> A64-Teres-I board is a laptop which comes with a builtin keyboard. The keyboard+trackpad controller pauses for 2 seconds at a firmware prompt before loading its HID interface. U-Boot needs to wait equally long to reliably enable the keyboard. Tested-by: Jonas Smedegaard Signed-off-by: Jonas Smedegaard Series-Cc: Jagan Teki Series-Cc: Lukasz Majewski Series-Cc: Andre Przywara --- Changes in v3: - (none) Changes in v2: - (none) --- configs/teres_i_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/teres_i_defconfig b/configs/teres_i_defconfig index 1019dab54a..61bbf76b1e 100644 --- a/configs/teres_i_defconfig +++ b/configs/teres_i_defconfig @@ -8,6 +8,7 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_USB1_VBUS_PIN="PL7" CONFIG_I2C0_ENABLE=y CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv usb_pgood_delay 2000; usb reset" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-teres-i"