From: Mark Brown <broonie@kernel.org>
To: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
David Collins <david.collins@oss.qualcomm.com>,
Subbaraman Narayanamurthy
<subbaraman.narayanamurthy@oss.qualcomm.com>,
Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
Maulik Shah <maulik.shah@oss.qualcomm.com>,
kernel@oss.qualcomm.com, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/4] soc: qcom: rpmh: Allow non-child devices to issue write commands
Date: Wed, 1 Jul 2026 12:33:15 +0100 [thread overview]
Message-ID: <42a439e0-e254-4604-af35-c847bd30bdff@sirena.org.uk> (raw)
In-Reply-To: <e807f4c1-b489-428d-a29e-186fc64eb542@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
On Wed, Jul 01, 2026 at 10:43:01AM +0800, Fenglin Wu wrote:
> Qcom PMH0101 includes bi-directional level-shifter (BIDIR_LVL_SHIFTER)
> modules that act as open-drain voltage translators, mainly to support
> 1.2 to 1.8V voltage translation on the I2C bus between the SoC with 1.2V
> IOs and other I2C clients with 1.8V IOs. Each module shares two physical
> pins with two GPIO modules, and control of the BIDIR_LVL_SHIFTER module
> is centralized on the AOP side with 'XOB' resources so it can be shared
> between different subsystems.
> When a BIDIR_LVL_SHIFTER is enabled, it needs to send RPMh commands to
> enable it and SPMI commands to disable the related two GPIO modules, to
> make sure their circuitry does not interfere with it. For now, the
> suggestion is to write a new driver for BIDIR_LVL_SHIFTER and place it
> as a child of the rpmh_rsc device, and refer to pinstate nodes to
> disable these two GPIO modules. However, we are now facing a difficulty
> in deciding which subsystem the new driver should belong to. We expected
> that the new driver should provide following capabilities:
To the extent any of this is comprehensible (I don't know what things
like AOP, XOB and so on are) nothing about this is screaming regulator.
It sounds like you just want to turn on and off a device to make the bus
you're talking through work?
> 1. Enable and disable the level-shifter at runtime. Consumers, likely
> I2C client devices, will enable it when active and disable it when not,
> mainly to save power.
> 2. Allow sharing the level-shifter between multiple consumers, even
> across different subsystems (currently managed by AOP).
> Following are the approaches that we are considered, and it seems only a
> regulator device could satisfy the requirement the best but we want to
> check with you if you are fine to put it in the regulator framework.
Why would this be a regulator? It's not providing power to anything
which is a fairly key element of being a regulator, it fits about as
well with clocks (which also provide reference counting which is AFAICT
what you're looking for here). You'll have a hard time writing DTs for
this that actually refelect the hardware I think. Possibly it's a power
domain (or a resource controlled by a power domain, I know they manage
clocks and regulators)?
Possibly work out a DT binding for this and then work back from there.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-07-01 11:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 1:05 [PATCH v2 0/4] pinctrl: qcom: spmi-gpio: Add bidirectional level-shifter function support Fenglin Wu
2026-05-29 1:05 ` [PATCH v2 1/4] soc: qcom: rpmh: Allow non-child devices to issue write commands Fenglin Wu
2026-05-29 1:45 ` sashiko-bot
2026-06-01 8:48 ` Bartosz Golaszewski
2026-06-01 13:37 ` Dmitry Baryshkov
2026-06-02 7:29 ` Fenglin Wu
2026-06-04 2:02 ` Fenglin Wu
2026-06-07 21:21 ` Dmitry Baryshkov
2026-06-09 1:28 ` Fenglin Wu
2026-06-11 10:36 ` Konrad Dybcio
2026-06-12 0:27 ` Dmitry Baryshkov
2026-06-18 6:39 ` Fenglin Wu
2026-06-30 14:28 ` Konrad Dybcio
2026-06-30 14:37 ` Mark Brown
2026-07-01 2:43 ` Fenglin Wu
2026-07-01 11:33 ` Mark Brown [this message]
2026-05-29 1:05 ` [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add level-shifter function Fenglin Wu
2026-05-29 2:01 ` sashiko-bot
2026-05-30 10:29 ` Krzysztof Kozlowski
2026-06-01 5:00 ` Fenglin Wu
2026-06-01 11:30 ` Krzysztof Kozlowski
2026-06-02 7:14 ` Fenglin Wu
2026-05-29 1:05 ` [PATCH v2 3/4] pinctrl: qcom: spmi-gpio: Rearchitect for flexible group support Fenglin Wu
2026-05-30 10:31 ` Krzysztof Kozlowski
2026-06-01 5:17 ` Fenglin Wu
2026-05-29 1:05 ` [PATCH v2 4/4] pinctrl: qcom: spmi-gpio: Add level-shifter function support Fenglin Wu
2026-05-29 3:15 ` sashiko-bot
2026-05-29 20:25 ` [PATCH v2 0/4] pinctrl: qcom: spmi-gpio: Add bidirectional " Linus Walleij
2026-06-01 5:18 ` 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=42a439e0-e254-4604-af35-c847bd30bdff@sirena.org.uk \
--to=broonie@kernel.org \
--cc=andersson@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david.collins@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=fenglin.wu@oss.qualcomm.com \
--cc=kamal.wadhwa@oss.qualcomm.com \
--cc=kernel@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maulik.shah@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=subbaraman.narayanamurthy@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