Skip to content

Conversation

jfischer-no
Copy link
Contributor

@jfischer-no jfischer-no commented Oct 15, 2025

Add set callback to regulator API. The regulator may generate an interrupt when, for example, the voltage is present. The callback can be used for USB VBUS voltage regulators to notify that a device is connected to a port.

Add VREGUSB driver for internal voltage regulator for the USB signaling interface.

The nodelabels do not have any relation to the Nordic MDK and can be
named differently between SoCs.

Signed-off-by: Johann Fischer <[email protected]>
We need to describe the wrapper separately as a parent node because it
is not part of the USB controller but is used to configure, control, and
enable/disable the USB PHY, and to enable/disable USB controller.

Signed-off-by: Johann Fischer <[email protected]>
The regulator may generate an interrupt when, for example, the voltage
is present. The callback can be used for USB VBUS voltage regulators to
notify that a device is connected to a port.

Signed-off-by: Johann Fischer <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be implemented on top of aligned/extended nrfx_power_usb* API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation of this reg in nrfx may help reach USB support in NCS bare metal option.
cc @lemrey

Comment on lines +14 to +18
regulator:
required: true
type: phandle
description: |
USB PHY and controller function depends on the USB regulator VREGUSB.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the nordic,nrf-usbhs-wrapper also be used for nRF54H20? How would the nrfs be modelled then?

Comment on lines +213 to +218
usbhs_wrapper: usbhs_wrapper@5a000 {
compatible = "nordic,nrf-usbhs-wrapper";
reg = <0x5a000 0x1000>;
regulator = <&vregusb>;
#address-cells = <1>;
#size-cells = <1>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you expand on what the wrapper does?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In short USBHS wrapper provides a way to enable underlying DWC2 controller (core), enable power to both core and USB PHY, configure USB PHY and make it possible to get core and USB PHY out of reset.

Add driver for internal voltage regulator for the USB signaling
interface.

Signed-off-by: Johann Fischer <[email protected]>
PHY and controller function depends on VREGUSB. Add VREGUSB regulator
node to nRF54LM20A and use phandle to reference it in the wrapper node.

Signed-off-by: Johann Fischer <[email protected]>
Use Nordic VREGUSB regulator driver in DWC2 nRF54LM20A vendor quirks.

Signed-off-by: Johann Fischer <[email protected]>
@jfischer-no jfischer-no force-pushed the pr-nrf54lm20a-vregusb branch from 00ec840 to 3d7218b Compare October 20, 2025 16:13
Copy link

*/
typedef void (*regulator_callback_t)(const struct device *dev,
const struct regulator_event *const evt,
const void *const user_data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants