J722S SGMII support
Subsystems (5)
v2 cover J722S SGMII support
The J722S CPSW and SERDES are very similar to the variants found on the AM64, but they additionally support SGMII. Introduce new compatible strings for the J722S to add this support to the drivers.
This is a prerequisite for the Single-Pair Ethernet interface of the TQ-Systems MBa67xx baseboard for the TQMa67xx SoM, which will be submitted separately.
v2:
- Keep support for the AM64 compatible strings as a fallback, adjust commit messages (patches 1-3 and 7)
- No changes to patches 4-6
Nora Schiffer (7):
dt-bindings: phy: ti: phy-j721e-wiz: Add ti,j722s-wiz-10g compatible
dt-bindings: phy: ti: phy-gmii-sel: Add ti,j722s-phy-gmii-sel
compatible
dt-bindings: net: ti: k3-am654-cpsw-nuss: Add ti,j722s-cpsw-nuss
compatible
phy: ti: phy-j721e-wiz: add support for J722S SoC family
phy: ti: gmii-sel: add support for J722S SoC family
net: ethernet: ti: am65-cpsw: add support for J722S SoC family
arm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel
and CPSW3G
.../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 20 ++++++++++------ .../bindings/phy/ti,phy-gmii-sel.yaml | 24 ++++++++++++------- .../bindings/phy/ti,phy-j721e-wiz.yaml | 20 ++++++++++------ arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 12 ++++++++-- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 +++++++ drivers/phy/ti/phy-gmii-sel.c | 11 +++++++++ drivers/phy/ti/phy-j721e-wiz.c | 24 +++++++++++++++++++ 7 files changed, 94 insertions(+), 25 deletions(-)
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 1/7 dt-bindings: phy: ti: phy-j721e-wiz: Add ti,j722s-wiz-10g compatible
The J722S WIZ is mostly identical to the AM64's, but additionally supports SGMII. The AM64 compatible ti,am64-wiz-10g is used as a fallback.
--- .../bindings/phy/ti,phy-j721e-wiz.yaml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml +13 -7
@@ -12,13 +12,19 @@ maintainers: properties: compatible: - enum: - - ti,j721e-wiz-16g - - ti,j721e-wiz-10g - - ti,j721s2-wiz-10g - - ti,am64-wiz-10g - - ti,j7200-wiz-10g - - ti,j784s4-wiz-10g + oneOf: + - items: + - enum: + - ti,j721e-wiz-16g + - ti,j721e-wiz-10g + - ti,j721s2-wiz-10g + - ti,am64-wiz-10g + - ti,j7200-wiz-10g + - ti,j784s4-wiz-10g + - items: + - enum: + - ti,j722s-wiz-10g + - const: ti,am64-wiz-10g power-domains: maxItems: 1
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 2/7 dt-bindings: phy: ti: phy-gmii-sel: Add ti,j722s-phy-gmii-sel compatible
In reply to Nora SchifferThe J722S gmii-sel is mostly identical to the AM64's, but additionally supports SGMII. The AM64 compatible ti,am654-phy-gmii-sel is used as a fallback.
--- .../bindings/phy/ti,phy-gmii-sel.yaml | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml +15 -9
@@ -47,15 +47,21 @@ description: | properties: compatible: - enum: - - ti,am3352-phy-gmii-sel - - ti,dra7xx-phy-gmii-sel - - ti,am43xx-phy-gmii-sel - - ti,dm814-phy-gmii-sel - - ti,am654-phy-gmii-sel - - ti,j7200-cpsw5g-phy-gmii-sel - - ti,j721e-cpsw9g-phy-gmii-sel - - ti,j784s4-cpsw9g-phy-gmii-sel + oneOf: + - items: + - enum: + - ti,am3352-phy-gmii-sel + - ti,dra7xx-phy-gmii-sel + - ti,am43xx-phy-gmii-sel + - ti,dm814-phy-gmii-sel + - ti,am654-phy-gmii-sel + - ti,j7200-cpsw5g-phy-gmii-sel + - ti,j721e-cpsw9g-phy-gmii-sel + - ti,j784s4-cpsw9g-phy-gmii-sel + - items: + - enum: + - ti,j722s-phy-gmii-sel + - const: ti,am654-phy-gmii-sel reg: maxItems: 1
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 3/7 dt-bindings: net: ti: k3-am654-cpsw-nuss: Add ti,j722s-cpsw-nuss compatible
In reply to Nora SchifferThe J722S CPSW3G is mostly identical to the AM64's, but additionally supports SGMII. The AM64 compatible ti,am642-cpsw-nuss is used as a fallback.
--- .../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml +13 -7
@@ -53,13 +53,19 @@ properties: "#size-cells": true compatible: - enum: - - ti,am642-cpsw-nuss - - ti,am654-cpsw-nuss - - ti,j7200-cpswxg-nuss - - ti,j721e-cpsw-nuss - - ti,j721e-cpswxg-nuss - - ti,j784s4-cpswxg-nuss + oneOf: + - items: + - enum: + - ti,am642-cpsw-nuss + - ti,am654-cpsw-nuss + - ti,j7200-cpswxg-nuss + - ti,j721e-cpsw-nuss + - ti,j721e-cpswxg-nuss + - ti,j784s4-cpswxg-nuss + - items: + - enum: + - ti,j722s-cpsw-nuss + - const: ti,am642-cpsw-nuss reg: maxItems: 1
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 4/7 phy: ti: phy-j721e-wiz: add support for J722S SoC family
In reply to Nora SchifferThe J722S WIZ is mostly identical to the AM64's, but additionally supports SGMII.
--- drivers/phy/ti/phy-j721e-wiz.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/phy/ti/phy-j721e-wiz.c +24 -0
@@ -331,6 +331,7 @@ enum wiz_type {J721E_WIZ_16G ,J721E_WIZ_10G ,/* Also for J7200 SR1.0 */ AM64_WIZ_10G , +J722S_WIZ_10G ,J7200_WIZ_10G ,/* J7200 SR2.0 */ J784S4_WIZ_10G , J721S2_WIZ_10G,
@@ -1020,6 +1021,7 @@ static void wiz_clock_cleanup(struct wiz *wiz, struct device_node *node)switch (wiz->type) {case AM64_WIZ_10G : +case J722S_WIZ_10G :case J7200_WIZ_10G :case J784S4_WIZ_10G :case J721S2_WIZ_10G :
@@ -1089,6 +1091,7 @@ static void wiz_clock_init(struct wiz *wiz)switch (wiz->type) {case AM64_WIZ_10G : +case J722S_WIZ_10G :case J7200_WIZ_10G :switch (rate) {case REF_CLK_100MHZ :
@@ -1158,6 +1161,7 @@ static int wiz_clock_probe(struct wiz *wiz, struct device_node *node)switch (wiz->type) {case AM64_WIZ_10G : +case J722S_WIZ_10G :case J7200_WIZ_10G :case J784S4_WIZ_10G :case J721S2_WIZ_10G :
@@ -1246,6 +1250,14 @@ static int wiz_phy_fullrt_div(struct wiz *wiz, int lane)if (wiz->lane_phy_type[lane] ==PHY_TYPE_SGMII )return regmap_field_write (wiz->p0_fullrt_div[lane],0x2 );break ; + +case J722S_WIZ_10G : +if (wiz->lane_phy_type[lane] ==PHY_TYPE_PCIE ) +return regmap_field_write (wiz->p0_fullrt_div[lane],0x1 ); +if (wiz->lane_phy_type[lane] ==PHY_TYPE_SGMII ) +return regmap_field_write (wiz->p0_fullrt_div[lane],0x2 ); +break ; +default :return 0 ; }
@@ -1350,6 +1362,15 @@ static struct wiz_data am64_10g_data = { .clk_div_sel_num = WIZ_DIV_NUM_CLOCKS_10G, }; +static struct wiz_data j722s_10g_data = { + .type =J722S_WIZ_10G , + .pll0_refclk_mux_sel = &pll0_refclk_mux_sel, + .pll1_refclk_mux_sel = &pll1_refclk_mux_sel, + .refclk_dig_sel = &refclk_dig_sel_10g, + .clk_mux_sel = clk_mux_sel_10g, + .clk_div_sel_num =WIZ_DIV_NUM_CLOCKS_10G , +}; +static struct wiz_data j7200_pg2_10g_data = { .type =J7200_WIZ_10G , .pll0_refclk_mux_sel = &sup_pll0_refclk_mux_sel,
@@ -1389,6 +1410,9 @@ static const struct of_device_id wiz_id_table[] = { { .compatible = "ti,am64-wiz-10g", .data = &am64_10g_data, }, + { + .compatible = "ti,j722s-wiz-10g", .data = &j722s_10g_data, + }, { .compatible = "ti,j7200-wiz-10g", .data = &j7200_pg2_10g_data, },
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 5/7 phy: ti: gmii-sel: add support for J722S SoC family
In reply to Nora SchifferThe J722S gmii-sel is mostly identical to the AM64's, but additionally supports SGMII.
--- drivers/phy/ti/phy-gmii-sel.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/phy/ti/phy-gmii-sel.c +11 -0
@@ -251,6 +251,13 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { .regfields = phy_gmii_sel_fields_am654, }; +static const +struct phy_gmii_sel_soc_data phy_gmii_sel_soc_j722s = { + .use_of_data = true, + .regfields = phy_gmii_sel_fields_am654, + .extra_modes =BIT (PHY_INTERFACE_MODE_SGMII ), +}; +static const struct phy_gmii_sel_soc_data phy_gmii_sel_cpsw5g_soc_j7200 = { .use_of_data = true,
@@ -307,6 +314,10 @@ static const struct of_device_id phy_gmii_sel_id_table[] = { .compatible = "ti,am654-phy-gmii-sel", .data = &phy_gmii_sel_soc_am654, }, + { + .compatible = "ti,j722s-phy-gmii-sel", + .data = &phy_gmii_sel_soc_j722s, + }, { .compatible = "ti,j7200-cpsw5g-phy-gmii-sel", .data = &phy_gmii_sel_cpsw5g_soc_j7200,
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
Re: [PATCH v2 5/7] phy: ti: gmii-sel: add support for J722S SoC family
Hi Nora,
Quoted 13 lines · Nora Schiffer
The J722S gmii-sel is mostly identical to the AM64's, but additionally supports SGMII.
Signed-off-by Nora Schiffer <[email protected]>--- drivers/phy/ti/phy-gmii-sel.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/phy/ti/phy-gmii-sel.c +0
-0
drivers/phy/ti/phy-gmii-sel.c struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { · line 258
Quoted 8 lines
drivers/phy/ti/phy-gmii-sel.c +5
-0@@ -251,6 +251,13 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { .regfields = phy_gmii_sel_fields_am654, }; +static const +struct phy_gmii_sel_soc_data phy_gmii_sel_soc_j722s = { + .use_of_data = true, + .regfields = phy_gmii_sel_fields_am654, + .extra_modes =BIT (PHY_INTERFACE_MODE_SGMII ),
I'm not familiar with the hardware, but "mostly identical to AM64, but additionally supports SGMII" does not explain why j722s does not inherit the features that am654 has (PHY_GMII_SEL_RGMII_ID_MODE and BIT(PHY_GMII_SEL_FIXED_TX_DELAY).
The phy-gmii-sel from j722s does support RGMII, right? Because in lack of the PHY_GMII_SEL_RGMII_ID_MODE feature, phy_gmii_sel_mode() will just silently skip the regmap_field_write(regfield, rgmii_id) call, and return successfully despite an incomplete configuration.
We have the phy_validate() call and phy_ops::validate() through which the PHY can report to the Ethernet controller which phy_interface_t it supports and which it doesn't. If the j722s doesn't support RGMII, maybe it should implement this method.
Quoted 2 lines
drivers/phy/ti/phy-gmii-sel.c +2
-0+}; +
Re: [PATCH v2 5/7] phy: ti: gmii-sel: add support for J722S SoC family
Quoted 35 lines · Vladimir Oltean
Hi Nora,
Quoted 13 lines · Nora Schiffer
The J722S gmii-sel is mostly identical to the AM64's, but additionally supports SGMII.
Signed-off-by Nora Schiffer <[email protected]>--- drivers/phy/ti/phy-gmii-sel.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/phy/ti/phy-gmii-sel.c +0
-0drivers/phy/ti/phy-gmii-sel.c struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { · line 258
Quoted 8 lines
drivers/phy/ti/phy-gmii-sel.c +5
-0@@ -251,6 +251,13 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { .regfields = phy_gmii_sel_fields_am654, }; +static const +struct phy_gmii_sel_soc_data phy_gmii_sel_soc_j722s = { + .use_of_data = true, + .regfields = phy_gmii_sel_fields_am654, + .extra_modes =BIT (PHY_INTERFACE_MODE_SGMII ),I'm not familiar with the hardware, but "mostly identical to AM64, but additionally supports SGMII" does not explain why j722s does not inherit the features that am654 has (
PHY_GMII_SEL_RGMII_ID_MODEandBIT(PHY_GMII_SEL_FIXED_TX_DELAY).The phy-gmii-sel from j722s does support RGMII, right? Because in lack of the
PHY_GMII_SEL_RGMII_ID_MODEfeature,phy_gmii_sel_mode()will just silently skip theregmap_field_write(regfield, rgmii_id)call, and return successfully despite an incomplete configuration.
Quoted 4 lines
We have the
phy_validate()call andphy_ops::validate()through which the PHY can report to the Ethernet controller whichphy_interface_tit supports and which it doesn't. If the j722s doesn't support RGMII, maybe it should implement this method.
Thanks for noticing this, PHY_GMII_SEL_RGMII_ID_MODE and PHY_GMII_SEL_FIXED_TX_DELAY are missing indeed - will fix in v3. I made the mistake to rebase from an older kernel version where these flags didn't exist yet and neglected to double check when the rebase went through without conflicts. I assume I didn't notice any issues because our bootloader left the controller in the correct state.
Best,
Nora
Quoted 3 lines
Quoted 3 lines
drivers/phy/ti/phy-gmii-sel.c +2
-0+}; +
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 6/7 net: ethernet: ti: am65-cpsw: add support for J722S SoC family
In reply to Nora SchifferThe J722S CPSW3G is mostly identical to the AM64's, but additionally supports SGMII.
--- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +8 -0
@@ -3468,6 +3468,13 @@ static const struct am65_cpsw_pdata am64x_cpswxg_pdata = { .fdqring_mode = K3_RINGACC_RING_MODE_RING, }; +static const struct am65_cpsw_pdata j722s_cpswxg_pdata = { + .quirks =AM64_CPSW_QUIRK_DMA_RX_TDOWN_IRQ , + .ale_dev_id ="am64-cpswxg" , + .fdqring_mode =K3_RINGACC_RING_MODE_RING , + .extra_modes =BIT (PHY_INTERFACE_MODE_SGMII ), +}; +static const struct am65_cpsw_pdata j7200_cpswxg_pdata = { .quirks =0 , .ale_dev_id ="am64-cpswxg" ,
@@ -3495,6 +3502,7 @@ static const struct of_device_id am65_cpsw_nuss_of_mtable[] = { { .compatible = "ti,am654-cpsw-nuss", .data = &am65x_sr1_0}, { .compatible = "ti,j721e-cpsw-nuss", .data = &j721e_pdata}, { .compatible = "ti,am642-cpsw-nuss", .data = &am64x_cpswxg_pdata}, + { .compatible = "ti,j722s-cpsw-nuss", .data = &j722s_cpswxg_pdata}, { .compatible = "ti,j7200-cpswxg-nuss", .data = &j7200_cpswxg_pdata}, { .compatible = "ti,j721e-cpswxg-nuss", .data = &j721e_cpswxg_pdata}, { .compatible = "ti,j784s4-cpswxg-nuss", .data = &j784s4_cpswxg_pdata},
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
PATCH v2 7/7 arm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel and CPSW3G
In reply to Nora SchifferUpdate WIZ, gmii-sel and CPSW3G to use the J722S-specific compatible strings, enabling SGMII support. The fallback compatibles preserve compatibility of the updated Device Trees with older kernels.
--- arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi +10 -2
@@ -18,7 +18,7 @@ serdes_refclk: clk-0 { &cbass_main { serdes_wiz0: phy@f000000 { - compatible = "ti,am64-wiz-10g"; + compatible = "ti,j722s-wiz-10g", "ti,am64-wiz-10g"; ranges = <0x0f000000 0x0 0x0f000000 0x00010000>; #address-cells = <1>; #size-cells = <1>;
@@ -56,7 +56,7 @@ serdes0: serdes@f000000 { }; serdes_wiz1: phy@f010000 { - compatible = "ti,am64-wiz-10g"; + compatible = "ti,j722s-wiz-10g", "ti,am64-wiz-10g"; ranges = <0x0f010000 0x0 0x0f010000 0x00010000>; #address-cells = <1>; #size-cells = <1>;
@@ -451,6 +451,14 @@ pcie0_ctrl: pcie0-ctrl@4070 { }; }; +&cpsw3g { + compatible = "ti,j722s-cpsw-nuss", "ti,am642-cpsw-nuss"; +}; + +&phy_gmii_sel { + compatible = "ti,j722s-phy-gmii-sel", "ti,am654-phy-gmii-sel"; +}; + &oc_sram { reg = <0x00 0x70000000 0x00 0x40000>; ranges = <0x00 0x00 0x70000000 0x40000>;
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
Jakub Kicinski
maintainerQuoted 7 lines · On Tue, 24 Mar 2026 13:29:36 +0100 Nora Schiffer wrote:
The J722S CPSW and SERDES are very similar to the variants found on the AM64, but they additionally support SGMII. Introduce new compatible strings for the J722S to add this support to the drivers.
This is a prerequisite for the Single-Pair Ethernet interface of the TQ-Systems MBa67xx baseboard for the TQMa67xx SoM, which will be submitted separately.
Please repost patch 3+6 as a separate series for net-next.