summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-10-30 08:03:02 -0600
committerTom Rini <[email protected]>2025-10-30 11:06:44 -0600
commit08bf42e1faa4411cd347c2e370da790a0116e318 (patch)
treecc953ba9176fd10d374b250a04c5457c585be6c0 /drivers/i2c
parent557606968646a5215b656e0e1e8927e1902f32bf (diff)
parent934647d49c61f9405767bd36da3bba06a40cf346 (diff)
Merge tag 'qcom-for-2026.01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
A variety of Qualcomm features/fixes for this cycle, notably with a few new platforms gaining support: * Initial support for SDM670 (similar to SDM845), SM6350, and SM7150 platforms is added * USB and UART issues on MSM8916 are addressed (improving stability/ reliability) * Firmware loading is implemented for the GENI serial engine, this is used on some platforms to load firmware for i2c/spi/uart to work Some additional patches like binman support for building MBN files still need some additional work. CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/8ef6ac07b35e39a57501554680bbf452e818d3e3/pipelines?ref=qcom-main
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/Kconfig2
-rw-r--r--drivers/i2c/geni_i2c.c14
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index bdd3c60118c..55465dc1d46 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -668,7 +668,7 @@ config SYS_I2C_QUP
config SYS_I2C_GENI
bool "Qualcomm Generic Interface (GENI) I2C controller"
- depends on ARCH_SNAPDRAGON
+ depends on ARCH_SNAPDRAGON && QCOM_GENI
help
Support for the Qualcomm Generic Interface (GENI) I2C interface.
The Generic Interface (GENI) is a firmware based Qualcomm Universal
diff --git a/drivers/i2c/geni_i2c.c b/drivers/i2c/geni_i2c.c
index eabf5c76c21..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
@@ -331,15 +332,13 @@ static int geni_i2c_disable_clocks(struct udevice *dev, struct geni_i2c_priv *ge
if (geni->is_master_hub) {
ret = clk_disable(&geni->core);
if (ret) {
- dev_err(dev, "clk_enable core failed %d\n", ret);
- return ret;
+ dev_err(dev, "clk_disable core failed %d\n", ret);
}
}
ret = clk_disable(&geni->se);
if (ret) {
- dev_err(dev, "clk_enable se failed %d\n", ret);
- return ret;
+ dev_err(dev, "clk_disable se failed %d\n", ret);
}
return 0;
@@ -501,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);