linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/35] [RFT] net: dpaa: Convert to phylink
@ 2022-06-28 22:13 Sean Anderson
  2022-06-28 22:13 ` [PATCH net-next v2 01/35] dt-bindings: phy: Add QorIQ SerDes binding Sean Anderson
                   ` (34 more replies)
  0 siblings, 35 replies; 61+ messages in thread
From: Sean Anderson @ 2022-06-28 22:13 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
  Cc: Russell King, Paolo Abeni, linux-arm-kernel, Eric Dumazet,
	linux-kernel, Sean Anderson, Benjamin Herrenschmidt,
	Ioana Ciornei, Jonathan Corbet, Kishon Vijay Abraham I,
	Krzysztof Kozlowski, Li Yang, Michael Ellerman, Paul Mackerras,
	Rob Herring, Shawn Guo, Vinod Koul, devicetree, linux-doc,
	linux-phy, linuxppc-dev

This series converts the DPAA driver to phylink. Additionally,
it also adds a serdes driver to allow for dynamic reconfiguration
between 1g and 10g interfaces (such as in an SFP+ slot). These changes
are submitted together for this RFC, but they will eventually be
submitted separately to the appropriate subsystem maintainers.

I have tried to maintain backwards compatibility with existing device
trees whereever possible. However, one area where I was unable to
achieve this was with QSGMII. Please refer to patch 3 for details.

All mac drivers have now been converted. I would greatly appreciate if
anyone has QorIQ boards they can test/debug this series on. I only have an
LS1046ARDB. Everything but QSGMII should work without breakage; QSGMII
needs patch 33.

The serdes driver is mostly functional (but not quite, see patches 5 and
31).  This series only adds support for the LS1046ARDB SerDes, but it
should be fairly straightforward to add support for other SoCs and
boards (see Documentation/driver-api/phy/qoriq.rst). Patches 34 and 25
should show the typical steps.

This patches in this series can be logically categorized as follows:
- 1, 4, 29, 34-35: SerDes support
- 2, 5-25: Cleanups. These can be applied as-is.
- 3, 26-28, 30-33: Phylink conversion

Patches 5-9 were first submitted as [1].

[1] https://lore.kernel.org/netdev/20220531195851.1592220-1-sean.anderson@seco.com/

Changes in v2:
- Add #clock-cells. This will allow using assigned-clocks* to configure
  the PLLs.
- Add CGR update function
- Add helper for sanity checking cgr ops
- Add nodes for QSGMII PCSs
- Add rgmii property to all DPAA MACs
- Adjust queue depth on rate change
- Allow a value of 1 for phy-cells. This allows for compatibility with
  the similar (but according to Ioana Ciornei different enough) lynx-28g
  binding.
- Better document how we select which PCS to use in the default case
- Clear SGMIIaCR1_PCS_EN during probe
- Configure the SerDes in enable/disable
- Convert 10GEC and dTSEC as well
- Convert FMan MAC bindings to yaml
- Disable SerDes by default to prevent breaking boards inadvertently.
- Document phy cells in the description
- Document the structure of the compatible strings
- Fix capitalization of mEMAC in commit messages
- Fix example binding having too many cells in regs
- Fix not clearing group->pll after disabling it
- Fix prototype for dtsec_initialization
- Fix warning if sizeof(void *) != sizeof(resource_size_t)
- Handle 1000Base-KX in lynx_proto_mode_prep
- Move PCS_LYNX dependency to fman Kconfig
- Move compatible first
- Power off lanes during probe
- Properly implement all ethtool ops and ioctls. These were mostly
  stubbed out just enough to compile last time.
- Refer to the device in the documentation, rather than the binding
- Remove minItems
- Remove some unused variables
- Remove unused variable slow_10g_if
- Rename LYNX_PROTO_UNKNOWN to LYNX_PROTO_NONE
- Rename driver to Lynx 10G (etc.)
- Rename to fsl,lynx-10g.yaml
- Restrict valid link modes based on the phy interface. This is easier
  to set up, and mostly captures what I intended to do the first time.
  We now have a custom validate which restricts half-duplex for some SoCs
  for RGMII, but generally just uses the default phylink validate.
- Specify type of mac_dev for exception_cb
- Support 1 and 2 phy-cells
- Use list for clock-names
- Use one phy cell for SerDes1, since no lanes can be grouped

Sean Anderson (35):
  dt-bindings: phy: Add QorIQ SerDes binding
  dt-bindings: net: Convert FMan MAC bindings to yaml
  dt-bindings: net: fman: Add additional interface properties
  [RFC] phy: fsl: Add Lynx 10G SerDes driver
  net: fman: Convert to SPDX identifiers
  net: fman: Don't pass comm_mode to enable/disable
  net: fman: Store en/disable in mac_device instead of mac_priv_s
  net: fman: dtsec: Always gracefully stop/start
  net: fman: Get PCS node in per-mac init
  net: fman: Store initialization function in match data
  net: fman: Move struct dev to mac_device
  net: fman: Configure fixed link in memac_initialization
  net: fman: Export/rename some common functions
  net: fman: memac: Use params instead of priv for max_speed
  net: fman: Move initialization to mac-specific files
  net: fman: Mark mac methods static
  net: fman: Inline several functions into initialization
  net: fman: Remove internal_phy_node from params
  net: fman: Map the base address once
  net: fman: Pass params directly to mac init
  net: fman: Use mac_dev for some params
  net: fman: Specify type of mac_dev for exception_cb
  net: fman: Clean up error handling
  net: fman: Change return type of disable to void
  net: dpaa: Use mac_dev variable in dpaa_netdev_init
  soc: fsl: qbman: Add helper for sanity checking cgr ops
  soc: fsl: qbman: Add CGR update function
  net: dpaa: Adjust queue depth on rate change
  net: fman: memac: Add serdes support
  net: fman: memac: Use lynx pcs driver
  [RFT] net: dpaa: Convert to phylink
  qoriq: Specify which MACs support RGMII
  qoriq: Add nodes for QSGMII PCSs
  arm64: dts: ls1046a: Add serdes bindings
  arm64: dts: ls1046ardb: Add serdes bindings

 .../bindings/net/fsl,fman-dtsec.yaml          |  188 +++
 .../devicetree/bindings/net/fsl-fman.txt      |  133 +-
 .../devicetree/bindings/phy/fsl,lynx-10g.yaml |   93 ++
 Documentation/driver-api/phy/index.rst        |    1 +
 Documentation/driver-api/phy/qoriq.rst        |   93 ++
 MAINTAINERS                                   |    6 +
 .../boot/dts/freescale/fsl-ls1043-post.dtsi   |   28 +
 .../boot/dts/freescale/fsl-ls1046-post.dtsi   |   33 +
 .../boot/dts/freescale/fsl-ls1046a-rdb.dts    |   34 +
 .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi |   16 +
 arch/powerpc/boot/dts/fsl/b4860si-post.dtsi   |    4 +
 arch/powerpc/boot/dts/fsl/b4si-post.dtsi      |    4 +
 .../fsl/qoriq-fman3-0-10g-0-best-effort.dtsi  |    3 +-
 .../boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi     |    9 +-
 .../fsl/qoriq-fman3-0-10g-1-best-effort.dtsi  |    9 +-
 .../boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi     |    9 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi      |    3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi      |    3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi     |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi     |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi      |    3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi      |    9 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi      |    3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi      |    9 +-
 arch/powerpc/boot/dts/fsl/t1023si-post.dtsi   |    4 +
 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi   |    7 +
 arch/powerpc/boot/dts/fsl/t2081si-post.dtsi   |    8 +
 arch/powerpc/boot/dts/fsl/t4240si-post.dtsi   |   16 +
 drivers/net/ethernet/freescale/dpaa/Kconfig   |    4 +-
 .../net/ethernet/freescale/dpaa/dpaa_eth.c    |  132 +-
 .../ethernet/freescale/dpaa/dpaa_eth_sysfs.c  |    2 +-
 .../ethernet/freescale/dpaa/dpaa_ethtool.c    |   90 +-
 drivers/net/ethernet/freescale/fman/Kconfig   |    3 +-
 drivers/net/ethernet/freescale/fman/fman.c    |   31 +-
 drivers/net/ethernet/freescale/fman/fman.h    |   31 +-
 .../net/ethernet/freescale/fman/fman_dtsec.c  |  670 ++++----
 .../net/ethernet/freescale/fman/fman_dtsec.h  |   58 +-
 .../net/ethernet/freescale/fman/fman_keygen.c |   29 +-
 .../net/ethernet/freescale/fman/fman_keygen.h |   29 +-
 .../net/ethernet/freescale/fman/fman_mac.h    |   34 +-
 .../net/ethernet/freescale/fman/fman_memac.c  |  877 +++++-----
 .../net/ethernet/freescale/fman/fman_memac.h  |   57 +-
 .../net/ethernet/freescale/fman/fman_muram.c  |   31 +-
 .../net/ethernet/freescale/fman/fman_muram.h  |   32 +-
 .../net/ethernet/freescale/fman/fman_port.c   |   29 +-
 .../net/ethernet/freescale/fman/fman_port.h   |   29 +-
 drivers/net/ethernet/freescale/fman/fman_sp.c |   29 +-
 drivers/net/ethernet/freescale/fman/fman_sp.h |   28 +-
 .../net/ethernet/freescale/fman/fman_tgec.c   |  274 ++-
 .../net/ethernet/freescale/fman/fman_tgec.h   |   54 +-
 drivers/net/ethernet/freescale/fman/mac.c     |  653 +-------
 drivers/net/ethernet/freescale/fman/mac.h     |   66 +-
 drivers/phy/freescale/Kconfig                 |   20 +
 drivers/phy/freescale/Makefile                |    1 +
 drivers/phy/freescale/phy-fsl-lynx-10g.c      | 1483 +++++++++++++++++
 drivers/soc/fsl/qbman/qman.c                  |   76 +-
 include/soc/fsl/qman.h                        |    9 +
 63 files changed, 3330 insertions(+), 2331 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
 create mode 100644 Documentation/driver-api/phy/qoriq.rst
 create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g.c

-- 
2.35.1.1320.gc452695387.dirty


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

end of thread, other threads:[~2022-07-12 19:57 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 22:13 [PATCH net-next v2 00/35] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 01/35] dt-bindings: phy: Add QorIQ SerDes binding Sean Anderson
2022-06-29  2:09   ` Rob Herring
2022-06-30 15:53     ` Sean Anderson
2022-06-30 17:27   ` Rob Herring
2022-06-30 18:01     ` Sean Anderson
2022-06-30 18:08       ` Krzysztof Kozlowski
2022-06-30 18:16         ` Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 02/35] dt-bindings: net: Convert FMan MAC bindings to yaml Sean Anderson
2022-06-29  2:09   ` Rob Herring
2022-06-29 14:50   ` Russell King (Oracle)
2022-06-30 14:59     ` Sean Anderson
2022-07-01  0:01   ` Rob Herring
2022-06-28 22:13 ` [PATCH net-next v2 03/35] dt-bindings: net: fman: Add additional interface properties Sean Anderson
2022-06-30 16:01   ` Rob Herring
2022-06-30 16:11     ` Sean Anderson
2022-07-12 19:36       ` Rob Herring
2022-07-12 19:56         ` Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 04/35] [RFC] phy: fsl: Add Lynx 10G SerDes driver Sean Anderson
2022-06-30 15:56   ` Ioana Ciornei
2022-06-30 18:11     ` Sean Anderson
2022-07-01 10:03       ` Ioana Ciornei
2022-07-01 15:51         ` Sean Anderson
     [not found]         ` <343faa45-4e4a-7a7f-b0c3-fcc9db89e976@seco.com>
2022-07-01 21:04           ` Sean Anderson
2022-07-05  6:12   ` Vinod Koul
2022-07-05 15:29     ` Sean Anderson
2022-07-06 16:57       ` Vinod Koul
2022-07-07 15:00         ` Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 05/35] net: fman: Convert to SPDX identifiers Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 06/35] net: fman: Don't pass comm_mode to enable/disable Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 07/35] net: fman: Store en/disable in mac_device instead of mac_priv_s Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 08/35] net: fman: dtsec: Always gracefully stop/start Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 09/35] net: fman: Get PCS node in per-mac init Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 10/35] net: fman: Store initialization function in match data Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 11/35] net: fman: Move struct dev to mac_device Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 12/35] net: fman: Configure fixed link in memac_initialization Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 13/35] net: fman: Export/rename some common functions Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 14/35] net: fman: memac: Use params instead of priv for max_speed Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 15/35] net: fman: Move initialization to mac-specific files Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 16/35] net: fman: Mark mac methods static Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 17/35] net: fman: Inline several functions into initialization Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 18/35] net: fman: Remove internal_phy_node from params Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 19/35] net: fman: Map the base address once Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 20/35] net: fman: Pass params directly to mac init Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 21/35] net: fman: Use mac_dev for some params Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 22/35] net: fman: Specify type of mac_dev for exception_cb Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 23/35] net: fman: Clean up error handling Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 24/35] net: fman: Change return type of disable to void Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 25/35] net: dpaa: Use mac_dev variable in dpaa_netdev_init Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 26/35] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 27/35] soc: fsl: qbman: Add CGR update function Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 28/35] net: dpaa: Adjust queue depth on rate change Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 29/35] net: fman: memac: Add serdes support Sean Anderson
2022-06-28 22:13 ` [PATCH net-next v2 30/35] net: fman: memac: Use lynx pcs driver Sean Anderson
2022-06-28 22:14 ` [PATCH net-next v2 31/35] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-06-29 14:44   ` Russell King (Oracle)
2022-06-30 15:56     ` Sean Anderson
2022-06-28 22:14 ` [PATCH net-next v2 32/35] qoriq: Specify which MACs support RGMII Sean Anderson
2022-06-28 22:14 ` [PATCH net-next v2 33/35] qoriq: Add nodes for QSGMII PCSs Sean Anderson
2022-06-28 22:14 ` [PATCH net-next v2 34/35] arm64: dts: ls1046a: Add serdes bindings Sean Anderson
2022-06-28 22:14 ` [PATCH net-next v2 35/35] arm64: dts: ls1046ardb: " Sean Anderson

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).