* [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L
@ 2024-06-16 10:53 Biju Das
2024-06-16 10:53 ` [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator Biju Das
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Biju Das @ 2024-06-16 10:53 UTC (permalink / raw)
To: Philipp Zabel, Liam Girdwood, Mark Brown, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven
Cc: Biju Das, Prabhakar Mahadev Lad, Biju Das, devicetree, linux-phy,
linux-renesas-soc
As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of
the VBUS Control Register(VBENCTL) register in the USBPHY Control. But
this IP is in the Reset block.
Reset driver exposes this register as regmap and instantiate the USB VBUS
regulator device. Consumers(phy device) can use regulator APIs to control
VBUS as controlling is done in the atomic context.
We need to have merge strategy which subsytem will apply this patches
as it involves multiple subsystems Reset, Regulator, PHY, DT and Renesas
SoC??
v3->v4:
* Fixed example indentation to 4 char spaces in patch#1
* Dropped regulator-{min,max}-microvolt from example.
* Updated commit header and description in patch#3
* Replaced regulator_set_hardware_enable_register()->regulator_hardware_enable()
* Updated documentation to "must use of regulator_get_exclusive() for consumers"
* Enforced exclusive access in regulator_hardware_enable().
* Added generic support regulator_hardware_enable().
* Added check for of_get_child_by_name().
* Released the resource by of_node_put()
* Updated commit description with regulator_hardware_enable()
* Used devm_regulator_get_exclusive() to get regulator handle.
* Dropped regulator-{min,max}-microvolt.
v2->v3:
* Documented regulator-vbus in the binding file.
* Updated commit description and header for patch#2
* Moved regulator device creation and instantiation at the end of probe().
* Introduced new API regulator_set_hardware_enable_register() to enable/disable
regulator in atomic context.
* Dropped vbus_voltages table from patch#4
* Added support for enabling/disabling regulator through regmap API's
* Updated rzg2l_usb_vbus_rdesc with enable_{reg,mask}, fixed_uV and
n_voltages
* Updated of_node with child node of the parent device.
* Replaced regulator's regmap API with newly introduced
regulator_set_hardware_enable_register to enable/disable regulator
in interrupt context in patch#5
* Dropped using "usb_vbus-supply" in patch#5.
* Upated vbus regulator label name in dts file.
* Updated node and regulator name that matches with the binding documentation.
v1->v2:
* Introduced a regulator driver to control VBUS
Biju Das (6):
dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS
regulator
reset: renesas: Add USB VBUS regulator device as child
regulator: core: Add helper for allow HW access to enable/disable
regulator
regulator: Add Renesas RZ/G2L USB VBUS regulator driver
phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs
arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
.../reset/renesas,rzg2l-usbphy-ctrl.yaml | 10 +++
Documentation/power/regulator/consumer.rst | 6 ++
.../boot/dts/renesas/rz-smarc-common.dtsi | 11 +--
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 8 +-
drivers/regulator/Kconfig | 9 +++
drivers/regulator/Makefile | 1 +
drivers/regulator/core.c | 28 +++++++
.../regulator/renesas-usb-vbus-regulator.c | 74 +++++++++++++++++++
drivers/reset/reset-rzg2l-usbphy-ctrl.c | 37 ++++++++++
include/linux/regulator/consumer.h | 7 ++
10 files changed, 182 insertions(+), 9 deletions(-)
create mode 100644 drivers/regulator/renesas-usb-vbus-regulator.c
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
@ 2024-06-16 10:53 ` Biju Das
2024-06-16 13:51 ` Krzysztof Kozlowski
2024-06-16 10:53 ` [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child Biju Das
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Biju Das @ 2024-06-16 10:53 UTC (permalink / raw)
To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Liam Girdwood, Mark Brown, Geert Uytterhoeven,
Magnus Damm, devicetree, linux-phy, linux-renesas-soc,
Prabhakar Mahadev Lad, Biju Das
The VBUS enable can be controlled by the VBOUT bit of the VBUS control
register. This register is part of usbphy-ctrl IP.
Document the USB VBUS regulator object.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* Fixed example indentation to 4 char spaces
* Dropped regulator-{min,max}-microvolt from example.
v3:
* New patch
---
.../bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
index 03c18611e42d..b0b20af15313 100644
--- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
+++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
@@ -42,6 +42,12 @@ properties:
0 = Port 1 Phy reset
1 = Port 2 Phy reset
+ regulator-vbus:
+ type: object
+ description: USB VBUS regulator
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
required:
- compatible
- reg
@@ -49,6 +55,7 @@ required:
- resets
- power-domains
- '#reset-cells'
+ - regulator-vbus
additionalProperties: false
@@ -64,4 +71,7 @@ examples:
resets = <&cpg R9A07G044_USB_PRESETN>;
power-domains = <&cpg>;
#reset-cells = <1>;
+ regulator-vbus {
+ regulator-name = "vbus";
+ };
};
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
2024-06-16 10:53 ` [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator Biju Das
@ 2024-06-16 10:53 ` Biju Das
2024-07-03 8:20 ` Philipp Zabel
2024-06-16 10:53 ` [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Biju Das
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Biju Das @ 2024-06-16 10:53 UTC (permalink / raw)
To: Philipp Zabel
Cc: Biju Das, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Prabhakar Mahadev Lad, Biju Das, devicetree, linux-phy,
linux-renesas-soc
As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit
of the VBUS Control Register(VBENCTL) register in the USBPHY Control.
Expose this register as regmap and instantiate the USB VBUS regulator
device, so that consumer can control the vbus using regulator API's
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* No change.
v2->v3:
* Updated commit description and header
* Moved regulator device creation and instantiation at the end of probe().
v1->v2:
* Instantiated regulator driver
---
drivers/reset/reset-rzg2l-usbphy-ctrl.c | 37 +++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
index 8f6fbd978591..c740b3b9599d 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -10,10 +10,12 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/reset-controller.h>
#define RESET 0x000
+#define VBENCTL 0x03c
#define RESET_SEL_PLLRESET BIT(12)
#define RESET_PLLRESET BIT(8)
@@ -32,6 +34,7 @@ struct rzg2l_usbphy_ctrl_priv {
struct reset_controller_dev rcdev;
struct reset_control *rstc;
void __iomem *base;
+ struct platform_device *vdev;
spinlock_t lock;
};
@@ -100,10 +103,19 @@ static const struct reset_control_ops rzg2l_usbphy_ctrl_reset_ops = {
.status = rzg2l_usbphy_ctrl_status,
};
+static const struct regmap_config rzg2l_usb_regconf = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .max_register = 1,
+};
+
static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rzg2l_usbphy_ctrl_priv *priv;
+ struct platform_device *vdev;
+ struct regmap *regmap;
unsigned long flags;
int error;
u32 val;
@@ -116,6 +128,10 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
+ regmap = devm_regmap_init_mmio(dev, priv->base + VBENCTL, &rzg2l_usb_regconf);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(priv->rstc))
return dev_err_probe(dev, PTR_ERR(priv->rstc),
@@ -153,13 +169,34 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
writel(val, priv->base + RESET);
spin_unlock_irqrestore(&priv->lock, flags);
+ vdev = platform_device_alloc("rzg2l-usb-vbus-regulator", pdev->id);
+ if (!vdev) {
+ error = -ENOMEM;
+ goto err_pm_runtime_put;
+ }
+ vdev->dev.parent = dev;
+ priv->vdev = vdev;
+
+ error = platform_device_add(vdev);
+ if (error)
+ goto err_device_put;
+
return 0;
+
+err_device_put:
+ platform_device_put(vdev);
+err_pm_runtime_put:
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+ reset_control_assert(priv->rstc);
+ return error;
}
static void rzg2l_usbphy_ctrl_remove(struct platform_device *pdev)
{
struct rzg2l_usbphy_ctrl_priv *priv = dev_get_drvdata(&pdev->dev);
+ platform_device_unregister(priv->vdev);
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
reset_control_assert(priv->rstc);
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
2024-06-16 10:53 ` [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator Biju Das
2024-06-16 10:53 ` [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child Biju Das
@ 2024-06-16 10:53 ` Biju Das
2024-07-02 11:27 ` Vinod Koul
2024-06-16 10:53 ` [PATCH v4 6/6] arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS Biju Das
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Biju Das @ 2024-06-16 10:53 UTC (permalink / raw)
To: Yoshihiro Shimoda
Cc: Biju Das, Philipp Zabel, Rob Herring, Krzysztof Kozlowski,
Liam Girdwood, Mark Brown, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Geert Uytterhoeven, Magnus Damm,
devicetree, linux-phy, linux-renesas-soc, Prabhakar Mahadev Lad,
Biju Das
Use regulator_hardware_enable() for controlling VBUS enable for
RZ/G2L alike SoCs in interrupt context.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* Updated commit description with regulator_hardware_enable()
* Used devm_regulator_get_exclusive() to get regulator handle.
v2->v3:
* Replaced regulator's regmap API with newly introduced
regulator_set_hardware_enable_register to enable/disable regulator
in interrupt context.
* Dropped using "usb_vbus-supply"
v1->v2:
* Used regulator driver's regmap to handle VBUS.
---
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index fbab6ac0f0d1..7594f64eb737 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -188,6 +188,9 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus)
dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus);
if (ch->soc_no_adp_ctrl) {
+ if (ch->vbus)
+ regulator_hardware_enable(ch->vbus, vbus);
+
vbus_ctrl_reg = USB2_VBCTRL;
vbus_ctrl_val = USB2_VBCTRL_VBOUT;
}
@@ -718,7 +721,10 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
phy_set_drvdata(channel->rphys[i].phy, &channel->rphys[i]);
}
- channel->vbus = devm_regulator_get_optional(dev, "vbus");
+ if (channel->soc_no_adp_ctrl && channel->is_otg_channel)
+ channel->vbus = devm_regulator_get_exclusive(dev, "vbus");
+ else
+ channel->vbus = devm_regulator_get_optional(dev, "vbus");
if (IS_ERR(channel->vbus)) {
if (PTR_ERR(channel->vbus) == -EPROBE_DEFER) {
ret = PTR_ERR(channel->vbus);
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v4 6/6] arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
` (2 preceding siblings ...)
2024-06-16 10:53 ` [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Biju Das
@ 2024-06-16 10:53 ` Biju Das
2024-06-20 16:37 ` [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Vinod Koul
2024-06-27 11:17 ` (subset) " Mark Brown
5 siblings, 0 replies; 11+ messages in thread
From: Biju Das @ 2024-06-16 10:53 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Philipp Zabel, Liam Girdwood, Mark Brown,
Geert Uytterhoeven, Magnus Damm, devicetree, linux-phy,
linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
Replace the fixed regulator for USB VBUS.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* Dropped regulator-{min,max}-microvolt
v2->v3:
* Upated label name
* Updated node and regulator name that matches with the bindings.
v1->v2:
* New patch.
---
arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi b/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi
index b7a3e6caa386..b34855956ae0 100644
--- a/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi
@@ -54,14 +54,6 @@ codec_dai: simple-audio-card,codec {
};
};
- usb0_vbus_otg: regulator-usb0-vbus-otg {
- compatible = "regulator-fixed";
-
- regulator-name = "USB0_VBUS_OTG";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- };
-
vccq_sdhi1: regulator-vccq-sdhi1 {
compatible = "regulator-gpio";
regulator-name = "SDHI1 VccQ";
@@ -139,6 +131,9 @@ &ohci1 {
&phyrst {
status = "okay";
+ usb0_vbus_otg: regulator-vbus {
+ regulator-name = "vbus";
+ };
};
&scif0 {
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator
2024-06-16 10:53 ` [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator Biju Das
@ 2024-06-16 13:51 ` Krzysztof Kozlowski
0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:51 UTC (permalink / raw)
To: Biju Das, Philipp Zabel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Liam Girdwood, Mark Brown, Geert Uytterhoeven, Magnus Damm,
devicetree, linux-phy, linux-renesas-soc, Prabhakar Mahadev Lad,
Biju Das
On 16/06/2024 12:53, Biju Das wrote:
> The VBUS enable can be controlled by the VBOUT bit of the VBUS control
> register. This register is part of usbphy-ctrl IP.
>
> Document the USB VBUS regulator object.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
` (3 preceding siblings ...)
2024-06-16 10:53 ` [PATCH v4 6/6] arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS Biju Das
@ 2024-06-20 16:37 ` Vinod Koul
2024-06-20 17:11 ` Biju Das
2024-06-27 11:17 ` (subset) " Mark Brown
5 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2024-06-20 16:37 UTC (permalink / raw)
To: Biju Das
Cc: Philipp Zabel, Liam Girdwood, Mark Brown, Kishon Vijay Abraham I,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Prabhakar Mahadev Lad, Biju Das, devicetree,
linux-phy, linux-renesas-soc
On 16-06-24, 11:53, Biju Das wrote:
> As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of
> the VBUS Control Register(VBENCTL) register in the USBPHY Control. But
> this IP is in the Reset block.
>
> Reset driver exposes this register as regmap and instantiate the USB VBUS
> regulator device. Consumers(phy device) can use regulator APIs to control
> VBUS as controlling is done in the atomic context.
>
> We need to have merge strategy which subsytem will apply this patches
> as it involves multiple subsystems Reset, Regulator, PHY, DT and Renesas
> SoC??
Why is there a dependency.. why cant they go thru respective trees?
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L
2024-06-20 16:37 ` [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Vinod Koul
@ 2024-06-20 17:11 ` Biju Das
0 siblings, 0 replies; 11+ messages in thread
From: Biju Das @ 2024-06-20 17:11 UTC (permalink / raw)
To: Vinod Koul
Cc: Philipp Zabel, Liam Girdwood, Mark Brown, Kishon Vijay Abraham I,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Prabhakar Mahadev Lad, biju.das.au,
devicetree@vger.kernel.org, linux-phy@lists.infradead.org,
linux-renesas-soc@vger.kernel.org
Hi Vinod,
Thanks for the feedback.
> -----Original Message-----
> From: Vinod Koul <vkoul@kernel.org>
> Sent: Thursday, June 20, 2024 5:38 PM
> Subject: Re: [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L
>
> On 16-06-24, 11:53, Biju Das wrote:
> > As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT
> > bit of the VBUS Control Register(VBENCTL) register in the USBPHY
> > Control. But this IP is in the Reset block.
> >
> > Reset driver exposes this register as regmap and instantiate the USB
> > VBUS regulator device. Consumers(phy device) can use regulator APIs to
> > control VBUS as controlling is done in the atomic context.
> >
> > We need to have merge strategy which subsytem will apply this patches
> > as it involves multiple subsystems Reset, Regulator, PHY, DT and
> > Renesas SoC??
>
> Why is there a dependency.. why cant they go thru respective trees?
In this series, only regulator driver changes has no dependency.
PHY driver (phy-rcar-gen3-usb2.c) has a dependency on new regulator consumer API regulator_hardware_enable(),
Without this it will lead to compilation error.
USB PHY ctrl driver(reset-rzg2l-usbphy-ctrl.c) instantiate and bind regulator driver(renesas-usb-vbus-regulator.c).
If regulator driver is not there means, USB PHY ctrl driver probe() fails,
that will break existing USB functionality.
Cheers,
Biju
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (subset) [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
` (4 preceding siblings ...)
2024-06-20 16:37 ` [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Vinod Koul
@ 2024-06-27 11:17 ` Mark Brown
5 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2024-06-27 11:17 UTC (permalink / raw)
To: Philipp Zabel, Liam Girdwood, Vinod Koul, Kishon Vijay Abraham I,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Biju Das
Cc: Prabhakar Mahadev Lad, Biju Das, devicetree, linux-phy,
linux-renesas-soc
On Sun, 16 Jun 2024 11:53:52 +0100, Biju Das wrote:
> As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of
> the VBUS Control Register(VBENCTL) register in the USBPHY Control. But
> this IP is in the Reset block.
>
> Reset driver exposes this register as regmap and instantiate the USB VBUS
> regulator device. Consumers(phy device) can use regulator APIs to control
> VBUS as controlling is done in the atomic context.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[3/6] regulator: core: Add helper for allow HW access to enable/disable regulator
commit: 1cb7d29157603561af4c38535e936850ceb99f0f
[4/6] regulator: Add Renesas RZ/G2L USB VBUS regulator driver
commit: 84fbd6198766336f627ba08f073fd9970729074e
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs
2024-06-16 10:53 ` [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Biju Das
@ 2024-07-02 11:27 ` Vinod Koul
0 siblings, 0 replies; 11+ messages in thread
From: Vinod Koul @ 2024-07-02 11:27 UTC (permalink / raw)
To: Biju Das
Cc: Yoshihiro Shimoda, Philipp Zabel, Rob Herring,
Krzysztof Kozlowski, Liam Girdwood, Mark Brown, Conor Dooley,
Kishon Vijay Abraham I, Geert Uytterhoeven, Magnus Damm,
devicetree, linux-phy, linux-renesas-soc, Prabhakar Mahadev Lad,
Biju Das
On 16-06-24, 11:53, Biju Das wrote:
> Use regulator_hardware_enable() for controlling VBUS enable for
> RZ/G2L alike SoCs in interrupt context.
Acked-by: Vinod Koul <vkoul@kernel.org>
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child
2024-06-16 10:53 ` [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child Biju Das
@ 2024-07-03 8:20 ` Philipp Zabel
0 siblings, 0 replies; 11+ messages in thread
From: Philipp Zabel @ 2024-07-03 8:20 UTC (permalink / raw)
To: Biju Das
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Prabhakar Mahadev Lad, Biju Das,
devicetree, linux-phy, linux-renesas-soc
On So, 2024-06-16 at 11:53 +0100, Biju Das wrote:
> As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit
> of the VBUS Control Register(VBENCTL) register in the USBPHY Control.
>
> Expose this register as regmap and instantiate the USB VBUS regulator
> device, so that consumer can control the vbus using regulator API's
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-07-03 8:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 10:53 [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Biju Das
2024-06-16 10:53 ` [PATCH v4 1/6] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator Biju Das
2024-06-16 13:51 ` Krzysztof Kozlowski
2024-06-16 10:53 ` [PATCH v4 2/6] reset: renesas: Add USB VBUS regulator device as child Biju Das
2024-07-03 8:20 ` Philipp Zabel
2024-06-16 10:53 ` [PATCH v4 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Biju Das
2024-07-02 11:27 ` Vinod Koul
2024-06-16 10:53 ` [PATCH v4 6/6] arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS Biju Das
2024-06-20 16:37 ` [PATCH v4 0/6] Add USB VBUS regulator for RZ/G2L Vinod Koul
2024-06-20 17:11 ` Biju Das
2024-06-27 11:17 ` (subset) " Mark Brown
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).