Skip to contentSkip to conversation

Voltage and current regulator: usage of 'regulators' parent node in device tree

DISCUSSION embedded (VIVAVIS AG) 2 participants 3 messages Jul 7, 2021

lore
Share & tools
lore
#0 lore raw

I see a lot of Devicetrees wrapping the regulator nodes within a parent node like this

regulators {
    compatible = "simple-bus";
    #address-cells = <1>;
    #size-cells = <0>;
    reg_p3v3: regulator@0 {
        compatible = "regulator-fixed";
        [...]
        regulator-always-on;
    };
    [...]

Contrary to that, patches exist removing the 'regulators' node, because the 'simple-bus' doesn't really exist in hardware. Unfortunately, the documentation is unclear about wrapping regulator nodes like shown above.

Should I avoid the parent 'regulators' node?

Is the given naming schema in fixed-regulator.yaml best practice to follow?

    reg_xyz: regulator-xyz {
      compatible = "regulator-fixed";
      regulator-name = "xyz";

Thank you for clarification.

Carsten Stelling

#1 lore raw
Quoted 1 line · embedded (VIVAVIS AG)

Should I avoid the parent 'regulators' node?

You should ask the DT maintainers, I don't really mind either way TBH. My understanding was to avoid the parent node but can't remember why or if it was important.

#2 lore raw

Hi Mark,

Quoted 5 lines · Mark Brown
Quoted 1 line

Should I avoid the parent 'regulators' node?

You should ask the DT maintainers, I don't really mind either way TBH. My understanding was to avoid the parent node but can't remember why or if it was important.

Thank you.

Carsten