build/patch/u-boot/v2023.01/board_odroidhc4/board.odroidhc4.preboot.pci.enum.usb.start.patch

42 lines
1.6 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Tue, 31 Jan 2023 00:11:35 +0100
Subject: odroidhc4: u-boot: spi: add pci enum & usb start to preboot
Under investigation; Neil Armstrong has determined that forcing PCI
enumeration on the HC4 allows the USB to be used for booting.
This adds a preboot command to the u-boot config run PCI enumeration
and start USB. (Starting USB is not required, since distroboot would
start it anyway, but has the added benefit of (maybe?) allowing USB
keyboard interaction during u-boot, which might be useful for users
sans-UART)
I have a strong suspicion that the real underlying issue is somehow
related to GPIOH_4:
- on the C4 DT, a gpio-hog usb-hub-reset `GPIOH_4 GPIO_ACTIVE_HIGH`
- on the HC4 DT: pcie reset-gpios `GPIOH_4 GPIO_ACTIVE_LOW`
See also: https://lore.kernel.org/all/20230121175639.12818-1-linux.amoon@gmail.com/
specially the c4 patch https://lore.kernel.org/all/20230121175639.12818-8-linux.amoon@gmail.com/
---
configs/odroid-hc4_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/odroid-hc4_defconfig b/configs/odroid-hc4_defconfig
index 1af9c11395..a006ef924e 100644
--- a/configs/odroid-hc4_defconfig
+++ b/configs/odroid-hc4_defconfig
@@ -17,6 +17,8 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
CONFIG_REMAKE_ELF=y
CONFIG_OF_BOARD_SETUP=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="run boot_pci_enum; usb start"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_MISC_INIT_R=y
CONFIG_SYS_MAXARGS=32
--
Armbian