From: Sean Anderson <sean.anderson@seco.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Madalin Bucur <madalin.bucur@nxp.com>,
netdev@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>,
Paolo Abeni <pabeni@redhat.com>,
linux-arm-kernel@lists.infradead.org,
Eric Dumazet <edumazet@google.com>,
linux-kernel@vger.kernel.org,
Sean Anderson <sean.anderson@seco.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Jonathan Corbet <corbet@lwn.net>,
Kishon Vijay Abraham I <kishon@ti.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Li Yang <leoyang.li@nxp.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>,
Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Vinod Koul <vkoul@kernel.org>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-phy@lists.infradead.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH net-next v2 00/35] [RFT] net: dpaa: Convert to phylink
Date: Tue, 28 Jun 2022 18:13:29 -0400 [thread overview]
Message-ID: <20220628221404.1444200-1-sean.anderson@seco.com> (raw)
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
next reply other threads:[~2022-06-28 22:14 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 22:13 Sean Anderson [this message]
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
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=20220628221404.1444200-1-sean.anderson@seco.com \
--to=sean.anderson@seco.com \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=ioana.ciornei@nxp.com \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulus@samba.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.org \
/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).