Re: [PATCH net-next 3/4] net: pse-pd: realtek-pse-mcu: configure global power budget

From: Jonas Jelonek

Date: Fri Nov 06 2026 - 03:58:13 EST


Hi Sander,

On 05.11.26 22:54, Sander Vanheule wrote:
> Hi Kory,
>
> On Wed, 2026-11-04 at 13:36 +0100, Kory Maincent wrote:

...

>> Indeed if you use "regulator-always-on" it does not turn off the power
>> supply when we call regulator_disable().
>> https://elixir.bootlin.com/linux/v7.3/source/drivers/regulator/core.c#L3269
>>
>> Does the PSE controller needs this supply to start, or is it only
>> required to power the PSE PIs?
>>
>> If it is the first you will need to enable it in the driver.
>> If it's the latter, you could describe it as the PI's regulator parent
>> supply. An enable of any PI will enable this vmain regulator.
> I'm not sure if you've seen a diagram before, but allow me to add one to show
> what the binding currently models (for a UART controlled MCU):
>
> ▲Vdd ▲Vpwr
> ┌─────┼────────┼─────────────────┐
> │ ├────────┼───────┬───┐ │
> │ ┌──┴────┐ │ │┌──┴───┐ │
> ──┼─►┤RX SDA├───┼────┬──┼┤ ├─┼───► PSE-PI0
> ◄─┼-─┤TX SCL├───┼───┬┼──┼┤ ├─┼───► PSE-PI1
> │ │ │ │ ││ ││ ├─┼───► PSE-PI2
> │ │MCU │ ├───┼┼──┼┤PSE-0 ├─┼───► PSE-PI3
> │ └───────┘ │ ││ │└──────┘ │
> │ │ ││ └───┐ │
> │ │ ││ ┌──┴───┐ │
> │ │ │└───┤ ├─┼───► PSE-PI4
> │ │ └────┤ ├─┼───► PSE-PI5
> │ │ │ ├─┼───► PSE-PI6
> │ └────────┤PSE-1 ├─┼───► PSE-PI7
> │realtek,pse-mcu-gen1 └──────┘ │
> └────────────────────────────────┘
>
>
> The outer box is what is modeled by the binding, but really consists of at least
> two chips on the board. The "vpwr-supply" (Vpwr) of the PSE PIs is controlled by
> the PSE-n ICs. The MCU doesn't use Vpwr and doesn't control it directly, but has
> to do this via the PSE controllers. This is similar to a PD69200 setup.
>
> Like Jonas said, Vpwr is usually (always) an always-on power supply, which
> matches well with "regulator-always-on". Vdd is the supply that actually powers
> the logic, but that is normally also not a switchable supply and hence not
> modeled by the devicetrees describing these PoE switches.
>
> This proposal adds Vpwr as "vmain-supply" on the main DT node, but I suppose
> that also means it should not be used for "vpwr-supply" on the PI subnodes?

The intention is mostly that the MCU takes care of that budgeting for the whole
system with whatever internal algorithm so it's in charge of what this supply
actually supplies, even though it doesn't physically control the rail.

I hesitated to add it on "vpwr-supply" for now because I don't really overlook
the implications and assumptions being tied to this. There are still the PSE-n
chips in between which themselves also have power limits, for the whole IC
and each PI.

> Would it make sense to model realtek,pse-mcu as a regulator as well and have
> "vpwr-supply" PI properties point there (instead of the fixed regulator)?
> AFAICT that's similar to the approach taken by the microchip,pd692x0 binding,
> where the PI nodes point to a manager. But I also don't know if that offers any
> advantages here.

That sounds more suitable, possibly with the PSE-n ICs in between. I've played
around with adding that layer here already because some switches use multiple
PSE chip variants within a setup where this might be useful to cover different
power limits. AFAICS this would require adding the managers to the devicetree
bindings too, similar to PD692x0. But apart from the mentioned usecase, I
haven't seen the advantage of that yet.

> Best,
> Sander

Best,
Jonas