J722S SGMII support
Subsystems (5)
v4 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.
For SGMII to actually work on the J722S, the am65-cpsw needs to be extended as well, which has been submitted for net-next:
https://patchwork.kernel.org/project/netdevbpf/list/?series=1078111
Fallback compatible strings allow for the patches to be applied in any order and to go through different trees without breaking existing functionality.
v4:
- remove redundant items: level from DT binding YAMLs
v3:
- Drop am65-cpsw changes from this series, they need to go through net-next
- Fix missing PHY_GMII_SEL_RGMII_ID_MODE and PHY_GMII_SEL_FIXED_TX_DELAY in gmii-sel driver for RGMII delay mode configuration
v2:
- Keep support for the AM64 compatible strings as a fallback, adjust commit messages
- Drop reference to AM64_CPSW_QUIRK_CUT_THRU flag, which only exists in the TI vendor kernel
Nora Schiffer (5):
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
phy: ti: phy-j721e-wiz: add support for J722S SoC family
phy: ti: gmii-sel: add support for J722S SoC family
arm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel
and CPSW3G
.../bindings/phy/ti,phy-gmii-sel.yaml | 23 +++++++++++------- .../bindings/phy/ti,phy-j721e-wiz.yaml | 19 +++++++++------ arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 12 ++++++++-- drivers/phy/ti/phy-gmii-sel.c | 13 ++++++++++ drivers/phy/ti/phy-j721e-wiz.c | 24 +++++++++++++++++++ 5 files changed, 73 insertions(+), 18 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 v4 1/5 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 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml +12 -7
@@ -12,13 +12,18 @@ 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: + - 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/
Re: [PATCH v4 1/5] dt-bindings: phy: ti: phy-j721e-wiz: Add ti,j722s-wiz-10g compatible
Quoted 7 lines · Nora Schiffer
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.
Signed-off-by Nora Schiffer <[email protected]>--- .../bindings/phy/ti,phy-j721e-wiz.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
Best regards,
Krzysztof
PATCH v4 2/5 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 | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml +14 -9
@@ -47,15 +47,20 @@ 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: + - 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/
Re: [PATCH v4 2/5] dt-bindings: phy: ti: phy-gmii-sel: Add ti,j722s-phy-gmii-sel compatible
Quoted 8 lines · Nora Schiffer
The 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.
Signed-off-by Nora Schiffer <[email protected]>--- .../bindings/phy/ti,phy-gmii-sel.yaml | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-)
Best regards,
Krzysztof
PATCH v4 3/5 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 v4 4/5 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/phy/ti/phy-gmii-sel.c +13 -0
@@ -251,6 +251,15 @@ 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, + .features =BIT (PHY_GMII_SEL_RGMII_ID_MODE ) | +BIT (PHY_GMII_SEL_FIXED_TX_DELAY ), + .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 +316,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/
PATCH v4 5/5 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/
Re: (subset) [PATCH v4 0/5] J722S SGMII support
In reply to Nora SchifferQuoted 9 lines · Nora Schiffer
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.
[...]
Applied, thanks!
[1/5] dt-bindings: phy: ti: phy-j721e-wiz: Add ti,j722s-wiz-10g compatible
commit: 059f1a4c9e3aa44d888c0e7cf4559403eece0438
[2/5] dt-bindings: phy: ti: phy-gmii-sel: Add ti,j722s-phy-gmii-sel compatible
commit: 567b3c62a7eb51db4cb562b416ec220132d524c9
[3/5] phy: ti: phy-j721e-wiz: add support for J722S SoC family
commit: 61849b7afb579630fc45dbeaf5449b42b33cc70e
[4/5] phy: ti: gmii-sel: add support for J722S SoC family
commit: d39cf00e7daea64889dda9abb0b7e6da04a69d04Best regards,
Signature · 1 line
~Vinod
Re: (subset) [PATCH v4 0/5] J722S SGMII support
In reply to Nora SchifferHi Nora Schiffer,
Quoted 9 lines · Nora Schiffer
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.
[...]
I have applied the following to branch ti-k3-dts-next on [1]. Thank you!
[5/5] arm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel and CPSW3G
commit: 2bdc0ea4e7304f6aa7e87089609fd902d9de7a2d
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource