public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Herve Codina <herve.codina@bootlin.com>,
	Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Choong Yong Liang <yong.liang.choong@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Lee Jones <lee@kernel.org>, Jiawen Wu <jiawenwu@trustnetic.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Serge Semin <fancer.lancer@gmail.com>
Subject: Re: [PATCH v2 net-next 09/15] dt-bindings: net: dsa: sja1105: document the PCS nodes
Date: Thu, 29 Jan 2026 12:10:53 -0600	[thread overview]
Message-ID: <176971025335.1390033.17907150388219680260.robh@kernel.org> (raw)
In-Reply-To: <20260122105654.105600-10-vladimir.oltean@nxp.com>


On Thu, 22 Jan 2026 12:56:48 +0200, Vladimir Oltean wrote:
> Some (not all) use cases are in dire need of describing the XPCS blocks
> embedded in the NXP SJA1105 and SJA1110 switches in the device tree.
> The use case driving this effort is specifying custom 'rx-polarity' or
> 'tx-polarity' property values.
> 
> These PCS blocks follow the same bindings as the other instances which
> are memory-mapped using an APB3 or MCI interface.
> 
> Since the SJA1105 applies the
> Documentation/devicetree/bindings/net/ethernet-switch.yaml schema
> directly on the SPI device OF node, its bindings are incompatible with
> describing address space regions where sub-devices like the XPCS exist.
> Namely, ethernet-switch.yaml wants #address-cells and #size-cells = <0>
> to satisfy the unit-address-less '^(ethernet-)?ports$' child node.
> But the XPCS sub-devices want their unit address to be the start
> of their "reg" region in the switch address space, and that
> requires #address-cells and #size-cells = <1>.
> 
> If the SPI device OF node had an MFD-style schema, i.e. "(1)" from here:
> https://lore.kernel.org/netdev/20260109121432.lu2o22iijd4i57qq@skbuf/
> things would have been simpler. But that ship has sailed and we need to
> continue supporting the direction in which the SJA1105 bindings have
> started already.
> 
> The retrofit-ready compromise solution is for the ethernet-switch to
> define a custom "regs" sub-node with #address-cells and #size-cells = <1>,
> and this will hold any memory-mapped sub-devices, like the XPCS in this
> case.
> 
> This solution could have been used for the "nxp,sja1110-base-t1-mdio"
> and "nxp,sja1110-base-tx-mdio" sub-devices too (although that ship has
> also sailed), and is further extensible for other SJA1110 sub-devices
> not yet supported (GPIO controller, cascaded IRQ controller).
> 
> Document the XPCS integration-specific compatible string, positioning in
> the switch's "regs" subnode, and the pcs-handle to them.
> 
> The "type: object" addition in the ethernet-port node is to suppress
> a dt_binding_check warning that states "node schemas must have a type
> or $ref". Rob Herring explains why this started being required just now:
> https://lore.kernel.org/netdev/20251120173012.GA1563834-robh@kernel.org/
> 
> Because the regs and ethernet-pcs nodes are optional, I don't want to
> pollute the example with them. However, I think I can add them to the
> commit message:
> 
> compatible = "nxp,sja1105s";
> ...
> regs {
> 	#address-cells = <0x01>;
> 	#size-cells = <0x01>;
> 
> 	ethernet-pcs@0 {
> 		compatible = "nxp,sja1105-pcs";
> 		reg = <0x00 0x800000>;
> 		reg-names = "direct";
> 		reg-io-width = <0x04>;
> 		tx-polarity = <PHY_POL_INVERTED>;
> 	};
> };
> 
> compatible = "nxp,sja1110a";
> ...
> regs {
> 	#address-cells = <0x01>;
> 	#size-cells = <0x01>;
> 
> 	ethernet-pcs@705000 {
> 		compatible = "nxp,sja1110-pcs";
> 		reg = <0x705000 0x1000>;
> 		reg-names = "indirect";
> 		reg-io-width = <0x04>;
> 		tx-polarity = <PHY_POL_NORMAL>;
> 	};
> 
> 	ethernet-pcs@706000 {
> 		compatible = "nxp,sja1110-pcs";
> 		reg = <0x706000 0x1000>;
> 		reg-names = "indirect";
> 		reg-io-width = <0x04>;
> 		tx-polarity = <PHY_POL_NORMAL>;
> 	};
> 
> 	ethernet-pcs@707000 {
> 		compatible = "nxp,sja1110-pcs";
> 		reg = <0x707000 0x1000>;
> 		reg-names = "indirect";
> 		reg-io-width = <0x04>;
> 		tx-polarity = <PHY_POL_NORMAL>;
> 	};
> 
> 	ethernet-pcs@708000 {
> 		compatible = "nxp,sja1110-pcs";
> 		reg = <0x708000 0x1000>;
> 		reg-names = "indirect";
> 		reg-io-width = <0x04>;
> 		tx-polarity = <PHY_POL_NORMAL>;
> 	};
> };
> 
> Cc: Rob Herring <robh@kernel.org>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> v1->v2: rewrite commit message
> 
>  .../bindings/net/dsa/nxp,sja1105.yaml         | 27 +++++++++++++++++++
>  .../bindings/net/pcs/snps,dw-xpcs.yaml        |  8 ++++++
>  2 files changed, 35 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


  reply	other threads:[~2026-01-29 18:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22 10:56 [PATCH v2 net-next 00/15] Probe SJA1105 DSA children as platform sub-devices Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 01/15] net: mdio-regmap: permit working with non-MMIO regmaps Vladimir Oltean
2026-01-22 12:06   ` Andy Shevchenko
2026-01-22 12:13     ` Vladimir Oltean
2026-01-22 12:16       ` Russell King (Oracle)
2026-01-22 12:21         ` Vladimir Oltean
2026-01-22 13:47       ` Vladimir Oltean
2026-01-22 14:38         ` Andy Shevchenko
2026-01-22 22:18           ` Vladimir Oltean
2026-01-23  7:20             ` Andy Shevchenko
2026-01-23 12:15               ` Vladimir Oltean
2026-01-23 13:55                 ` Vladimir Oltean
2026-01-23 14:31                   ` Andy Shevchenko
2026-01-23 15:10                     ` Vladimir Oltean
2026-01-23 15:39                       ` Andy Shevchenko
2026-01-23 15:54                         ` Andy Shevchenko
2026-01-23 14:23                 ` Andy Shevchenko
2026-01-22 14:28       ` Andy Shevchenko
2026-01-22 10:56 ` [PATCH v2 net-next 02/15] net: mdio: add driver for NXP SJA1110 100BASE-T1 embedded PHYs Vladimir Oltean
2026-01-22 12:12   ` Andy Shevchenko
2026-01-22 12:47     ` Vladimir Oltean
2026-01-22 14:44       ` Andy Shevchenko
2026-01-22 22:10         ` Vladimir Oltean
2026-01-22 23:11           ` Andrew Lunn
2026-01-23  7:25           ` Andy Shevchenko
2026-01-22 10:56 ` [PATCH v2 net-next 03/15] net: mdio: add generic driver for NXP SJA1110 100BASE-TX " Vladimir Oltean
2026-01-22 12:20   ` Andy Shevchenko
2026-01-22 13:31     ` Vladimir Oltean
2026-01-22 14:48       ` Andy Shevchenko
2026-01-22 10:56 ` [PATCH v2 net-next 04/15] net: dsa: sja1105: prepare regmap for passing to child devices Vladimir Oltean
2026-01-22 12:23   ` Andy Shevchenko
2026-01-22 13:42     ` Vladimir Oltean
2026-01-22 14:54       ` Andy Shevchenko
2026-01-22 16:17         ` Russell King (Oracle)
2026-01-22 16:34           ` Andy Shevchenko
2026-01-22 10:56 ` [PATCH v2 net-next 05/15] net: dsa: sja1105: include spi.h from sja1105.h Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 06/15] net: dsa: sja1105: transition OF-based MDIO controllers to standalone sub-devices Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 07/15] net: pcs: xpcs: introduce xpcs_create_pcs_fwnode() Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 08/15] net: pcs: xpcs-plat: convert to regmap Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 09/15] dt-bindings: net: dsa: sja1105: document the PCS nodes Vladimir Oltean
2026-01-29 18:10   ` Rob Herring (Arm) [this message]
2026-01-22 10:56 ` [PATCH v2 net-next 10/15] net: pcs: xpcs-plat: add NXP SJA1105/SJA1110 support Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 11/15] net: dsa: sja1105: fill device tree with ethernet-pcs sub-devices under "regs" node Vladimir Oltean
2026-01-23 19:45   ` kernel test robot
2026-01-22 10:56 ` [PATCH v2 net-next 12/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 13/15] net: dsa: sja1105: permit finding the XPCS via pcs-handle Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 14/15] dt-bindings: net: xpcs: allow properties from phy-common-props.yaml Vladimir Oltean
2026-01-22 10:56 ` [PATCH v2 net-next 15/15] net: pcs: xpcs: allow generic polarity inversion Vladimir Oltean

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=176971025335.1390033.17907150388219680260.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=yong.liang.choong@linux.intel.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