linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de,
	geert+renesas@glider.be, magnus.damm@gmail.com,
	gregkh@linuxfoundation.org, mturquette@baylibre.com,
	sboyd@kernel.org, yoshihiro.shimoda.uh@renesas.com,
	biju.das.jz@bp.renesas.com, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@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:58:15 +0300	[thread overview]
Message-ID: <da4c57ff-de2b-418f-ba2c-e83c1d399b94@tuxon.dev> (raw)
In-Reply-To: <CAPDyKFpLnREr4C=wZ7o8Lb-CZbQa4Nr2VTuYdZHZ26Rcb1Masg@mail.gmail.com>



On 03.09.2024 13:35, Ulf Hansson wrote:
> On Sat, 31 Aug 2024 at 12:32, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> [...]
>>
>>>>
>>>> If not, there are two other options that can be considered I think.
>>>> *) Using the genpd on/off notifiers, to really allow the consumer
>>>> driver of the reset-control to know when the PM domain gets turned
>>>> on/off.
>>>> **) Move the entire reset handling into the PM domain provider, as it
>>>> obviously knows when the domain is getting turned on/off.
>>>
>>> This option is what I've explored, tested on my side.
>>>
>>> I explored it in 2 ways:
>>>
>>> 1/ SYSC modeled as an individual PM domain provider (this is more
>>>    appropriate to how HW manual described the hardware) with this the PHY
>>>    reset DT node would have to get 2 PM domains handlers (one for the
>>>    current PM domain provider and the other one for SYSC):
>>>
>>> +               phyrst: usbphy-ctrl@11e00000 {
>>> +                       compatible = "renesas,r9a08g045-usbphy-ctrl";
>>> +                       reg = <0 0x11e00000 0 0x10000>;
>>> +                       clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>;
>>> +                       resets = <&cpg R9A08G045_USB_PRESETN>;
>>> +                       power-domain-names = "cpg", "sysc";
>>> +                       power-domains = <&cpg R9A08G045_PD_USB_PHY>, <&sysc
>>> R9A08G045_SYSC_PD_USB>;
>>> +                       #reset-cells = <1>;
>>> +                       status = "disabled";
>>> +
>>> +                       usb0_vbus_otg: regulator-vbus {
>>> +                               regulator-name = "vbus";
>>> +                       };
>>> +               };
>>> +
>>
>> According to what you have described earlier/above, modelling the SYSC
>> as a PM domain provider seems like a better description of the HW to
>> me. Although, as I said earlier, if you prefer the reset approach, I
>> would not object to that.
> 
> Following the discussion I believe I should take this back. If I
> understand correctly, SYSC signal seems best to be modelled as a
> reset.
> 
>  Although, it looks like the USB PM domain provider should rather be
> the consumer of that reset, instead of having the reset being consumed
> by the consumers of the USB PM domain.

The PM domain provider for USB is the provider for the rest of IPs. To work
like this the SYSC these signals should be handled in the USB domains power
on/off function. It's not impossible to have it implemented like this but
it will complicate a bit the code, AFAICT. This will not describe the
hardware, also.

With the information that we had up to yesterday, the connection b/w HW
blocks was something as follows:

                 USB area
              +--------------------------+
      sig     | PHY -> USB controller X  |
SYSC -------->|  ^                       |
              |  |                       |
              | PHY reset                |
              +--------------------------+

In this implementation the SYSC signal was connected to PHY reset block as
it is the root of the devices used in the USB setup and no USB
functionality can exist w/o the PHY reset being setup.

There is a new information arrived just yesterday from hardware team saying
this about SYSC signals: "When turning off USB PHY and PCIe PHY, if they
are not controlled, PHY may break" which may means that it is just
connected to the PHYs not to the USB area/region or PCIe area/region as
initially expressed in HW manual.

With that the HW connection b/w the USB devices and SYSC might become
something like:

                 USB area
              +--------------------------+
     sig   +--->PHY -> USB controller X  |
SYSC ------+  |  ^                       |
              |  |                       |
              | PHY reset                |
              +--------------------------+

I haven't got the chance to test this topology, though.

With this new information would you be OK to still have it as a reset
signal and connected only to the PHY driver ?

Thank you,
Claudiu Beznea

> 
> Did that make sense?
> 
> [...]
> 
> Kind regards
> Uffe


  reply	other threads:[~2024-09-03 11:04 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 [this message]
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
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=da4c57ff-de2b-418f-ba2c-e83c1d399b94@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).