[PATCH] spmi: msm: correct mac_channels for v5 controllers

Caleb Connolly caleb.connolly at linaro.org
Mon Jun 24 04:23:29 CEST 2024


Commit ee1d8aa5ecf7 ("spmi: msm: support controller version 7") broke
support for channels > 128 on v5 controllers, resulting in some
peripherals (like the power button / pon) working but others (like
gpios) reading bogus data.

Correct max_channels for v5 controllers.

Fixes: ee1d8aa5ecf7 ("spmi: msm: support controller version 7")
Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
---
 drivers/spmi/spmi-msm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 58c676423f40..49aad439648f 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -270,9 +270,9 @@ static int msm_spmi_probe(struct udevice *dev)
 		priv->max_channels = SPMI_MAX_CHANNELS;
 	} else if (hw_ver < PMIC_ARB_VERSION_V7_MIN) {
 		priv->arb_ver = V5;
 		priv->arb_chnl = core_addr + APID_MAP_OFFSET_V5;
-		priv->max_channels = SPMI_MAX_CHANNELS;
+		priv->max_channels = SPMI_MAX_CHANNELS_V5;
 		priv->spmi_cnfg = dev_read_addr_name(dev, "cnfg");
 	} else {
 		/* TOFIX: handle second bus */
 		priv->arb_ver = V7;
-- 
2.45.0



More information about the U-Boot mailing list