public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Lee Jones <lee@kernel.org>
Cc: netdev@vger.kernel.org, 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>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 07/15] mfd: core: add ability for cells to probe on a custom parent OF node
Date: Fri, 16 Jan 2026 16:22:04 +0200	[thread overview]
Message-ID: <20260116142204.fjpqvcbc2p72m255@skbuf> (raw)
In-Reply-To: <20260116140237.kfkegpkubzn7l63g@skbuf>

On Fri, Jan 16, 2026 at 04:02:37PM +0200, Vladimir Oltean wrote:
> On Fri, Jan 16, 2026 at 01:23:45PM +0000, Lee Jones wrote:
> > Please send me the full and finalised DTS hunk.
>
> I gave it to you earlier in this thread, it is (2) from:
> https://lore.kernel.org/netdev/20260109121432.lu2o22iijd4i57qq@skbuf/
> (the actual device tree has more irrelevant properties, the above is
> just the relevant skeleton)
>
> With the mention that in current device trees, the "regs" node and its
> underlying hierachy is missing, and patch 14 from this patch set uses
> the of_changeset API to dynamically fill it in before calling
> mfd_add_devices().

I am a bit torn between not wanting to confuse you by providing
irrelevant information, and not giving the impression that those
properties are all that there is.

The ethernet-switch root node also has all DSA properties that can be
seen in the Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
example. The above properties are all overlaid on top.

Merged together, they would look like this:

spi {
	#address-cells = <1>;
	#size-cells = <0>;

	sw1: ethernet-switch@0 {
		compatible = "nxp,sja1110a";
		reg = <0>; // means "SPI chip select"

		ethernet-ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
			};

			port@1 {
				reg = <1>;
				pcs-handle = <&sgmii1_pcs>;
			};

			port@2 {
				reg = <2>;
				pcs-handle = <&sgmii2_pcs>;

				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};

			port@3 {
				reg = <3>;
				pcs-handle = <&sgmii3_pcs>;
			};

			sw1p4: port@4 {
				reg = <4>;
				pcs-handle = <&sgmii4_pcs>;
			};

			port@5 {
				reg = <5>;
				phy-handle = <&sw1_port5_base_t1_phy>;
			};

			port@6 {
				reg = <6>;
				phy-handle = <&sw1_port6_base_t1_phy>;
			};

			port@7 {
				reg = <7>;
				phy-handle = <&sw1_port7_base_t1_phy>;
			};

			port@8 {
				reg = <8>;
				phy-handle = <&sw1_port8_base_t1_phy>;
			};

			port@9 {
				reg = <9>;
				phy-handle = <&sw1_port9_base_t1_phy>;
			};

			port@a {
				reg = <10>;
				phy-handle = <&sw1_port10_base_t1_phy>;
			};
		};

		mdios {
			#address-cells = <1>;
			#size-cells = <0>;

			mdio@0 {
				compatible = "nxp,sja1110-base-t1-mdio";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0>; // 0 has no physical meaning other than "first bus"

				sw1_port5_base_t1_phy: ethernet-phy@1 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x1>;
				};

				sw1_port6_base_t1_phy: ethernet-phy@2 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x2>;
				};

				sw1_port7_base_t1_phy: ethernet-phy@3 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x3>;
				};

				sw1_port8_base_t1_phy: ethernet-phy@4 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x4>;
				};

				sw1_port9_base_t1_phy: ethernet-phy@5 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x5>;
				};

				sw1_port10_base_t1_phy: ethernet-phy@6 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x6>;
				};
			};

			mdio@1 {
				compatible = "nxp,sja1110-base-tx-mdio";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <1>; // no physical meaning other than "second bus"

				ethernet-phy@0 {
					reg = <0x0>;
				};
			};
		};

		/* The portion above is established binding. The portion below isn't */

		regs {
			#address-cells = <1>;
			#size-cells = <1>;

			/* The bindings of these PCS devices all come
			 * from Documentation/devicetree/bindings/net/pcs/snps,dw-xpcs.yaml,
			 * they are not defined by me.
			 */
			sgmii1_pcs: ethernet-pcs@705000 { // Physical meaning: untranslatable switch address space
				compatible = "nxp,sja1110-pcs";
				reg = <0x705000 0x1000>;
				reg-names = "indirect";
			};

			sgmii2_pcs: ethernet-pcs@706000 {
				compatible = "nxp,sja1110-pcs";
				reg = <0x706000 0x1000>;
				reg-names = "indirect";
				rx-polarity = <PHY_POL_INVERT>; // THIS LINE is what the entire effort is for.
			};

			sgmii3_pcs: ethernet-pcs@707000 {
				compatible = "nxp,sja1110-pcs";
				reg = <0x707000 0x1000>;
				reg-names = "indirect";
			};

			sgmii4_pcs: ethernet-pcs@708000 {
				compatible = "nxp,sja1110-pcs";
				reg = <0x708000 0x1000>;
				reg-names = "indirect";
			};
		};
	};
};

  reply	other threads:[~2026-01-16 14:22 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 19:05 [PATCH net-next 00/15] Probe SJA1105 DSA children using MFD and dynamic OF nodes Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 01/15] net: dsa: sja1105: let phylink help with the replay of link callbacks Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 02/15] net: mdio-regmap: permit working with non-MMIO regmaps Vladimir Oltean
2025-11-20 14:35   ` Maxime Chevallier
2025-11-18 19:05 ` [PATCH net-next 03/15] net: mdio: add driver for NXP SJA1110 100BASE-T1 embedded PHYs Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 04/15] net: mdio: add generic driver for NXP SJA1110 100BASE-TX " Vladimir Oltean
2025-11-20 17:55   ` Maxime Chevallier
2025-11-20 18:49     ` Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 05/15] net: dsa: sja1105: prepare regmap for passing to child devices Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 06/15] net: dsa: sja1105: include spi.h from sja1105.h Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 07/15] mfd: core: add ability for cells to probe on a custom parent OF node Vladimir Oltean
2025-11-20 14:41   ` Lee Jones
2025-11-20 15:36     ` Vladimir Oltean
2025-11-21 12:06       ` Lee Jones
2025-11-21 17:03         ` Vladimir Oltean
2025-11-26 10:20           ` Lee Jones
2025-12-15 15:50           ` Lee Jones
2025-12-16  0:29             ` Vladimir Oltean
2025-12-16  9:18               ` Lee Jones
2025-12-16 16:24                 ` Vladimir Oltean
2026-01-09 10:31                   ` Lee Jones
2026-01-09 12:14                     ` Vladimir Oltean
2026-01-15  9:35                       ` Vladimir Oltean
2026-01-15 15:18                         ` Lee Jones
2026-01-15 16:14                       ` Lee Jones
2026-01-15 18:57                         ` Vladimir Oltean
2026-01-16  8:40                           ` Lee Jones
2026-01-16 11:38                             ` Vladimir Oltean
2026-01-16 13:23                               ` Lee Jones
2026-01-16 14:02                                 ` Vladimir Oltean
2026-01-16 14:22                                   ` Vladimir Oltean [this message]
2025-12-17  9:31                 ` Andrew Lunn
2026-01-09  9:58                   ` Lee Jones
2025-11-18 19:05 ` [PATCH net-next 08/15] net: dsa: sja1105: transition OF-based MDIO drivers to standalone Vladimir Oltean
2025-11-20 14:40   ` Lee Jones
2025-11-20 15:14     ` Vladimir Oltean
2025-11-20 16:36       ` Lee Jones
2025-11-20 19:59         ` Vladimir Oltean
2025-11-21 12:00           ` Lee Jones
2025-11-18 19:05 ` [PATCH net-next 09/15] net: dsa: sja1105: remove sja1105_mdio_private Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 10/15] net: pcs: xpcs: introduce xpcs_create_pcs_fwnode() Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 11/15] net: pcs: xpcs-plat: convert to regmap Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 12/15] dt-bindings: net: dsa: sja1105: document the PCS nodes Vladimir Oltean
2025-11-20 17:30   ` Rob Herring
2025-11-18 19:05 ` [PATCH net-next 13/15] net: pcs: xpcs-plat: add NXP SJA1105/SJA1110 support Vladimir Oltean
2025-11-18 19:05 ` [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver Vladimir Oltean
2025-11-19  0:41   ` Jakub Kicinski
2025-11-19  9:59     ` Vladimir Oltean
2025-11-19 10:31       ` Andy Shevchenko
2025-11-19 11:25         ` Vladimir Oltean
2025-11-19 16:11           ` Jakub Kicinski
2025-11-19 16:17             ` Andy Shevchenko
2025-11-19 17:23               ` Russell King (Oracle)
2025-11-19 17:39                 ` Andy Shevchenko
2025-11-19 18:35                   ` Jakub Kicinski
2025-11-19 19:33                     ` Andy Shevchenko
2025-11-20 12:32             ` Russell King (Oracle)
2025-11-20 15:00               ` Jakub Kicinski
2025-11-19 11:19   ` kernel test robot
2025-11-19 12:01     ` Vladimir Oltean
2025-11-19 12:03       ` Russell King (Oracle)
2025-11-19 12:05         ` Russell King (Oracle)
2025-11-19 13:28           ` Vladimir Oltean
2025-11-19 12:01   ` kernel test robot
2025-11-20  0:01   ` kernel test robot
2025-11-18 19:05 ` [PATCH net-next 15/15] net: dsa: sja1105: permit finding the XPCS via pcs-handle 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=20260116142204.fjpqvcbc2p72m255@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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