devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Nikunj Kela <quic_nkela@quicinc.com>,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	"Prasad Sodagudi (QUIC)" <quic_psodagud@quicinc.com>,
	srinivas.kandagatla@linaro.org, vincent.guittot@linaro.org,
	ulf.hansson@linaro.org
Subject: Re: DT Query on "New Compatible vs New Property"
Date: Wed, 24 Jan 2024 16:06:23 +0530	[thread overview]
Message-ID: <20240124103623.GJ4906@thinkpad> (raw)
In-Reply-To: <74b9b07c-dd28-4825-b367-d702a1adfb0d@linaro.org>

On Wed, Jan 24, 2024 at 10:40:53AM +0100, Krzysztof Kozlowski wrote:
> On 24/01/2024 10:27, Manivannan Sadhasivam wrote:
> > On Wed, Jan 24, 2024 at 10:01:05AM +0100, Krzysztof Kozlowski wrote:
> >> On 24/01/2024 09:53, Manivannan Sadhasivam wrote:
> >>> On Wed, Jan 24, 2024 at 09:45:05AM +0100, Krzysztof Kozlowski wrote:
> >>>> On 24/01/2024 09:39, Manivannan Sadhasivam wrote:
> >>>>> On Wed, Jan 24, 2024 at 09:02:16AM +0100, Krzysztof Kozlowski wrote:
> >>>>>> On 23/01/2024 17:12, Manivannan Sadhasivam wrote:
> >>>>>>> On Thu, Dec 14, 2023 at 07:18:25AM -0800, Nikunj Kela wrote:
> >>>>>>>>
> >>>>>>>> On 12/13/2023 11:49 PM, Krzysztof Kozlowski wrote:
> >>>>>>>>> On 14/12/2023 07:17, Manivannan Sadhasivam wrote:
> >>>>>>>>>> On Tue, Dec 12, 2023 at 11:06:42AM -0800, Nikunj Kela wrote:
> >>>>>>>>>>> + Linaro team
> >>>>>>>>>>>
> >>>>>>>>>>> On 12/12/2023 11:01 AM, Krzysztof Kozlowski wrote:
> >>>>>>>>>>>> On 12/12/2023 18:45, Nikunj Kela wrote:
> >>>>>>>>>>>>> We are abstracting some resources(ex. clocks) under new firmware on an
> >>>>>>>>>>>>> existing platform therefore need to make changes in certain drivers to
> >>>>>>>>>>>>> work with that firmware. We need to make a distinction between two
> >>>>>>>>>>>>> different variants of the FW. In one case, some resources will be
> >>>>>>>>>>>>> abstracted while in other case, they won't be abstracted. My query is -
> >>>>>>>>>>>>> "should we define a new compatible string for the variant with
> >>>>>>>>>>>>> abstracted resources(in FW) or we should add a new DT property keeping
> >>>>>>>>>>>>> the compatible same?"
> >>>>>>>>>>>> Hi,
> >>>>>>>>>>>>
> >>>>>>>>>>>> Usually change in the interface or behavior warrants new compatible.
> >>>>>>>>>>>> Property would be suitable if the same device, e.g. same SoC component
> >>>>>>>>>>>> with same FW, was configured differently on different boards.
> >>>>>>>>>>>>
> >>>>>>>>>> Here, the hardware is going to be the same, but the resources (clocks,
> >>>>>>>>>> regulators, etc...) will be controlled by the firmware instead of OS.
> >>>>>>>>> Yeah, that's the problem with generic questions, instead of specific...
> >>>>>>>>> "Talk is cheap."
> >>>>>>>>>
> >>>>>>>>> OK, so the hardware is exactly the same? Does FW bring any
> >>>>>>>>> incompatibilities in the interface or is it just about the clocks? I
> >>>>>>>>> guess I should not have included "with same FW" in my last statement.
> >>>>>>>>> It's true, but way too narrow. Therefore let me rephrase it:
> >>>>>>>>
> >>>>>>>> HW is exactly the same. Let me give more insight on the setup. We have been
> >>>>>>>> using the HW in virtual environment but now the ownership of certain
> >>>>>>>> resources (e.g. clock controller etc.) is handed over to a different VM(non
> >>>>>>>> Linux VM). Earlier the ownership of the resources was local to the same
> >>>>>>>> VM(Linux VM) via passthrough mode so it could directly access them however
> >>>>>>>> now Linux VM talks to non-Linux VM for its operations for resources that it
> >>>>>>>> doesn't own anymore via some interface(shared memory/doorbell).  So shall we
> >>>>>>>> use property like 'qcom, controlled-remotely' or do we need a new compatible
> >>>>>>>> for such setup?
> >>>>>>>>
> >>>>>>>
> >>>>>>> Krzysztof, just a ping on this thread.
> >>>>>>>
> >>>>>>> To summarise, the hardware is exactly same. We can consider the case of UFS. The
> >>>>>>> UFS controller is exactly same in this proposed setup but the resources of the
> >>>>>>> UFS controller are taken care by the VM. So instead of enabling the resources
> >>>>>>> one by one, Linux kernel will just ask the VM to do so using an SCMI command.
> >>>>>>>
> >>>>>>> Due to this difference, we need to make the changes in the UFS controller
> >>>>>>> driver. So we want to know if we can use a different compatible for the UFS
> >>>>>>> controller altogether in DT (this will allow Linux kernel to have a separate
> >>>>>>> driver and will simplify things) or just use a property like
> >>>>>>> "remotely-controlled" to let the driver detect this setup and take action
> >>>>>>> accordingly.
> >>>>>>
> >>>>>> What devices do we talk about? Are they released? For which other
> >>>>>> devices you want to use it?
> >>>>>
> >>>>> If you are referring to "peripherals" as "devices", then this new interface is
> >>>>> going to be applicable to most of the peripherals in the SoC like PCIe, UFS, USB
> >>>>> etc...
> >>>>>
> >>>>
> >>>> And what about SoCs and final products?
> >>>>
> >>>
> >>> Sorry, I don't understand what you mean. This interface is still under
> >>> development and going to be available in future SoCs. At that time, we need
> >>> changes to the drivers to adapt to this interface.
> >>
> >> Hm, confused... The message was saying: the same hardware. Same hardware
> >> means for example Qualcomm SM8550 SoC.
> >>
> > 
> > Same hardware means all the peripherals are same as of previous gen SoCs apart
> > from usual improvements. Maybe I confused you by saying that this interface is
> > only applicable for newer SoCs, that is not accurate.
> > 
> > So for instance, even if you take SM8550, Qcom can use this interface (VM) and
> > ship it to a customer. The VM is just part of the bootloader package. So if the
> > VM is shipped with an SoC, then Linux should not try to handle resources for the
> > peripherals and instead request VM to do so using the SCMI interface. Much like
> > how ACPI behaves in the x86 world. But how the OS should be made aware of the
> > presence of VM is the question here. Qcom likes to convey that information using
> > DT.
> 
> So this is not an existing SoC? Then why do you need to change the
> meaning of compatible? You have new compatible.
> 

Let me put it this way: Qcom wants to use a VM to control the clocks, regulator,
PHY for the controllers in the SoC that is already out there in the market.
They will just change the bootloader to include the VM and the VM will take
control of the resources. All the resources will be specified in the DT as it is
for the affected controllers.

Right now, the device drivers in the OS are controlling the above mentioned
resources. Can Qcom use DT to convey this information to the OS? So that the
device drivers in the OS can use SCMI interface to manage the resources with the
help of VM. Otherwise, if OS tries to control the resources as usual, it may
result in some access violation.

- Mani

> > 
> >> OK, I think we are way past possible theoretical discussions. Please
> >> send patches and we will discuss it from there.
> >>
> > 
> > Well, this decision (whether to use a different compatible or a property)
> > impacts all the peripheral teams inside Qcom as the driver update heavily
> > depends on this decision. So let's try to conclude the decision here itself.
> > If something is not clear, please say as you said above. I'll try my best to
> > clarify.
> 
> Then again - list exact existing SoCs which will be affected. If this is
> for future SoCs, then why we are even discussing this? Everything
> started - first sentence! - with:
> "existing platform"
> 
> Sorry guys, I am getting more and more confused.
> 
> Best regards,
> Krzysztof
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2024-01-24 10:36 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 17:45 DT Query on "New Compatible vs New Property" Nikunj Kela
2023-12-12 19:01 ` Krzysztof Kozlowski
2023-12-12 19:06   ` Nikunj Kela
2023-12-14  6:17     ` Manivannan Sadhasivam
2023-12-14  7:49       ` Krzysztof Kozlowski
2023-12-14 15:18         ` Nikunj Kela
2024-01-23 16:12           ` Manivannan Sadhasivam
2024-01-24  8:02             ` Krzysztof Kozlowski
2024-01-24  8:39               ` Manivannan Sadhasivam
2024-01-24  8:45                 ` Krzysztof Kozlowski
2024-01-24  8:53                   ` Manivannan Sadhasivam
2024-01-24  9:01                     ` Krzysztof Kozlowski
2024-01-24  9:27                       ` Manivannan Sadhasivam
2024-01-24  9:40                         ` Krzysztof Kozlowski
2024-01-24 10:36                           ` Manivannan Sadhasivam [this message]
2024-01-24 10:23             ` Sudeep Holla
2024-01-24 10:45               ` Manivannan Sadhasivam
2024-01-24 11:02                 ` Sudeep Holla
2024-01-24 12:27                   ` Nikunj Kela
2024-01-24 12:48                     ` Sudeep Holla
2024-01-24 13:17                       ` Nikunj Kela
2024-01-24 13:38                         ` Vincent Guittot
2024-01-24 14:04                           ` Sudeep Holla
2024-01-24 14:28                             ` Nikunj Kela
2024-01-24 17:24                               ` Sudeep Holla
2024-01-24 17:33                                 ` Nikunj Kela
2024-02-26 14:22                                   ` Nikunj Kela
2024-02-28 13:27                                     ` Ulf Hansson
2024-02-28 14:02                                       ` Sudeep Holla
2024-02-28 14:20                                         ` Krzysztof Kozlowski
2024-02-28 16:09                                           ` Sudeep Holla
2024-02-28 16:22                                             ` Ulf Hansson
2024-02-28 17:11                                               ` Srinivas Kandagatla
2024-03-01 11:53                                                 ` Ulf Hansson
2024-03-04 11:01                                                   ` Sudeep Holla
2024-03-12 16:52                                                     ` Nikunj Kela
2024-03-12 16:58                                                       ` Trilok Soni
2024-03-12 17:08                                                         ` Nikunj Kela
2024-03-12 17:21                                                         ` Srinivas Kandagatla
2024-03-12 17:25                                                           ` Trilok Soni
2024-03-13  9:19                                                             ` Ulf Hansson
2024-03-13  9:31                                                               ` Nikunj Kela
2024-03-13 11:21                                                               ` Srinivas Kandagatla
2024-03-13 11:49                                                             ` Srinivas Kandagatla
2024-03-13 22:40                                                               ` Trilok Soni
2024-04-10 16:53                                                                 ` Nikunj Kela
2024-04-11  9:29                                                                   ` Sudeep Holla
2024-03-13 11:04                                                       ` Sudeep Holla
2024-03-13 13:04                                                         ` Srinivas Kandagatla
2024-03-14 10:55                                                           ` Sudeep Holla
2024-03-14 12:35                                                             ` Nikunj Kela
2024-03-14 15:38                                                               ` Sudeep Holla
2024-03-16 19:30                                                                 ` Trilok Soni
2024-03-19 10:17                                                                   ` Srinivas Kandagatla
2024-03-19 12:00                                                                     ` Sudeep Holla
2024-03-19 14:40                                                                       ` Srinivas Kandagatla
2024-03-19 15:17                                                                         ` Sudeep Holla
2024-03-19 15:41                                                                           ` Srinivas Kandagatla
2024-03-19 16:13                                                                             ` Sudeep Holla
2024-04-10 16:55                                                                               ` Nikunj Kela
2024-04-10 17:13                                                                                 ` Krzysztof Kozlowski
2024-04-10 17:24                                                                                   ` Nikunj Kela
2024-04-11 15:44                                                                                     ` Conor Dooley
2024-04-11 15:55                                                                                       ` Nikunj Kela
2024-04-11 19:29                                                                                         ` Krzysztof Kozlowski
2024-04-12 10:16                                                                                           ` Sudeep Holla
2024-04-11  9:23                                                                                 ` Sudeep Holla
2024-04-11 15:59                                                                                   ` Nikunj Kela
2024-04-12 10:12                                                                                     ` Sudeep Holla
2024-01-24 14:01                         ` Sudeep Holla

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=20240124103623.GJ4906@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=quic_nkela@quicinc.com \
    --cc=quic_psodagud@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).