[PATCH v2 03/15] pinctrl: qcom: Add driver for sc7180

2025-02-26 Thread Stephen Boyd
Add a driver for Qualcomm's sc7180 pinctrl device (TLMM). This is largely a copy of a similar driver in U-Boot along with reference to the Linux driver to fix up the data properly. Signed-off-by: Stephen Boyd --- drivers/pinctrl/qcom/Kconfig | 7 ++ drivers/pinctrl/qcom/Mak

[PATCH v2 14/15] cmd: ximg: Support LZO compressed images

2025-02-26 Thread Stephen Boyd
Add support to decompress LZO images. Signed-off-by: Stephen Boyd --- cmd/ximg.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/cmd/ximg.c b/cmd/ximg.c index 29d7c3279b39..a6341a078019 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -14,6 +14,9 @@ #include #include

[PATCH v2 15/15] cmd: ximg: Support LZ4 compressed images

2025-02-26 Thread Stephen Boyd
Add support to decompress LZ4 images. LZ4 is used on more recent Chromebooks to store the FIT image. Signed-off-by: Stephen Boyd --- cmd/ximg.c | 13 + 1 file changed, 13 insertions(+) diff --git a/cmd/ximg.c b/cmd/ximg.c index a6341a078019..eed66c776d12 100644 --- a/cmd/ximg.c

[PATCH v2 13/15] mach-snapdragon: Support booting as a coreboot payload

2025-02-26 Thread Stephen Boyd
-off-by: Stephen Boyd --- arch/arm/mach-snapdragon/board.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index 2ef936aab757..cb3df1c2adec 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach

[PATCH v2 12/15] coreboot: Move timestamp parsing to generic place

2025-02-26 Thread Stephen Boyd
Move the timestamp code out of x86/cpu/coreboot to lib/coreboot and make it generic. This lets us migrate the timestamp table from coreboot into U-Boot's version of boot stage timing and use it on ARM based devices. --- arch/x86/cpu/coreboot/Makefile | 1 - arch/x86/cpu/coreb

[PATCH v2 11/15] coreboot: Add /firmware/coreboot node to DT

2025-02-26 Thread Stephen Boyd
Populate the firmware node with a coreboot node detailing where the coreboot tables and CBMEM area are located. Signed-off-by: Stephen Boyd --- boot/image-fdt.c | 4 ++ include/cb_sysinfo.h | 7 +++ lib/coreboot/cb_sysinfo.c | 120 ++ 3

[PATCH v2 10/15] pstore: Add pstore address from coreboot tables

2025-02-26 Thread Stephen Boyd
Set the pstore address and size based on the coreboot tables if the coreboot tables are populated. Signed-off-by: Stephen Boyd --- cmd/pstore.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/cmd/pstore.c b/cmd/pstore.c index

[PATCH v2 09/15] coreboot: Parse sku_id/fw_config from coreboot tables

2025-02-26 Thread Stephen Boyd
. Signed-off-by: Stephen Boyd --- cmd/cbsysinfo.c | 2 ++ include/cb_sysinfo.h | 4 include/coreboot_tables.h | 11 +++ lib/coreboot/cb_sysinfo.c | 15 +++ 4 files changed, 32 insertions(+) diff --git a/cmd/cbsysinfo.c b/cmd/cbsysinfo.c index ed7b50f6d0fc

[PATCH v2 07/15] cmd/cbsysinfo: Skip the CMOS 'option_table' when not present

2025-02-26 Thread Stephen Boyd
The CMOS 'option_table' isn't populated on ARM devices running coreboot. Check to see if the pointer is NULL and bail out if it is. Signed-off-by: Stephen Boyd --- cmd/x86/cbsysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/x86/cbsysinfo.c b/cmd/

[PATCH v2 08/15] cmd/cbsysinfo: Allow on ARM as well

2025-02-26 Thread Stephen Boyd
This command isn't x86 specific. Move it up one level so that it can be used on a platform that can find the coreboot table, i.e. x86 or ARM. Signed-off-by: Stephen Boyd --- cmd/Kconfig | 4 ++-- cmd/Makefile | 1 + cmd/{x86 => }/cbsysinfo.c | 0 cmd/x86/

[PATCH v2 06/15] arm: Support running U-Boot as a coreboot payload on ARM64

2025-02-26 Thread Stephen Boyd
Add a 'coreboot' cpu to armv8 that looks for the coreboot table near the top of the 4G address space. Signed-off-by: Stephen Boyd --- arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/coreboot/Makefile | 4 arch/arm/cpu/armv8/coreboot/cpu

[PATCH v2 05/15] coreboot: Move coreboot logic out of x86 to a generic place

2025-02-26 Thread Stephen Boyd
helper functions like board_get_usable_ram_top_from_coreboot(), dram_init_from_coreboot(), and dram_init_banksize_from_coreboot() so that boards can still override these common functions while also supporting booting as a coreboot payload. Signed-off-by: Stephen Boyd --- arch/x86/Kconfig

[PATCH v2 01/15] bootstd: cros: Return negative error code

2025-02-26 Thread Stephen Boyd
This should be negative EFAULT to indicate an error code. Reviewed-by: Simon Glass Signed-off-by: Stephen Boyd --- boot/bootmeth_cros.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootmeth_cros.c b/boot/bootmeth_cros.c index c7b862e512a0..d4c4ed328bd0 100644 --- a

[PATCH v2 04/15] spi: Add Qualcomm GENI SPI driver

2025-02-26 Thread Stephen Boyd
Add a SPI driver for Qualcomm's GENI hardware. Signed-off-by: Stephen Boyd --- drivers/spi/Kconfig | 10 + drivers/spi/Makefile| 1 + drivers/spi/spi-geni-qcom.c | 527 3 files changed, 538 insertions(+) create mode 100644 drivers/sp

[PATCH v2 02/15] clk: qcom: Add driver for sc7180

2025-02-26 Thread Stephen Boyd
The clks are already configured properly by coreboot on sc7180, but this is good enough to make the MMC and USB drivers work. Signed-off-by: Stephen Boyd --- drivers/clk/qcom/Kconfig| 8 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-sc7180.c | 150

[PATCH v2 00/15] Support to run U-Boot on sc7180 Trogdor Chromebooks

2025-02-26 Thread Stephen Boyd
86 as well in a different patch Stephen Boyd (15): bootstd: cros: Return negative error code clk: qcom: Add driver for sc7180 pinctrl: qcom: Add driver for sc7180 spi: Add Qualcomm GENI SPI driver coreboot: Move coreboot logic out of x86 to a generic place arm: Support running U-Boot

Re: [PATCH 00/12] Support to run U-Boot on sc7180 Trogdor Chromebooks

2025-02-26 Thread Stephen Boyd
Quoting Caleb Connolly (2025-02-26 03:04:29) > > > On 2/25/25 21:49, Stephen Boyd wrote: > > > this supposed to work in general? Should I be storing the DTB on disk so > > The SystemReady approach is that firmware provides the FDT, if you don't > pick a DTB the

Re: [PATCH 00/12] Support to run U-Boot on sc7180 Trogdor Chromebooks

2025-02-25 Thread Stephen Boyd
Quoting Caleb Connolly (2025-02-24 06:30:43) > > > >> > >> you might have some luck booting pmOS, we build depthcharge compatible > >> images for trogdor > >> > >> https://images.postmarketos.org/bpo/edge/google-trogdor/ > >> > >> There's also a generic ARM64 EFI image that should work. You may nee

Re: [PATCH 00/12] Support to run U-Boot on sc7180 Trogdor Chromebooks

2025-02-21 Thread Stephen Boyd
Quoting Caleb Connolly (2025-02-20 17:00:30) > Hi Stephen, > > On 2/20/25 20: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

Re: [PATCH 07/12] cmd/cbsysinfo: Allow on ARM as well

2025-02-21 Thread Stephen Boyd
Quoting Tom Rini (2025-02-20 17:07:21) > On Thu, Feb 20, 2025 at 12:58:49PM -0800, Stephen Boyd wrote: > > diff --git a/cmd/Kconfig b/cmd/Kconfig > > index 864b6d464ba0..0f456e3b95a2 100644 > > --- a/cmd/Kconfig > > +++ b/cmd/Kconfig > > @@ -2898,7 +2898,7 @@ menu

Re: [PATCH 05/12] arm: Support running U-Boot as a coreboot payload on ARM64

2025-02-21 Thread Stephen Boyd
Quoting Tom Rini (2025-02-20 17:07:11) > On Thu, Feb 20, 2025 at 12:58:47PM -0800, Stephen Boyd wrote: > > > Add a 'coreboot' cpu to armv8 that looks for the coreboot table near the > > top of the 4G address space. > > > > Signed-off-by: Ste

Re: [PATCH 04/12] coreboot: Move coreboot logic out of x86 to a generic place

2025-02-21 Thread Stephen Boyd
Quoting Tom Rini (2025-02-20 17:06:58) > On Thu, Feb 20, 2025 at 12:58:46PM -0800, Stephen Boyd wrote: > > > Lay the groundwork to run U-Boot as a payload on ARM coreboot based > > devices. Move the coreboot table parsing code out of arch/x86 into > > lib/coreboot. The h

[PATCH 03/12] spi: Add Qualcomm GENI SPI driver

2025-02-20 Thread Stephen Boyd
Add a SPI driver for Qualcomm's GENI hardware. Signed-off-by: Stephen Boyd --- drivers/spi/Kconfig | 10 + drivers/spi/Makefile| 1 + drivers/spi/spi-geni-qcom.c | 527 3 files changed, 538 insertions(+) create mode 100644 drivers/sp

[PATCH 01/12] clk: qcom: Add driver for sc7180

2025-02-20 Thread Stephen Boyd
The clks are already configured properly by coreboot on sc7180, but this is good enough to make the MMC and USB drivers work. Signed-off-by: Stephen Boyd --- drivers/clk/qcom/Kconfig| 8 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-sc7180.c | 150

[PATCH 11/12] bootstd: cros: Return negative error code

2025-02-20 Thread Stephen Boyd
This should be negative EFAULT to indicate an error code. Signed-off-by: Stephen Boyd --- boot/bootmeth_cros.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootmeth_cros.c b/boot/bootmeth_cros.c index c7b862e512a0..d4c4ed328bd0 100644 --- a/boot/bootmeth_cros.c +++ b

[PATCH 12/12] mach-snapdragon: Support booting as a coreboot payload

2025-02-20 Thread Stephen Boyd
-off-by: Stephen Boyd --- arch/arm/mach-snapdragon/board.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index f1319df43147..b410c2972fbd 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach

[PATCH 10/12] coreboot: Add /firmware/coreboot node to DT

2025-02-20 Thread Stephen Boyd
Populate the firmware node with a coreboot node detailing where the coreboot tables and CBMEM area are located. Signed-off-by: Stephen Boyd --- boot/image-fdt.c | 4 ++ include/cb_sysinfo.h | 2 + lib/coreboot/cb_sysinfo.c | 120 ++ 3 files

[PATCH 09/12] pstore: Add pstore address from coreboot tables

2025-02-20 Thread Stephen Boyd
Set the pstore address and size based on the coreboot tables if the coreboot tables are populated. Signed-off-by: Stephen Boyd --- cmd/pstore.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/cmd/pstore.c b/cmd/pstore.c index

[PATCH 07/12] cmd/cbsysinfo: Allow on ARM as well

2025-02-20 Thread Stephen Boyd
This command isn't x86 specific. Move it up one level so that it can be used on a platform that can find the coreboot table, i.e. x86 or ARM. Signed-off-by: Stephen Boyd --- cmd/Kconfig | 2 +- cmd/Makefile | 1 + cmd/{x86 => }/cbsysinfo.c | 0 cmd/x86/

[PATCH 08/12] coreboot: Parse sku_id/fw_config from coreboot tables

2025-02-20 Thread Stephen Boyd
. Signed-off-by: Stephen Boyd --- cmd/cbsysinfo.c | 2 ++ include/cb_sysinfo.h | 4 include/coreboot_tables.h | 11 +++ lib/coreboot/cb_sysinfo.c | 15 +++ 4 files changed, 32 insertions(+) diff --git a/cmd/cbsysinfo.c b/cmd/cbsysinfo.c index ed7b50f6d0fc

[PATCH 06/12] cmd/cbsysinfo: Skip the CMOS 'option_table' if it isn't present

2025-02-20 Thread Stephen Boyd
The CMOS 'option_table' isn't populated on ARM devices running coreboot. Check to see if the pointer is NULL and bail out if it is. Signed-off-by: Stephen Boyd --- cmd/x86/cbsysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/x86/cbsysinfo.c b/cmd/

[PATCH 04/12] coreboot: Move coreboot logic out of x86 to a generic place

2025-02-20 Thread Stephen Boyd
helper functions like board_get_usable_ram_top_from_coreboot(), dram_init_from_coreboot(), and dram_init_banksize_from_coreboot() so that boards can still override these common functions while also supporting booting as a coreboot payload. Signed-off-by: Stephen Boyd --- arch/x86/Kconfig

[PATCH 05/12] arm: Support running U-Boot as a coreboot payload on ARM64

2025-02-20 Thread Stephen Boyd
Add a 'coreboot' cpu to armv8 that looks for the coreboot table near the top of the 4G address space. Signed-off-by: Stephen Boyd --- arch/arm/Kconfig | 2 ++ arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/coreboot/Kconfig | 22 + ar

[PATCH 02/12] pinctrl: qcom: Add driver for sc7180

2025-02-20 Thread Stephen Boyd
Add a driver for Qualcomm's sc7180 pinctrl device (TLMM). This is largely a copy of a similar driver in U-Boot along with reference to the Linux driver to fix up the data properly. Signed-off-by: Stephen Boyd --- drivers/pinctrl/qcom/Kconfig | 7 ++ drivers/pinctrl/qcom/Mak

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

2025-02-20 Thread Stephen Boyd
here so I'm going to ignore that problem and assume that I can boot some Linux distro because the eMMC can be read by U-Boot and the kernel boots. Stephen Boyd (12): clk: qcom: Add driver for sc7180 pinctrl: qcom: Add driver for sc7180 spi: Add Qualcomm GENI SPI driver coreboot: Move cor