mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
To: Jeff Roach <jeff.roach0@gmail.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	David Collins <david.collins@oss.qualcomm.com>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Tingguo Cheng <tingguo.cheng@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] soc: qcom: pmic_glink: Add GIO pmic_glink instance
Date: Thu, 12 Nov 2026 15:10:55 +0800	[thread overview]
Message-ID: <9d80c088-1a0e-48fc-9a24-09fa8c281cd7@oss.qualcomm.com> (raw)
In-Reply-To: <0fa09b92-3855-40b0-af6d-2c763235b15e@oss.qualcomm.com>



On 11/12/2026 9:11 AM, Fenglin Wu wrote:
> 
> 
> On 11/11/2026 9:14 PM, Jeff Roach wrote:
>> Hi Fenglin,
>>
>> I tried this series on an HP OmniBook X 16 (X2 Elite "Mahua", DT boot,
>> qcom,glymur-pmic-glink, 7.3-based kernel, firmware F.04). The RTC part
>> works: rtc-qcom-gio reads the correct UTC time.
>>
>> But UCSI breaks when pmic_glink_gio is bound, although the commit
>> message says ucsi stays on the legacy interface:
>>
>> - pmic_glink_gio loaded at boot: ucsi_glink fails with
>>   "error -ETIMEDOUT: PPM init failed", no typec ports.
>> - pmic_glink_gio blacklisted (patched pmic_glink still loaded): typec
>>   ports and partners come up, plug/unplug is seen.
>> - Same boot, then modprobe pmic_glink_gio: the RTC works and the ports
>>   stay, but UCSI no longer sees any plug or unplug (old partners stay).
>>   USB data and charging still work.
>>
>> Happy to test a fix.
>>
>> Jeff
> 
> Hi Jeff,
> 
> Thanks for testing the changes and reporting the issues.
> 
> I tested with all clients switched to use GIO interface. I confirmed
> that battmgr, UCSI, altmode worked as expected. I should also test the
> hybrid mode of only having RTC used on GIO and others left in PMIC
> Glink. I thought I didn't push those client changes so those drivers
> were not impacted and they should work as before.
> 
> I will test it this way and get back.
> 
> Thanks
> Fenglin

Hi Jeff,

My initial impression was that the SoCCP battery management firmware
might not handle this hybrid mode (GIO + legacy OPCODE) well. Enabling
the GIO alert might cause the charger firmware to select the GIO
interface over the legacy OPCODE by default. I made a simple change to
prevent the global alert from being enabled, and the issue you mentioned
was resolved at my side. This will not impact RTC driver anyway, as RTC
doesn't need to handle alert messages.

Could you try this on your side? If it works there as well, I can
discuss it with the firmware team and come up with a formal fix when
pushing next patch.


diff --git a/drivers/soc/qcom/pmic_glink_gio.c
b/drivers/soc/qcom/pmic_glink_gio.c
index 83656a5758b8..fc5dcc62b200 100644
--- a/drivers/soc/qcom/pmic_glink_gio.c
+++ b/drivers/soc/qcom/pmic_glink_gio.c
@@ -310,14 +310,14 @@ static void pmic_glink_gio_pdr_notify(void *priv,
int state)

 static void pmic_glink_gio_enable_alerts(struct pmic_glink_gio *pgio)
 {
-       __le32 data;
-       int ret;
-
-       data = cpu_to_le32(GIO_CORE_GLOBAL_ALERT_MODE_IBI |
GIO_CORE_GLOBAL_ALERT_EN_BIT);
-
-       ret = regmap_raw_write(pgio->gio->regmap,
GIO_CORE_GLOBAL_ALERT_CTRL_ADDR, &data, 4);
-       if (ret)
-               dev_err(pgio->dev, "GIO turn on global alert failed:
%d\n", ret);
+//     __le32 data;
+//     int ret;
+//
+//     data = cpu_to_le32(GIO_CORE_GLOBAL_ALERT_MODE_IBI |
GIO_CORE_GLOBAL_ALERT_EN_BIT);
+//
+//     ret = regmap_raw_write(pgio->gio->regmap,
GIO_CORE_GLOBAL_ALERT_CTRL_ADDR, &data, 4);
+//     if (ret)
+//             dev_err(pgio->dev, "GIO turn on global alert failed:
%d\n", ret);
 }

Thanks
Fenglin Wu
> 


  reply	other threads:[~2026-11-12  7:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  3:28 [PATCH 0/3] soc: qcom: Add Qualcomm PMIC GIO framework and RTC driver using it Fenglin Wu
2026-11-11  3:28 ` [PATCH 1/3] soc: qcom: Add pmic-gio GIO framework driver Fenglin Wu
2026-11-11  3:28 ` [PATCH 2/3] soc: qcom: pmic_glink: Add GIO pmic_glink instance Fenglin Wu
2026-11-11 13:14   ` Jeff Roach
2026-11-11 13:41     ` Jeff Roach
2026-11-12  1:11     ` Fenglin Wu
2026-11-12  7:10       ` Fenglin Wu [this message]
2026-11-11  3:28 ` [PATCH 3/3] rtc: Add Qualcomm GIO RTC driver Fenglin Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d80c088-1a0e-48fc-9a24-09fa8c281cd7@oss.qualcomm.com \
    --to=fenglin.wu@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andersson@kernel.org \
    --cc=david.collins@oss.qualcomm.com \
    --cc=jeff.roach0@gmail.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    --cc=tingguo.cheng@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®