mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sriram Dash <quic_sriramd@quicinc.com>
Subject: Re: [PATCH v3 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P
Date: Tue, 20 Oct 2026 14:51:35 +0200	[thread overview]
Message-ID: <xhkdb33u04js8.fsf@mkorpers-koolstof.csb> (raw)
In-Reply-To: <179216539953.106618.14570496753417806206.b4-reply@b4>

On Fri, Oct 16, 2026 at 21:13, Manivannan Sadhasivam <mani@kernel.org> wrote:

> On 2026-10-16 15:14 +0200, Mattijs Korpershoek wrote:
>> Hi Mani,
>> 
>> On Fri, Oct 16, 2026 at 15:20, Manivannan Sadhasivam <mani@kernel.org> wrote:
>> 
>> > On 2026-10-02 11:41 +0200, Mattijs Korpershoek wrote:
>> >> From: Sriram Dash <quic_sriramd@quicinc.com>
>> >> 
>> >> The Qualcomm automotive SA8255p SoC relies on firmware to configure
>> >> platform resources, including clocks, interconnects and TLMM.
>> >> The driver requests resources operations over SCMI using power protocols.
>> >> 
>> >> The SCMI power protocol enables or disables resources like clocks,
>> >> interconnect paths, and TLMM (GPIOs) using runtime PM framework APIs,
>> >> such as resume/suspend, to control power on/off.
>> >> 
>> >> Power domain "core" controls the GDSC, resets, and TLMM (GPIOs)
>> >> whereas power domain "transfer" controls clocks and interconnects.
>> >> 
>> >
>> > This is not consistent with other SCMI based drivers. Most of them are using
>> > 'power' and 'perf' power domains, not 'core', 'transfer'.
>> 
>> That's correct. Krzysztof had the same concerns [1] in the binding
>> reviews. To sum up from that thread:
>> 
>> For usb PHY, 2 SCMI protocols are exposed by the firmware:
>> * power domain management protocol (protocol_id=0x11)
>> * performance domain management protocol (protocol_id=0x13)
>> 
>> The power domain has 2 indices: 'core' and 'transfer'.
>> * core controls the regulators, the clocks and the reset
>> * transfer only controls the clocks
>> 
>
> But this contradicts with your commit message:
>
> "Power domain "core" controls the GDSC, resets, and TLMM (GPIOs)
> whereas power domain "transfer" controls clocks and interconnects."

Yes, I need to update the commit message here. I should have done that
when updating the binding commit. Sorry about that.

>
>> The performance domain (0x13) exposes opaques values (0xa to 0x11)
>> for which we don't have any information.
>> 
>
> It is a shame that it is being defined as opaque values, but as long as you
> don't define it in the binding and not use it in the driver, I'm OK with it.

Ack. It's not defined in the binding and I won't use it in the driver.

>
>> >
>> > Why are these discrete powers domains be required? In my point of view, the PHY
>> > should have only one power domain for controlling power and be done with it. If
>> > you start having these fine grain controls over the resources from SCMI clients,
>> > then it defeats the purpose of the SCMI based firmware abstraction design.
>> 
>> From what I understand, thse fine-grain controls are useful for runtime
>> suspend/resume (on the Linux side).
>> For example:
>> 1. Enable 'core' power domain to enable the PHY
>> 2. Disable 'transfer' to turn of the clocks. PHY is still powered but is
>> "idle"
>> 
>> If we look at the patch, we can see that this is what's done in
>> qcom_snps_hsphy_suspend().
>> 
>> Does that clarify things?
>> 
>
> Even though the SCMI spec allows defining multiple sub-domains inside a
> protocol, I'd argue that there should only be one power domain 'power'
> controlling all resources such as clock, icc, resets etc... But in this case,
> that ship has already sailed.

I agree. Unfortunately, I can't change what the SCMI firmware exposes to me.

>
>> This is also explained in the binding [2]
>> Should I rephrase the commit message here to include that?
>> 
>
> Yes, please. Driver commit message should be independent.

Ok, will do.

>
>> >
>> >> In this variant, two disjoint sets of resources are modeled against
>> >> the power domain suppliers which can be turned on/off to achieve modeled
>> >> device states. Two modeled low power states d1 and d3 are supported.
>> >> 
>> >> transition: d0 <--> d3  :: both core and transfer suppliers
>> >> transition: d0 <--> d1  :: only transfer supplier
>> >> 
>> >
>> > What are these transition levels and who defines these? We cannot have different
>> > SCMI drivers inventing these kind of independent low power modes.
>> >
>> 
>> Maybe the naming is not as good as it should be.
>> I took this originally from a downstream qcom patch and did not change
>> it.
>> 
>> I interpret this as:
>> * d3: phy is powered off, before probe (no regulators, no clocks and in reset mode)
>> * d1: phy is in lower power mode (regulator on, no clocks, no reset)
>> * d0: phy is powered on an operational (after probe)
>> 
>
> These looks like ACPI D-states, which are neither defined in the SCMI spec, nor
> used by any other Qcom SCMI drivers. So this driver cannot just invent these
> states on its own. Just use plain wording for the function names based on the
> indices.

Ok, will do. Thank you for the suggestion.

>
>> I see that drivers/tty/serial/qcom_geni_serial.c uses a similar
>> mechanism. Should I try to follow that naming convention?
>> 
>> If you have other suggestions, I'm happy to get them.
>> 
>> Note that I can't change the power domains ('core' and 'transfer' since
>> those are enforced by the SCMI firmware)
>> 
>
> SCMI firmware don't define the power domain names, isn't it? They just define
> indices and it is up to the OS to name it however it wants.

That's correct. It's been a while I looked into it so I got confused.
However, I'd like the names to stay like this since it's how they are
defined in the binding.

>
> But if it is defined in any of the internal doc, then it is fine.
>
> - Mani

  reply	other threads:[~2026-10-20 12:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  9:41 [PATCH v3 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver Mattijs Korpershoek
2026-10-02  9:41 ` [PATCH v3 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY Mattijs Korpershoek
2026-10-02  9:41 ` [PATCH v3 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P Mattijs Korpershoek
2026-10-16  9:50   ` Manivannan Sadhasivam
2026-10-16 13:14     ` Mattijs Korpershoek
2026-10-16 15:43       ` Manivannan Sadhasivam
2026-10-20 12:51         ` Mattijs Korpershoek [this message]
2026-10-16 15:44   ` Manivannan Sadhasivam
2026-10-20 13:05     ` Mattijs Korpershoek
2026-10-15 14:24 ` [PATCH v3 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver Mattijs Korpershoek
2026-10-15 15:15   ` Manivannan Sadhasivam

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=xhkdb33u04js8.fsf@mkorpers-koolstof.csb \
    --to=mkorpershoek@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_sriramd@quicinc.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /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®