diff mbox series

rockchip: rockpro64: initialize USB in preboot

Message ID 20200603154420.3548127-1-marcin@juszkiewicz.com.pl
State Accepted
Delegated to: Kever Yang
Headers show
Series rockchip: rockpro64: initialize USB in preboot | expand

Commit Message

Marcin Juszkiewicz June 3, 2020, 3:44 p.m. UTC
With video output enabled and USB keyboard supported there is no need
for serial console. So let initialize USB subsystem so keyboard connected to
board (either directly or via hub) can be used to interrupt autoboot.

U-Boot TPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)
Trying to boot from SPI

U-Boot 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)

SoC: Rockchip rk3399
Reset cause: RST
Model: Pine64 RockPro64 v2.1
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPI Flash... SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Pine64 RockPro64 v2.1
Net:   eth0: ethernet@fe300000
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 2 USB Device(s) found
scanning bus dwc3 for devices... 1 USB Device(s) found
scanning bus dwc3 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0
=>

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
---
 configs/rockpro64-rk3399_defconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kever Yang June 4, 2020, 3:09 a.m. UTC | #1
On 2020/6/3 下午11:44, Marcin Juszkiewicz wrote:
> With video output enabled and USB keyboard supported there is no need
> for serial console. So let initialize USB subsystem so keyboard connected to
> board (either directly or via hub) can be used to interrupt autoboot.
>
> U-Boot TPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20)
> Channel 0: LPDDR4, 50MHz
> BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
> Channel 1: LPDDR4, 50MHz
> BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
> 256B stride
> 256B stride
> lpddr4_set_rate: change freq to 400000000 mhz 0, 1
> lpddr4_set_rate: change freq to 800000000 mhz 1, 0
> Trying to boot from BOOTROM
> Returning to boot ROM...
>
> U-Boot SPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)
> Trying to boot from SPI
>
> U-Boot 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)
>
> SoC: Rockchip rk3399
> Reset cause: RST
> Model: Pine64 RockPro64 v2.1
> DRAM:  3.9 GiB
> PMIC:  RK808
> MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
> Loading Environment from SPI Flash... SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
> OK
> In:    serial
> Out:   vidconsole
> Err:   vidconsole
> Model: Pine64 RockPro64 v2.1
> Net:   eth0: ethernet@fe300000
> starting USB...
> Bus usb@fe380000: USB EHCI 1.00
> Bus usb@fe3a0000: USB OHCI 1.0
> Bus usb@fe3c0000: USB EHCI 1.00
> Bus usb@fe3e0000: USB OHCI 1.0
> Bus dwc3: Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.10
> Bus dwc3: Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.10
> scanning bus usb@fe380000 for devices... 1 USB Device(s) found
> scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
> scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
> scanning bus usb@fe3e0000 for devices... 2 USB Device(s) found
> scanning bus dwc3 for devices... 1 USB Device(s) found
> scanning bus dwc3 for devices... 2 USB Device(s) found
>         scanning usb for storage devices... 1 Storage Device(s) found
> Hit any key to stop autoboot:  0
> =>
>
> Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   configs/rockpro64-rk3399_defconfig | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git configs/rockpro64-rk3399_defconfig configs/rockpro64-rk3399_defconfig
> index 807747485a..a56126b042 100644
> --- configs/rockpro64-rk3399_defconfig
> +++ configs/rockpro64-rk3399_defconfig
> @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>   CONFIG_SPL_SPI_FLASH_SUPPORT=y
>   CONFIG_SPL_SPI_SUPPORT=y
>   CONFIG_DEBUG_UART=y
> +CONFIG_USE_PREBOOT=y
> +CONFIG_PREBOOT="usb start"
>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
>   CONFIG_MISC_INIT_R=y
>   CONFIG_DISPLAY_BOARDINFO_LATE=y
Kever Yang June 27, 2020, 2:02 p.m. UTC | #2
On 2020/6/4 上午11:09, Kever Yang wrote:
>
> On 2020/6/3 下午11:44, Marcin Juszkiewicz wrote:
>> With video output enabled and USB keyboard supported there is no need
>> for serial console. So let initialize USB subsystem so keyboard 
>> connected to
>> board (either directly or via hub) can be used to interrupt autoboot.
>>
>> U-Boot TPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20)
>> Channel 0: LPDDR4, 50MHz
>> BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
>> Channel 1: LPDDR4, 50MHz
>> BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB
>> 256B stride
>> 256B stride
>> lpddr4_set_rate: change freq to 400000000 mhz 0, 1
>> lpddr4_set_rate: change freq to 800000000 mhz 1, 0
>> Trying to boot from BOOTROM
>> Returning to boot ROM...
>>
>> U-Boot SPL 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)
>> Trying to boot from SPI
>>
>> U-Boot 2020.07-rc3-00123-g52d6cbd1a7 (Jun 03 2020 - 17:34:20 +0200)
>>
>> SoC: Rockchip rk3399
>> Reset cause: RST
>> Model: Pine64 RockPro64 v2.1
>> DRAM:  3.9 GiB
>> PMIC:  RK808
>> MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
>> Loading Environment from SPI Flash... SF: Detected gd25q128 with page 
>> size 256 Bytes, erase size 4 KiB, total 16 MiB
>> OK
>> In:    serial
>> Out:   vidconsole
>> Err:   vidconsole
>> Model: Pine64 RockPro64 v2.1
>> Net:   eth0: ethernet@fe300000
>> starting USB...
>> Bus usb@fe380000: USB EHCI 1.00
>> Bus usb@fe3a0000: USB OHCI 1.0
>> Bus usb@fe3c0000: USB EHCI 1.00
>> Bus usb@fe3e0000: USB OHCI 1.0
>> Bus dwc3: Register 2000140 NbrPorts 2
>> Starting the controller
>> USB XHCI 1.10
>> Bus dwc3: Register 2000140 NbrPorts 2
>> Starting the controller
>> USB XHCI 1.10
>> scanning bus usb@fe380000 for devices... 1 USB Device(s) found
>> scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
>> scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
>> scanning bus usb@fe3e0000 for devices... 2 USB Device(s) found
>> scanning bus dwc3 for devices... 1 USB Device(s) found
>> scanning bus dwc3 for devices... 2 USB Device(s) found
>>         scanning usb for storage devices... 1 Storage Device(s) found
>> Hit any key to stop autoboot:  0
>> =>
>>
>> Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
>
> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Applied to u-boot-rockchip next branch


>
> Thanks,
> - Kever
>> ---
>>   configs/rockpro64-rk3399_defconfig | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git configs/rockpro64-rk3399_defconfig 
>> configs/rockpro64-rk3399_defconfig
>> index 807747485a..a56126b042 100644
>> --- configs/rockpro64-rk3399_defconfig
>> +++ configs/rockpro64-rk3399_defconfig
>> @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>>   CONFIG_SPL_SPI_FLASH_SUPPORT=y
>>   CONFIG_SPL_SPI_SUPPORT=y
>>   CONFIG_DEBUG_UART=y
>> +CONFIG_USE_PREBOOT=y
>> +CONFIG_PREBOOT="usb start"
>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
>>   CONFIG_MISC_INIT_R=y
>>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>
>
>
>
diff mbox series

Patch

diff --git configs/rockpro64-rk3399_defconfig configs/rockpro64-rk3399_defconfig
index 807747485a..a56126b042 100644
--- configs/rockpro64-rk3399_defconfig
+++ configs/rockpro64-rk3399_defconfig
@@ -11,6 +11,8 @@  CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="usb start"
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
 CONFIG_MISC_INIT_R=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y