[PATCH v4 00/28] Support to run U-Boot on sc7180 Trogdor Chromebooks

Casey Connolly casey.connolly at linaro.org
Wed Jun 18 19:59:24 CEST 2025


Hi Stephen,

There are multiple build errors with this branch, I started trying to 
fix a few but I think there's enough to warrant a respin...

Please build test for x86 and coreboot targets (try buildman)!

CI failures are here 
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/jobs/1174915

Kind regards,

On 5/24/25 00:58, Stephen Boyd wrote:
> This series supports running U-Boot as a payload on sc7180 Trogdor
> Chromebooks like Lazor or Wormdingler. This is a jumble of different
> patches to get to the final goal of booting a Linux distro from the eMMC
> on Lazor. I'm able to boot Fedora Workstation 41 from a USB stick on my
> Lazor.
> 
> I moved the reviewed patch to the start. After that one line fix there's
> a few patches to add support for the particular SoC used on Trogdor
> devices, sc7180. The next set of patches move the coreboot logic out of
> arch/x86/ into lib/ to find the coreboot tables on ARM and stash them in
> global data. Then I have a handful of patches to let the coreboot
> commands and utilities parse and populate various things like pstore and
> firmware details into the DTB with the proper data from the coreboot
> tables. Finally, I add the calls to coreboot dram parsing code in the
> snapdragon board so that if coreboot tables exist we get the memory info
> from coreboot instead of from an earlier stage DTB.
> 
> I tested the SPI driver with the crosec command. The cros bootflow
> method almost works, but it seems like chromeos userspace blows up
> spectacularly likely because crossystem can't figure out what board it
> is running on. I don't really care too much about booting chromeos
> userspace here so I'm ignoring that problem.
> 
> I'm able to install fedora on Lazor with this as long as I start the USB
> with CONFIG_PREBOOT=y. I tried to get this working on SC7280 Hoglin but
> it crashed in Fedora. I'm not sure why but it could be because the
> memory stuff was all wrong. Either way I hope it may work in the near
> future.
> 
> The display is almost there but I suspect I'll need to do the whole
> initialization all over again so I punted for now.
> 
> TODO:
>   * Get display working
>   * Implement FIT FDT picking similar to depthcharge based on coreboot
>     tables indicating the SKU and board id
> 
> Changes from v3 https://lore.kernel.org/r/20250428192427.3877612-1-swboyd@chromium.org
>   * GPIO chipselect in the SPI driver support
>   * sc7280 clk driver support for UART
>   * Enable the UART clk at probe
>   * Read VPD and inject the wifi MAC address
>   * Patch to inject wifi MAC from the environment
>   * Add a debug_board_init routine for trogdor to support early debug
>   * Add a defconfig
> 
> Changes from v2 https://lore.kernel.org/r/20250226221607.1283592-1-swboyd@chromium.org
>   * Check SPI proto in probe
>   * Handle pins differently in pinctrl driver
>   * Pick up tags
>   * Rebase to ToT
>   * Update pinctrl driver for new changes in last few months
>   * Add some more gates to clk driver to handle missing clk warnings
>   * New patch to locate coreboot tables early
> 
> Changes from v1 https://lore.kernel.org/r/20250220205900.3127680-1-swboyd@chromium.org
>   * Add Kconfig file in lib/coreboot/ to hold the coreboot config stuff
>     similar to EFI
>   * Couple new patches for ximg to support extracting the FDT from
>     chromeos kernel partitions
>   * Move the timestamp file out of arch/x86 as well in a different patch
> 
> Stephen Boyd (28):
>    bootstd: cros: Return negative error code
>    clk: qcom: Add driver for sc7180
>    clk/stub: Add sc7180-rpmh clock
>    clk: qcom: Support uart clk on sc7280 CRD
>    pinctrl: qcom: Add driver for sc7180
>    spi: Add Qualcomm GENI SPI driver
>    serial: msm-geni: Enable SE clk in probe
>    coreboot: Move coreboot logic out of x86 to a generic place
>    coreboot: Set gd->ram_base when parsing tables
>    coreboot: Locate table earlier than arch_cpu_init()
>    arm: Support running U-Boot as a coreboot payload on ARM64
>    cmd/cbsysinfo: Skip the CMOS 'option_table' when not present
>    cmd/cbsysinfo: Allow on ARM as well
>    coreboot: Parse sku_id/fw_config from coreboot tables
>    pstore: Add pstore address from coreboot tables
>    coreboot: Add /firmware/coreboot node to DT
>    coreboot: Move timestamp parsing to generic place
>    coreboot: Dump VPD information in cbsysinfo command
>    coreboot: Set serial# from VPD
>    coreboot: Set wifi mac addr from VPD
>    fdt: Populate wifi MAC from environment
>    mach-snapdragon: Support booting as a coreboot payload
>    mach-snapdragon: Allow usb3 to work when a coreboot payload
>    board: google: Add board_debug_uart_init() for Trogdor
>    cmd: ximg: Support LZO compressed images
>    cmd: ximg: Support LZ4 compressed images
>    configs: Add chromebook_trogdor defconfig
>    doc: chromebook_trogdor: Add document detailing installation steps
> 
>   arch/arm/cpu/armv8/Makefile                   |   1 +
>   arch/arm/cpu/armv8/coreboot/Makefile          |   4 +
>   arch/arm/cpu/armv8/coreboot/cpu.c             |  22 +
>   arch/arm/include/asm/global_data.h            |   3 +
>   arch/arm/mach-snapdragon/board.c              |  23 +
>   arch/arm/mach-snapdragon/of_fixup.c           |  22 +-
>   arch/x86/Kconfig                              |  22 -
>   arch/x86/cpu/coreboot/Kconfig                 |  33 -
>   arch/x86/cpu/coreboot/Makefile                |   1 -
>   arch/x86/cpu/coreboot/coreboot.c              |  16 +-
>   arch/x86/cpu/coreboot/sdram.c                 |  78 +--
>   arch/x86/cpu/cpu.c                            |  15 +-
>   arch/x86/cpu/i386/cpu.c                       |   2 +-
>   arch/x86/lib/bootm.c                          |   5 +-
>   arch/x86/lib/coreboot/Makefile                |   1 -
>   arch/x86/lib/coreboot/cb_support.c            |   2 +-
>   arch/x86/lib/coreboot_table.c                 |   2 +-
>   arch/x86/lib/tables.c                         |   2 +-
>   arch/x86/lib/zimage.c                         |   3 -
>   board/coreboot/coreboot/coreboot.c            |   2 +-
>   board/coreboot/coreboot/sysinfo.c             |   2 +-
>   board/google/chromebook_coral/coral.c         |   2 +-
>   board/google/trogdor/Makefile                 |   3 +
>   board/google/trogdor/debug.config             |   6 +
>   board/google/trogdor/debug_uart.c             |  41 ++
>   boot/Kconfig                                  |   1 +
>   boot/bootmeth_cros.c                          |   2 +-
>   boot/expo_build_cb.c                          |   2 +-
>   boot/fdt_support.c                            |  54 +-
>   boot/image-fdt.c                              |   4 +
>   cmd/Kconfig                                   |   4 +-
>   cmd/Makefile                                  |   1 +
>   cmd/{x86 => }/cbsysinfo.c                     |  40 +-
>   cmd/pstore.c                                  |  51 +-
>   cmd/version.c                                 |   2 +-
>   cmd/x86/Makefile                              |   1 -
>   cmd/x86/cbcmos.c                              |   2 +-
>   cmd/ximg.c                                    |  28 +
>   common/board_f.c                              |   4 +
>   configs/chromebook_trogdor_defconfig          | 138 +++++
>   doc/board/google/chromebook_trogdor.rst       |  69 +++
>   doc/board/google/index.rst                    |   1 +
>   drivers/clk/clk-stub.c                        |   1 +
>   drivers/clk/qcom/Kconfig                      |   8 +
>   drivers/clk/qcom/Makefile                     |   1 +
>   drivers/clk/qcom/clock-sc7180.c               | 153 +++++
>   drivers/clk/qcom/clock-sc7280.c               |  22 +
>   drivers/misc/cbmem_console.c                  |   2 +-
>   drivers/pinctrl/qcom/Kconfig                  |   8 +
>   drivers/pinctrl/qcom/Makefile                 |   1 +
>   drivers/pinctrl/qcom/pinctrl-sc7180.c         | 133 ++++
>   drivers/serial/serial_coreboot.c              |   2 +-
>   drivers/serial/serial_msm_geni.c              |  26 +-
>   drivers/spi/Kconfig                           |  10 +
>   drivers/spi/Makefile                          |   1 +
>   drivers/spi/spi-geni-qcom.c                   | 569 ++++++++++++++++++
>   drivers/video/coreboot.c                      |   2 +-
>   .../x86/include/asm => include}/cb_sysinfo.h  |  51 +-
>   .../include/asm => include}/coreboot_tables.h |  24 +
>   .../coreboot_timestamp.h                      |   9 +-
>   lib/Makefile                                  |   2 +
>   lib/coreboot/Kconfig                          |  55 ++
>   {arch/x86/cpu => lib}/coreboot/Makefile       |  11 +-
>   {arch/x86/lib => lib}/coreboot/cb_sysinfo.c   | 288 ++++++++-
>   {arch/x86/cpu => lib}/coreboot/sdram.c        |  25 +-
>   {arch/x86/cpu => lib}/coreboot/timestamp.c    |  15 +-
>   66 files changed, 1863 insertions(+), 273 deletions(-)
>   create mode 100644 arch/arm/cpu/armv8/coreboot/Makefile
>   create mode 100644 arch/arm/cpu/armv8/coreboot/cpu.c
>   delete mode 100644 arch/x86/cpu/coreboot/Kconfig
>   create mode 100644 board/google/trogdor/Makefile
>   create mode 100644 board/google/trogdor/debug.config
>   create mode 100644 board/google/trogdor/debug_uart.c
>   rename cmd/{x86 => }/cbsysinfo.c (93%)
>   create mode 100644 configs/chromebook_trogdor_defconfig
>   create mode 100644 doc/board/google/chromebook_trogdor.rst
>   create mode 100644 drivers/clk/qcom/clock-sc7180.c
>   create mode 100644 drivers/pinctrl/qcom/pinctrl-sc7180.c
>   create mode 100644 drivers/spi/spi-geni-qcom.c
>   rename {arch/x86/include/asm => include}/cb_sysinfo.h (86%)
>   rename {arch/x86/include/asm => include}/coreboot_tables.h (96%)
>   rename arch/x86/include/asm/arch-coreboot/timestamp.h => include/coreboot_timestamp.h (63%)
>   create mode 100644 lib/coreboot/Kconfig
>   copy {arch/x86/cpu => lib}/coreboot/Makefile (71%)
>   rename {arch/x86/lib => lib}/coreboot/cb_sysinfo.c (62%)
>   copy {arch/x86/cpu => lib}/coreboot/sdram.c (84%)
>   rename {arch/x86/cpu => lib}/coreboot/timestamp.c (83%)
> 
> 
> base-commit: 9d3f1ebaf8751f0287b5d02158cc706435f8fb19

-- 
Casey (she/they)



More information about the U-Boot mailing list