diff options
| author | Casey Connolly <[email protected]> | 2025-07-14 15:13:15 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-30 11:04:51 -0600 |
| commit | 10f28bc7ae0ca039970f760493fb8719300f0479 (patch) | |
| tree | b97d561862cdb1486dcb2169dcbce9d0d0190e03 | |
| parent | b95df6ed8c21aee71b4859d9d88c6a6e32c641c8 (diff) | |
i2c: geni: load firmware if required
Load firmware for the peripheral if necessary.
Signed-off-by: Casey Connolly <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
| -rw-r--r-- | drivers/i2c/geni_i2c.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/geni_i2c.c b/drivers/i2c/geni_i2c.c index 4eb41ba852f..d29e00fdf41 100644 --- a/drivers/i2c/geni_i2c.c +++ b/drivers/i2c/geni_i2c.c @@ -22,6 +22,7 @@ #include <reset.h> #include <time.h> #include <soc/qcom/geni-se.h> +#include <soc/qcom/qup-fw-load.h> #define SE_I2C_TX_TRANS_LEN 0x26c #define SE_I2C_RX_TRANS_LEN 0x270 @@ -499,6 +500,13 @@ static int geni_i2c_probe(struct udevice *dev) proto &= FW_REV_PROTOCOL_MSK; proto >>= FW_REV_PROTOCOL_SHFT; + if (proto == GENI_SE_INVALID_PROTO) { + qcom_geni_load_firmware(geni->base, dev); + proto = readl(geni->base + GENI_FW_REVISION_RO); + proto &= FW_REV_PROTOCOL_MSK; + proto >>= FW_REV_PROTOCOL_SHFT; + } + if (proto != GENI_SE_I2C) { dev_err(dev, "Invalid proto %d\n", proto); geni_i2c_disable_clocks(dev, geni); |
