misc: introduce Qcom GENI wrapper
authorCasey Connolly <casey.connolly@linaro.org>
Mon, 14 Jul 2025 13:13:14 +0000 (15:13 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 30 Oct 2025 17:04:51 +0000 (11:04 -0600)
commitb95df6ed8c21aee71b4859d9d88c6a6e32c641c8
tree152e74530c0a4529018ac7bc6fb7703fcf9452ba
parentf3e73dc94b4e9e373fd90d74a69ded9a5bb28f4d
misc: introduce Qcom GENI wrapper

Qualcomm peripherals like UART, SPI, I2C, etc are all exposed under a
common GENI Serial Engine wrapper device. Replace the stub driver we use
for this currently with a full-on misc device and implement support for
loading peripheral firmware.

Each of the peripherals has it's own protocol-specific firmware, this is
stored on the internal storage of the device with a well-known partition
type GUID.

To support this, GENI will bind peripherals in two stages. First the
ones that already have firmware loaded (such as the serial port) are
bound in the typical way. But devices that require firmware loading are
deferred until EVT_LAST_STAGE_INIT. At this point we can be sure that
the storage device is available, so we load the firmware and then bind
and probe the remaining children.

Child devices are expected to determine if firmware loading is necessary
and call qcom_geni_load_firmware().

Since Linux currently doesn't support loading firmware (and firmware may
not be available), we probe all GENI peripherals to ensure that they
always load firmware if necessary.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20250714-geni-load-fw-v5-3-5abbc0d29838@linaro.org
Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
drivers/i2c/Kconfig
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/qcom_geni.c [new file with mode: 0644]
drivers/serial/Kconfig
drivers/serial/serial_msm_geni.c
include/soc/qcom/geni-se.h
include/soc/qcom/qup-fw-load.h [new file with mode: 0644]