linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [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

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).