* [PATCH 0/3] Add support for dual port USXGMII+SGMII
@ 2026-06-25 12:08 Gokul Praveen
2026-06-25 12:08 ` [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node Gokul Praveen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Gokul Praveen @ 2026-06-25 12:08 UTC (permalink / raw)
To: vigneshr, kristo, conor+dt, c-vankar, s-vadapalli, krzk+dt, davem,
andrew+netdev, pabeni, kuba, g-praveen, devicetree, linux-kernel
This patch series enables dual port USXGMII and SGMII Ethernet mode
support on the TI J784S4 EVM platform using the CPSW9G Ethernet switch.
The CPSW9G instance supports both SGMII and USXGMII modes simultaneously
on MAC Ports 1 and 2, which connect to ENET Expansion 1 and ENET
Expansion 2 slots through the SERDES2 instance. The series includes:
1. A fix to the SERDES2 node to add the missing PLL1 refclk, which is
required for multilink SERDES configuration to function properly.
2. A driver fix for the am65-cpsw Ethernet driver to properly configure
the MAC in SGMII mode according to the CPSGMII Module specification,
including correct advertisement ability register settings and master
mode configuration.
3. Device tree overlay support for two board configurations:
- Board 1: Port 1 in SGMII mode (1Gbps) + Port 2 in USXGMII mode (5Gbps)
- Board 2: Port 1 in USXGMII mode (5Gbps) + Port 2 in SGMII mode (1Gbps)
Both configurations use fixed-link mode and provide flexible multi-speed
networking options for the J784S4 platform.
Boot logs:
https://gist.github.com/GokulPraveen2001/7a09cc5ed0151d264f32cbbc31896605
Gokul Praveen (3):
arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node
net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode
arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII
mode
arch/arm64/boot/dts/ti/Makefile | 11 ++-
...s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso | 97 +++++++++++++++++++
...s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso | 97 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 3 +-
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +-
5 files changed, 209 insertions(+), 6 deletions(-)
create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso
create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node 2026-06-25 12:08 [PATCH 0/3] Add support for dual port USXGMII+SGMII Gokul Praveen @ 2026-06-25 12:08 ` Gokul Praveen 2026-06-25 12:20 ` sashiko-bot 2026-06-25 12:08 ` [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode Gokul Praveen 2026-06-25 12:08 ` [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode Gokul Praveen 2 siblings, 1 reply; 7+ messages in thread From: Gokul Praveen @ 2026-06-25 12:08 UTC (permalink / raw) To: vigneshr, kristo, conor+dt, c-vankar, s-vadapalli, krzk+dt, davem, andrew+netdev, pabeni, kuba, g-praveen, devicetree, linux-kernel Add PLL1 refclk to "clocks" and "clock-names" parameter of SERDES2 node as "assigned clocks" parameter has PLL1 and serdes multilink configuration fails without PLL1. Signed-off-by: Gokul Praveen <g-praveen@ti.com> --- arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi index 78fcd0c40abc..da8d582574d0 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi @@ -122,8 +122,9 @@ serdes2: serdes@5020000 { resets = <&serdes_wiz2 0>; reset-names = "torrent_reset"; clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>, + <&serdes_wiz2 TI_WIZ_PLL1_REFCLK>, <&serdes_wiz2 TI_WIZ_PHY_EN_REFCLK>; - clock-names = "refclk", "phy_en_refclk"; + clock-names = "refclk","pll1_refclk", "phy_en_refclk"; assigned-clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>, <&serdes_wiz2 TI_WIZ_PLL1_REFCLK>, <&serdes_wiz2 TI_WIZ_REFCLK_DIG>; -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node 2026-06-25 12:08 ` [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node Gokul Praveen @ 2026-06-25 12:20 ` sashiko-bot 0 siblings, 0 replies; 7+ messages in thread From: sashiko-bot @ 2026-06-25 12:20 UTC (permalink / raw) To: Gokul Praveen; +Cc: devicetree, conor+dt, robh Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Adding a third clock to the serdes2 node violates the Cadence Torrent PHY DT binding schema, which will cause `dtbs_check` validation to fail. -- commit c7948a2c66b640fab1ce0e80a89c69a933059939 Author: Gokul Praveen <g-praveen@ti.com> arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node This commit adds the PLL1 reference clock to the clocks and clock-names properties of the SERDES2 node. This is done to satisfy the assigned-clocks parameter and prevent multilink configuration failures. > diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi > index 78fcd0c40abcf..da8d582574d03 100644 > --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi > @@ -122,8 +122,9 @@ serdes2: serdes@5020000 { > resets = <&serdes_wiz2 0>; > reset-names = "torrent_reset"; > clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>, > + <&serdes_wiz2 TI_WIZ_PLL1_REFCLK>, > <&serdes_wiz2 TI_WIZ_PHY_EN_REFCLK>; > - clock-names = "refclk", "phy_en_refclk"; > + clock-names = "refclk","pll1_refclk", "phy_en_refclk"; [Severity: Low] Will adding a third clock to the serdes2 node cause dtbs_check validation to fail? The Cadence Torrent PHY device tree binding schema in Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml restricts the clocks and clock-names properties to a maximum of 2 items. By adding pll1_refclk alongside refclk and phy_en_refclk, the array now contains 3 items, which violates the existing schema constraints. Does the device tree binding schema need to be updated first to support this third clock? > assigned-clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>, > <&serdes_wiz2 TI_WIZ_PLL1_REFCLK>, > <&serdes_wiz2 TI_WIZ_REFCLK_DIG>; -- Sashiko AI review · https://sashiko.dev/#/patchset/20260625120805.28948-1-g-praveen@ti.com?part=1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode 2026-06-25 12:08 [PATCH 0/3] Add support for dual port USXGMII+SGMII Gokul Praveen 2026-06-25 12:08 ` [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node Gokul Praveen @ 2026-06-25 12:08 ` Gokul Praveen 2026-06-25 12:18 ` sashiko-bot 2026-06-25 12:08 ` [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode Gokul Praveen 2 siblings, 1 reply; 7+ messages in thread From: Gokul Praveen @ 2026-06-25 12:08 UTC (permalink / raw) To: vigneshr, kristo, conor+dt, c-vankar, s-vadapalli, krzk+dt, davem, andrew+netdev, pabeni, kuba, g-praveen, devicetree, linux-kernel Fix MAC configuration of CPSW Ethernet Switch in SGMII mode by modifying the CPSW_SGMII_MR_ADV_ABILITY_REG and configuring MAC in master mode as per CPSGMII Module specification. Signed-off-by: Gokul Praveen <g-praveen@ti.com> --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 434a31080855..291697d82491 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -84,6 +84,7 @@ #define AM65_CPSW_SGMII_CONTROL_REG 0x010 #define AM65_CPSW_SGMII_MR_ADV_ABILITY_REG 0x018 #define AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE BIT(0) +#define AM65_CPSW_SGMII_CONTROL_MASTER BIT(5) #define AM65_CPSW_CTL_VLAN_AWARE BIT(1) #define AM65_CPSW_CTL_P0_ENABLE BIT(2) @@ -2061,8 +2062,10 @@ static void am65_cpsw_nuss_mac_config(struct phylink_config *config, unsigned in if (common->pdata.extra_modes & BIT(state->interface)) { if (state->interface == PHY_INTERFACE_MODE_SGMII) { - writel(ADVERTISE_SGMII, - port->sgmii_base + AM65_CPSW_SGMII_MR_ADV_ABILITY_REG); + writel(ADVERTISE_SGMII | LPA_SGMII_1000FULL | LPA_SGMII_LINK, + port->sgmii_base + AM65_CPSW_SGMII_MR_ADV_ABILITY_REG); + writel(AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE, + port->sgmii_base + AM65_CPSW_SGMII_CONTROL_REG); cpsw_sl_ctl_set(port->slave.mac_sl, CPSW_SL_CTL_EXT_EN); } else { cpsw_sl_ctl_clr(port->slave.mac_sl, CPSW_SL_CTL_EXT_EN); @@ -2076,8 +2079,6 @@ static void am65_cpsw_nuss_mac_config(struct phylink_config *config, unsigned in CPSW_SL_CTL_XGIG | CPSW_SL_CTL_XGMII_EN); } - writel(AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE, - port->sgmii_base + AM65_CPSW_SGMII_CONTROL_REG); } } -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode 2026-06-25 12:08 ` [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode Gokul Praveen @ 2026-06-25 12:18 ` sashiko-bot 0 siblings, 0 replies; 7+ messages in thread From: sashiko-bot @ 2026-06-25 12:18 UTC (permalink / raw) To: Gokul Praveen; +Cc: robh, devicetree, conor+dt Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Missing AM65_CPSW_SGMII_CONTROL_MASTER bit in SGMII control register write - [Medium] Hardcoded SGMII link advertisement to 1000 Mbps Full Duplex -- commit 2e14387f10f244dbb25f009bd28dfe67470e6821 Author: Gokul Praveen <g-praveen@ti.com> net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode Fix MAC configuration of CPSW Ethernet Switch in SGMII mode by modifying the CPSW_SGMII_MR_ADV_ABILITY_REG and configuring MAC in master mode as per CPSGMII Module specification. > diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > index 7ac75fc8cdcf4..4740b35052464 100644 > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > @@ -84,6 +84,7 @@ > #define AM65_CPSW_SGMII_CONTROL_REG 0x010 > #define AM65_CPSW_SGMII_MR_ADV_ABILITY_REG 0x018 > #define AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE BIT(0) > +#define AM65_CPSW_SGMII_CONTROL_MASTER BIT(5) > > #define AM65_CPSW_CTL_VLAN_AWARE BIT(1) [ ... ] > @@ -2063,8 +2064,10 @@ static void am65_cpsw_nuss_mac_config(struct phylink_config *config, unsigned in > > if (common->pdata.extra_modes & BIT(state->interface)) { > if (state->interface == PHY_INTERFACE_MODE_SGMII) { > - writel(ADVERTISE_SGMII, > - port->sgmii_base + AM65_CPSW_SGMII_MR_ADV_ABILITY_REG); > + writel(ADVERTISE_SGMII | LPA_SGMII_1000FULL | LPA_SGMII_LINK, > + port->sgmii_base + AM65_CPSW_SGMII_MR_ADV_ABILITY_REG); [Severity: Medium] Will this hardcoded advertisement break SGMII operation at 10 Mbps or 100 Mbps? By unconditionally applying LPA_SGMII_1000FULL and LPA_SGMII_LINK, the MAC seems to always claim 1000 Mbps capabilities regardless of the actual requested or negotiated speed, which could restrict generic SGMII functionality to gigabit-only. > + writel(AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE, > + port->sgmii_base + AM65_CPSW_SGMII_CONTROL_REG); [Severity: High] Does this write miss the AM65_CPSW_SGMII_CONTROL_MASTER bit introduced earlier in the patch? The commit message states the intent is to configure the MAC in master mode, but only AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE is being set in am65_cpsw_nuss_mac_config(). Could this cause the MAC to remain in slave mode, potentially preventing the SGMII link from coming up on MAC-to-MAC connections that require the MAC to act as the master? > cpsw_sl_ctl_set(port->slave.mac_sl, CPSW_SL_CTL_EXT_EN); > } else { > cpsw_sl_ctl_clr(port->slave.mac_sl, CPSW_SL_CTL_EXT_EN); -- Sashiko AI review · https://sashiko.dev/#/patchset/20260625120805.28948-1-g-praveen@ti.com?part=2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode 2026-06-25 12:08 [PATCH 0/3] Add support for dual port USXGMII+SGMII Gokul Praveen 2026-06-25 12:08 ` [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node Gokul Praveen 2026-06-25 12:08 ` [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode Gokul Praveen @ 2026-06-25 12:08 ` Gokul Praveen 2026-06-25 12:20 ` sashiko-bot 2 siblings, 1 reply; 7+ messages in thread From: Gokul Praveen @ 2026-06-25 12:08 UTC (permalink / raw) To: vigneshr, kristo, conor+dt, c-vankar, s-vadapalli, krzk+dt, davem, andrew+netdev, pabeni, kuba, g-praveen, devicetree, linux-kernel The CPSW9G instance of the CPSW Ethernet Switch supports SGMII and USXGMII mode with MAC Ports 1 and 2 of the instance, which are connected to ENET Expansion 1 and ENET Expansion 2 slots on the EVM respectively, through the Serdes2 instance of the SERDES. Enable CPSW9G MAC Ports 1 and 2 in fixed-link configuration SGMII and USXGMII mode at 1Gbps and 5 Gbps each. Signed-off-by: Gokul Praveen <g-praveen@ti.com> --- arch/arm64/boot/dts/ti/Makefile | 11 ++- ...s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso | 93 ++++++++++++++++++ ...s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso | 96 +++++++++++++++++++ 3 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 371f9a043fe5..253706415833 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -199,6 +199,8 @@ dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-pcie0-pcie1-ep.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-quad-port-eth-exp1.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-usxgmii-exp1-exp2.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j784s4-j742s2-evm-usb0-type-a.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtbo # Boards with J742S2 SoC dtb-$(CONFIG_ARCH_K3) += k3-j742s2-evm.dtb @@ -338,6 +340,10 @@ k3-j784s4-evm-usb0-type-a-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-j742s2-evm-usb0-type-a.dtbo k3-j784s4-evm-usxgmii-exp1-exp2-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-evm-usxgmii-exp1-exp2.dtbo +k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1-dtbs := k3-j784s4-evm.dtb \ + k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtbo +k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2-dtbs := k3-j784s4-evm.dtb \ + k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtbo dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-am625-beagleplay-csi2-tevi-ov5640.dtb \ k3-am625-phyboard-lyra-disable-eth-phy.dtb \ @@ -404,7 +410,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-j784s4-evm-pcie0-pcie1-ep.dtb \ k3-j784s4-evm-quad-port-eth-exp1.dtb \ k3-j784s4-evm-usb0-type-a.dtb \ - k3-j784s4-evm-usxgmii-exp1-exp2.dtb - + k3-j784s4-evm-usxgmii-exp1-exp2.dtb \ + k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtb \ + k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtb \ # Enable support for device-tree overlays DTC_FLAGS := -@ diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso new file mode 100644 index 000000000000..553546b281a9 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso @@ -0,0 +1,93 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +/** + * DT Overlay for CPSW9G in dual port fixed-link USXGMII mode using ENET-1 + * and ENET-2 Expansion slots of J784S4 EVM. + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/phy/phy-cadence.h> +#include <dt-bindings/phy/phy.h> + +#include "k3-serdes.h" + +&{/} { + aliases { + ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1"; + ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2"; + ethernet3 = "/bus@100000/ethernet@c200000/ethernet-ports/port@1"; + }; +}; + +&main_cpsw0 { + pinctrl-names = "default"; + status = "okay"; +}; + +&main_cpsw0_port1 { + phy-mode = "sgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_sgmii2_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&main_cpsw0_port2 { + phy-mode = "usxgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_usxgmii_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <5000>; + full-duplex; + }; +}; + +&serdes_wiz2 { + assigned-clocks = <&k3_clks 406 6>, <&k3_clks 406 5>; + //assigned-clock-parents = <&k3_clks 406 9>; /* Use 100 MHz clock for SGMII */ + status = "okay"; +}; + +&serdes2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + assigned-clock-parents = <&k3_clks 406 5>, + <&k3_clks 406 6>, + <&k3_clks 406 5>; + + serdes2_sgmii2_link: phy@1 { + reg = <2>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = <PHY_TYPE_SGMII>; + resets = <&serdes_wiz2 3>; + }; + serdes2_usxgmii_link: phy@0 { + reg = <3>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = <PHY_TYPE_USXGMII>; + resets = <&serdes_wiz2 4>; + }; +}; + +&serdes_ln_ctrl { + idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>, <J784S4_SERDES0_LANE1_PCIE1_LANE1>, + <J784S4_SERDES0_LANE2_IP3_UNUSED>, <J784S4_SERDES0_LANE3_USB>, + <J784S4_SERDES1_LANE0_PCIE0_LANE0>, <J784S4_SERDES1_LANE1_PCIE0_LANE1>, + <J784S4_SERDES1_LANE2_PCIE0_LANE2>, <J784S4_SERDES1_LANE3_PCIE0_LANE3>, + <J784S4_SERDES2_LANE0_IP2_UNUSED>, <J784S4_SERDES2_LANE1_IP2_UNUSED>, + <J784S4_SERDES2_LANE2_QSGMII_LANE1>, <J784S4_SERDES2_LANE3_QSGMII_LANE2>; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso new file mode 100644 index 000000000000..c98be3bbf2c8 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso @@ -0,0 +1,96 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +/** + * DT Overlay for CPSW9G in dual port fixed-link USXGMII mode using ENET-1 + * and ENET-2 Expansion slots of J784S4 EVM. + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/phy/phy-cadence.h> +#include <dt-bindings/phy/phy.h> + +#include "k3-serdes.h" + +&{/} { + aliases { + ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1"; + ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2"; + ethernet3 = "/bus@100000/ethernet@c200000/ethernet-ports/port@1"; + }; +}; + +&main_cpsw0 { + pinctrl-names = "default"; + status = "okay"; +}; + +&main_cpsw0_port1 { + phy-mode = "usxgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_usxgmii_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <5000>; + full-duplex; + }; +}; + +&main_cpsw0_port2 { + phy-mode = "sgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_sgmii2_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&serdes_wiz2 { + assigned-clocks = <&k3_clks 406 6>, <&k3_clks 406 5>; + //assigned-clock-parents = <&k3_clks 406 9>; /* Use 156.25 MHz clock for USXGMII */ + status = "okay"; +}; + +&serdes2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + assigned-clock-parents = <&k3_clks 406 5>, + <&k3_clks 406 6>, + <&k3_clks 406 5>; + + + + serdes2_sgmii2_link: phy@1 { + reg = <3>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = <PHY_TYPE_SGMII>; + resets = <&serdes_wiz2 4>; + }; + serdes2_usxgmii_link: phy@0 { + reg = <2>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = <PHY_TYPE_USXGMII>; + resets = <&serdes_wiz2 3>; + }; + +}; + +&serdes_ln_ctrl { + idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>, <J784S4_SERDES0_LANE1_PCIE1_LANE1>, + <J784S4_SERDES0_LANE2_IP3_UNUSED>, <J784S4_SERDES0_LANE3_USB>, + <J784S4_SERDES1_LANE0_PCIE0_LANE0>, <J784S4_SERDES1_LANE1_PCIE0_LANE1>, + <J784S4_SERDES1_LANE2_PCIE0_LANE2>, <J784S4_SERDES1_LANE3_PCIE0_LANE3>, + <J784S4_SERDES2_LANE0_IP2_UNUSED>, <J784S4_SERDES2_LANE1_IP2_UNUSED>, + <J784S4_SERDES2_LANE2_QSGMII_LANE1>, <J784S4_SERDES2_LANE3_QSGMII_LANE2>; +}; -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode 2026-06-25 12:08 ` [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode Gokul Praveen @ 2026-06-25 12:20 ` sashiko-bot 0 siblings, 0 replies; 7+ messages in thread From: sashiko-bot @ 2026-06-25 12:20 UTC (permalink / raw) To: Gokul Praveen; +Cc: conor+dt, robh, devicetree Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Incomplete clock configuration in `&serdes_wiz2` leaves a dangling `assigned-clocks` element as dead code. - [Low] The unit addresses in the PHY node names do not match their `reg` property values. -- commit ec16658036ad6f4bdcb6018a15184b9bd2b3c4aa Author: Gokul Praveen <g-praveen@ti.com> arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode The CPSW9G instance of the CPSW Ethernet Switch supports SGMII and USXGMII mode with MAC Ports 1 and 2 of the instance, which are connected to ENET Expansion 1 and ENET Expansion 2 slots on the EVM respectively, through the Serdes2 instance of the SERDES. Enable CPSW9G MAC Ports 1 and 2 in fixed-link configuration SGMII and USXGMII mode at 1Gbps and 5 Gbps each. > diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso > new file mode 100644 > index 0000000000000..553546b281a9e > --- /dev/null > +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-sgmii-usxgmii-exp1-exp2_board1.dtso [ ... ] > +&serdes_wiz2 { > + assigned-clocks = <&k3_clks 406 6>, <&k3_clks 406 5>; > + //assigned-clock-parents = <&k3_clks 406 9>; /* Use 100 MHz clock for SGMII */ > + status = "okay"; > +}; [Severity: Medium] The assigned-clock-parents override is commented out here, but the assigned-clocks array was expanded to two elements. Because the base device tree only defines a single parent, the clock framework will only process the first clock and silently ignore the second element. Does this leave the second clock unconfigured, and should assigned-clock-parents be uncommented to resolve this? > + > +&serdes2 { > + #address-cells = <1>; > + #size-cells = <0>; > + status = "okay"; > + > + assigned-clock-parents = <&k3_clks 406 5>, > + <&k3_clks 406 6>, > + <&k3_clks 406 5>; > + > + serdes2_sgmii2_link: phy@1 { > + reg = <2>; > + cdns,num-lanes = <1>; > + #phy-cells = <0>; > + cdns,phy-type = <PHY_TYPE_SGMII>; > + resets = <&serdes_wiz2 3>; > + }; > + serdes2_usxgmii_link: phy@0 { > + reg = <3>; [Severity: Low] Do the unit addresses phy@1 and phy@0 need to match their reg property values <2> and <3>? The dtc compiler will generate unit_address_vs_reg warnings when the unit address and reg property do not match. [ ... ] > diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso > new file mode 100644 > index 0000000000000..c98be3bbf2c8b > --- /dev/null > +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-sgmii-exp1-exp2_board2.dtso [ ... ] > +&serdes_wiz2 { > + assigned-clocks = <&k3_clks 406 6>, <&k3_clks 406 5>; > + //assigned-clock-parents = <&k3_clks 406 9>; /* Use 156.25 MHz clock for USXGMII */ > + status = "okay"; > +}; [Severity: Medium] Similar to the first overlay, the assigned-clock-parents override is commented out while assigned-clocks contains two elements. Is the second clock intended to be left unconfigured here? > + > +&serdes2 { > + #address-cells = <1>; > + #size-cells = <0>; > + status = "okay"; > + > + assigned-clock-parents = <&k3_clks 406 5>, > + <&k3_clks 406 6>, > + <&k3_clks 406 5>; > + > + > + > + serdes2_sgmii2_link: phy@1 { > + reg = <3>; > + cdns,num-lanes = <1>; > + #phy-cells = <0>; > + cdns,phy-type = <PHY_TYPE_SGMII>; > + resets = <&serdes_wiz2 4>; > + }; > + serdes2_usxgmii_link: phy@0 { > + reg = <2>; [Severity: Low] Are the unit addresses for these nodes correct? They are named phy@1 and phy@0, but their reg properties are set to <3> and <2>. Should they be updated to match the reg properties to prevent dtc warnings? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260625120805.28948-1-g-praveen@ti.com?part=3 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-25 12:20 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-25 12:08 [PATCH 0/3] Add support for dual port USXGMII+SGMII Gokul Praveen 2026-06-25 12:08 ` [PATCH 1/3] arm64: dts: ti: Add PLL1 refclk to J784S4 SoC SERDES node Gokul Praveen 2026-06-25 12:20 ` sashiko-bot 2026-06-25 12:08 ` [PATCH 2/3] net: ethernet: ti: am65-cpsw: Fix MAC configuration for SGMII mode Gokul Praveen 2026-06-25 12:18 ` sashiko-bot 2026-06-25 12:08 ` [PATCH 3/3] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII+SGMII mode Gokul Praveen 2026-06-25 12:20 ` sashiko-bot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox