[PATCH v5 0/8] Qualcomm: implement support for GENI firmware loading

Casey Connolly casey.connolly at linaro.org
Mon Jul 14 15:13:11 CEST 2025


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 v5:
- fixed devices getting probed multiple times
- pick Stephens patch to properly enable serial clocks
- Link to v4: https://lore.kernel.org/r/20250616-geni-load-fw-v4-0-e7df44205505@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 (7):
      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 uart5 and uart7 clocks
      serial: msm-geni: implement firmware loading
      configs: qcom_*: enable QCOM_GENI where needed

Stephen Boyd (1):
      serial: msm-geni: Enable SE clk in probe

 configs/qcom_defconfig             |   1 +
 configs/qcom_ipq5424_mmc_defconfig |  69 ++---
 configs/qcom_ipq9574_mmc_defconfig |   2 +
 drivers/clk/qcom/clock-sc7280.c    |  28 ++
 drivers/i2c/Kconfig                |   2 +-
 drivers/i2c/geni_i2c.c             |  14 +-
 drivers/misc/Kconfig               |   9 +
 drivers/misc/Makefile              |   1 +
 drivers/misc/qcom_geni.c           | 580 +++++++++++++++++++++++++++++++++++++
 drivers/serial/Kconfig             |   1 +
 drivers/serial/serial_msm_geni.c   | 107 +++----
 include/soc/qcom/geni-se.h         |  36 +++
 include/soc/qcom/qup-fw-load.h     | 178 ++++++++++++
 13 files changed, 912 insertions(+), 116 deletions(-)
---
base-commit: 9805321dfdeb5225fe5c5e0721abf49c0875637e
change-id: 20250314-geni-load-fw-0eca432f489c

Casey Connolly <casey.connolly at linaro.org>



More information about the U-Boot mailing list