* [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink
@ 2022-07-15 21:59 Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: Andrew Lunn, linux-doc, Eric Dumazet, Paul Mackerras,
Krzysztof Kozlowski, Ioana Ciornei, linux-phy, Jonathan Corbet,
Sean Anderson, Russell King, Kishon Vijay Abraham I, Paolo Abeni,
devicetree, Rob Herring, linux-arm-kernel, linuxppc-dev,
Alexandru Marginean, linux-kernel, Li Yang, Vinod Koul,
Vladimir Oltean, Shawn Guo, Heiner Kallweit
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 RFT, 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 4 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 patches 42 and 43.
The serdes driver is mostly functional (except for XFI). This series
only adds support for the LS1046ARDB SerDes (and untested LS1088ARDB),
but it should be fairly straightforward to add support for other SoCs
and boards (see Documentation/driver-api/phy/qoriq.rst).
This is the last spin of this series with all patches included. After next
week (depending on feedback) I will resend the patches broken up as
follows:
- 5: 1000BASE-KX support
- 1, 6, 44, 45: Lynx 10G support
- 7-10, 12-14: Phy rate adaptation support
- 2-4, 15-43, 46, 47: DPAA phylink conversion
Patches 15-19 were first submitted as [1].
[1] https://lore.kernel.org/netdev/20220531195851.1592220-1-sean.anderson@seco.com/
Changes in v3:
- Manually expand yaml references
- Add mode configuration to device tree
- Expand pcs-handle to an array
- Incorperate some minor changes into the first FMan binding commit
- Add vendor prefix 'fsl,' to rgmii and mii properties.
- Set maxItems for pcs-names
- Remove phy-* properties from example because dt-schema complains and I
can't be bothered to figure out how to make it work.
- Add pcs-handle as a preferred version of pcsphy-handle
- Deprecate pcsphy-handle
- Remove mii/rmii properties
- Add 1000BASE-KX interface mode
- Rename remaining references to QorIQ SerDes to Lynx 10G
- Fix PLL enable sequence by waiting for our reset request to be cleared
before continuing. Do the same for the lock, even though it isn't as
critical. Because we will delay for 1.5ms on average, use prepare
instead of enable so we can sleep.
- Document the status of each protocol
- Fix offset of several bitfields in RECR0
- Take into account PLLRST_B, SDRST_B, and SDEN when considering whether
a PLL is "enabled."
- Only power off unused lanes.
- Split mode lane mask into first/last lane (like group)
- Read modes from device tree
- Use caps to determine whether KX/KR are supported
- Move modes to lynx_priv
- Ensure that the protocol controller is not already in-use when we try
to configure a new mode. This should only occur if the device tree is
misconfigured (e.g. when QSGMII is selected on two lanes but there is
only one QSGMII controller).
- Split PLL drivers off into their own file
- Add clock for "ext_dly" instead of writing the bit directly (and
racing with any clock code).
- Use kasprintf instead of open-coding the snprintf dance
- Support 1000BASE-KX in lynx_lookup_proto. This still requires PCS
support, so nothing is truly "enabled" yet.
- Add support for phy rate adaptation
- Support differing link speeds and interface speeds
- Adjust advertisement based on rate adaptation
- Adjust link settings based on rate adaptation
- Add support for CRS-based rate adaptation
- Add support for AQR115
- Add some additional phy interfaces
- Add support for aquantia rate adaptation
- Put the PCS mdiodev only after we are done with it (since the PCS
does not perform a get itself).
- Remove _return label from memac_initialization in favor of returning
directly
- Fix grabbing the default PCS not checking for -ENODATA from
of_property_match_string
- Set DTSEC_ECNTRL_R100M in dtsec_link_up instead of dtsec_mac_config
- Remove rmii/mii properties
- Replace 1000Base... with 1000BASE... to match IEEE capitalization
- Add compatibles for QSGMII PCSs
- Split arm and powerpcs dts updates
- Describe modes in device tree
- ls1088a: Add serdes bindings
Changes in v2:
- Rename to fsl,lynx-10g.yaml
- Refer to the device in the documentation, rather than the binding
- Move compatible first
- Document phy cells in the description
- 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.
- Remove minItems
- Use list for clock-names
- Fix example binding having too many cells in regs
- Add #clock-cells. This will allow using assigned-clocks* to configure
the PLLs.
- Document the structure of the compatible strings
- Convert FMan MAC bindings to yaml
- Better document how we select which PCS to use in the default case
- Rename driver to Lynx 10G (etc.)
- Fix not clearing group->pll after disabling it
- Support 1 and 2 phy-cells
- Power off lanes during probe
- Clear SGMIIaCR1_PCS_EN during probe
- Rename LYNX_PROTO_UNKNOWN to LYNX_PROTO_NONE
- Handle 1000BASE-KX in lynx_proto_mode_prep
- Remove some unused variables
- Fix prototype for dtsec_initialization
- Fix warning if sizeof(void *) != sizeof(resource_size_t)
- Specify type of mac_dev for exception_cb
- Add helper for sanity checking cgr ops
- Add CGR update function
- Adjust queue depth on rate change
- Move PCS_LYNX dependency to fman Kconfig
- Remove unused variable slow_10g_if
- 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.
- Configure the SerDes in enable/disable
- Properly implement all ethtool ops and ioctls. These were mostly
stubbed out just enough to compile last time.
- Convert 10GEC and dTSEC as well
- Fix capitalization of mEMAC in commit messages
- Add nodes for QSGMII PCSs
- Add nodes for QSGMII PCSs
- Use one phy cell for SerDes1, since no lanes can be grouped
- Disable SerDes by default to prevent breaking boards inadvertently.
Sean Anderson (47):
dt-bindings: phy: Add Lynx 10G phy binding
dt-bindings: net: Expand pcs-handle to an array
dt-bindings: net: Convert FMan MAC bindings to yaml
dt-bindings: net: fman: Add additional interface properties
net: phy: Add 1000BASE-KX interface mode
[RFT] phy: fsl: Add Lynx 10G SerDes driver
net: phy: Add support for rate adaptation
net: phylink: Support differing link speeds and interface speeds
net: phylink: Adjust advertisement based on rate adaptation
net: phylink: Adjust link settings based on rate adaptation
[RFC] net: phylink: Add support for CRS-based rate adaptation
net: phy: aquantia: Add support for AQR115
net: phy: aquantia: Add some additional phy interfaces
net: phy: aquantia: Add support for rate adaptation
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
powerpc: dts: qoriq: Add nodes for QSGMII PCSs
arm64: dts: layerscape: Add nodes for QSGMII PCSs
arm64: dts: ls1046a: Add serdes bindings
arm64: dts: ls1088a: Add serdes bindings
arm64: dts: ls1046ardb: Add serdes bindings
[WIP] arm64: dts: ls1088ardb: Add serdes bindings
.../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 1 +
.../bindings/net/ethernet-controller.yaml | 10 +-
.../bindings/net/fsl,fman-dtsec.yaml | 172 +++
.../bindings/net/fsl,qoriq-mc-dpmac.yaml | 2 +-
.../devicetree/bindings/net/fsl-fman.txt | 133 +-
.../devicetree/bindings/phy/fsl,lynx-10g.yaml | 311 ++++
Documentation/driver-api/phy/index.rst | 1 +
Documentation/driver-api/phy/lynx_10g.rst | 73 +
MAINTAINERS | 6 +
.../boot/dts/freescale/fsl-ls1043-post.dtsi | 24 +
.../boot/dts/freescale/fsl-ls1046-post.dtsi | 25 +
.../boot/dts/freescale/fsl-ls1046a-rdb.dts | 34 +
.../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 179 +++
.../boot/dts/freescale/fsl-ls1088a-rdb.dts | 87 ++
.../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 96 ++
.../fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 +-
.../boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +-
.../fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 +-
.../boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 +-
.../boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +-
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 | 4 +-
drivers/net/ethernet/freescale/fman/fman.c | 31 +-
drivers/net/ethernet/freescale/fman/fman.h | 31 +-
.../net/ethernet/freescale/fman/fman_dtsec.c | 674 ++++-----
.../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 | 864 +++++------
.../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/net/phy/aquantia_main.c | 86 +-
drivers/net/phy/phy.c | 21 +
drivers/net/phy/phylink.c | 161 +-
drivers/phy/freescale/Kconfig | 20 +
drivers/phy/freescale/Makefile | 3 +
drivers/phy/freescale/lynx-10g.h | 36 +
drivers/phy/freescale/phy-fsl-lynx-10g-clk.c | 438 ++++++
drivers/phy/freescale/phy-fsl-lynx-10g.c | 1297 +++++++++++++++++
drivers/soc/fsl/qbman/qman.c | 76 +-
include/linux/phy.h | 42 +
include/linux/phylink.h | 12 +-
include/soc/fsl/qman.h | 9 +
69 files changed, 4408 insertions(+), 2356 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/lynx_10g.rst
create mode 100644 drivers/phy/freescale/lynx-10g.h
create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g-clk.c
create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g.c
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
@ 2022-07-15 21:59 ` Sean Anderson
2022-07-21 13:16 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function Sean Anderson
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: Li Yang, Sean Anderson, Russell King, linux-kernel, Eric Dumazet,
Paolo Abeni, linuxppc-dev, linux-arm-kernel
This breaks out/combines get_affine_portal and the cgr sanity check in
preparation for the next commit. No functional change intended.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
(no changes since v2)
Changes in v2:
- New
drivers/soc/fsl/qbman/qman.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index fde4edd83c14..eb6600aab09b 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2483,13 +2483,8 @@ int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
}
EXPORT_SYMBOL(qman_create_cgr);
-int qman_delete_cgr(struct qman_cgr *cgr)
+static struct qman_portal *qman_cgr_get_affine_portal(struct qman_cgr *cgr)
{
- unsigned long irqflags;
- struct qm_mcr_querycgr cgr_state;
- struct qm_mcc_initcgr local_opts;
- int ret = 0;
- struct qman_cgr *i;
struct qman_portal *p = get_affine_portal();
if (cgr->chan != p->config->channel) {
@@ -2497,10 +2492,25 @@ int qman_delete_cgr(struct qman_cgr *cgr)
dev_err(p->config->dev, "CGR not owned by current portal");
dev_dbg(p->config->dev, " create 0x%x, delete 0x%x\n",
cgr->chan, p->config->channel);
-
- ret = -EINVAL;
- goto put_portal;
+ put_affine_portal();
+ return NULL;
}
+
+ return p;
+}
+
+int qman_delete_cgr(struct qman_cgr *cgr)
+{
+ unsigned long irqflags;
+ struct qm_mcr_querycgr cgr_state;
+ struct qm_mcc_initcgr local_opts;
+ int ret = 0;
+ struct qman_cgr *i;
+ struct qman_portal *p = qman_cgr_get_affine_portal(cgr);
+
+ if (!p)
+ return -EINVAL;
+
memset(&local_opts, 0, sizeof(struct qm_mcc_initcgr));
spin_lock_irqsave(&p->cgr_lock, irqflags);
list_del(&cgr->node);
@@ -2528,7 +2538,6 @@ int qman_delete_cgr(struct qman_cgr *cgr)
list_add(&cgr->node, &p->cgr_cbs);
release_lock:
spin_unlock_irqrestore(&p->cgr_lock, irqflags);
-put_portal:
put_affine_portal();
return ret;
}
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
@ 2022-07-15 21:59 ` Sean Anderson
2022-07-21 13:18 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change Sean Anderson
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: Li Yang, Sean Anderson, Russell King, linux-kernel, Eric Dumazet,
Paolo Abeni, linuxppc-dev, linux-arm-kernel
This adds a function to update a CGR with new parameters.
qman_cgr_create can almost be used for this (with flags=0), but it's not
suitable because it also registers the callback function. The _safe
variant was modeled off of qman_cgr_delete_safe. However, we handle
multiple arguments and a return value.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
(no changes since v2)
Changes in v2:
- New
drivers/soc/fsl/qbman/qman.c | 47 ++++++++++++++++++++++++++++++++++++
include/soc/fsl/qman.h | 9 +++++++
2 files changed, 56 insertions(+)
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index eb6600aab09b..68b825ea10f1 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2568,6 +2568,53 @@ void qman_delete_cgr_safe(struct qman_cgr *cgr)
}
EXPORT_SYMBOL(qman_delete_cgr_safe);
+static int qman_update_cgr(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
+{
+ int ret;
+ unsigned long irqflags;
+ struct qman_portal *p = qman_cgr_get_affine_portal(cgr);
+
+ if (!p)
+ return -EINVAL;
+
+ spin_lock_irqsave(&p->cgr_lock, irqflags);
+ ret = qm_modify_cgr(cgr, 0, opts);
+ spin_unlock_irqrestore(&p->cgr_lock, irqflags);
+ put_affine_portal();
+ return ret;
+}
+
+struct update_cgr_params {
+ struct qman_cgr *cgr;
+ struct qm_mcc_initcgr *opts;
+ int ret;
+};
+
+static void qman_update_cgr_smp_call(void *p)
+{
+ struct update_cgr_params *params = p;
+
+ params->ret = qman_update_cgr(params->cgr, params->opts);
+}
+
+int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
+{
+ struct update_cgr_params params = {
+ .cgr = cgr,
+ .opts = opts,
+ };
+
+ preempt_disable();
+ if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id())
+ smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
+ qman_update_cgr_smp_call, ¶ms, true);
+ else
+ params.ret = qman_update_cgr(cgr, opts);
+ preempt_enable();
+ return params.ret;
+}
+EXPORT_SYMBOL(qman_update_cgr_safe);
+
/* Cleanup FQs */
static int _qm_mr_consume_and_match_verb(struct qm_portal *p, int v)
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index 59eeba31c192..0d3d6beb7fdb 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1171,6 +1171,15 @@ int qman_delete_cgr(struct qman_cgr *cgr);
*/
void qman_delete_cgr_safe(struct qman_cgr *cgr);
+/**
+ * qman_update_cgr_safe - Modifies a congestion group object from any CPU
+ * @cgr: the 'cgr' object to modify
+ * @opts: state of the CGR settings
+ *
+ * This will select the proper CPU and modify the CGR settings.
+ */
+int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts);
+
/**
* qman_query_cgr_congested - Queries CGR's congestion status
* @cgr: the 'cgr' object to query
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function Sean Anderson
@ 2022-07-15 21:59 ` Sean Anderson
2022-07-21 13:18 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: Li Yang, Sean Anderson, Russell King, linux-kernel, Eric Dumazet,
Paolo Abeni, linuxppc-dev, linux-arm-kernel
Instead of setting the queue depth once during probe, adjust it on the
fly whenever we configure the link. This is a bit unusal, since usually
the DPAA driver calls into the FMAN driver, but here we do the opposite.
We need to add a netdev to struct mac_device for this, but it will soon
live in the phylink config.
I haven't tested this extensively, but it doesn't seem to break
anything. We could possibly optimize this a bit by keeping track of the
last rate, but for now we just update every time. 10GEC probably doesn't
need to call into this at all, but I've added it for consistency.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
(no changes since v2)
Changes in v2:
- New
.../net/ethernet/freescale/dpaa/dpaa_eth.c | 38 +++++++++++++++++--
.../net/ethernet/freescale/fman/fman_dtsec.c | 1 +
.../net/ethernet/freescale/fman/fman_memac.c | 1 +
.../net/ethernet/freescale/fman/fman_tgec.c | 7 +++-
drivers/net/ethernet/freescale/fman/mac.h | 3 ++
5 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 377e5513a414..a2a89f547813 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -197,6 +197,8 @@ static int dpaa_rx_extra_headroom;
#define dpaa_get_max_mtu() \
(dpaa_max_frm - (VLAN_ETH_HLEN + ETH_FCS_LEN))
+static void dpaa_eth_cgr_set_speed(struct mac_device *mac_dev, int speed);
+
static int dpaa_netdev_init(struct net_device *net_dev,
const struct net_device_ops *dpaa_ops,
u16 tx_timeout)
@@ -262,6 +264,9 @@ static int dpaa_netdev_init(struct net_device *net_dev,
net_dev->needed_headroom = priv->tx_headroom;
net_dev->watchdog_timeo = msecs_to_jiffies(tx_timeout);
+ mac_dev->net_dev = net_dev;
+ mac_dev->update_speed = dpaa_eth_cgr_set_speed;
+
/* start without the RUNNING flag, phylib controls it later */
netif_carrier_off(net_dev);
@@ -826,10 +831,10 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv)
initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CSCN_EN | QM_CGR_WE_CS_THRES);
initcgr.cgr.cscn_en = QM_CGR_EN;
- /* Set different thresholds based on the MAC speed.
- * This may turn suboptimal if the MAC is reconfigured at a speed
- * lower than its max, e.g. if a dTSEC later negotiates a 100Mbps link.
- * In such cases, we ought to reconfigure the threshold, too.
+ /* Set different thresholds based on the configured MAC speed.
+ * This may turn suboptimal if the MAC is reconfigured at another
+ * speed, so MACs must call dpaa_eth_cgr_set_speed in their adjust_link
+ * callback.
*/
if (priv->mac_dev->if_support & SUPPORTED_10000baseT_Full)
cs_th = DPAA_CS_THRESHOLD_10G;
@@ -858,6 +863,31 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv)
return err;
}
+static void dpaa_eth_cgr_set_speed(struct mac_device *mac_dev, int speed)
+{
+ struct net_device *net_dev = mac_dev->net_dev;
+ struct dpaa_priv *priv = netdev_priv(net_dev);
+ struct qm_mcc_initcgr opts = { };
+ u32 cs_th;
+ int err;
+
+ opts.we_mask = cpu_to_be16(QM_CGR_WE_CS_THRES);
+ switch (speed) {
+ case SPEED_10000:
+ cs_th = DPAA_CS_THRESHOLD_10G;
+ break;
+ case SPEED_1000:
+ default:
+ cs_th = DPAA_CS_THRESHOLD_1G;
+ break;
+ }
+ qm_cgr_cs_thres_set64(&opts.cgr.cs_thres, cs_th, 1);
+
+ err = qman_update_cgr_safe(&priv->cgr_data.cgr, &opts);
+ if (err)
+ netdev_err(net_dev, "could not update speed: %d\n", err);
+}
+
static inline void dpaa_setup_ingress(const struct dpaa_priv *priv,
struct dpaa_fq *fq,
const struct qman_fq *template)
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index f2dd07b714ea..6617932fd3fd 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -1244,6 +1244,7 @@ static void adjust_link_dtsec(struct mac_device *mac_dev)
}
dtsec_adjust_link(fman_mac, phy_dev->speed);
+ mac_dev->update_speed(mac_dev, phy_dev->speed);
fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause);
err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause);
if (err < 0)
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index 8ad93a4c0c21..02b3a0a2d5d1 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -782,6 +782,7 @@ static void adjust_link_memac(struct mac_device *mac_dev)
fman_mac = mac_dev->fman_mac;
memac_adjust_link(fman_mac, phy_dev->speed);
+ mac_dev->update_speed(mac_dev, phy_dev->speed);
fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause);
err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause);
diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c
index f4cdf0cf7c32..33f3b1cc2cfe 100644
--- a/drivers/net/ethernet/freescale/fman/fman_tgec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c
@@ -601,8 +601,11 @@ static int tgec_del_hash_mac_address(struct fman_mac *tgec,
return 0;
}
-static void adjust_link_void(struct mac_device *mac_dev)
+static void tgec_adjust_link(struct mac_device *mac_dev)
{
+ struct phy_device *phy_dev = mac_dev->phy_dev;
+
+ mac_dev->update_speed(mac_dev, phy_dev->speed);
}
static int tgec_set_exception(struct fman_mac *tgec,
@@ -794,7 +797,7 @@ int tgec_initialization(struct mac_device *mac_dev,
mac_dev->set_allmulti = tgec_set_allmulti;
mac_dev->set_tstamp = tgec_set_tstamp;
mac_dev->set_multi = fman_set_multi;
- mac_dev->adjust_link = adjust_link_void;
+ mac_dev->adjust_link = tgec_adjust_link;
mac_dev->enable = tgec_enable;
mac_dev->disable = tgec_disable;
diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h
index a55efcb7998c..b95d384271bd 100644
--- a/drivers/net/ethernet/freescale/fman/mac.h
+++ b/drivers/net/ethernet/freescale/fman/mac.h
@@ -28,6 +28,7 @@ struct mac_device {
struct phy_device *phy_dev;
phy_interface_t phy_if;
struct device_node *phy_node;
+ struct net_device *net_dev;
bool autoneg_pause;
bool rx_pause_req;
@@ -56,6 +57,8 @@ struct mac_device {
int (*remove_hash_mac_addr)(struct fman_mac *mac_dev,
enet_addr_t *eth_addr);
+ void (*update_speed)(struct mac_device *mac_dev, int speed);
+
struct fman_mac *fman_mac;
struct mac_priv_s *priv;
};
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
` (2 preceding siblings ...)
2022-07-15 21:59 ` [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change Sean Anderson
@ 2022-07-15 21:59 ` Sean Anderson
2022-07-21 13:48 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 43/47] arm64: dts: layerscape: " Sean Anderson
2022-07-21 14:26 ` [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Camelia Alexandra Groza
5 siblings, 1 reply; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: devicetree, Li Yang, Sean Anderson, linuxppc-dev, Russell King,
linux-kernel, Eric Dumazet, Rob Herring, Paul Mackerras,
Krzysztof Kozlowski, Paolo Abeni, Shawn Guo, linux-arm-kernel
Now that we actually read registers from QSGMII PCSs, it's important
that we have the correct address (instead of hoping that we're the MAC
with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII
PCSs. They have the same addresses on all SoCs (e.g. if QSGMIIA is
present it's used for MACs 1 through 4).
Since the first QSGMII PCSs share an address with the SGMII and XFI
PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts
on the bus.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
Changes in v3:
- Add compatibles for QSGMII PCSs
- Split arm and powerpcs dts updates
Changes in v2:
- New
.../boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 ++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +++++++++-
.../boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 ++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 ++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 ++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +++++++++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 ++-
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +++++++++-
18 files changed, 127 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
index baa0c503e741..db169d630db3 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
@@ -55,7 +55,8 @@ ethernet@e0000 {
reg = <0xe0000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy0>;
+ pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
+ pcs-names = "sgmii", "qsgmii";
};
mdio@e1000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
index 93095600e808..e80ad8675be8 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
@@ -52,7 +52,15 @@ ethernet@f0000 {
compatible = "fsl,fman-memac";
reg = <0xf0000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x10 &fman0_tx_0x30>;
- pcsphy-handle = <&pcsphy6>;
+ pcsphy-handle = <&pcsphy6>, <&qsgmiib_pcs2>, <&pcsphy6>;
+ pcs-names = "sgmii", "qsgmii", "xfi";
+ };
+
+ mdio@e9000 {
+ qsgmiib_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <2>;
+ };
};
mdio@f1000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
index ff4bd38f0645..6a6f51842ad5 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
@@ -55,7 +55,15 @@ ethernet@e2000 {
reg = <0xe2000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy1>;
+ pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiia_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <1>;
+ };
};
mdio@e3000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
index 1fa38ed6f59e..543da5493e40 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
@@ -52,7 +52,15 @@ ethernet@f2000 {
compatible = "fsl,fman-memac";
reg = <0xf2000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x11 &fman0_tx_0x31>;
- pcsphy-handle = <&pcsphy7>;
+ pcsphy-handle = <&pcsphy7>, <&qsgmiib_pcs3>, <&pcsphy7>;
+ pcs-names = "sgmii", "qsgmii", "xfi";
+ };
+
+ mdio@e9000 {
+ qsgmiib_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <3>;
+ };
};
mdio@f3000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
index a8cc9780c0c4..ce76725e6eb2 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
@@ -51,7 +51,8 @@ ethernet@e0000 {
reg = <0xe0000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy0>;
+ pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
+ pcs-names = "sgmii", "qsgmii";
};
mdio@e1000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
index 8b8bd70c9382..f3af67df4767 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
@@ -51,7 +51,15 @@ ethernet@e2000 {
reg = <0xe2000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy1>;
+ pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiia_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <1>;
+ };
};
mdio@e3000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
index 619c880b54d8..f6d74de84bfe 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
@@ -51,7 +51,15 @@ ethernet@e4000 {
reg = <0xe4000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy2>;
+ pcsphy-handle = <&pcsphy2>, <&qsgmiia_pcs2>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiia_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <2>;
+ };
};
mdio@e5000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
index d7ebb73a400d..6e091d8ae9e2 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
@@ -51,7 +51,15 @@ ethernet@e6000 {
reg = <0xe6000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x0b &fman0_tx_0x2b>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy3>;
+ pcsphy-handle = <&pcsphy3>, <&qsgmiia_pcs3>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiia_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <3>;
+ };
};
mdio@e7000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
index b151d696a069..e2174c0fc841 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
@@ -51,7 +51,8 @@ ethernet@e8000 {
reg = <0xe8000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy4>;
+ pcsphy-handle = <&pcsphy4>, <&pcsphy4>;
+ pcs-names = "sgmii", "qsgmii";
};
mdio@e9000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
index adc0ae0013a3..9106815bd63e 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
@@ -51,7 +51,15 @@ ethernet@ea000 {
reg = <0xea000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x0d &fman0_tx_0x2d>;
ptp-timer = <&ptp_timer0>;
- pcsphy-handle = <&pcsphy5>;
+ pcsphy-handle = <&pcsphy5>, <&qsgmiib_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e9000 {
+ qsgmiib_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <1>;
+ };
};
mdio@eb000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
index 435047e0e250..a3c1538dfda1 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
@@ -52,7 +52,15 @@ ethernet@f0000 {
compatible = "fsl,fman-memac";
reg = <0xf0000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
- pcsphy-handle = <&pcsphy14>;
+ pcsphy-handle = <&pcsphy14>, <&qsgmiid_pcs2>, <&pcsphy14>;
+ pcs-names = "sgmii", "qsgmii", "xfi";
+ };
+
+ mdio@e9000 {
+ qsgmiid_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <2>;
+ };
};
mdio@f1000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
index c098657cca0a..c024517e70d6 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
@@ -52,7 +52,15 @@ ethernet@f2000 {
compatible = "fsl,fman-memac";
reg = <0xf2000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x11 &fman1_tx_0x31>;
- pcsphy-handle = <&pcsphy15>;
+ pcsphy-handle = <&pcsphy15>, <&qsgmiid_pcs3>, <&pcsphy15>;
+ pcs-names = "sgmii", "qsgmii", "xfi";
+ };
+
+ mdio@e9000 {
+ qsgmiid_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <3>;
+ };
};
mdio@f3000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
index 9d06824815f3..16fb299f615a 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
@@ -51,7 +51,8 @@ ethernet@e0000 {
reg = <0xe0000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x08 &fman1_tx_0x28>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy8>;
+ pcsphy-handle = <&pcsphy8>, <&pcsphy8>;
+ pcs-names = "sgmii", "qsgmii";
};
mdio@e1000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
index 70e947730c4b..75cecbef8469 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
@@ -51,7 +51,15 @@ ethernet@e2000 {
reg = <0xe2000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x09 &fman1_tx_0x29>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy9>;
+ pcsphy-handle = <&pcsphy9>, <&qsgmiic_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiic_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <1>;
+ };
};
mdio@e3000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
index ad96e6529595..98c1d27f17e7 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
@@ -51,7 +51,15 @@ ethernet@e4000 {
reg = <0xe4000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy10>;
+ pcsphy-handle = <&pcsphy10>, <&qsgmiic_pcs2>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiic_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <2>;
+ };
};
mdio@e5000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
index 034bc4b71f7a..203a00036f17 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
@@ -51,7 +51,15 @@ ethernet@e6000 {
reg = <0xe6000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x0b &fman1_tx_0x2b>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy11>;
+ pcsphy-handle = <&pcsphy11>, <&qsgmiic_pcs3>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e1000 {
+ qsgmiic_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <3>;
+ };
};
mdio@e7000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
index 93ca23d82b39..9366935ebc02 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
@@ -51,7 +51,8 @@ ethernet@e8000 {
reg = <0xe8000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x0c &fman1_tx_0x2c>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy12>;
+ pcsphy-handle = <&pcsphy12>, <&pcsphy12>;
+ pcs-names = "sgmii", "qsgmii";
};
mdio@e9000 {
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
index 23b3117a2fd2..39f7c6133017 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
@@ -51,7 +51,15 @@ ethernet@ea000 {
reg = <0xea000 0x1000>;
fsl,fman-ports = <&fman1_rx_0x0d &fman1_tx_0x2d>;
ptp-timer = <&ptp_timer1>;
- pcsphy-handle = <&pcsphy13>;
+ pcsphy-handle = <&pcsphy13>, <&qsgmiid_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
+ };
+
+ mdio@e9000 {
+ qsgmiid_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <1>;
+ };
};
mdio@eb000 {
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next v3 43/47] arm64: dts: layerscape: Add nodes for QSGMII PCSs
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
` (3 preceding siblings ...)
2022-07-15 21:59 ` [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
@ 2022-07-15 21:59 ` Sean Anderson
2022-07-21 14:26 ` [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Camelia Alexandra Groza
5 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-07-15 21:59 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Madalin Bucur, netdev
Cc: devicetree, Li Yang, Sean Anderson, linuxppc-dev, Russell King,
linux-kernel, Eric Dumazet, Rob Herring, Paul Mackerras,
Krzysztof Kozlowski, Paolo Abeni, Shawn Guo, linux-arm-kernel
Now that we actually read registers from QSGMII PCSs, it's important
that we have the correct address (instead of hoping that we're the MAC
with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII
PCSs. The exact mapping of QSGMII to MACs depends on the SoC.
Since the first QSGMII PCSs share an address with the SGMII and XFI
PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts
on the bus.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
Changes in v3:
- Split this patch off from the previous one
Changes in v2:
- New
.../boot/dts/freescale/fsl-ls1043-post.dtsi | 24 ++++++++++++++++++
.../boot/dts/freescale/fsl-ls1046-post.dtsi | 25 +++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi
index d237162a8744..02c51690b9da 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi
@@ -24,9 +24,12 @@ &fman0 {
/* these aliases provide the FMan ports mapping */
enet0: ethernet@e0000 {
+ pcs-names = "qsgmii";
};
enet1: ethernet@e2000 {
+ pcsphy-handle = <&pcsphy1>, <&qsgmiib_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
};
enet2: ethernet@e4000 {
@@ -36,11 +39,32 @@ enet3: ethernet@e6000 {
};
enet4: ethernet@e8000 {
+ pcsphy-handle = <&pcsphy4>, <&qsgmiib_pcs2>;
+ pcs-names = "sgmii", "qsgmii";
};
enet5: ethernet@ea000 {
+ pcsphy-handle = <&pcsphy5>, <&qsgmiib_pcs3>;
+ pcs-names = "sgmii", "qsgmii";
};
enet6: ethernet@f0000 {
};
+
+ mdio@e1000 {
+ qsgmiib_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x1>;
+ };
+
+ qsgmiib_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x2>;
+ };
+
+ qsgmiib_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x3>;
+ };
+ };
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi
index d6caaea57d90..1ce40c35f344 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi
@@ -23,6 +23,8 @@ &soc {
&fman0 {
/* these aliases provide the FMan ports mapping */
enet0: ethernet@e0000 {
+ pcsphy-handle = <&qsgmiib_pcs3>;
+ pcs-names = "qsgmii";
};
enet1: ethernet@e2000 {
@@ -35,14 +37,37 @@ enet3: ethernet@e6000 {
};
enet4: ethernet@e8000 {
+ pcsphy-handle = <&pcsphy4>, <&qsgmiib_pcs1>;
+ pcs-names = "sgmii", "qsgmii";
};
enet5: ethernet@ea000 {
+ pcsphy-handle = <&pcsphy5>, <&pcsphy5>;
+ pcs-names = "sgmii", "qsgmii";
};
enet6: ethernet@f0000 {
};
enet7: ethernet@f2000 {
+ pcsphy-handle = <&pcsphy7>, <&qsgmiib_pcs2>, <&pcsphy7>;
+ pcs-names = "sgmii", "qsgmii", "xfi";
+ };
+
+ mdio@eb000 {
+ qsgmiib_pcs1: ethernet-pcs@1 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x1>;
+ };
+
+ qsgmiib_pcs2: ethernet-pcs@2 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x2>;
+ };
+
+ qsgmiib_pcs3: ethernet-pcs@3 {
+ compatible = "fsl,lynx-pcs";
+ reg = <0x3>;
+ };
};
};
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 14+ messages in thread
* RE: [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops
2022-07-15 21:59 ` [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
@ 2022-07-21 13:16 ` Camelia Alexandra Groza
0 siblings, 0 replies; 14+ messages in thread
From: Camelia Alexandra Groza @ 2022-07-21 13:16 UTC (permalink / raw)
To: Sean Anderson, David S . Miller, Jakub Kicinski, Madalin Bucur,
netdev@vger.kernel.org
Cc: Leo Li, Sean Anderson, linux-kernel@vger.kernel.org, Russell King,
Eric Dumazet, Paolo Abeni, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
> -----Original Message-----
> From: Linuxppc-dev <linuxppc-dev-
> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
> Anderson
> Sent: Saturday, July 16, 2022 1:00
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> netdev@vger.kernel.org
> Cc: Leo Li <leoyang.li@nxp.com>; Sean Anderson
> <sean.anderson@seco.com>; Russell King <linux@armlinux.org.uk>; linux-
> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; Paolo
> Abeni <pabeni@redhat.com>; linuxppc-dev@lists.ozlabs.org; linux-arm-
> kernel@lists.infradead.org
> Subject: [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity
> checking cgr ops
>
> This breaks out/combines get_affine_portal and the cgr sanity check in
> preparation for the next commit. No functional change intended.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function
2022-07-15 21:59 ` [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function Sean Anderson
@ 2022-07-21 13:18 ` Camelia Alexandra Groza
2022-07-21 15:36 ` Sean Anderson
0 siblings, 1 reply; 14+ messages in thread
From: Camelia Alexandra Groza @ 2022-07-21 13:18 UTC (permalink / raw)
To: Sean Anderson, David S . Miller, Jakub Kicinski, Madalin Bucur,
netdev@vger.kernel.org
Cc: Leo Li, Sean Anderson, linux-kernel@vger.kernel.org, Russell King,
Eric Dumazet, Paolo Abeni, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
> -----Original Message-----
> From: Linuxppc-dev <linuxppc-dev-
> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
> Anderson
> Sent: Saturday, July 16, 2022 1:00
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> netdev@vger.kernel.org
> Cc: Leo Li <leoyang.li@nxp.com>; Sean Anderson
> <sean.anderson@seco.com>; Russell King <linux@armlinux.org.uk>; linux-
> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; Paolo
> Abeni <pabeni@redhat.com>; linuxppc-dev@lists.ozlabs.org; linux-arm-
> kernel@lists.infradead.org
> Subject: [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update
> function
>
> This adds a function to update a CGR with new parameters.
> qman_cgr_create can almost be used for this (with flags=0), but it's not
It's qman_create_cgr, not qman_cgr_create.
> suitable because it also registers the callback function. The _safe
> variant was modeled off of qman_cgr_delete_safe. However, we handle
> multiple arguments and a return value.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change
2022-07-15 21:59 ` [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change Sean Anderson
@ 2022-07-21 13:18 ` Camelia Alexandra Groza
0 siblings, 0 replies; 14+ messages in thread
From: Camelia Alexandra Groza @ 2022-07-21 13:18 UTC (permalink / raw)
To: Sean Anderson, David S . Miller, Jakub Kicinski, Madalin Bucur,
netdev@vger.kernel.org
Cc: Leo Li, Sean Anderson, linux-kernel@vger.kernel.org, Russell King,
Eric Dumazet, Paolo Abeni, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
> -----Original Message-----
> From: Linuxppc-dev <linuxppc-dev-
> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
> Anderson
> Sent: Saturday, July 16, 2022 1:00
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> netdev@vger.kernel.org
> Cc: Leo Li <leoyang.li@nxp.com>; Sean Anderson
> <sean.anderson@seco.com>; Russell King <linux@armlinux.org.uk>; linux-
> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; Paolo
> Abeni <pabeni@redhat.com>; linuxppc-dev@lists.ozlabs.org; linux-arm-
> kernel@lists.infradead.org
> Subject: [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate
> change
>
> Instead of setting the queue depth once during probe, adjust it on the
> fly whenever we configure the link. This is a bit unusal, since usually
> the DPAA driver calls into the FMAN driver, but here we do the opposite.
> We need to add a netdev to struct mac_device for this, but it will soon
> live in the phylink config.
>
> I haven't tested this extensively, but it doesn't seem to break
> anything. We could possibly optimize this a bit by keeping track of the
> last rate, but for now we just update every time. 10GEC probably doesn't
> need to call into this at all, but I've added it for consistency.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs
2022-07-15 21:59 ` [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
@ 2022-07-21 13:48 ` Camelia Alexandra Groza
2022-07-21 17:51 ` Sean Anderson
0 siblings, 1 reply; 14+ messages in thread
From: Camelia Alexandra Groza @ 2022-07-21 13:48 UTC (permalink / raw)
To: Sean Anderson, David S . Miller, Jakub Kicinski, Madalin Bucur,
netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org, Paolo Abeni, Sean Anderson, Shawn Guo,
Russell King, linux-kernel@vger.kernel.org, Eric Dumazet,
Rob Herring, Paul Mackerras, Krzysztof Kozlowski, Leo Li,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
[-- Attachment #1: Type: text/plain, Size: 16075 bytes --]
> -----Original Message-----
> From: Linuxppc-dev <linuxppc-dev-
> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
> Anderson
> Sent: Saturday, July 16, 2022 1:00
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> netdev@vger.kernel.org
> Cc: devicetree@vger.kernel.org; Leo Li <leoyang.li@nxp.com>; Sean
> Anderson <sean.anderson@seco.com>; linuxppc-dev@lists.ozlabs.org;
> Russell King <linux@armlinux.org.uk>; linux-kernel@vger.kernel.org; Eric
> Dumazet <edumazet@google.com>; Rob Herring <robh+dt@kernel.org>;
> Paul Mackerras <paulus@samba.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Paolo Abeni <pabeni@redhat.com>;
> Shawn Guo <shawnguo@kernel.org>; linux-arm-kernel@lists.infradead.org
> Subject: [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for
> QSGMII PCSs
>
> Now that we actually read registers from QSGMII PCSs, it's important
> that we have the correct address (instead of hoping that we're the MAC
> with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII
> PCSs. They have the same addresses on all SoCs (e.g. if QSGMIIA is
> present it's used for MACs 1 through 4).
>
> Since the first QSGMII PCSs share an address with the SGMII and XFI
> PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts
> on the bus.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
MAC1 and MAC2 can be XFI on T2080. This needs to be reflected in qoriq-fman3-0-1g-0.dtsi
and qoriq-fman3-0-1g-1.dtsi
The two associated netdevs fail to probe on a T2080RDB without "xfi" added to the pcs-names:
fsl_dpaa_mac ffe4e0000.ethernet (unnamed net_device) (uninitialized): failed to validate link configuration for in-band status
fsl_dpaa_mac ffe4e0000.ethernet: error -EINVAL: Could not create phylink
fsl_dpa: probe of dpaa-ethernet.0 failed with error -22
> ---
>
> Changes in v3:
> - Add compatibles for QSGMII PCSs
> - Split arm and powerpcs dts updates
>
> Changes in v2:
> - New
>
> .../boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 ++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +++++++++-
> .../boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 ++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 ++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 ++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +++++++++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 ++-
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +++++++++-
> 18 files changed, 127 insertions(+), 18 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
> index baa0c503e741..db169d630db3 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
> @@ -55,7 +55,8 @@ ethernet@e0000 {
> reg = <0xe0000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy0>;
> + pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
> + pcs-names = "sgmii", "qsgmii";
> };
>
> mdio@e1000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
> index 93095600e808..e80ad8675be8 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
> @@ -52,7 +52,15 @@ ethernet@f0000 {
> compatible = "fsl,fman-memac";
> reg = <0xf0000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x10 &fman0_tx_0x30>;
> - pcsphy-handle = <&pcsphy6>;
> + pcsphy-handle = <&pcsphy6>, <&qsgmiib_pcs2>,
> <&pcsphy6>;
> + pcs-names = "sgmii", "qsgmii", "xfi";
> + };
> +
> + mdio@e9000 {
> + qsgmiib_pcs2: ethernet-pcs@2 {
> + compatible = "fsl,lynx-pcs";
> + reg = <2>;
> + };
> };
>
> mdio@f1000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
> index ff4bd38f0645..6a6f51842ad5 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
> @@ -55,7 +55,15 @@ ethernet@e2000 {
> reg = <0xe2000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy1>;
> + pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiia_pcs1: ethernet-pcs@1 {
> + compatible = "fsl,lynx-pcs";
> + reg = <1>;
> + };
> };
>
> mdio@e3000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
> index 1fa38ed6f59e..543da5493e40 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
> @@ -52,7 +52,15 @@ ethernet@f2000 {
> compatible = "fsl,fman-memac";
> reg = <0xf2000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x11 &fman0_tx_0x31>;
> - pcsphy-handle = <&pcsphy7>;
> + pcsphy-handle = <&pcsphy7>, <&qsgmiib_pcs3>,
> <&pcsphy7>;
> + pcs-names = "sgmii", "qsgmii", "xfi";
> + };
> +
> + mdio@e9000 {
> + qsgmiib_pcs3: ethernet-pcs@3 {
> + compatible = "fsl,lynx-pcs";
> + reg = <3>;
> + };
> };
>
> mdio@f3000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
> index a8cc9780c0c4..ce76725e6eb2 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
> @@ -51,7 +51,8 @@ ethernet@e0000 {
> reg = <0xe0000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy0>;
> + pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
> + pcs-names = "sgmii", "qsgmii";
> };
>
> mdio@e1000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
> index 8b8bd70c9382..f3af67df4767 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
> @@ -51,7 +51,15 @@ ethernet@e2000 {
> reg = <0xe2000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy1>;
> + pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiia_pcs1: ethernet-pcs@1 {
> + compatible = "fsl,lynx-pcs";
> + reg = <1>;
> + };
> };
>
> mdio@e3000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
> index 619c880b54d8..f6d74de84bfe 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
> @@ -51,7 +51,15 @@ ethernet@e4000 {
> reg = <0xe4000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy2>;
> + pcsphy-handle = <&pcsphy2>, <&qsgmiia_pcs2>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiia_pcs2: ethernet-pcs@2 {
> + compatible = "fsl,lynx-pcs";
> + reg = <2>;
> + };
> };
>
> mdio@e5000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
> index d7ebb73a400d..6e091d8ae9e2 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
> @@ -51,7 +51,15 @@ ethernet@e6000 {
> reg = <0xe6000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x0b &fman0_tx_0x2b>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy3>;
> + pcsphy-handle = <&pcsphy3>, <&qsgmiia_pcs3>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiia_pcs3: ethernet-pcs@3 {
> + compatible = "fsl,lynx-pcs";
> + reg = <3>;
> + };
> };
>
> mdio@e7000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
> index b151d696a069..e2174c0fc841 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
> @@ -51,7 +51,8 @@ ethernet@e8000 {
> reg = <0xe8000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy4>;
> + pcsphy-handle = <&pcsphy4>, <&pcsphy4>;
> + pcs-names = "sgmii", "qsgmii";
> };
>
> mdio@e9000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
> index adc0ae0013a3..9106815bd63e 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
> @@ -51,7 +51,15 @@ ethernet@ea000 {
> reg = <0xea000 0x1000>;
> fsl,fman-ports = <&fman0_rx_0x0d &fman0_tx_0x2d>;
> ptp-timer = <&ptp_timer0>;
> - pcsphy-handle = <&pcsphy5>;
> + pcsphy-handle = <&pcsphy5>, <&qsgmiib_pcs1>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e9000 {
> + qsgmiib_pcs1: ethernet-pcs@1 {
> + compatible = "fsl,lynx-pcs";
> + reg = <1>;
> + };
> };
>
> mdio@eb000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
> index 435047e0e250..a3c1538dfda1 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
> @@ -52,7 +52,15 @@ ethernet@f0000 {
> compatible = "fsl,fman-memac";
> reg = <0xf0000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
> - pcsphy-handle = <&pcsphy14>;
> + pcsphy-handle = <&pcsphy14>, <&qsgmiid_pcs2>,
> <&pcsphy14>;
> + pcs-names = "sgmii", "qsgmii", "xfi";
> + };
> +
> + mdio@e9000 {
> + qsgmiid_pcs2: ethernet-pcs@2 {
> + compatible = "fsl,lynx-pcs";
> + reg = <2>;
> + };
> };
>
> mdio@f1000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
> index c098657cca0a..c024517e70d6 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
> @@ -52,7 +52,15 @@ ethernet@f2000 {
> compatible = "fsl,fman-memac";
> reg = <0xf2000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x11 &fman1_tx_0x31>;
> - pcsphy-handle = <&pcsphy15>;
> + pcsphy-handle = <&pcsphy15>, <&qsgmiid_pcs3>,
> <&pcsphy15>;
> + pcs-names = "sgmii", "qsgmii", "xfi";
> + };
> +
> + mdio@e9000 {
> + qsgmiid_pcs3: ethernet-pcs@3 {
> + compatible = "fsl,lynx-pcs";
> + reg = <3>;
> + };
> };
>
> mdio@f3000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
> index 9d06824815f3..16fb299f615a 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
> @@ -51,7 +51,8 @@ ethernet@e0000 {
> reg = <0xe0000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x08 &fman1_tx_0x28>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy8>;
> + pcsphy-handle = <&pcsphy8>, <&pcsphy8>;
> + pcs-names = "sgmii", "qsgmii";
> };
>
> mdio@e1000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
> index 70e947730c4b..75cecbef8469 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
> @@ -51,7 +51,15 @@ ethernet@e2000 {
> reg = <0xe2000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x09 &fman1_tx_0x29>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy9>;
> + pcsphy-handle = <&pcsphy9>, <&qsgmiic_pcs1>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiic_pcs1: ethernet-pcs@1 {
> + compatible = "fsl,lynx-pcs";
> + reg = <1>;
> + };
> };
>
> mdio@e3000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
> index ad96e6529595..98c1d27f17e7 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
> @@ -51,7 +51,15 @@ ethernet@e4000 {
> reg = <0xe4000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy10>;
> + pcsphy-handle = <&pcsphy10>, <&qsgmiic_pcs2>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiic_pcs2: ethernet-pcs@2 {
> + compatible = "fsl,lynx-pcs";
> + reg = <2>;
> + };
> };
>
> mdio@e5000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
> index 034bc4b71f7a..203a00036f17 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
> @@ -51,7 +51,15 @@ ethernet@e6000 {
> reg = <0xe6000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x0b &fman1_tx_0x2b>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy11>;
> + pcsphy-handle = <&pcsphy11>, <&qsgmiic_pcs3>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e1000 {
> + qsgmiic_pcs3: ethernet-pcs@3 {
> + compatible = "fsl,lynx-pcs";
> + reg = <3>;
> + };
> };
>
> mdio@e7000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
> index 93ca23d82b39..9366935ebc02 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
> @@ -51,7 +51,8 @@ ethernet@e8000 {
> reg = <0xe8000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x0c &fman1_tx_0x2c>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy12>;
> + pcsphy-handle = <&pcsphy12>, <&pcsphy12>;
> + pcs-names = "sgmii", "qsgmii";
> };
>
> mdio@e9000 {
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
> index 23b3117a2fd2..39f7c6133017 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
> @@ -51,7 +51,15 @@ ethernet@ea000 {
> reg = <0xea000 0x1000>;
> fsl,fman-ports = <&fman1_rx_0x0d &fman1_tx_0x2d>;
> ptp-timer = <&ptp_timer1>;
> - pcsphy-handle = <&pcsphy13>;
> + pcsphy-handle = <&pcsphy13>, <&qsgmiid_pcs1>;
> + pcs-names = "sgmii", "qsgmii";
> + };
> +
> + mdio@e9000 {
> + qsgmiid_pcs1: ethernet-pcs@1 {
> + compatible = "fsl,lynx-pcs";
> + reg = <1>;
> + };
> };
>
> mdio@eb000 {
> --
> 2.35.1.1320.gc452695387.dirty
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 18845 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
` (4 preceding siblings ...)
2022-07-15 21:59 ` [PATCH net-next v3 43/47] arm64: dts: layerscape: " Sean Anderson
@ 2022-07-21 14:26 ` Camelia Alexandra Groza
2022-07-21 15:39 ` Sean Anderson
5 siblings, 1 reply; 14+ messages in thread
From: Camelia Alexandra Groza @ 2022-07-21 14:26 UTC (permalink / raw)
To: Sean Anderson, David S . Miller, Jakub Kicinski, Madalin Bucur,
netdev@vger.kernel.org
Cc: Andrew Lunn, linux-doc@vger.kernel.org, Eric Dumazet,
Paul Mackerras, Krzysztof Kozlowski, Ioana Ciornei,
linux-phy@lists.infradead.org, Jonathan Corbet, Sean Anderson,
Russell King, Kishon Vijay Abraham I, Paolo Abeni,
devicetree@vger.kernel.org, Rob Herring,
linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, Alexandru Marginean,
linux-kernel@vger.kernel.org, Leo Li, Vinod Koul, Vladimir Oltean,
Shawn Guo, Heiner Ka llweit
> -----Original Message-----
> From: Sean Anderson <sean.anderson@seco.com>
> Sent: Saturday, July 16, 2022 0:59
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> netdev@vger.kernel.org
> Cc: Paolo Abeni <pabeni@redhat.com>; Eric Dumazet
> <edumazet@google.com>; linux-arm-kernel@lists.infradead.org; Russell
> King <linux@armlinux.org.uk>; linux-kernel@vger.kernel.org; Sean Anderson
> <sean.anderson@seco.com>; Alexandru Marginean
> <alexandru.marginean@nxp.com>; Andrew Lunn <andrew@lunn.ch>;
> Benjamin Herrenschmidt <benh@kernel.crashing.org>; Heiner Kallweit
> <hkallweit1@gmail.com>; 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>; Leo Li
> <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>;
> Vladimir Oltean <olteanv@gmail.com>; devicetree@vger.kernel.org; linux-
> doc@vger.kernel.org; linux-phy@lists.infradead.org; linuxppc-
> dev@lists.ozlabs.org
> Subject: [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink
>
> 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 RFT, 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 4 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 patches 42 and 43.
>
> The serdes driver is mostly functional (except for XFI). This series
> only adds support for the LS1046ARDB SerDes (and untested LS1088ARDB),
> but it should be fairly straightforward to add support for other SoCs
> and boards (see Documentation/driver-api/phy/qoriq.rst).
>
> This is the last spin of this series with all patches included. After next
> week (depending on feedback) I will resend the patches broken up as
> follows:
> - 5: 1000BASE-KX support
> - 1, 6, 44, 45: Lynx 10G support
> - 7-10, 12-14: Phy rate adaptation support
> - 2-4, 15-43, 46, 47: DPAA phylink conversion
Please also send patches 15-38 separately from the DPAA1 SerDes and phylink set for easier review
> Patches 15-19 were first submitted as [1].
>
> [1] https://lore.kernel.org/netdev/20220531195851.1592220-1-sean.anderson@seco.com/
>
> Changes in v3:
> - Manually expand yaml references
> - Add mode configuration to device tree
> - Expand pcs-handle to an array
> - Incorperate some minor changes into the first FMan binding commit
> - Add vendor prefix 'fsl,' to rgmii and mii properties.
> - Set maxItems for pcs-names
> - Remove phy-* properties from example because dt-schema complains and
> I
> can't be bothered to figure out how to make it work.
> - Add pcs-handle as a preferred version of pcsphy-handle
> - Deprecate pcsphy-handle
> - Remove mii/rmii properties
> - Add 1000BASE-KX interface mode
> - Rename remaining references to QorIQ SerDes to Lynx 10G
> - Fix PLL enable sequence by waiting for our reset request to be cleared
> before continuing. Do the same for the lock, even though it isn't as
> critical. Because we will delay for 1.5ms on average, use prepare
> instead of enable so we can sleep.
> - Document the status of each protocol
> - Fix offset of several bitfields in RECR0
> - Take into account PLLRST_B, SDRST_B, and SDEN when considering whether
> a PLL is "enabled."
> - Only power off unused lanes.
> - Split mode lane mask into first/last lane (like group)
> - Read modes from device tree
> - Use caps to determine whether KX/KR are supported
> - Move modes to lynx_priv
> - Ensure that the protocol controller is not already in-use when we try
> to configure a new mode. This should only occur if the device tree is
> misconfigured (e.g. when QSGMII is selected on two lanes but there is
> only one QSGMII controller).
> - Split PLL drivers off into their own file
> - Add clock for "ext_dly" instead of writing the bit directly (and
> racing with any clock code).
> - Use kasprintf instead of open-coding the snprintf dance
> - Support 1000BASE-KX in lynx_lookup_proto. This still requires PCS
> support, so nothing is truly "enabled" yet.
> - Add support for phy rate adaptation
> - Support differing link speeds and interface speeds
> - Adjust advertisement based on rate adaptation
> - Adjust link settings based on rate adaptation
> - Add support for CRS-based rate adaptation
> - Add support for AQR115
> - Add some additional phy interfaces
> - Add support for aquantia rate adaptation
> - Put the PCS mdiodev only after we are done with it (since the PCS
> does not perform a get itself).
> - Remove _return label from memac_initialization in favor of returning
> directly
> - Fix grabbing the default PCS not checking for -ENODATA from
> of_property_match_string
> - Set DTSEC_ECNTRL_R100M in dtsec_link_up instead of dtsec_mac_config
> - Remove rmii/mii properties
> - Replace 1000Base... with 1000BASE... to match IEEE capitalization
> - Add compatibles for QSGMII PCSs
> - Split arm and powerpcs dts updates
> - Describe modes in device tree
> - ls1088a: Add serdes bindings
>
> Changes in v2:
> - Rename to fsl,lynx-10g.yaml
> - Refer to the device in the documentation, rather than the binding
> - Move compatible first
> - Document phy cells in the description
> - 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.
> - Remove minItems
> - Use list for clock-names
> - Fix example binding having too many cells in regs
> - Add #clock-cells. This will allow using assigned-clocks* to configure
> the PLLs.
> - Document the structure of the compatible strings
> - Convert FMan MAC bindings to yaml
> - Better document how we select which PCS to use in the default case
> - Rename driver to Lynx 10G (etc.)
> - Fix not clearing group->pll after disabling it
> - Support 1 and 2 phy-cells
> - Power off lanes during probe
> - Clear SGMIIaCR1_PCS_EN during probe
> - Rename LYNX_PROTO_UNKNOWN to LYNX_PROTO_NONE
> - Handle 1000BASE-KX in lynx_proto_mode_prep
> - Remove some unused variables
> - Fix prototype for dtsec_initialization
> - Fix warning if sizeof(void *) != sizeof(resource_size_t)
> - Specify type of mac_dev for exception_cb
> - Add helper for sanity checking cgr ops
> - Add CGR update function
> - Adjust queue depth on rate change
> - Move PCS_LYNX dependency to fman Kconfig
> - Remove unused variable slow_10g_if
> - 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.
> - Configure the SerDes in enable/disable
> - Properly implement all ethtool ops and ioctls. These were mostly
> stubbed out just enough to compile last time.
> - Convert 10GEC and dTSEC as well
> - Fix capitalization of mEMAC in commit messages
> - Add nodes for QSGMII PCSs
> - Add nodes for QSGMII PCSs
> - Use one phy cell for SerDes1, since no lanes can be grouped
> - Disable SerDes by default to prevent breaking boards inadvertently.
>
> Sean Anderson (47):
> dt-bindings: phy: Add Lynx 10G phy binding
> dt-bindings: net: Expand pcs-handle to an array
> dt-bindings: net: Convert FMan MAC bindings to yaml
> dt-bindings: net: fman: Add additional interface properties
> net: phy: Add 1000BASE-KX interface mode
> [RFT] phy: fsl: Add Lynx 10G SerDes driver
> net: phy: Add support for rate adaptation
> net: phylink: Support differing link speeds and interface speeds
> net: phylink: Adjust advertisement based on rate adaptation
> net: phylink: Adjust link settings based on rate adaptation
> [RFC] net: phylink: Add support for CRS-based rate adaptation
> net: phy: aquantia: Add support for AQR115
> net: phy: aquantia: Add some additional phy interfaces
> net: phy: aquantia: Add support for rate adaptation
> 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
> powerpc: dts: qoriq: Add nodes for QSGMII PCSs
> arm64: dts: layerscape: Add nodes for QSGMII PCSs
> arm64: dts: ls1046a: Add serdes bindings
> arm64: dts: ls1088a: Add serdes bindings
> arm64: dts: ls1046ardb: Add serdes bindings
> [WIP] arm64: dts: ls1088ardb: Add serdes bindings
>
> .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 1 +
> .../bindings/net/ethernet-controller.yaml | 10 +-
> .../bindings/net/fsl,fman-dtsec.yaml | 172 +++
> .../bindings/net/fsl,qoriq-mc-dpmac.yaml | 2 +-
> .../devicetree/bindings/net/fsl-fman.txt | 133 +-
> .../devicetree/bindings/phy/fsl,lynx-10g.yaml | 311 ++++
> Documentation/driver-api/phy/index.rst | 1 +
> Documentation/driver-api/phy/lynx_10g.rst | 73 +
> MAINTAINERS | 6 +
> .../boot/dts/freescale/fsl-ls1043-post.dtsi | 24 +
> .../boot/dts/freescale/fsl-ls1046-post.dtsi | 25 +
> .../boot/dts/freescale/fsl-ls1046a-rdb.dts | 34 +
> .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 179 +++
> .../boot/dts/freescale/fsl-ls1088a-rdb.dts | 87 ++
> .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 96 ++
> .../fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 +-
> .../boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +-
> .../fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 +-
> .../boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 +-
> .../boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +-
> 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 | 4 +-
> drivers/net/ethernet/freescale/fman/fman.c | 31 +-
> drivers/net/ethernet/freescale/fman/fman.h | 31 +-
> .../net/ethernet/freescale/fman/fman_dtsec.c | 674 ++++-----
> .../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 | 864 +++++------
> .../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/net/phy/aquantia_main.c | 86 +-
> drivers/net/phy/phy.c | 21 +
> drivers/net/phy/phylink.c | 161 +-
> drivers/phy/freescale/Kconfig | 20 +
> drivers/phy/freescale/Makefile | 3 +
> drivers/phy/freescale/lynx-10g.h | 36 +
> drivers/phy/freescale/phy-fsl-lynx-10g-clk.c | 438 ++++++
> drivers/phy/freescale/phy-fsl-lynx-10g.c | 1297 +++++++++++++++++
> drivers/soc/fsl/qbman/qman.c | 76 +-
> include/linux/phy.h | 42 +
> include/linux/phylink.h | 12 +-
> include/soc/fsl/qman.h | 9 +
> 69 files changed, 4408 insertions(+), 2356 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/lynx_10g.rst
> create mode 100644 drivers/phy/freescale/lynx-10g.h
> create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g-clk.c
> create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g.c
>
> --
> 2.35.1.1320.gc452695387.dirty
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function
2022-07-21 13:18 ` Camelia Alexandra Groza
@ 2022-07-21 15:36 ` Sean Anderson
0 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-07-21 15:36 UTC (permalink / raw)
To: Camelia Alexandra Groza, David S . Miller, Jakub Kicinski,
Madalin Bucur, netdev@vger.kernel.org
Cc: Leo Li, linux-kernel@vger.kernel.org, Russell King, Eric Dumazet,
Paolo Abeni, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
On 7/21/22 9:18 AM, Camelia Alexandra Groza wrote:
>> -----Original Message-----
>> From: Linuxppc-dev <linuxppc-dev-
>> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
>> Anderson
>> Sent: Saturday, July 16, 2022 1:00
>> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
>> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
>> netdev@vger.kernel.org
>> Cc: Leo Li <leoyang.li@nxp.com>; Sean Anderson
>> <sean.anderson@seco.com>; Russell King <linux@armlinux.org.uk>; linux-
>> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; Paolo
>> Abeni <pabeni@redhat.com>; linuxppc-dev@lists.ozlabs.org; linux-arm-
>> kernel@lists.infradead.org
>> Subject: [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update
>> function
>>
>> This adds a function to update a CGR with new parameters.
>> qman_cgr_create can almost be used for this (with flags=0), but it's not
>
> It's qman_create_cgr, not qman_cgr_create.
Thanks, will fix.
>> suitable because it also registers the callback function. The _safe
>> variant was modeled off of qman_cgr_delete_safe. However, we handle
>> multiple arguments and a return value.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>
> Acked-by: Camelia Groza <camelia.groza@nxp.com>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink
2022-07-21 14:26 ` [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Camelia Alexandra Groza
@ 2022-07-21 15:39 ` Sean Anderson
0 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-07-21 15:39 UTC (permalink / raw)
To: Camelia Alexandra Groza, David S . Miller, Jakub Kicinski,
Madalin Bucur, netdev@vger.kernel.org
Cc: Andrew Lunn, linux-doc@vger.kernel.org, Eric Dumazet,
Paul Mackerras, Krzysztof Kozlowski, Ioana Ciornei,
linux-phy@lists.infradead.org, Jonathan Corbet, Russell King,
Kishon Vijay Abraham I, Paolo Abeni, devicetree@vger.kernel.org,
Rob Herring, linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, Alexandru Marginean,
linux-kernel@vger.kernel.org, Leo Li, Vinod Koul, Vladimir Oltean,
Shawn Guo, Heiner Kallweit
On 7/21/22 10:26 AM, Camelia Alexandra Groza wrote:
>> -----Original Message-----
>> From: Sean Anderson <sean.anderson@seco.com>
>> Sent: Saturday, July 16, 2022 0:59
>> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
>> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
>> netdev@vger.kernel.org
>> Cc: Paolo Abeni <pabeni@redhat.com>; Eric Dumazet
>> <edumazet@google.com>; linux-arm-kernel@lists.infradead.org; Russell
>> King <linux@armlinux.org.uk>; linux-kernel@vger.kernel.org; Sean Anderson
>> <sean.anderson@seco.com>; Alexandru Marginean
>> <alexandru.marginean@nxp.com>; Andrew Lunn <andrew@lunn.ch>;
>> Benjamin Herrenschmidt <benh@kernel.crashing.org>; Heiner Kallweit
>> <hkallweit1@gmail.com>; 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>; Leo Li
>> <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>;
>> Vladimir Oltean <olteanv@gmail.com>; devicetree@vger.kernel.org; linux-
>> doc@vger.kernel.org; linux-phy@lists.infradead.org; linuxppc-
>> dev@lists.ozlabs.org
>> Subject: [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink
>>
>> 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 RFT, 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 4 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 patches 42 and 43.
>>
>> The serdes driver is mostly functional (except for XFI). This series
>> only adds support for the LS1046ARDB SerDes (and untested LS1088ARDB),
>> but it should be fairly straightforward to add support for other SoCs
>> and boards (see Documentation/driver-api/phy/qoriq.rst).
>>
>> This is the last spin of this series with all patches included. After next
>> week (depending on feedback) I will resend the patches broken up as
>> follows:
>> - 5: 1000BASE-KX support
>> - 1, 6, 44, 45: Lynx 10G support
>> - 7-10, 12-14: Phy rate adaptation support
>> - 2-4, 15-43, 46, 47: DPAA phylink conversion
>
> Please also send patches 15-38 separately from the DPAA1 SerDes and phylink set for easier review
OK.
--Sean
>> Patches 15-19 were first submitted as [1].
>>
>> [1] https://lore.kernel.org/netdev/20220531195851.1592220-1-sean.anderson@seco.com/
>>
>> Changes in v3:
>> - Manually expand yaml references
>> - Add mode configuration to device tree
>> - Expand pcs-handle to an array
>> - Incorperate some minor changes into the first FMan binding commit
>> - Add vendor prefix 'fsl,' to rgmii and mii properties.
>> - Set maxItems for pcs-names
>> - Remove phy-* properties from example because dt-schema complains and
>> I
>> can't be bothered to figure out how to make it work.
>> - Add pcs-handle as a preferred version of pcsphy-handle
>> - Deprecate pcsphy-handle
>> - Remove mii/rmii properties
>> - Add 1000BASE-KX interface mode
>> - Rename remaining references to QorIQ SerDes to Lynx 10G
>> - Fix PLL enable sequence by waiting for our reset request to be cleared
>> before continuing. Do the same for the lock, even though it isn't as
>> critical. Because we will delay for 1.5ms on average, use prepare
>> instead of enable so we can sleep.
>> - Document the status of each protocol
>> - Fix offset of several bitfields in RECR0
>> - Take into account PLLRST_B, SDRST_B, and SDEN when considering whether
>> a PLL is "enabled."
>> - Only power off unused lanes.
>> - Split mode lane mask into first/last lane (like group)
>> - Read modes from device tree
>> - Use caps to determine whether KX/KR are supported
>> - Move modes to lynx_priv
>> - Ensure that the protocol controller is not already in-use when we try
>> to configure a new mode. This should only occur if the device tree is
>> misconfigured (e.g. when QSGMII is selected on two lanes but there is
>> only one QSGMII controller).
>> - Split PLL drivers off into their own file
>> - Add clock for "ext_dly" instead of writing the bit directly (and
>> racing with any clock code).
>> - Use kasprintf instead of open-coding the snprintf dance
>> - Support 1000BASE-KX in lynx_lookup_proto. This still requires PCS
>> support, so nothing is truly "enabled" yet.
>> - Add support for phy rate adaptation
>> - Support differing link speeds and interface speeds
>> - Adjust advertisement based on rate adaptation
>> - Adjust link settings based on rate adaptation
>> - Add support for CRS-based rate adaptation
>> - Add support for AQR115
>> - Add some additional phy interfaces
>> - Add support for aquantia rate adaptation
>> - Put the PCS mdiodev only after we are done with it (since the PCS
>> does not perform a get itself).
>> - Remove _return label from memac_initialization in favor of returning
>> directly
>> - Fix grabbing the default PCS not checking for -ENODATA from
>> of_property_match_string
>> - Set DTSEC_ECNTRL_R100M in dtsec_link_up instead of dtsec_mac_config
>> - Remove rmii/mii properties
>> - Replace 1000Base... with 1000BASE... to match IEEE capitalization
>> - Add compatibles for QSGMII PCSs
>> - Split arm and powerpcs dts updates
>> - Describe modes in device tree
>> - ls1088a: Add serdes bindings
>>
>> Changes in v2:
>> - Rename to fsl,lynx-10g.yaml
>> - Refer to the device in the documentation, rather than the binding
>> - Move compatible first
>> - Document phy cells in the description
>> - 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.
>> - Remove minItems
>> - Use list for clock-names
>> - Fix example binding having too many cells in regs
>> - Add #clock-cells. This will allow using assigned-clocks* to configure
>> the PLLs.
>> - Document the structure of the compatible strings
>> - Convert FMan MAC bindings to yaml
>> - Better document how we select which PCS to use in the default case
>> - Rename driver to Lynx 10G (etc.)
>> - Fix not clearing group->pll after disabling it
>> - Support 1 and 2 phy-cells
>> - Power off lanes during probe
>> - Clear SGMIIaCR1_PCS_EN during probe
>> - Rename LYNX_PROTO_UNKNOWN to LYNX_PROTO_NONE
>> - Handle 1000BASE-KX in lynx_proto_mode_prep
>> - Remove some unused variables
>> - Fix prototype for dtsec_initialization
>> - Fix warning if sizeof(void *) != sizeof(resource_size_t)
>> - Specify type of mac_dev for exception_cb
>> - Add helper for sanity checking cgr ops
>> - Add CGR update function
>> - Adjust queue depth on rate change
>> - Move PCS_LYNX dependency to fman Kconfig
>> - Remove unused variable slow_10g_if
>> - 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.
>> - Configure the SerDes in enable/disable
>> - Properly implement all ethtool ops and ioctls. These were mostly
>> stubbed out just enough to compile last time.
>> - Convert 10GEC and dTSEC as well
>> - Fix capitalization of mEMAC in commit messages
>> - Add nodes for QSGMII PCSs
>> - Add nodes for QSGMII PCSs
>> - Use one phy cell for SerDes1, since no lanes can be grouped
>> - Disable SerDes by default to prevent breaking boards inadvertently.
>>
>> Sean Anderson (47):
>> dt-bindings: phy: Add Lynx 10G phy binding
>> dt-bindings: net: Expand pcs-handle to an array
>> dt-bindings: net: Convert FMan MAC bindings to yaml
>> dt-bindings: net: fman: Add additional interface properties
>> net: phy: Add 1000BASE-KX interface mode
>> [RFT] phy: fsl: Add Lynx 10G SerDes driver
>> net: phy: Add support for rate adaptation
>> net: phylink: Support differing link speeds and interface speeds
>> net: phylink: Adjust advertisement based on rate adaptation
>> net: phylink: Adjust link settings based on rate adaptation
>> [RFC] net: phylink: Add support for CRS-based rate adaptation
>> net: phy: aquantia: Add support for AQR115
>> net: phy: aquantia: Add some additional phy interfaces
>> net: phy: aquantia: Add support for rate adaptation
>> 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
>> powerpc: dts: qoriq: Add nodes for QSGMII PCSs
>> arm64: dts: layerscape: Add nodes for QSGMII PCSs
>> arm64: dts: ls1046a: Add serdes bindings
>> arm64: dts: ls1088a: Add serdes bindings
>> arm64: dts: ls1046ardb: Add serdes bindings
>> [WIP] arm64: dts: ls1088ardb: Add serdes bindings
>>
>> .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 1 +
>> .../bindings/net/ethernet-controller.yaml | 10 +-
>> .../bindings/net/fsl,fman-dtsec.yaml | 172 +++
>> .../bindings/net/fsl,qoriq-mc-dpmac.yaml | 2 +-
>> .../devicetree/bindings/net/fsl-fman.txt | 133 +-
>> .../devicetree/bindings/phy/fsl,lynx-10g.yaml | 311 ++++
>> Documentation/driver-api/phy/index.rst | 1 +
>> Documentation/driver-api/phy/lynx_10g.rst | 73 +
>> MAINTAINERS | 6 +
>> .../boot/dts/freescale/fsl-ls1043-post.dtsi | 24 +
>> .../boot/dts/freescale/fsl-ls1046-post.dtsi | 25 +
>> .../boot/dts/freescale/fsl-ls1046a-rdb.dts | 34 +
>> .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 179 +++
>> .../boot/dts/freescale/fsl-ls1088a-rdb.dts | 87 ++
>> .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 96 ++
>> .../fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 +-
>> .../boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +-
>> .../fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 +-
>> .../boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 +-
>> .../boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +-
>> 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 | 4 +-
>> drivers/net/ethernet/freescale/fman/fman.c | 31 +-
>> drivers/net/ethernet/freescale/fman/fman.h | 31 +-
>> .../net/ethernet/freescale/fman/fman_dtsec.c | 674 ++++-----
>> .../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 | 864 +++++------
>> .../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/net/phy/aquantia_main.c | 86 +-
>> drivers/net/phy/phy.c | 21 +
>> drivers/net/phy/phylink.c | 161 +-
>> drivers/phy/freescale/Kconfig | 20 +
>> drivers/phy/freescale/Makefile | 3 +
>> drivers/phy/freescale/lynx-10g.h | 36 +
>> drivers/phy/freescale/phy-fsl-lynx-10g-clk.c | 438 ++++++
>> drivers/phy/freescale/phy-fsl-lynx-10g.c | 1297 +++++++++++++++++
>> drivers/soc/fsl/qbman/qman.c | 76 +-
>> include/linux/phy.h | 42 +
>> include/linux/phylink.h | 12 +-
>> include/soc/fsl/qman.h | 9 +
>> 69 files changed, 4408 insertions(+), 2356 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/lynx_10g.rst
>> create mode 100644 drivers/phy/freescale/lynx-10g.h
>> create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g-clk.c
>> create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g.c
>>
>> --
>> 2.35.1.1320.gc452695387.dirty
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs
2022-07-21 13:48 ` Camelia Alexandra Groza
@ 2022-07-21 17:51 ` Sean Anderson
0 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-07-21 17:51 UTC (permalink / raw)
To: Camelia Alexandra Groza, David S . Miller, Jakub Kicinski,
Madalin Bucur, netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org, Paolo Abeni, Shawn Guo, Russell King,
linux-kernel@vger.kernel.org, Eric Dumazet, Rob Herring,
Paul Mackerras, Krzysztof Kozlowski, Leo Li,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
On 7/21/22 9:48 AM, Camelia Alexandra Groza wrote:
>> -----Original Message-----
>> From: Linuxppc-dev <linuxppc-dev-
>> bounces+camelia.groza=nxp.com@lists.ozlabs.org> On Behalf Of Sean
>> Anderson
>> Sent: Saturday, July 16, 2022 1:00
>> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
>> <kuba@kernel.org>; Madalin Bucur <madalin.bucur@nxp.com>;
>> netdev@vger.kernel.org
>> Cc: devicetree@vger.kernel.org; Leo Li <leoyang.li@nxp.com>; Sean
>> Anderson <sean.anderson@seco.com>; linuxppc-dev@lists.ozlabs.org;
>> Russell King <linux@armlinux.org.uk>; linux-kernel@vger.kernel.org; Eric
>> Dumazet <edumazet@google.com>; Rob Herring <robh+dt@kernel.org>;
>> Paul Mackerras <paulus@samba.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@linaro.org>; Paolo Abeni <pabeni@redhat.com>;
>> Shawn Guo <shawnguo@kernel.org>; linux-arm-kernel@lists.infradead.org
>> Subject: [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for
>> QSGMII PCSs
>>
>> Now that we actually read registers from QSGMII PCSs, it's important
>> that we have the correct address (instead of hoping that we're the MAC
>> with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII
>> PCSs. They have the same addresses on all SoCs (e.g. if QSGMIIA is
>> present it's used for MACs 1 through 4).
>>
>> Since the first QSGMII PCSs share an address with the SGMII and XFI
>> PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts
>> on the bus.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>
> MAC1 and MAC2 can be XFI on T2080. This needs to be reflected in qoriq-fman3-0-1g-0.dtsi
> and qoriq-fman3-0-1g-1.dtsi
>
> The two associated netdevs fail to probe on a T2080RDB without "xfi" added to the pcs-names:
> fsl_dpaa_mac ffe4e0000.ethernet (unnamed net_device) (uninitialized): failed to validate link configuration for in-band status
> fsl_dpaa_mac ffe4e0000.ethernet: error -EINVAL: Could not create phylink
> fsl_dpa: probe of dpaa-ethernet.0 failed with error -22
Ah, I missed that this SoC had 10G on MAC1/MAC2. Going with the existing
naming scheme, these MACs should probably go in DTSs named
qoriq-fman3-0-1g-2.dtsi and qoriq-fman3-0-1g-3.dtsi. Alternatively, this
could be done in t2081si-post.dtsi, since it is only for one SoC. I don't
want to add these to qoriq-fman3-0-1g-0.dtsi and qoriq-fman3-0-1g-1.dtsi
because they are used on other SoCs which don't have 10G.
--Sean
>> ---
>>
>> Changes in v3:
>> - Add compatibles for QSGMII PCSs
>> - Split arm and powerpcs dts updates
>>
>> Changes in v2:
>> - New
>>
>> .../boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 ++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +++++++++-
>> .../boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 ++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 ++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 ++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +++++++++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 ++-
>> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +++++++++-
>> 18 files changed, 127 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
>> index baa0c503e741..db169d630db3 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
>> @@ -55,7 +55,8 @@ ethernet@e0000 {
>> reg = <0xe0000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy0>;
>> + pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
>> + pcs-names = "sgmii", "qsgmii";
>> };
>>
>> mdio@e1000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
>> index 93095600e808..e80ad8675be8 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
>> @@ -52,7 +52,15 @@ ethernet@f0000 {
>> compatible = "fsl,fman-memac";
>> reg = <0xf0000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x10 &fman0_tx_0x30>;
>> - pcsphy-handle = <&pcsphy6>;
>> + pcsphy-handle = <&pcsphy6>, <&qsgmiib_pcs2>,
>> <&pcsphy6>;
>> + pcs-names = "sgmii", "qsgmii", "xfi";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiib_pcs2: ethernet-pcs@2 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <2>;
>> + };
>> };
>>
>> mdio@f1000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
>> index ff4bd38f0645..6a6f51842ad5 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
>> @@ -55,7 +55,15 @@ ethernet@e2000 {
>> reg = <0xe2000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy1>;
>> + pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiia_pcs1: ethernet-pcs@1 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <1>;
>> + };
>> };
>>
>> mdio@e3000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
>> index 1fa38ed6f59e..543da5493e40 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
>> @@ -52,7 +52,15 @@ ethernet@f2000 {
>> compatible = "fsl,fman-memac";
>> reg = <0xf2000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x11 &fman0_tx_0x31>;
>> - pcsphy-handle = <&pcsphy7>;
>> + pcsphy-handle = <&pcsphy7>, <&qsgmiib_pcs3>,
>> <&pcsphy7>;
>> + pcs-names = "sgmii", "qsgmii", "xfi";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiib_pcs3: ethernet-pcs@3 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <3>;
>> + };
>> };
>>
>> mdio@f3000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
>> index a8cc9780c0c4..ce76725e6eb2 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
>> @@ -51,7 +51,8 @@ ethernet@e0000 {
>> reg = <0xe0000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy0>;
>> + pcsphy-handle = <&pcsphy0>, <&pcsphy0>;
>> + pcs-names = "sgmii", "qsgmii";
>> };
>>
>> mdio@e1000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
>> index 8b8bd70c9382..f3af67df4767 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e2000 {
>> reg = <0xe2000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy1>;
>> + pcsphy-handle = <&pcsphy1>, <&qsgmiia_pcs1>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiia_pcs1: ethernet-pcs@1 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <1>;
>> + };
>> };
>>
>> mdio@e3000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
>> index 619c880b54d8..f6d74de84bfe 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e4000 {
>> reg = <0xe4000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy2>;
>> + pcsphy-handle = <&pcsphy2>, <&qsgmiia_pcs2>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiia_pcs2: ethernet-pcs@2 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <2>;
>> + };
>> };
>>
>> mdio@e5000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
>> index d7ebb73a400d..6e091d8ae9e2 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e6000 {
>> reg = <0xe6000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x0b &fman0_tx_0x2b>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy3>;
>> + pcsphy-handle = <&pcsphy3>, <&qsgmiia_pcs3>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiia_pcs3: ethernet-pcs@3 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <3>;
>> + };
>> };
>>
>> mdio@e7000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
>> index b151d696a069..e2174c0fc841 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
>> @@ -51,7 +51,8 @@ ethernet@e8000 {
>> reg = <0xe8000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy4>;
>> + pcsphy-handle = <&pcsphy4>, <&pcsphy4>;
>> + pcs-names = "sgmii", "qsgmii";
>> };
>>
>> mdio@e9000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
>> index adc0ae0013a3..9106815bd63e 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
>> @@ -51,7 +51,15 @@ ethernet@ea000 {
>> reg = <0xea000 0x1000>;
>> fsl,fman-ports = <&fman0_rx_0x0d &fman0_tx_0x2d>;
>> ptp-timer = <&ptp_timer0>;
>> - pcsphy-handle = <&pcsphy5>;
>> + pcsphy-handle = <&pcsphy5>, <&qsgmiib_pcs1>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiib_pcs1: ethernet-pcs@1 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <1>;
>> + };
>> };
>>
>> mdio@eb000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
>> index 435047e0e250..a3c1538dfda1 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
>> @@ -52,7 +52,15 @@ ethernet@f0000 {
>> compatible = "fsl,fman-memac";
>> reg = <0xf0000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
>> - pcsphy-handle = <&pcsphy14>;
>> + pcsphy-handle = <&pcsphy14>, <&qsgmiid_pcs2>,
>> <&pcsphy14>;
>> + pcs-names = "sgmii", "qsgmii", "xfi";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiid_pcs2: ethernet-pcs@2 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <2>;
>> + };
>> };
>>
>> mdio@f1000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
>> index c098657cca0a..c024517e70d6 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
>> @@ -52,7 +52,15 @@ ethernet@f2000 {
>> compatible = "fsl,fman-memac";
>> reg = <0xf2000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x11 &fman1_tx_0x31>;
>> - pcsphy-handle = <&pcsphy15>;
>> + pcsphy-handle = <&pcsphy15>, <&qsgmiid_pcs3>,
>> <&pcsphy15>;
>> + pcs-names = "sgmii", "qsgmii", "xfi";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiid_pcs3: ethernet-pcs@3 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <3>;
>> + };
>> };
>>
>> mdio@f3000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
>> index 9d06824815f3..16fb299f615a 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
>> @@ -51,7 +51,8 @@ ethernet@e0000 {
>> reg = <0xe0000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x08 &fman1_tx_0x28>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy8>;
>> + pcsphy-handle = <&pcsphy8>, <&pcsphy8>;
>> + pcs-names = "sgmii", "qsgmii";
>> };
>>
>> mdio@e1000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
>> index 70e947730c4b..75cecbef8469 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e2000 {
>> reg = <0xe2000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x09 &fman1_tx_0x29>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy9>;
>> + pcsphy-handle = <&pcsphy9>, <&qsgmiic_pcs1>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiic_pcs1: ethernet-pcs@1 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <1>;
>> + };
>> };
>>
>> mdio@e3000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
>> index ad96e6529595..98c1d27f17e7 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e4000 {
>> reg = <0xe4000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy10>;
>> + pcsphy-handle = <&pcsphy10>, <&qsgmiic_pcs2>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiic_pcs2: ethernet-pcs@2 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <2>;
>> + };
>> };
>>
>> mdio@e5000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
>> index 034bc4b71f7a..203a00036f17 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
>> @@ -51,7 +51,15 @@ ethernet@e6000 {
>> reg = <0xe6000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x0b &fman1_tx_0x2b>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy11>;
>> + pcsphy-handle = <&pcsphy11>, <&qsgmiic_pcs3>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e1000 {
>> + qsgmiic_pcs3: ethernet-pcs@3 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <3>;
>> + };
>> };
>>
>> mdio@e7000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
>> index 93ca23d82b39..9366935ebc02 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
>> @@ -51,7 +51,8 @@ ethernet@e8000 {
>> reg = <0xe8000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x0c &fman1_tx_0x2c>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy12>;
>> + pcsphy-handle = <&pcsphy12>, <&pcsphy12>;
>> + pcs-names = "sgmii", "qsgmii";
>> };
>>
>> mdio@e9000 {
>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
>> b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
>> index 23b3117a2fd2..39f7c6133017 100644
>> --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
>> @@ -51,7 +51,15 @@ ethernet@ea000 {
>> reg = <0xea000 0x1000>;
>> fsl,fman-ports = <&fman1_rx_0x0d &fman1_tx_0x2d>;
>> ptp-timer = <&ptp_timer1>;
>> - pcsphy-handle = <&pcsphy13>;
>> + pcsphy-handle = <&pcsphy13>, <&qsgmiid_pcs1>;
>> + pcs-names = "sgmii", "qsgmii";
>> + };
>> +
>> + mdio@e9000 {
>> + qsgmiid_pcs1: ethernet-pcs@1 {
>> + compatible = "fsl,lynx-pcs";
>> + reg = <1>;
>> + };
>> };
>>
>> mdio@eb000 {
>> --
>> 2.35.1.1320.gc452695387.dirty
>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-07-21 17:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 21:59 [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 36/47] soc: fsl: qbman: Add helper for sanity checking cgr ops Sean Anderson
2022-07-21 13:16 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 37/47] soc: fsl: qbman: Add CGR update function Sean Anderson
2022-07-21 13:18 ` Camelia Alexandra Groza
2022-07-21 15:36 ` Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change Sean Anderson
2022-07-21 13:18 ` Camelia Alexandra Groza
2022-07-15 21:59 ` [PATCH net-next v3 42/47] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
2022-07-21 13:48 ` Camelia Alexandra Groza
2022-07-21 17:51 ` Sean Anderson
2022-07-15 21:59 ` [PATCH net-next v3 43/47] arm64: dts: layerscape: " Sean Anderson
2022-07-21 14:26 ` [PATCH net-next v3 00/47] [RFT] net: dpaa: Convert to phylink Camelia Alexandra Groza
2022-07-21 15:39 ` 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).