devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Biju Das <biju.das.jz@bp.renesas.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: "vkoul@kernel.org" <vkoul@kernel.org>,
	"kishon@kernel.org" <kishon@kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC
Date: Tue, 3 Sep 2024 13:25:21 +0300	[thread overview]
Message-ID: <fbfa9179-2f52-429f-8b69-f7f4064e796b@tuxon.dev> (raw)
In-Reply-To: <TY3PR01MB1134648BF51F1B52BFE34DD6D86932@TY3PR01MB11346.jpnprd01.prod.outlook.com>



On 03.09.2024 10:18, Biju Das wrote:
> Hi Claudiu,
> 
>> -----Original Message-----
>> From: Biju Das
>> Sent: Monday, September 2, 2024 11:48 AM
>> Subject: RE: [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC
>>
>> Hi Claudiu,
>>
>>> -----Original Message-----
>>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>>> Sent: Monday, September 2, 2024 11:41 AM
>>> Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas
>>> RZ/G3S SoC
>>>
>>>
>>>
>>> On 02.09.2024 12:18, Biju Das wrote:
>>>>>>>> Do you have any plan to control this power transitions(ALL_ON to AWO and vice versa) in linux?
>>>>>>> As you know, the RZ/G3S USB PM code is already prepared. This is
>>>>>>> also configuring these signals when going to suspend/exiting from resume.
>>>>>>> W/o configuring properly these signals the USB is not working after a suspend/resume cycle.
>>>>>> One option is to handle SYSC USB PWRRDY signal in TF-A, if you
>>>>>> plan to handle system transitions
>>>>> there??
>>>>>
>>>>> As I mentioned, the settings in these registers may be changed by
>>>>> intermediary booting
>>> applications.
>>>>> Depending on that, Linux need to control it also on probe for USB
>>>>> to work (it should be the same with PCIe, these signals seems similar from HW manual
>> description).
>>>> You mean system transition settings will be override by U-boot, so Linux needs to restore it
>> back??
>>>
>>> It was talking about booting...
>>
>> I am also referring to boot. Boot starts with TF-A and it has a system state.
>>
>>>
>>> You proposed to handle SYSC signals from TF-A in a discussion about system power transitions:
>>>
>>> "One option is to handle SYSC USB PWRRDY signal in TF-A,  if you plan to handle system transitions"
>>>
>>> (I was guessing the "system transition" statement there refers to
>>> power states transitions, ALL_ON <->
>>> AWO/VBAT)
>>
>> That is correct.
>>
>>>
>>> and I gave the booting process as a counter example: if we handle it
>>> in TF-A it may not be enough as these signals might be changed by intermediary booting applications
>> (e.g., U-Boot).
>>
>> Why should U-boot override, system state signals such as USB PWRREADY? Can you please give an example.
>>
>>>
>>> To conclude, there are 3 scenarios I see where these signals need to
>>> be
>>> handled:
>>> 1/ booting
>>> 2/ suspend to RAM
>>> 3/ driver unbind/bind
>>
>> --> It should be OK as linux is not handling USB PWRREADY signal.
>>
>>>
>>> In case of booting: if we have TF-A to set signals there might be
>>> intermediary booting applications (e.g. U-Boot) that set these signals
>>> also. If it leaves it in improper state and Linux wants to use USB then the USB will not work (if
>> Linux doesn't handle it).
>>
>> That is the problem of U-boot. U-boot should not override system state signals such as USB PWRREADY.
>>
>>>
>>> In case of suspend to RAM: as TF-A is the only application in the
>>> suspend to RAM chain, it should work handling it in TF-A.
>>
>> That is correct, TF-A should handle based on system state.
>>
>>>
>>> In case of unbind/bind: currently we don't know if these signals
>>> introduces any kind of power saving so asserting/de-asserting them in Linux may be useful from this
>> perspective, if any.
>>
>> These are system signals, according to me should not be used in unbind/bind.
>>
>> I may be wrong.
> 
> Just to add the below are the 4 system states (power mode) for this LSI.
> 
> If I understand correctly, we need to configure USB PWRRDY signal
> only when there is a transition from ALL_ON to AWO mode and vice versa.
> as you see on AWO mode only CM-33 is active.
> 
> • ALL_OFF mode: All CPUs and peripheral modules can not be worked.
> • ALL_ON mode: All CPUs and peripheral modules can be worked.
> • AWO mode: Cortex-M33 and peripheral modules in PD_VCC and PD_VBATT domain can be worked.
> • VBATT mode: Only RTC, tamper detection and backup registers can be worked.
> 
> System manager which is controlling both CA-55 and CM-33, will set USB PWRRDY signal
> based on system state.
> 
> Since we don't have system manager for controlling both CA-55 and CM-33
> Probably from CA-55 perspective, TF-A should be sufficient.
> 
> During boot clr USB PWR READY signal in TF-A.
> STR case, suspend set USB PWR READY signal in TF-A.
> STR case, resume clr USB PWR READY signal in TF-A.

As I said previously, it can be done in different ways. My point was to let
Linux set what it needs for all it's devices to work. I think the way to go
forward is a maintainer decision.

Thank you,
Claudiu Beznea

> 
> I am not expert in this area. I may be wrong.
> 
> Maybe we need to get an opinion from Power experts in Linux.
> 
> Cheers,
> Biju

  reply	other threads:[~2024-09-03 10:25 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 15:27 [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC Claudiu
2024-08-22 15:27 ` [PATCH 01/16] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Claudiu
2024-08-29 12:35   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 02/16] dt-bindings: soc: renesas: renesas,rzg2l-sysc: Add #reset-cells for RZ/G3S Claudiu
2024-08-22 16:42   ` Conor Dooley
2024-08-22 16:44     ` Conor Dooley
2024-08-23  7:59       ` claudiu beznea
2024-08-23  7:54     ` claudiu beznea
2024-08-23 16:18       ` Conor Dooley
2024-08-23 16:26         ` claudiu beznea
2024-08-23 16:33           ` Conor Dooley
2024-08-26 10:15             ` claudiu beznea
2024-08-26 17:09               ` Conor Dooley
2024-10-08 13:24   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 03/16] dt-bindings: reset: renesas,r9a08g045-sysc: Add reset IDs for RZ/G3S SYSC reset Claudiu
2024-08-22 16:45   ` Conor Dooley
2024-10-08 13:25   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 04/16] soc: renesas: Add SYSC driver for Renesas RZ/G3S Claudiu
2024-09-24 11:32   ` Geert Uytterhoeven
2024-09-25  7:50     ` claudiu beznea
2024-10-08 13:54       ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 05/16] soc: renesas: sysc: Move RZ/G3S SoC detection on SYSC driver Claudiu
2024-10-08 13:23   ` Geert Uytterhoeven
2024-10-09  8:26     ` claudiu beznea
2024-08-22 15:27 ` [PATCH 06/16] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S SoC Claudiu
2024-08-22 16:45   ` Conor Dooley
2024-10-08 14:46   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 07/16] reset: rzg2l-usbphy-ctrl: Get reset control array Claudiu
2024-08-23  7:25   ` Biju Das
2024-08-23  8:05     ` claudiu beznea
2024-08-23  8:17       ` Biju Das
2024-10-08 14:46   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 08/16] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S Claudiu
2024-08-22 16:59   ` Biju Das
2024-08-23  8:40     ` claudiu beznea
2024-08-23  8:46       ` Biju Das
2024-10-08 14:47   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 09/16] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Claudiu
2024-08-22 16:46   ` Conor Dooley
2024-10-08 14:51   ` Geert Uytterhoeven
2024-10-09  8:28     ` claudiu beznea
2024-08-22 15:27 ` [PATCH 10/16] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus Claudiu
2024-08-23  7:35   ` Biju Das
2024-08-23  8:57     ` claudiu beznea
2024-08-23  9:01       ` Biju Das
2024-08-30  8:02         ` Vinod Koul
2024-08-30  8:06           ` Biju Das
2024-10-08 14:57   ` Geert Uytterhoeven
2024-10-09  8:31     ` claudiu beznea
2024-08-22 15:27 ` [PATCH 11/16] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings Claudiu
2024-08-22 16:46   ` Conor Dooley
2024-10-08 14:58   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 12/16] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC Claudiu
2024-10-08 14:59   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 13/16] arm64: dts: renesas: Add #reset-cells to system controller node Claudiu
2024-10-08 14:59   ` Geert Uytterhoeven
2024-08-22 15:27 ` [PATCH 14/16] arm64: dts: renesas: r9a08g045: Add USB support Claudiu
2024-10-08 15:00   ` Geert Uytterhoeven
2024-08-22 15:28 ` [PATCH 15/16] arm64: dts: renesas: rzg3s-smarc: Enable " Claudiu
2024-10-08 15:16   ` Geert Uytterhoeven
2024-10-09  8:42     ` claudiu beznea
2024-08-22 15:28 ` [PATCH 16/16] arm64: defconfig: Enable RZ/G3S SYSC reset driver Claudiu
2024-10-08 15:17   ` Geert Uytterhoeven
2024-08-29 15:26 ` [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC Ulf Hansson
2024-08-30  8:22   ` claudiu beznea
2024-08-30 10:14     ` Ulf Hansson
2024-08-30 11:32       ` claudiu beznea
2024-08-31 10:32         ` Ulf Hansson
2024-09-03 10:35           ` Ulf Hansson
2024-09-03 10:58             ` claudiu beznea
2024-09-03 11:50               ` Ulf Hansson
2024-08-31  5:13     ` Biju Das
2024-09-02  7:54       ` Biju Das
2024-09-02  8:47         ` claudiu beznea
2024-09-02  8:53           ` Biju Das
2024-09-02  9:14             ` claudiu beznea
2024-09-02  9:18               ` Biju Das
2024-09-02 10:40                 ` claudiu beznea
2024-09-02 10:47                   ` Biju Das
2024-09-03  7:18                     ` Biju Das
2024-09-03 10:25                       ` claudiu beznea [this message]
2024-09-03 10:31                         ` Biju Das
2024-09-03 11:00                           ` claudiu beznea
2024-09-03 11:07                             ` Biju Das
2024-09-03 12:00                               ` Biju Das
2024-09-03 12:25                                 ` claudiu beznea
2024-09-03 12:37                                   ` Biju Das
2024-09-03 12:57                                     ` claudiu beznea
2024-09-03 13:09                                       ` Biju Das
2024-09-03 14:46                                         ` claudiu beznea
2024-09-03 15:30                                           ` Biju Das
2024-09-03 13:45                                       ` Biju Das
2024-09-03 14:48                                         ` claudiu beznea
2024-11-07 10:00                                           ` Claudiu Beznea
2024-11-07 16:22                                             ` Philipp Zabel
2024-09-03 10:19                     ` claudiu beznea
2024-09-02  8:28       ` claudiu beznea
2024-08-30  8:10 ` (subset) " Vinod Koul

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=fbfa9179-2f52-429f-8b69-f7f4064e796b@tuxon.dev \
    --to=claudiu.beznea@tuxon.dev \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).