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_vdadh...@quicinc.com/ [2]: https://lore.kernel.org/u-boot/20250314-sc7280-more-clocks-v1-0-ead54487c...@linaro.org/ --- Caleb Connolly (3): i2c: geni: fix error message wording in clk_disable misc: introduce Qcom GENI wrapper i2c: geni: load firmware if required arch/arm/Kconfig | 1 + drivers/i2c/geni_i2c.c | 14 +- drivers/misc/Kconfig | 9 + drivers/misc/Makefile | 1 + drivers/misc/qcom_geni.c | 576 +++++++++++++++++++++++++++++++++++++++ drivers/serial/serial_msm_geni.c | 13 - include/soc/qcom/geni-se.h | 36 +++ include/soc/qcom/qup-fw-load.h | 178 ++++++++++++ 8 files changed, 811 insertions(+), 17 deletions(-) --- base-commit: 9805321dfdeb5225fe5c5e0721abf49c0875637e Caleb Connolly <caleb.conno...@linaro.org>