From: Rob Herring <robh@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
"Daniel Golle" <daniel@makrotopia.org>,
"Horatiu Vultur" <horatiu.vultur@microchip.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Eric Woudstra" <ericwouds@gmail.com>,
"Marek Behún" <kabel@kernel.org>, "Lee Jones" <lee@kernel.org>,
"Patrice Chotard" <patrice.chotard@foss.st.com>
Subject: Re: [PATCH net-next 2/9] dt-bindings: phy-common-props: create a reusable "protocol-names" definition
Date: Thu, 4 Dec 2025 10:11:33 -0600 [thread overview]
Message-ID: <20251204161133.GA1574692-robh@kernel.org> (raw)
In-Reply-To: <20251204155219.GA1533839-robh@kernel.org>
On Thu, Dec 04, 2025 at 09:52:19AM -0600, Rob Herring wrote:
> On Sat, Nov 22, 2025 at 09:33:34PM +0200, Vladimir Oltean wrote:
> > Other properties also need to be defined per protocol than just
> > tx-p2p-microvolt-names. Create a common definition to avoid copying a 55
> > line property.
> >
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
> > .../bindings/phy/phy-common-props.yaml | 34 +++++++++++--------
> > 1 file changed, 19 insertions(+), 15 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/phy-common-props.yaml b/Documentation/devicetree/bindings/phy/phy-common-props.yaml
> > index 255205ac09cd..775f4dfe3cc3 100644
> > --- a/Documentation/devicetree/bindings/phy/phy-common-props.yaml
> > +++ b/Documentation/devicetree/bindings/phy/phy-common-props.yaml
> > @@ -13,22 +13,12 @@ description:
> > maintainers:
> > - Marek Behún <kabel@kernel.org>
> >
> > -properties:
> > - tx-p2p-microvolt:
> > +$defs:
> > + protocol-names:
> > description:
> > - Transmit amplitude voltages in microvolts, peak-to-peak. If this property
> > - contains multiple values for various PHY modes, the
> > - 'tx-p2p-microvolt-names' property must be provided and contain
> > - corresponding mode names.
> > -
> > - tx-p2p-microvolt-names:
> > - description: |
> > - Names of the modes corresponding to voltages in the 'tx-p2p-microvolt'
> > - property. Required only if multiple voltages are provided.
> > -
> > - If a value of 'default' is provided, the system should use it for any PHY
> > - mode that is otherwise not defined here. If 'default' is not provided, the
> > - system should use manufacturer default value.
> > + Names of the PHY modes. If a value of 'default' is provided, the system
> > + should use it for any PHY mode that is otherwise not defined here. If
> > + 'default' is not provided, the system should use manufacturer default value.
> > minItems: 1
> > maxItems: 16
> > items:
> > @@ -89,6 +79,20 @@ properties:
> > - mipi-dphy-univ
> > - mipi-dphy-v2.5-univ
> >
> > +properties:
> > + tx-p2p-microvolt:
> > + description:
> > + Transmit amplitude voltages in microvolts, peak-to-peak. If this property
> > + contains multiple values for various PHY modes, the
> > + 'tx-p2p-microvolt-names' property must be provided and contain
> > + corresponding mode names.
> > +
> > + tx-p2p-microvolt-names:
> > + description:
> > + Names of the modes corresponding to voltages in the 'tx-p2p-microvolt'
> > + property. Required only if multiple voltages are provided.
> > + $ref: "#/$defs/protocol-names"
>
> The default for .*-names is the entries don't have to be unique. That's
> for the exception, but unfortunately everyone else has to define the
> type (type.yaml#/definitons/string).
>
> Each user needs to define the names of the entries which will enforce
> the length. So defining the length 1-16 here doesn't do much. So I think
> you can drop that and then the $defs is not needed either.
I missed that all the names are defined here. Nevermind on the 2nd
point. We probably still need either a $ref or 'uniqueItems: true'.
Either way should work.
Rob
next prev parent reply other threads:[~2025-12-04 16:11 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-22 19:33 [PATCH net-next 0/9] XPCS polarity inversion via generic device tree properties Vladimir Oltean
2025-11-22 19:33 ` [PATCH net-next 1/9] dt-bindings: phy: rename transmit-amplitude.yaml to phy-common-props.yaml Vladimir Oltean
2025-11-25 21:19 ` Andrew Lunn
2025-11-25 21:44 ` Vladimir Oltean
2025-11-25 22:33 ` Andrew Lunn
2025-11-26 7:26 ` Vladimir Oltean
2025-11-26 9:32 ` Holger Brunck
2025-11-26 10:33 ` Vladimir Oltean
2025-11-26 10:45 ` Holger Brunck
2025-11-26 10:51 ` Vladimir Oltean
2025-11-26 13:05 ` Holger Brunck
2025-11-26 14:09 ` Andrew Lunn
2025-11-26 14:25 ` Maxime Chevallier
2025-12-04 16:11 ` Rob Herring (Arm)
2025-11-22 19:33 ` [PATCH net-next 2/9] dt-bindings: phy-common-props: create a reusable "protocol-names" definition Vladimir Oltean
2025-12-04 15:52 ` Rob Herring
2025-12-04 16:11 ` Rob Herring [this message]
2025-11-22 19:33 ` [PATCH net-next 3/9] dt-bindings: phy-common-props: RX and TX lane polarity inversion Vladimir Oltean
2025-12-04 16:13 ` Rob Herring (Arm)
2025-11-22 19:33 ` [PATCH net-next 4/9] dt-bindings: net: xpcs: allow properties from phy-common-props.yaml Vladimir Oltean
2025-12-04 16:13 ` Rob Herring (Arm)
2025-11-22 19:33 ` [PATCH net-next 5/9] phy: add phy_get_rx_polarity() and phy_get_tx_polarity() Vladimir Oltean
2025-11-25 4:01 ` Jakub Kicinski
2025-11-25 17:02 ` Vladimir Oltean
2025-12-01 8:37 ` Vinod Koul
2025-12-01 8:41 ` Krzysztof Kozlowski
2025-12-04 15:34 ` Vladimir Oltean
2025-12-04 16:48 ` Krzysztof Kozlowski
2025-12-01 19:03 ` Jakub Kicinski
2025-11-22 19:33 ` [PATCH net-next 6/9] net: pcs: xpcs: promote SJA1105 TX polarity inversion to core Vladimir Oltean
2025-11-22 19:33 ` [PATCH net-next 7/9] net: pcs: xpcs: allow lane polarity inversion Vladimir Oltean
2025-11-26 15:17 ` kernel test robot
2025-11-22 19:33 ` [PATCH net-next 8/9] net: phy: air_en8811h: deprecate "airoha,pnswap-rx" and "airoha,pnswap-tx" Vladimir Oltean
2025-11-22 19:33 ` [PATCH net-next 9/9] dt-bindings: net: airoha,en8811h: " Vladimir Oltean
2025-12-04 16:13 ` Rob Herring (Arm)
2025-11-25 14:36 ` [PATCH net-next 0/9] XPCS polarity inversion via generic device tree properties Daniel Golle
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=20251204161133.GA1574692-robh@kernel.org \
--to=robh@kernel.org \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=ericwouds@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kabel@kernel.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patrice.chotard@foss.st.com \
--cc=vkoul@kernel.org \
--cc=vladimir.oltean@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).