From: Jonas Jelonek <jelonek.jonas@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: o.rempel@pengutronix.de, kory.maincent@bootlin.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
daniel@makrotopia.org, bjorn@mork.no, sander@svanheule.net
Subject: Re: [PATCH net-next v11 1/4] dt-bindings: net: pse-pd: add bindings for Realtek PSE MCU
Date: Thu, 6 Aug 2026 09:19:00 +0200 [thread overview]
Message-ID: <d26486b9-e820-41a6-ae22-f7473cc9ecef@gmail.com> (raw)
In-Reply-To: <20260806011107.1855326-1-kuba@kernel.org>
On 06.08.26 03:11, Jakub Kicinski wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> ---
> dt-bindings: net: pse-pd: add bindings for Realtek PSE MCU
>
> This adds a new YAML binding for the MCU that fronts the PSE silicon on a
> range of managed Realtek-based switches, covering both protocol generations
> and the I2C/SMBus and UART attachments. Two questions below about the file
> naming and about the serial slave node name.
>
>> diff --git a/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml b/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml
>> new file mode 100644
>> index 0000000000000..3bb32349c28c4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml
>> @@ -0,0 +1,182 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/pse-pd/realtek,pse-mcu-gen1.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> [ ... ]
>
>> +properties:
>> + compatible:
>> + oneOf:
>> + # UART
>> + - items:
>> + - enum:
>> + - zyxel,gs1900-10hp-a1-pse
>> + - const: realtek,pse-mcu-gen1
>> +
>> + # I2C, SMBus framing
>> + - items:
>> + - enum:
>> + - zyxel,gs1920-24hp-v2-pse
>> + - const: realtek,pse-mcu-gen1-smbus
>> +
>> + # UART
>> + - items:
>> + - enum:
>> + - zyxel,gs1900-10hp-b1-pse
>> + - zyxel,xmg1915-10ep-pse
>> + - const: realtek,pse-mcu-gen2
>> +
>> + # I2C, SMBus framing
>> + - items:
>> + - enum:
>> + - zyxel,xs1930-12hp-pse
>> + - const: realtek,pse-mcu-gen2-smbus
>> +
>> + # I2C, raw framing
>> + - items:
>> + - enum:
>> + - linksys,lgs328mpc-v2-pse
>> + - const: realtek,pse-mcu-gen2-i2c
> [Severity: Low]
> This isn't a bug, but should the file be named after the family rather than
> after one compatible?
>
> The file (and $id) is realtek,pse-mcu-gen1.yaml, while the compatible list
> here documents five strings across two protocol generations:
>
> realtek,pse-mcu-gen1
> realtek,pse-mcu-gen1-smbus
> realtek,pse-mcu-gen2
> realtek,pse-mcu-gen2-smbus
> realtek,pse-mcu-gen2-i2c
>
> There is no file bearing the name of any realtek,pse-mcu-gen2* compatible,
> so searching by that compatible name finds nothing, and the commit message
> does not mention that gen2 is described in a ...-gen1.yaml file.
>
> Would realtek,pse-mcu.yaml (with the $id updated to match) describe the
> actual scope better?
>
> To be clear, the $id path itself is consistent with the current file path
> (net/pse-pd/realtek,pse-mcu-gen1.yaml#), so $ref resolution and
> dt_binding_check are not affected here - this is only about the declared
> scope of the name.
Could someone please take a decision on this and tell the bot how it
should be? This is being raised again and again... Conor explicitly said
the filename should carry one of the compatibles.
>> +required:
>> + - compatible
>> +
>> +allOf:
>> + - $ref: pse-controller.yaml#
> [ ... ]
>
>> + else:
>> + allOf:
>> + - $ref: /schemas/serial/serial-peripheral-props.yaml#
>> +
>> + properties:
>> + reg: false
> [Severity: Low]
> This else branch declares the bare gen compatibles to be UART (serial
> slave) attachments, and the node name is forced to ethernet-pse by
> pse-controller.yaml:
>
> Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
> $nodename:
> pattern: "^ethernet-pse(@.*|-([0-9]|[1-9][0-9]+))?$"
>
> But serial.yaml only enumerates these serial slave child node names:
>
> Documentation/devicetree/bindings/serial/serial.yaml
> patternProperties:
> "^(bluetooth|bluetooth-gnss|embedded-controller|gnss|gps|mcu|onewire)$":
> if:
> type: object
> then:
> additionalProperties: true
> $ref: serial-peripheral-props.yaml#
> ...
> required:
> - compatible
>
> Does a board device tree with an ethernet-pse child of serial then get the
> shared slave-node subschema applied at all? Since serial.yaml ends with
> additionalProperties: true, the unmatched child looks like it just falls
> through silently rather than being flagged.
It gets applied since it's referenced in my bindings. It just doesn't use the
"routing" present in serial.yaml.
> Should serial.yaml's pattern list gain ethernet-pse as part of this series,
I would avoid this since it adds no value in what is validated. From what
I've seen the pattern in serial.yaml isn't exhaustive so other bindings
like "qca,qca7000" also use a node name not being in that list.
> or is the intent to reuse the existing generic mcu name (which would
> conflict with pse-controller.yaml's $nodename pattern)?
No, reason already given in ( ).
> [ ... ]
>
>> + # UART attachment
>> + - |
>> + serial {
>> + ethernet-pse {
>> + compatible = "zyxel,gs1900-10hp-a1-pse", "realtek,pse-mcu-gen1";
>> + current-speed = <19200>;
> [ ... ]
Regards,
Jonas
next prev parent reply other threads:[~2026-08-06 7:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 10:01 [PATCH net-next v11 0/4] net: pse-pd: add Realtek PSE MCU support Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 1/4] dt-bindings: net: pse-pd: add bindings for Realtek PSE MCU Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 7:19 ` Jonas Jelonek [this message]
2026-08-02 10:01 ` [PATCH net-next v11 2/4] net: pse-pd: add Realtek PSE MCU core Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:15 ` Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 3/4] net: pse-pd: realtek-pse-mcu: add I2C transport Jonas Jelonek
2026-08-03 10:01 ` sashiko-bot
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:29 ` Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 4/4] net: pse-pd: realtek-pse-mcu: add UART transport Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:59 ` Jonas Jelonek
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=d26486b9-e820-41a6-ae22-f7473cc9ecef@gmail.com \
--to=jelonek.jonas@gmail.com \
--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=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=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sander@svanheule.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.