Netdev List
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Jonas Jelonek <jelonek.jonas@gmail.com>
Cc: "Kory Maincent" <kory.maincent@bootlin.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Bjørn Mork" <bjorn@mork.no>
Subject: Re: [PATCH net-next 0/2] net: pse-pd: add Realtek/Broadcom PSE MCU support
Date: Thu, 11 Jun 2026 13:03:27 +0200	[thread overview]
Message-ID: <aiqV_10qQahSHXca@pengutronix.de> (raw)
In-Reply-To: <20260608205758.1830521-1-jelonek.jonas@gmail.com>

Hi Jonas,

On Mon, Jun 08, 2026 at 08:57:55PM +0000, Jonas Jelonek wrote:
> This series adds a PSE-PD driver for the microcontroller (MCU) that fronts
> the PSE silicon on a range of managed switches, together with its DT
> binding.
> 
> Hardware model
> ==============
> 
> These boards do not expose the PSE chips to the host directly. A small
> microcontroller sits on an I2C/SMBus or UART bus and manages one or more PSE
> chips behind it; the host CPU only ever talks to that MCU, using a fixed
> 12-byte request/response protocol with a trailing checksum. The PSE silicon
> never appears on the bus.
> 
> The same protocol family is used by MCUs fronting Realtek PSE chips
> (RTL8238B, RTL8239, RTL8239C) and Broadcom PSE chips (BCM59111, BCM59121),
> diverging in opcode numbering and a few response layouts. The driver
> abstracts that behind a per-dialect opcode table and parser hooks, 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).
> 
> Why the compatible names the protocol, not the chip
> ===================================================
> 
> The compatibles are "realtek,pse-mcu-rtk" and "realtek,pse-mcu-bcm". This is
> a deliberate choice and the part most likely to raise questions, so the
> reasoning up front.
> 
> The node names the protocol dialect, not a part:
> 
>   - The DT node describes the MCU, not a PSE chip: the PSE chips are behind
>     the MCU and never appear on the bus, so naming the node after one (e.g.
>     "realtek,rtl8239") would describe hardware that isn't at that address.
> 
>   - The PSE chips are, in principle, usable without this MCU (host-driven
>     directly) - different hardware with a different programming model that
>     would warrant its own binding. Claiming the PSE-chip compatibles here
>     would collide with that.
> 
>   - Naming the MCU silicon is equally wrong: these are ordinary
>     general-purpose microcontrollers (GigaDevice, Nuvoton, ...) that vary
>     across boards and are not dedicated to this application.
> 
>   - What is fixed, and all the driver needs at DT-parse time, is the
>     protocol dialect, so the compatible encodes exactly that. The two
>     dialects share one protocol family and one binding, kept in a single
>     "realtek" vendor namespace because this MCU front-end is found almost
>     exclusively on Realtek-based switches; a "-rtk"/"-bcm" suffix selects
>     the dialect. This follows the "google,cros-ec-*" pattern: a compatible
>     for a firmware/protocol interface implemented by varying
>     microcontrollers.
> 
> One compatible per dialect spans both transports:
> 
>   - The 12-byte wire protocol is identical over I2C/SMBus and UART; only the
>     plumbing differs (SMBus vs native framing on I2C, baud rate on UART),
>     and the transport is already expressed structurally by the node's parent
>     bus (i2c@... vs serial@...). A "-i2c"/"-uart" suffix would only
>     duplicate that, for a protocol that does not change across transports.
> 
>   - This is the multi-transport model used by e.g. "bosch,bmi160" (one
>     compatible, separate i2c and spi drivers binding it), rather than the
>     cros-ec model of per-transport compatibles - cros-ec splits because its
>     on-wire framing genuinely differs per bus, which is not the case here.
> 
> The binding documents both points as well.
> 
> Testing
> =======
> 
>  - Linksys LGS328MPCv2  (RTL8238B, I2C)
>  - Zyxel GS1900-10HP A1 (BCM59121, UART)
>  - Zyxel GS1900-10HP B1 (RTL8238B, UART)
>  - Zyxel XMG1915-10EP   (RTL8239C, UART)
>  - Zyxel XS1930-12HP    (RTL8239, SMBus)
> 
 
Thank you for your work!

Overall, LGTM. Can you please take a look at this report:
https://sashiko.dev/#/patchset/20260608205758.1830521-1-jelonek.jonas%40gmail.com 

kzalloc_obj - seems to be a false positive. Some other have good points.

Best Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      parent reply	other threads:[~2026-06-11 11:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 20:57 [PATCH net-next 0/2] net: pse-pd: add Realtek/Broadcom PSE MCU support Jonas Jelonek
2026-06-08 20:57 ` [PATCH net-next 1/2] dt-bindings: net: pse-pd: add bindings for Realtek/Broadcom PSE MCU Jonas Jelonek
2026-06-08 20:57 ` [PATCH net-next 2/2] net: pse-pd: add Realtek/Broadcom PSE MCU driver Jonas Jelonek
2026-06-11 11:03 ` Oleksij Rempel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiqV_10qQahSHXca@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=jelonek.jonas@gmail.com \
    --cc=kory.maincent@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox