All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/9] Qualcomm: implement support for GENI firmware loading
@ 2025-06-16  9:44 Casey Connolly
  2025-06-16  9:44 ` [PATCH v4 1/9] configs: run savedefconfig on qcom_ipq5424_mmc_defconfig Casey Connolly
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Casey Connolly @ 2025-06-16  9:44 UTC (permalink / raw)
  To: Heiko Schocher, Tom Rini, Rayagonda Kokatanur, Neil Armstrong,
	Sumit Garg, Casey Connolly
  Cc: u-boot, u-boot-qcom, Casey Connolly

The GENI block on Qualcomm platforms contains many Serial Engines (SEs),
these are general purpose hardware blocks capable of implementing any
low speed protocol (UART, SPI, I2C, etc).

The protocol implementation is provided in the form of firmware which is
programmed in to the peripheral, typically by the EDK2 bootloader. Up
until now we have primarily been chainloading U-Boot, and therefore
haven't had to deal with this problem.

However, when running U-Boot as the primary bootloader it is necessary
to handle loading and writing the firmware.

Support for doing this in Linux is also in progress [1], this series is
largely based on that one, however the Linux patches expect the firmware
to be provided in /lib/firmware, and will only exist on newer kernels.

Since we may want to use peripheral (e.g. EEPROM) inside U-Boot it is
still useful to implement firmware loading in U-Boot.

The approach taken here is to bind all peripheral devices which don't
need firmware loading (e.g. the serial port), then wait until
EVT_LAST_STAGE_INIT to handle loading the firmware from storage and
probing the remaining peripherals. We forcefully probe them so that they
will trigger firmware loading and will be available to Linux.

For testing on the RB3 Gen 2 [2] is needed so that the i2c peripherals
can be probed.

[1]: https://lore.kernel.org/linux-arm-msm/20250303124349.3474185-1-quic_vdadhani@quicinc.com/
[2]: https://lore.kernel.org/u-boot/20250314-sc7280-more-clocks-v1-0-ead54487c38e@linaro.org/

---
Changes in v4:
- Regenerate qcom_ipq5424_mmc_defconfig
- Adjust Kconfig so that peripheral drivers express their dependency on QCOM_GENI for firmware loading and update the defconfig
- Add fw loading for UART (e.g. bluetooth) and SPI
- Link to v3: https://lore.kernel.org/r/20250613-geni-load-fw-v3-0-be778b3b101b@linaro.org

Changes in v3:
- Replace printf() with pr_XXX() in geni SE driver
- Add firmware loading for UART as well
- Link to v2: https://lore.kernel.org/r/20250610-geni-load-fw-v2-0-7cad6bc18db0@linaro.org

Changes in v2:
- Use GENI_SE_INVALID_PROTO in geni_i2c instead of 0xff
- Fix typo
- Link to v1: https://lore.kernel.org/r/20250314-geni-load-fw-v1-0-587f25f2812f@linaro.org

---
Casey Connolly (9):
      configs: run savedefconfig on qcom_ipq5424_mmc_defconfig
      i2c: geni: fix error message wording in clk_disable
      misc: introduce Qcom GENI wrapper
      i2c: geni: load firmware if required
      clk/qcom: sc7280: add uart7 clocks
      serial: msm-geni: implement firmware loading
      WIP: rb3gen2: describe micro-usb port
      spi: geni: load firmware if required
      configs: qcom_*: enable QCOM_GENI where needed

 configs/chromebook_trogdor_defconfig            |   2 +-
 configs/qcom_defconfig                          |   3 +-
 configs/qcom_ipq5424_mmc_defconfig              |  69 +--
 configs/qcom_ipq9574_mmc_defconfig              |   2 +
 drivers/clk/qcom/clock-sc7280.c                 |   6 +
 drivers/i2c/Kconfig                             |   2 +-
 drivers/i2c/geni_i2c.c                          |  14 +-
 drivers/misc/Kconfig                            |   9 +
 drivers/misc/Makefile                           |   1 +
 drivers/misc/qcom_geni.c                        | 578 ++++++++++++++++++++++++
 drivers/serial/Kconfig                          |   1 +
 drivers/serial/serial_msm_geni.c                |  81 ++--
 drivers/spi/Kconfig                             |   2 +-
 drivers/spi/spi-geni-qcom.c                     |   8 +
 dts/upstream/src/arm64/qcom/qcs6490-rb3gen2.dts |  17 +
 include/soc/qcom/geni-se.h                      |  36 ++
 include/soc/qcom/qup-fw-load.h                  | 178 ++++++++
 17 files changed, 904 insertions(+), 105 deletions(-)
---
base-commit: 9805321dfdeb5225fe5c5e0721abf49c0875637e
change-id: 20250314-geni-load-fw-0eca432f489c

Casey Connolly <casey.connolly@linaro.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-06-18 18:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  9:44 [PATCH v4 0/9] Qualcomm: implement support for GENI firmware loading Casey Connolly
2025-06-16  9:44 ` [PATCH v4 1/9] configs: run savedefconfig on qcom_ipq5424_mmc_defconfig Casey Connolly
2025-06-16 16:21   ` Tom Rini
2025-06-16  9:44 ` [PATCH v4 2/9] i2c: geni: fix error message wording in clk_disable Casey Connolly
2025-06-16  9:44 ` [PATCH v4 3/9] misc: introduce Qcom GENI wrapper Casey Connolly
2025-06-16  9:44 ` [PATCH v4 4/9] i2c: geni: load firmware if required Casey Connolly
2025-06-16  9:44 ` [PATCH v4 5/9] clk/qcom: sc7280: add uart7 clocks Casey Connolly
2025-06-16  9:44 ` [PATCH v4 6/9] serial: msm-geni: implement firmware loading Casey Connolly
2025-06-16  9:44 ` [PATCH v4 7/9] WIP: rb3gen2: describe micro-usb port Casey Connolly
2025-06-17  9:49   ` Sumit Garg
2025-06-18 18:05     ` Casey Connolly
2025-06-16  9:44 ` [PATCH v4 8/9] spi: geni: load firmware if required Casey Connolly
2025-06-16  9:44 ` [PATCH v4 9/9] configs: qcom_*: enable QCOM_GENI where needed Casey Connolly

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.