Re: [PATCH net-next v12 2/4] net: pse-pd: add Realtek PSE MCU core
Kory Maincent <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Organization | bootlin |
| Message-ID | <20260810144621.23c14dce@kmaincent-XPS-13-7390> |
On Sun, 9 Aug 2026 11:22:48 +0000 Jonas Jelonek <[email protected]> wrote: > A range of managed Realtek-based PoE switches use a small microcontroller > on the PCB to front the actual PSE silicon. The host CPU talks to that > MCU over I2C/SMBus or UART using a fixed 12-byte request/response > protocol with a trailing checksum; the PSE chips are managed by the MCU > and are not accessed directly. Two generations of the protocol exist - > both Realtek's - diverging in opcode numbering and a few response > layouts; the driver handles this with a per-dialect opcode table and > parser hooks for the responses that differ, selected by the compatible. > The specific PSE chip behind the MCU is detected at runtime and only > influences per-chip constants (power scaling and the per-port cap). > > This core module implements the protocol, message framing, the dialect > machinery and the pse_controller_ops glue, and exports a registration > helper for transport modules. The I2C and UART transports that drive it > follow in the next patches; the core (PSE_REALTEK_MCU) is selected > automatically by those transports and is not user-selectable on its own. > > The realtek-pse-mcu-* files and PSE_REALTEK_MCU* symbols match the > realtek,pse-mcu-* compatibles (see the binding for the naming rationale). > The two protocol generations - gen1 on older Broadcom-PSE boards, gen2 on > Realtek's own PSE silicon - are both Realtek's, handled by the same shared > core, each selecting its dialect via the compatible. > > Power budgeting is left to the MCU firmware; the driver advertises > PSE_BUDGET_EVAL_STRAT_DYNAMIC accordingly. Reviewed-by: Kory Maincent <[email protected]> Thank you! -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com