As per RZ/G2L HW manual, VBUSEN 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 driver's regmap to control VBUS as controlling is done in the atomic context. Please provide your valuable inputs. v1->v2: * Introduced a regulator driver to control VBUS Biju Das (4): reset: renesas: Instantiate USB VBUS regulator device regulator: Add Renesas RZ/G2L USB VBUS regulator driver phy: renesas: phy-rcar-gen3-usb2: Control VBUSEN selection arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS .../boot/dts/renesas/rz-smarc-common.dtsi | 15 ++--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 17 ++++- drivers/regulator/Kconfig | 9 +++ drivers/regulator/Makefile | 1 + .../regulator/renesas-usb-vbus-regulator.c | 65 +++++++++++++++++++ drivers/reset/reset-rzg2l-usbphy-ctrl.c | 29 +++++++++ 6 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 drivers/regulator/renesas-usb-vbus-regulator.c -- 2.25.1