public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/15] Probe SJA1105 DSA children as platform sub-devices
@ 2026-01-22 10:56 Vladimir Oltean
  2026-01-22 10:56 ` [PATCH v2 net-next 01/15] net: mdio-regmap: permit working with non-MMIO regmaps Vladimir Oltean
                   ` (14 more replies)
  0 siblings, 15 replies; 48+ messages in thread
From: Vladimir Oltean @ 2026-01-22 10:56 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel,
	Andy Shevchenko, Herve Codina, Mark Brown, Serge Semin,
	Maxime Chevallier, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, Choong Yong Liang, Jiawen Wu

The NXP SJA1105 and SJA1110 switches have a linear address space thanks
to their SPI-to-AHB bridge. This address space contains not only the
Ethernet switch, but (depending on hw generation) SGMII PCS blocks,
MDIO controllers, interrupt controllers, GPIO controllers. Of these, the
SGMII PCS blocks and the MDIO controllers are supported today by the DSA
driver, through internal programming.

This series proposes registering platform devices for each non-switch
weakly coupled component, all such devices being backed by an OF node
(and reachable through phandles to it), one or more resources and the
switch global regmap. For backward compatibility and not only (DT author
convenience), if these OF nodes do not exist, they are created using the
dynamic of_changeset API.

The motivation must be explained top-down:

  The high-level goal is to customize the XPCS (SGMII PCS block) with
  board-specific device tree that describe the required differential
  lane polarity.

  But the XPCS is not presently described in the device tree in
  SJA1105/SJA1110, hence the desire to do that.

  However, instances of XPCS blocks described in the device tree already
  exist for the case where it is MMIO-mapped. Those bindings dictate how
  the XPCS in SJA1105/SJA1110 should be described.

v1 at:
https://lore.kernel.org/netdev/20251118190530.580267-1-vladimir.oltean@nxp.com/

Major changes since v1:
- Stop using MFD API due to pushback from Lee Jones. Create replacement
  of_subdevs_populate() API localized to sja1105 (can be moved if need
  be)
- Exclude first patch "net: dsa: sja1105: let phylink help with the
  replay of link callbacks", upstreamed separately.
- Include XPCS lane polarity parsing.
Minor changes listed in individual patches.

Note that the current of_changeset API is "sufficient" for this use
case, but if its use is acceptable for XPCS, I will need to look at
expanding it with phandle support, for the interrupt controller
sub-device. I was able to "wing it" here by manually keeping dynamic
fwnode_handle references rather than reaching them through phandles,
but that has limits.

Vladimir Oltean (15):
  net: mdio-regmap: permit working with non-MMIO regmaps
  net: mdio: add driver for NXP SJA1110 100BASE-T1 embedded PHYs
  net: mdio: add generic driver for NXP SJA1110 100BASE-TX embedded PHYs
  net: dsa: sja1105: prepare regmap for passing to child devices
  net: dsa: sja1105: include spi.h from sja1105.h
  net: dsa: sja1105: transition OF-based MDIO controllers to standalone
    sub-devices
  net: pcs: xpcs: introduce xpcs_create_pcs_fwnode()
  net: pcs: xpcs-plat: convert to regmap
  dt-bindings: net: dsa: sja1105: document the PCS nodes
  net: pcs: xpcs-plat: add NXP SJA1105/SJA1110 support
  net: dsa: sja1105: fill device tree with ethernet-pcs sub-devices
    under "regs" node
  net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver
  net: dsa: sja1105: permit finding the XPCS via pcs-handle
  dt-bindings: net: xpcs: allow properties from phy-common-props.yaml
  net: pcs: xpcs: allow generic polarity inversion

 .../bindings/net/dsa/nxp,sja1105.yaml         |  27 +
 .../bindings/net/pcs/snps,dw-xpcs.yaml        |  13 +-
 MAINTAINERS                                   |   2 +
 drivers/net/dsa/sja1105/Kconfig               |   1 +
 drivers/net/dsa/sja1105/Makefile              |   2 +-
 drivers/net/dsa/sja1105/sja1105.h             |  39 +-
 drivers/net/dsa/sja1105/sja1105_main.c        |  86 ++-
 drivers/net/dsa/sja1105/sja1105_mdio.c        | 507 -----------------
 drivers/net/dsa/sja1105/sja1105_spi.c         | 113 +++-
 drivers/net/dsa/sja1105/sja1105_subdev.c      | 513 ++++++++++++++++++
 drivers/net/dsa/sja1105/sja1105_subdev.h      |  10 +
 drivers/net/mdio/Kconfig                      |  22 +-
 drivers/net/mdio/Makefile                     |   2 +
 drivers/net/mdio/mdio-regmap-simple.c         |  80 +++
 drivers/net/mdio/mdio-regmap.c                |   7 +-
 drivers/net/mdio/mdio-sja1110-cbt1.c          | 179 ++++++
 drivers/net/pcs/Kconfig                       |   1 +
 drivers/net/pcs/pcs-xpcs-nxp.c                |  11 -
 drivers/net/pcs/pcs-xpcs-plat.c               | 146 +++--
 drivers/net/pcs/pcs-xpcs.c                    |  58 +-
 drivers/net/pcs/pcs-xpcs.h                    |   1 -
 include/linux/mdio/mdio-regmap.h              |   2 +
 include/linux/pcs/pcs-xpcs.h                  |   1 +
 23 files changed, 1185 insertions(+), 638 deletions(-)
 delete mode 100644 drivers/net/dsa/sja1105/sja1105_mdio.c
 create mode 100644 drivers/net/dsa/sja1105/sja1105_subdev.c
 create mode 100644 drivers/net/dsa/sja1105/sja1105_subdev.h
 create mode 100644 drivers/net/mdio/mdio-regmap-simple.c
 create mode 100644 drivers/net/mdio/mdio-sja1110-cbt1.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2026-01-29 18:10 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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)
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox