phy: ti: gmii-sel: add support for am654x/j721e soc
Subsystems (5)
v2 cover phy: ti: gmii-sel: add support for am654x/j721e soc
Hi Kishon,
This series adds support for TI K3 AM654x/J721E SoCs in TI phy-gmii-sel PHY driver, which is required for future adding networking support.
depends on:
[PATCH 0/2] phy: ti: gmii-sel: two fixes
https://lkml.org/lkml/2020/2/14/2510
Changes in v2:
- fixed comments
v1: https://lkml.org/lkml/2020/2/22/100
Grygorii Strashko (5):
phy: ti: gmii-sel: simplify config dependencies between net drivers
and gmii phy
dt-bindings: phy: ti: gmii-sel: add support for am654x/j721e soc
phy: ti: gmii-sel: add support for am654x/j721e soc
arm64: dts: ti: k3-am65-mcu: add phy-gmii-sel node
arm64: dts: ti: k3-j721e-mcu: add scm node and phy-gmii-sel nodes
.../bindings/phy/ti-phy-gmii-sel.txt | 1 + arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 6 ++++++ .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 14 ++++++++++++++ drivers/net/ethernet/ti/Kconfig | 1 + drivers/phy/ti/Kconfig | 3 --- drivers/phy/ti/phy-gmii-sel.c | 19 +++++++++++++++++++ 6 files changed, 41 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/5 phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy
The phy-gmii-sel can be only auto selected in Kconfig and now the pretty complex Kconfig dependencies are defined for phy-gmii-sel driver, which also need to be updated every time phy-gmii-sel is re-used for any new networking driver.
Simplify Kconfig definition for phy-gmii-sel PHY driver - drop all dependencies and from networking drivers and rely on using 'imply PHY_TI_GMII_SEL' in Kconfig definitions for networking drivers instead.
--- drivers/net/ethernet/ti/Kconfig | 1 + drivers/phy/ti/Kconfig | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/ti/Kconfig +1 -0
@@ -53,6 +53,7 @@ config TI_CPSW select MFD_SYSCON select PAGE_POOL select REGMAP + imply PHY_TI_GMII_SEL ---help--- This driver supports TI's CPSW Ethernet Switch.
drivers/phy/ti/Kconfig +0 -3
@@ -106,11 +106,8 @@ config TWL4030_USB config PHY_TI_GMII_SEL tristate - default y if TI_CPSW=y || TI_CPSW_SWITCHDEV=y - depends on TI_CPSW || TI_CPSW_SWITCHDEV || COMPILE_TEST select GENERIC_PHY select REGMAP - default m help This driver supports configuring of the TI CPSW Port mode depending on the Ethernet PHY connected to the CPSW Port.
Signature · 1 line
2.17.1
PATCH v2 2/5 dt-bindings: phy: ti: gmii-sel: add support for am654x/j721e soc
In reply to Grygorii StrashkoTI AM654x/J721E SoCs have the same PHY interface selection mechanism for CPSWx subsystem as TI SoCs (AM3/4/5/DRA7), but registers and bit-fields placement is different.
This patch adds corresponding compatible strings to enable support for TI AM654x/J721E SoCs.
--- Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt +1 -0
@@ -40,6 +40,7 @@ Required properties: "ti,dra7xx-phy-gmii-sel" for dra7xx/am57xx platform "ti,am43xx-phy-gmii-sel" for am43xx platform "ti,dm814-phy-gmii-sel" for dm814x platform + "ti,am654-phy-gmii-sel" for AM654x/J721E platform - reg : Address and length of the register set for the device - #phy-cells : must be 2. cell 1 - CPSW port number (starting from 1)
Signature · 1 line
2.17.1
PATCH v2 4/5 arm64: dts: ti: k3-am65-mcu: add phy-gmii-sel node
In reply to Grygorii StrashkoAdd DT node for the TI AM65x SoC phy-gmii-sel PHY required for Ethernet ports mode selection.
--- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +6 -0
@@ -12,6 +12,12 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40f00000 0x20000>; + + phy_gmii_sel: phy@4040 { + compatible = "ti,am654-phy-gmii-sel"; + reg = <0x4040 0x4>; + #phy-cells = <1>; + }; }; mcu_uart0: serial@40a00000 {
Signature · 1 line
2.17.1
PATCH v2 3/5 phy: ti: gmii-sel: add support for am654x/j721e soc
In reply to Grygorii StrashkoTI AM654x/J721E SoCs have the same PHY interface selection mechanism for CPSWx subsystem as TI SoCs (AM3/4/5/DRA7), but registers and bit-fields placement is different.
This patch adds corresponding support for TI AM654x/J721E SoCs PHY interface selection.
--- drivers/phy/ti/phy-gmii-sel.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/phy/ti/phy-gmii-sel.c +19 -0
@@ -170,6 +170,21 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_soc_dm814 = { .regfields = phy_gmii_sel_fields_am33xx, }; +static const +struct reg_field phy_gmii_sel_fields_am654[][PHY_GMII_SEL_LAST ] = { + { + [PHY_GMII_SEL_PORT_MODE ] =REG_FIELD (0x4040 ,0 ,1 ), + [PHY_GMII_SEL_RGMII_ID_MODE ] =REG_FIELD ((~0 ),0 ,0 ), + [PHY_GMII_SEL_RMII_IO_CLK_EN ] =REG_FIELD ((~0 ),0 ,0 ), + }, +}; + +static const +struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { + .num_ports =1 , + .regfields = phy_gmii_sel_fields_am654, +}; +static const struct of_device_id phy_gmii_sel_id_table[] = { { .compatible ="ti,am3352-phy-gmii-sel" ,
@@ -187,6 +202,10 @@ static const struct of_device_id phy_gmii_sel_id_table[] = { .compatible = "ti,dm814-phy-gmii-sel", .data = &phy_gmii_sel_soc_dm814, }, + { + .compatible = "ti,am654-phy-gmii-sel", + .data = &phy_gmii_sel_soc_am654, + }, {} };MODULE_DEVICE_TABLE (of, phy_gmii_sel_id_table);
Signature · 1 line
2.17.1
PATCH v2 5/5 arm64: dts: ti: k3-j721e-mcu: add scm node and phy-gmii-sel nodes
In reply to Grygorii StrashkoAdd DT node for MCU System Control module DT node and DT node for the TI J721E SoC phy-gmii-sel PHY required for Ethernet ports mode selection.
--- arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +14 -0
@@ -34,6 +34,20 @@ }; }; + mcu_conf: syscon@40f00000 { + compatible = "syscon", "simple-mfd"; + reg = <0x0 0x40f00000 0x0 0x20000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x40f00000 0x20000>; + + phy_gmii_sel: phy@4040 { + compatible = "ti,am654-phy-gmii-sel"; + reg = <0x4040 0x4>; + #phy-cells = <1>; + }; + }; + wkup_pmx0: pinmux@4301c000 { compatible = "pinctrl-single"; /* Proxy 0 addressing */
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Grygorii Strashko <[email protected]>
Date: Tue, 3 Mar 2020 18:00:24 +0200
Quoted 5 lines
Hi Kishon,
This series adds support for TI K3 AM654x/J721E SoCs in TI phy-gmii-sel PHY driver, which is required for future adding networking support.
Quoted 8 lines
depends on:
[PATCH 0/2] phy: ti: gmii-sel: two fixes
https://lkml.org/lkml/2020/2/14/2510Changes in v2:
- fixed comments
This is mostly DT updates and not much networking code changes, will some other tree take this?
Hi,
Quoted 12 lines · David Miller
From: Grygorii Strashko <[email protected]>
Date: Tue, 3 Mar 2020 18:00:24 +0200Quoted 9 lines
Hi Kishon,
This series adds support for TI K3 AM654x/J721E SoCs in TI phy-gmii-sel PHY driver, which is required for future adding networking support.
depends on:
[PATCH 0/2] phy: ti: gmii-sel: two fixes
https://lkml.org/lkml/2020/2/14/2510
Quoted 7 lines
Quoted 4 lines
Changes in v2:
- fixed commentsThis is mostly DT updates and not much networking code changes, will some other tree take this?
I can take the phy related changes. Grygorii, can you split the dt patches into a separate series?
Thanks
Kishon
Quoted 18 lines · Kishon Vijay Abraham I
Hi,
Quoted 15 lines · David Miller
From: Grygorii Strashko <[email protected]>
Date: Tue, 3 Mar 2020 18:00:24 +0200Quoted 12 lines
Hi Kishon,
This series adds support for TI K3 AM654x/J721E SoCs in TI phy-gmii-sel PHY driver, which is required for future adding networking support.
depends on:
[PATCH 0/2] phy: ti: gmii-sel: two fixes
https://lkml.org/lkml/2020/2/14/2510Changes in v2:
- fixed comments
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
This is mostly DT updates and not much networking code changes, will some other tree take this?
I can take the phy related changes. Grygorii, can you split the dt patches into a separate series?
sure. Could pls, pick up 1-3 and I'll resend 4-5.
Or you want me re-send once again?
Signature · 2 lines
Best regards, grygorii
Re: [for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy
In reply to Grygorii StrashkoHi Dave,
Quoted 5 lines · Grygorii Strashko
The phy-gmii-sel can be only auto selected in
Kconfigand now the pretty complexKconfigdependencies are defined for phy-gmii-sel driver, which also need to be updated every time phy-gmii-sel is re-used for any new networking driver.
Quoted 7 lines
Simplify
Kconfigdefinition for phy-gmii-sel PHY driver - drop all dependencies and from networking drivers and rely on using 'implyPHY_TI_GMII_SEL' inKconfigdefinitions for networking drivers instead.Signed-off-by Grygorii Strashko <[email protected]>--- drivers/net/ethernet/ti/Kconfig | 1 +
I can pick this in my tree. Can you give your Acked-by since there is a small change in drivers/net?
Thanks
Kishon
Quoted 32 lines
drivers/phy/ti/Kconfig | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/ti/Kconfig +1
-0@@ -53,6 +53,7 @@ config TI_CPSW select MFD_SYSCON select PAGE_POOL select REGMAP + imply PHY_TI_GMII_SEL ---help--- This driver supports TI's CPSW Ethernet Switch.drivers/phy/ti/Kconfig +0
-3@@ -106,11 +106,8 @@ config TWL4030_USB config PHY_TI_GMII_SEL tristate - default y if TI_CPSW=y || TI_CPSW_SWITCHDEV=y - depends on TI_CPSW || TI_CPSW_SWITCHDEV || COMPILE_TEST select GENERIC_PHY select REGMAP - default m help This driver supports configuring of the TI CPSW Port mode depending on the Ethernet PHY connected to the CPSW Port.
Re: [for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy
Hi All,
Quoted 12 lines · Kishon Vijay Abraham I
Hi Dave,
Quoted 9 lines · Grygorii Strashko
The phy-gmii-sel can be only auto selected in
Kconfigand now the pretty complexKconfigdependencies are defined for phy-gmii-sel driver, which also need to be updated every time phy-gmii-sel is re-used for any new networking driver.Simplify
Kconfigdefinition for phy-gmii-sel PHY driver - drop all dependencies and from networking drivers and rely on using 'implyPHY_TI_GMII_SEL' inKconfigdefinitions for networking drivers instead.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Grygorii Strashko <[email protected]>--- drivers/net/ethernet/ti/Kconfig | 1 +I can pick this in my tree. Can you give your Acked-by since there is a small change in
drivers/net?
Sorry for disturbing you, but what's the final decision here?
Quoted 35 lines
Thanks
KishonQuoted 32 lines
drivers/phy/ti/Kconfig | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/ti/Kconfig +1
-0@@ -53,6 +53,7 @@ config TI_CPSW select MFD_SYSCON select PAGE_POOL select REGMAP + imply PHY_TI_GMII_SEL ---help--- This driver supports TI's CPSW Ethernet Switch.drivers/phy/ti/Kconfig +0
-3@@ -106,11 +106,8 @@ config TWL4030_USB config PHY_TI_GMII_SEL tristate - default y if TI_CPSW=y || TI_CPSW_SWITCHDEV=y - depends on TI_CPSW || TI_CPSW_SWITCHDEV || COMPILE_TEST select GENERIC_PHY select REGMAP - default m help This driver supports configuring of the TI CPSW Port mode depending on the Ethernet PHY connected to the CPSW Port.
Signature · 2 lines
Best regards, grygorii
Re: [for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy
In reply to a message not in the archiveQuoted 6 lines · Kishon Vijay Abraham I
Quoted 5 lines · Grygorii Strashko
The phy-gmii-sel can be only auto selected in
Kconfigand now the pretty complexKconfigdependencies are defined for phy-gmii-sel driver, which also need to be updated every time phy-gmii-sel is re-used for any new networking driver.
Quoted 7 lines
Quoted 5 lines
Simplify
Kconfigdefinition for phy-gmii-sel PHY driver - drop all dependencies and from networking drivers and rely on using 'implyPHY_TI_GMII_SEL' inKconfigdefinitions for networking drivers instead.Signed-off-by Grygorii Strashko <[email protected]>
Thanks you, Kishon.
I'll include this patch in next version of my series to add networking support for k3 am65x/j721e soc.
Signature · 2 lines
Best regards, grygorii
Tero Kristo
AppliedQuoted 23 lines · Grygorii Strashko
Quoted 20 lines · Kishon Vijay Abraham I
Hi,
Quoted 17 lines · David Miller
From: Grygorii Strashko <[email protected]>
Date: Tue, 3 Mar 2020 18:00:24 +0200Quoted 13 lines
Hi Kishon,
This series adds support for TI K3 AM654x/J721E SoCs in TI phy-gmii-sel PHY driver, which is required for future adding networking support.
depends on:
[PATCH 0/2] phy: ti: gmii-sel: two fixes
https://lkml.org/lkml/2020/2/14/2510Changes in v2:
- fixed comments
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
This is mostly DT updates and not much networking code changes, will some other tree take this?
I can take the phy related changes. Grygorii, can you split the dt patches into a separate series?
sure. Could pls, pick up 1-3 and I'll resend 4-5.
Or you want me re-send once again?
Queued up patches #4 and #5 towards 5.7, thanks.
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki