mbox series

[RFC,0/3] Support VBUSEN selection control for RZ/G2L

Message ID 20230518155649.516346-1-biju.das.jz@bp.renesas.com
Headers show
Series Support VBUSEN selection control for RZ/G2L | expand

Message

Biju Das May 18, 2023, 3:56 p.m. UTC
This patch series aims to add support for VBUSEN selection control for
RZ/G2L alike SoCs.

As per RZ/G2L HW(Rev.1.30 May2023) manual, VBUSEN can be controlled by
the Port Power bit of the EHCI/OHCI operational register or by the VBOUT
bit of the VBUS Control Register.

A reset consumer(phy-rcar-gen3-usb2) needs to find the reset controller
device and then call the provider(reset-rzg2l-usbphy-ctrl) to configure
it.

Please share your thoughts on this patch series.

Biju Das (3):
  reset: Add reset_controller_get_dev()
  reset: renesas: Add rzg2l_usbphy_ctrl_select_vbus_ctrl()
  phy: renesas: phy-rcar-gen3-usb2: Control VBUSEN selection

 drivers/phy/renesas/phy-rcar-gen3-usb2.c |  9 ++++++++
 drivers/reset/core.c                     | 14 ++++++++++++
 drivers/reset/reset-rzg2l-usbphy-ctrl.c  | 27 ++++++++++++++++++++++++
 include/linux/reset-controller.h         |  9 ++++++++
 include/linux/reset/rzg2l-usbphy-ctrl.h  | 16 ++++++++++++++
 5 files changed, 75 insertions(+)
 create mode 100644 include/linux/reset/rzg2l-usbphy-ctrl.h

Comments

Biju Das Feb. 27, 2024, 12:02 p.m. UTC | #1
Hi All,

> -----Original Message-----
> From: Biju Das <biju.das.jz@bp.renesas.com>
> Sent: Thursday, May 18, 2023 4:57 PM
> To: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Vinod Koul <vkoul@kernel.org>;
> Kishon Vijay Abraham I <kishon@kernel.org>; linux-phy@lists.infradead.org;
> Geert Uytterhoeven <geert+renesas@glider.be>; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>; linux-renesas-soc@vger.kernel.org
> Subject: [PATCH RFC 0/3] Support VBUSEN selection control for RZ/G2L
> 
> This patch series aims to add support for VBUSEN selection control for
> RZ/G2L alike SoCs.
> 
> As per RZ/G2L HW(Rev.1.30 May2023) manual, VBUSEN can be controlled by the
> Port Power bit of the EHCI/OHCI operational register or by the VBOUT bit
> of the VBUS Control Register.
> 
> A reset consumer(phy-rcar-gen3-usb2) needs to find the reset controller
> device and then call the provider(reset-rzg2l-usbphy-ctrl) to configure
> it.
> 
> Please share your thoughts on this patch series.

Gentle ping for this RFC series. Is this series is in the right direction?

Cheers,
Biju

> 
> Biju Das (3):
>   reset: Add reset_controller_get_dev()
>   reset: renesas: Add rzg2l_usbphy_ctrl_select_vbus_ctrl()
>   phy: renesas: phy-rcar-gen3-usb2: Control VBUSEN selection
> 
>  drivers/phy/renesas/phy-rcar-gen3-usb2.c |  9 ++++++++
>  drivers/reset/core.c                     | 14 ++++++++++++
>  drivers/reset/reset-rzg2l-usbphy-ctrl.c  | 27 ++++++++++++++++++++++++
>  include/linux/reset-controller.h         |  9 ++++++++
>  include/linux/reset/rzg2l-usbphy-ctrl.h  | 16 ++++++++++++++
>  5 files changed, 75 insertions(+)
>  create mode 100644 include/linux/reset/rzg2l-usbphy-ctrl.h
> 
> --
> 2.25.1
Biju Das April 15, 2024, 12:18 p.m. UTC | #2
Hi All,

What about modelling VBUSEN as a regulator?

USB phy ctrl driver shares the resource to VBUSEN regulator driver
for enable/disable VBUS and PHY driver uses regulator to control the
VBUS??

+ DT as it involves different modelling

Cheers,
Biju

> -----Original Message-----
> From: Biju Das
> Sent: Tuesday, February 27, 2024 12:03 PM
> Subject: RE: [PATCH RFC 0/3] Support VBUSEN selection control for RZ/G2L
> 
> Hi All,
> 
> > -----Original Message-----
> > From: Biju Das <biju.das.jz@bp.renesas.com>
> > Sent: Thursday, May 18, 2023 4:57 PM
> > To: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Biju Das <biju.das.jz@bp.renesas.com>; Vinod Koul
> > <vkoul@kernel.org>; Kishon Vijay Abraham I <kishon@kernel.org>;
> > linux-phy@lists.infradead.org; Geert Uytterhoeven
> > <geert+renesas@glider.be>; Fabrizio Castro
> > <fabrizio.castro.jz@renesas.com>; linux-renesas-soc@vger.kernel.org
> > Subject: [PATCH RFC 0/3] Support VBUSEN selection control for RZ/G2L
> >
> > This patch series aims to add support for VBUSEN selection control for
> > RZ/G2L alike SoCs.
> >
> > As per RZ/G2L HW(Rev.1.30 May2023) manual, VBUSEN can be controlled by
> > the Port Power bit of the EHCI/OHCI operational register or by the
> > VBOUT bit of the VBUS Control Register.
> >
> > A reset consumer(phy-rcar-gen3-usb2) needs to find the reset
> > controller device and then call the provider(reset-rzg2l-usbphy-ctrl)
> > to configure it.
> >
> > Please share your thoughts on this patch series.
> 
> Gentle ping for this RFC series. Is this series is in the right direction?
> 
> Cheers,
> Biju
> 
> >
> > Biju Das (3):
> >   reset: Add reset_controller_get_dev()
> >   reset: renesas: Add rzg2l_usbphy_ctrl_select_vbus_ctrl()
> >   phy: renesas: phy-rcar-gen3-usb2: Control VBUSEN selection
> >
> >  drivers/phy/renesas/phy-rcar-gen3-usb2.c |  9 ++++++++
> >  drivers/reset/core.c                     | 14 ++++++++++++
> >  drivers/reset/reset-rzg2l-usbphy-ctrl.c  | 27 ++++++++++++++++++++++++
> >  include/linux/reset-controller.h         |  9 ++++++++
> >  include/linux/reset/rzg2l-usbphy-ctrl.h  | 16 ++++++++++++++
> >  5 files changed, 75 insertions(+)
> >  create mode 100644 include/linux/reset/rzg2l-usbphy-ctrl.h
> >
> > --
> > 2.25.1