mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bartosz Golaszewski <brgl@kernel.org>,
	Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: soc: tegra: Document Nvidia Tegra modem pwrseq
Date: Wed, 27 May 2026 10:26:12 +0200	[thread overview]
Message-ID: <80e102be-04c3-4591-8e75-ddf859d3a877@kernel.org> (raw)
In-Reply-To: <CAMRc=Mf4W9hoP7FAbxQTNLaG3M9W+GmvQSMECbzzdQLU_+5D4A@mail.gmail.com>

On 27/05/2026 09:55, Bartosz Golaszewski wrote:
> On Tue, 26 May 2026 15:41:58 +0200, Svyatoslav Ryhel <clamor95@gmail.com> said:
>> вт, 26 трав. 2026 р. о 16:14 Bartosz Golaszewski <brgl@kernel.org> пише:
>>>
>>> On Tue, May 26, 2026 at 2:55 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>>>>
>>>>>>>
>>>>>>> The node attached to the pwrseq provider device should represent a real
>>>>>>> hardware component. Are the enable-gpios and power-supply lines connected
>>>>>>> to the modem package?
>>>>>>
>>>>>> Yes, enable-gpio is connected to the modem and signals that USB is set
>>>>>> and ready to work with the modem, while power-supply is an optional
>>>>>> supply connected to the modem's vbus input.
>>>>>>
>>>>>
>>>>> The modem is a hard-wired USB device? Do you implement it as a
>>>>> platform driver or a USB driver?
>>>>>
>>>>
>>>> It is not a traditional USB device. XMM6260 is an embedded modem used
>>>> in the Tegra phones, it is linked with the AP using USB line in HSIC
>>>> mode. The driver is implemented as a platform device since it does not
>>>> interacts with the exposed USB device directly, it just ensures that
>>>> USB device is properly configured and is ready for IPC.
>>>>
>>>>> Is there a connector of any kind that could be used as the HW
>>>>> component represented by the pwrseq device?
>>>>
>>>> I assume control over USB line is the HW base, but as I have said, I
>>>> can integrate binding in the modem node itself, and pwrseq can get all
>>>> it needs from the match. Pwrseq framework states "This framework is
>>>> designed to abstract complex power-up sequences that are shared
>>>> between multiple logical devices in the Linux kernel." it does not say
>>>> that it must represent some specific hardware.
>>>>
>>>
>>> No, not at all. We just can't make up any imaginary, logical "pwrseq"
>>> devices and describe them in DT bindings.
>>>
>>
>> Ye, ye, sure, pwrseq framework is quite flexible and I am not stating
>> this bindings is mandatory.
>>
>>>> Using pwrseq allows modem driver to be SoC independent since USB line
>>>> handling is moved into SoC specific power sequence, and this modem is
>>>> used in Exynos and OMAP too with similar setup but they all have
>>>> different USB controllers. Maybe you can point me where SoC specific
>>>> USB controller handling can be implemented?
>>>>
>>>
>>> I'm not sure I'm following. Can you atrephrase or point me where OMAP
>>> and Samsung implement it?
>>>
>>
>> They did not.
>>
>> The XMM6260 modem is used not only in the Tegra phones but in the OMAP
>> and Exynos based too. Replicant tried to implement support locally
>> with midas devices and they had some progress. From what I have seen
>> generic implementation I am proposing will work with any of those 3
>> SoCs maybe with some slight tweaks, only part that is totally
>> different and SoC specific is how USB controller used by the modem is
>> handled (well and IPC but that is out of scope of this patchset
>> anyway).
>>
>> Obviously, non of the 3 vendors have submitted any mainline patches,
>> everything is in the downstream forks. I have investigated a bit how
>> this modem works on my Tegra phone and re-implemented it to work with
>> mainline kernel (I don't have Exynos and OMAP devices to play with). I
>> have come up with generic platform driver which handles modem
>> configuration and a SoC specific part which performs USB controller
>> bind/probe when modem is ready to handle the USB. ATM this SoC
>> specific part is available and tested only for Tegra devices.
>>
> 
> Are you familiar with the PCI pwrctrl code that lives under
> drivers/pci/pwrctrl/? It seems to be solving a somewhat similar issue for
> PCI devices that are hardwired and powered externally. Maybe you could use
> some of that code for your USB use-case?


I pointed to PCI already:
https://lore.kernel.org/lkml/20260518-mustard-rabbit-of-ecstasy-eed3b6@quoll/

And emphasized to describe hardware, not drivers. This binding AGAIN
describes drivers, so we did not move forward at all.


Best regards,
Krzysztof

  reply	other threads:[~2026-05-27  8:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  8:51 [PATCH v2 0/2] power: sequencing: Add support for " Svyatoslav Ryhel
2026-05-23  8:51 ` [PATCH v2 1/2] dt-bindings: soc: tegra: Document " Svyatoslav Ryhel
2026-05-26  9:51   ` Bartosz Golaszewski
2026-05-26 10:03     ` Svyatoslav Ryhel
2026-05-26 11:14       ` Bartosz Golaszewski
2026-05-26 12:29         ` Svyatoslav Ryhel
2026-05-26 12:34           ` Bartosz Golaszewski
2026-05-26 12:55             ` Svyatoslav Ryhel
2026-05-26 13:14               ` Bartosz Golaszewski
2026-05-26 13:41                 ` Svyatoslav Ryhel
2026-05-27  7:55                   ` Bartosz Golaszewski
2026-05-27  8:26                     ` Krzysztof Kozlowski [this message]
2026-05-27  9:06                       ` Svyatoslav Ryhel
2026-05-27  9:15                         ` Bartosz Golaszewski
2026-05-27 10:10                           ` Svyatoslav Ryhel
2026-05-27  9:20                         ` Krzysztof Kozlowski
2026-05-27 10:12                           ` Svyatoslav Ryhel
2026-05-27  8:19   ` Krzysztof Kozlowski
2026-05-23  8:51 ` [PATCH v2 2/2] power: sequencing: Add support for " Svyatoslav Ryhel
2026-05-29 14:58 ` [PATCH v2 0/2] " Svyatoslav Ryhel

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=80e102be-04c3-4591-8e75-ddf859d3a877@kernel.org \
    --to=krzk@kernel.org \
    --cc=brgl@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@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®