
Hi Alper,
On Thu, 25 Nov 2021 at 10:39, Alper Nebi Yasak alpernebiyasak@gmail.com wrote:
I have recently started testing booting U-Boot from SPI on my gru-kevin (as opposed to chainloading it from vendor coreboot + depthcharge) and brought it to a better working state based on an initial support patch from Marty [1][2] and some follow-up work by Simon [3].
I tried to keep them as the git author when I took things from their work, but squashing other changes into those and rewriting commit messages makes things a bit weird in my opinion, especially for keeping their signoff. Do tell me if there is a better way to that.
As the Kevin and Bob boards are very similar. I assumed the config and devicetree changes will be appropriate for Bob as well, and applied them to it first. I do not have a Bob, so could not test on one myself, but Simon did test an earlier version of this and it appears to work [4].
Other useful things for these boards:
- Patch to fix a hang when usb controllers exit [5]
- Series to support HS400ES mode as HS400 training fails [6]
- Hack to skip eMMC reinitialization so it keeps working [7]
[1] https://patchwork.ozlabs.org/patch/1053386/ [2] https://patchwork.ozlabs.org/comment/2488899/ [3] https://github.com/sjg20/u-boot/commits/kevin [4] https://lore.kernel.org/u-boot/CAPnjgZ23jD92y9Ni8YW1FTL0a1sjhGOUoaKx13ZkoKN6... [5] https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-ic... [6] https://patchwork.ozlabs.org/project/uboot/list/?series=269768 [7] https://patchwork.ozlabs.org/comment/2779784/
Alper Nebi Yasak (2): rockchip: gru: Set up SoC IO domain registers rockchip: bob: Enable more configs
Marty E. Plummer (1): rockchip: rk3399: Add support for chromebook_kevin
Simon Glass (1): rockchip: gru: Add more devicetree settings
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi | 11 ++ arch/arm/dts/rk3399-gru-u-boot.dtsi | 55 +++++++++ arch/arm/mach-rockchip/rk3399/Kconfig | 11 ++ arch/arm/mach-rockchip/rk3399/rk3399.c | 4 +- arch/arm/mach-rockchip/spl.c | 3 +- board/google/gru/Kconfig | 16 +++ board/google/gru/MAINTAINERS | 8 ++ board/google/gru/gru.c | 56 ++++++++- configs/chromebook_bob_defconfig | 27 +++- configs/chromebook_kevin_defconfig | 116 ++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/gru.h | 3 + include/dt-bindings/input/linux-event-codes.h | 3 +- 14 files changed, 309 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi create mode 100644 configs/chromebook_kevin_defconfig
-- 2.34.0
My test results below. It seems that MMC is broken (I think by a previous change). The garbage on the console with kevin is new but may be unrelated to your patches, not sure. So it seems that your patches work for me on both.
Bob:
do-try-int.sh bob Revision 68acce8a08beb24618343a1ce7ee6c0c4c234b97, board bob
Checking revision 68acce8a08beb24618343a1ce7ee6c0c4c234b97 /vid/software/devel/ubtest tbot starting ... ├─Parameters: │ rev = '68acce8a08beb24618343a1ce7ee6c0c4c234b97' │ clean = False ├─Calling uboot_build_and_flash ... │ ├─bob is on port 9904 and uses /dev/pts/37 │ ├─Calling uboot_build ... │ │ ├─Calling uboot_checkout ... │ │ │ ├─Builder: bob │ │ │ └─Done. (1.104s) │ │ ├─Configuring build ... │ │ ├─Calling uboot_make ... │ │ │ └─Done. (10.289s) │ │ └─Done. (11.767s) │ ├─Calling uboot_flash ... │ │ └─Done. (2.209s) │ └─Done. (14.438s) ├───────────────────────────────────────── └─SUCCESS (16.780s) tbot starting ... ├─Calling interactive_board ... │ ├─bob is on port 9904 and uses /dev/pts/37 │ ├─POWERON (bob) │ ├─Entering interactive shell (CTRL+D to exit) ... Channel 0: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride
U-Boot SPL 2022.01-rc3-00130-g68acce8a08b (Dec 02 2021 - 20:05:54 -0700) Trying to boot from SPI rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2022.01-rc3-00130-g68acce8a08b (Dec 02 2021 - 20:05:54 -0700)
Model: Google Bob DRAM: 3.9 GiB MMC: mmc@fe320000: 1, mmc@fe330000: 0 Loading Environment from MMC... Select HS400ES failed -524 unable to select a mode : -5 *** Warning - No block device, using default environment
In: cros-ec-keyb Out: vidconsole Err: vidconsole Model: Google Bob Net: No ethernet found. Hit any key to stop autoboot: 0 Select HS400ES failed -524 unable to select a mode : -5 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 usb@fe800000: Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 Bus usb@fe900000: Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 scanning bus usb@fe380000 for devices... 2 USB Device(s) found scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found scanning bus usb@fe800000 for devices... 1 USB Device(s) found scanning bus usb@fe900000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device No ethernet found. missing environment variable: pxeuuid Retrieving file: pxelinux.cfg/00000000 No ethernet found. Retrieving file: pxelinux.cfg/0000000 No ethernet found. Retrieving file: pxelinux.cfg/000000 No ethernet found. Retrieving file: pxelinux.cfg/00000 No ethernet found. Retrieving file: pxelinux.cfg/0000 No ethernet found. Retrieving file: pxelinux.cfg/000 No ethernet found. Retrieving file: pxelinux.cfg/00 No ethernet found. Retrieving file: pxelinux.cfg/0 No ethernet found. Retrieving file: pxelinux.cfg/default-arm-rk3399-gru No ethernet found. Retrieving file: pxelinux.cfg/default-arm-rk3399 No ethernet found. Retrieving file: pxelinux.cfg/default-arm No ethernet found. Retrieving file: pxelinux.cfg/default No ethernet found. Config file not found No ethernet found. No ethernet found. SF: Detected gd25lq32 with page size 256 Bytes, erase size 4 KiB, total 4 MiB Offset exceeds device limit sf - SPI flash sub-system
Usage: sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus and chip select sf read addr offset|partition len - read `len' bytes starting at `offset' or from start of mtd `partition'to memory at `addr' sf write addr offset|partition len - write `len' bytes from memory at `addr' to flash at `offset' or to start of mtd `partition' sf erase offset|partition [+]len - erase `len' bytes from `offset' or from start of mtd `partition' `+len' round up `len' to block size sf update addr offset|partition len - erase and write `len' bytes from memory at `addr' to flash at `offset' or to start of mtd `partition' sf protect lock/unlock sector len - protect/unprotect 'len' bytes starting at address 'sector' sf test offset len - run a very basic destructive test ## Executing script at 00500000 Wrong image format for "source" command SCRIPT FAILED: continuing... => mmc info Select HS400ES failed -524 unable to select a mode : -5 => mmc dev 0 Select HS400ES failed -524 unable to select a mode : -5 => mmc dev 1 => => mmc info Select HS400ES failed -524 unable to select a mode : -5 => │ ├─POWEROFF (bob) │ └─Done. (91.515s) ├───────────────────────────────────────── └─SUCCESS (91.618s)
kevin
do-try-int.sh kevin Revision db055a91992886388ca8de0b2408a91f7b7c5d3e, board kevin
Checking revision db055a91992886388ca8de0b2408a91f7b7c5d3e /vid/software/devel/ubtest tbot starting ... ├─Parameters: │ rev = 'db055a91992886388ca8de0b2408a91f7b7c5d3e' │ clean = False ├─Calling uboot_build_and_flash ... │ ├─kevin is on port 9907 and uses /dev/pts/25 │ ├─Calling uboot_build ... │ │ ├─Calling uboot_checkout ... │ │ │ ├─Builder: kevin │ │ │ └─Done. (0.243s) │ │ ├─Configuring build ... │ │ ├─Calling uboot_make ... │ │ │ └─Done. (2.085s) │ │ └─Done. (2.516s) │ ├─Calling uboot_flash ... │ │ └─Done. (2.460s) │ └─Done. (5.426s) ├───────────────────────────────────────── └─SUCCESS (5.663s) tbot starting ... ├─Calling interactive_board ... │ ├─kevin is on port 9907 and uses /dev/pts/25 │ ├─POWERON (kevin) │ ├─Entering interactive shell (CTRL+D to exit) ... ��^o���?�����߿���?�ߴ��[�:�>Ͽ�ݧ���������/���O���>��?�^�i�J����K�k�~ߟ�j�����k��~��[��?2<��ڙ�/�]�����h������ۻo���/����{��jU_�����j��]����7T������o?�W�����}~��;8���陷������w����v���kӿ�;���w�������>�����n|߶��~���\�z���߿7۪������.������WΧ��g��;����������9����ϟ�?�w������?���������ժ����:ۊ�}����>�������j���������~���Wvj2;7�������0^������G�����;��_��r��}�S�Ҿ�������G�o����K���������1ٽ=����ߺb^\������?��M���}/{����7������f�T�����u�sm�7���������3Wo����<�מ����7ho?��z�����=������#���ܿ��q������w�����w����I����������u�=����������������������=��۾������������������������������������������������������w������~���������߷w������������������������������������������������Channel 0: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride
U-Boot SPL 2022.01-rc3-00130-gdb055a91992 (Dec 02 2021 - 20:20:17 -0700) Trying to boot from SPI rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2022.01-rc3-00130-gdb055a91992 (Dec 02 2021 - 20:20:17 -0700)
Model: Google Kevin DRAM: 3.9 GiB MMC: mmc@fe320000: 1, mmc@fe330000: 0 Loading Environment from MMC... Select HS400ES failed -524 *** Warning - bad CRC, using default environment
In: cros-ec-keyb Out: vidconsole Err: vidconsole Model: Google Kevin Net: No ethernet found. Hit any key to stop autoboot: 0
Regards, Simon