[PATCH v2 3/3] rockchip: rock64-rk3328_defconfig: enable HDMI output and USB keyboard
Jonas Karlman
jonas at kwiboo.se
Tue Apr 1 09:56:21 CEST 2025
Hi Vasily,
On 2025-04-01 00:16, Vasily Khoruzhick wrote:
> On Sun, Mar 30, 2025 at 4:45 AM Jonas Karlman <jonas at kwiboo.se> wrote:
>>
>> Hi Vasily,
>>
>> On 2025-03-23 23:50, Vasily Khoruzhick wrote:
>>> Enable HDMI output and USB keyboard on Rock64 board
>>>
>>> Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
>>> ---
>>> v2: no change
>>>
>>> configs/rock64-rk3328_defconfig | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
>>> index 6d00b52e62f..ae3512625cf 100644
>>> --- a/configs/rock64-rk3328_defconfig
>>> +++ b/configs/rock64-rk3328_defconfig
>>> @@ -21,7 +21,9 @@ CONFIG_FIT_VERBOSE=y
>>> CONFIG_SPL_FIT_SIGNATURE=y
>>> CONFIG_SPL_LOAD_FIT=y
>>> CONFIG_LEGACY_IMAGE_FORMAT=y
>>> +CONFIG_USE_PREBOOT=y
>>
>> This will add a large delay during boot as it forces a run of the slow
>> "usb start" and is something we want to avoid for normal use, please
>> drop this.
>
> Well, I can just drop the patch altogether.
>
> Personally, I do need USB and HDMI support, since it allows me to boot
> from a secondary storage in case the OS on main storage doesn't boot.
> Not having USB support defeats the purpose of this patch.
With bootstd the storage media is initialized in fastest to slowest
(initialization time) order. So USB will be initialized if nothing it
found on mmc nvme etc, see boot_targets env var.
However, if you want usb in efi bootmgr you must initialize usb (and any
other storage media) before starting bootstd loop. To my knowledge
someone should be working on a change to the boot order to load efi
bootmgr just before removable media and have it initialize usb etc.
Since ROCK64 has env by default you can easily change the boot command
to run "usb start" before booting on your device, until the reordered
efi bootmgr work lands.
Slowing down boot (USE_PREBOOT=y) for everyone by several seconds to
force initialize USB when it is not really needed for i.e. a quick
extlinux/scripts boot from MMC is not ideal.
We could look into options using e.g. recovery button, env var or
similar to use an alternative boot flow.
Regards,
Jonas
>
>>> CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock64.dtb"
>>> +# CONFIG_SYS_DEVICE_NULLDEV is not set
>>> # CONFIG_DISPLAY_CPUINFO is not set
>>> CONFIG_DISPLAY_BOARDINFO_LATE=y
>>> CONFIG_SPL_MAX_SIZE=0x40000
>>> @@ -72,6 +74,7 @@ CONFIG_DM_ETH_PHY=y
>>> CONFIG_PHY_GIGE=y
>>> CONFIG_ETH_DESIGNWARE=y
>>> CONFIG_GMAC_ROCKCHIP=y
>>> +CONFIG_PHY_ROCKCHIP_INNO_HDMI=y
>>> CONFIG_PHY_ROCKCHIP_INNO_USB2=y
>>> CONFIG_PINCTRL=y
>>> CONFIG_SPL_PINCTRL=y
>>> @@ -80,6 +83,8 @@ CONFIG_PMIC_RK8XX=y
>>> CONFIG_SPL_DM_REGULATOR=y
>>> CONFIG_DM_REGULATOR_FIXED=y
>>> CONFIG_SPL_DM_REGULATOR_FIXED=y
>>> +CONFIG_DM_REGULATOR_GPIO=y
>>> +CONFIG_SPL_DM_REGULATOR_GPIO=y
>>
>> The ROCK64 does not use any regulator-gpio, this look unrelated and can
>> be dropped?
>>
>>> CONFIG_REGULATOR_RK8XX=y
>>> CONFIG_PWM_ROCKCHIP=y
>>> CONFIG_RAM=y
>>> @@ -104,6 +109,11 @@ CONFIG_USB_OHCI_GENERIC=y
>>> CONFIG_USB_DWC2=y
>>> CONFIG_USB_DWC3=y
>>> CONFIG_USB_DWC3_GENERIC=y
>>> +CONFIG_USB_KEYBOARD=y
>>> +CONFIG_VIDEO=y
>>> +CONFIG_DISPLAY=y
>>> +CONFIG_VIDEO_ROCKCHIP=y
>>> +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
>>
>> This will force a small delay of at least a 300ms timeout for all users
>> that does not have HDMI connected during boot.
>>
>> Maybe this could be extracted to a rockchip-hdmi.config-file to make it
>> more optional?
>>
>> E.g. use "make rock64-rk3328_defconfig rockchip-hdmi.config" to build
>> with something like:
>>
>> > cat rockchip-hdmi.config
>> CONFIG_VIDEO=y
>> CONFIG_DISPLAY=y
>> CONFIG_VIDEO_ROCKCHIP=y
>> CONFIG_DISPLAY_ROCKCHIP_HDMI=y
>>
>> Regards,
>> Jonas
>>
>>> CONFIG_SPL_TINY_MEMSET=y
>>> CONFIG_TPL_TINY_MEMSET=y
>>> CONFIG_ERRNO_STR=y
>>
More information about the U-Boot
mailing list