[for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

STALE2341d

Revision v2 of 2 in this series.

12 messages, 4 authors, 2020-03-20 · open the first message on its own page

[for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:00:42

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(-)

-- 
2.17.1

[for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:00:51

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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/Kconfig | 1 +
 drivers/phy/ti/Kconfig          | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index bf98e0fa7d8b..8a6ca16eee3b 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -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.
 
diff --git a/drivers/phy/ti/Kconfig b/drivers/phy/ti/Kconfig
index 6dbe9d0b9ff3..15a3bcf32308 100644
--- a/drivers/phy/ti/Kconfig
+++ b/drivers/phy/ti/Kconfig
@@ -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.
-- 
2.17.1

[for-next PATCH v2 2/5] dt-bindings: phy: ti: gmii-sel: add support for am654x/j721e soc

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:00:54

TI 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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt b/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt
index 50ce9ae0f7a5..83b78c1c0644 100644
--- a/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt
+++ b/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt
@@ -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)
-- 
2.17.1

[for-next PATCH v2 4/5] arm64: dts: ti: k3-am65-mcu: add phy-gmii-sel node

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:01:00

Add DT node for the TI AM65x SoC phy-gmii-sel PHY required for Ethernet
ports mode selection.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
index 92629cbdc184..ad89f93f30e5 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
@@ -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 {
-- 
2.17.1

[for-next PATCH v2 3/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:01:06

TI 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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/phy/ti/phy-gmii-sel.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c
index 1c536fc03c83..7edd5c3bc536 100644
--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -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);
-- 
2.17.1

[for-next PATCH v2 5/5] arm64: dts: ti: k3-j721e-mcu: add scm node and phy-gmii-sel nodes

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-03 16:01:11

Add 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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
index 16c874bfd49a..6f961d5f077a 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
@@ -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 */
-- 
2.17.1

Re: [for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: David Miller <davem@davemloft.net>
Date: 2020-03-04 22:39:54

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 3 Mar 2020 18:00:24 +0200
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
This is mostly DT updates and not much networking code changes, will some other
tree take this?

Re: [for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: Kishon Vijay Abraham I <hidden>
Date: 2020-03-05 05:12:48

Hi,

On 05/03/20 4:09 am, David Miller wrote:
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 3 Mar 2020 18:00:24 +0200
quoted
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
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?

Thanks
Kishon

Re: [for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-05 10:55:35


On 05/03/2020 07:17, Kishon Vijay Abraham I wrote:
Hi,

On 05/03/20 4:09 am, David Miller wrote:
quoted
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 3 Mar 2020 18:00:24 +0200
quoted
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
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?

-- 
Best regards,
grygorii

Re: [for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy

From: Kishon Vijay Abraham I <hidden>
Date: 2020-03-05 11:02:16

Hi Dave,

On 03/03/20 9:30 pm, Grygorii Strashko wrote:
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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 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 hunk
 drivers/phy/ti/Kconfig          | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index bf98e0fa7d8b..8a6ca16eee3b 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -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.
 
diff --git a/drivers/phy/ti/Kconfig b/drivers/phy/ti/Kconfig
index 6dbe9d0b9ff3..15a3bcf32308 100644
--- a/drivers/phy/ti/Kconfig
+++ b/drivers/phy/ti/Kconfig
@@ -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

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: 2020-03-13 15:07:52

Hi All,

On 05/03/2020 13:06, Kishon Vijay Abraham I wrote:
Hi Dave,

On 03/03/20 9:30 pm, Grygorii Strashko wrote:
quoted
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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
  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?


Thanks
Kishon
quoted
  drivers/phy/ti/Kconfig          | 3 ---
  2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index bf98e0fa7d8b..8a6ca16eee3b 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -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.
  
diff --git a/drivers/phy/ti/Kconfig b/drivers/phy/ti/Kconfig
index 6dbe9d0b9ff3..15a3bcf32308 100644
--- a/drivers/phy/ti/Kconfig
+++ b/drivers/phy/ti/Kconfig
@@ -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.
-- 
Best regards,
grygorii

Re: [for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc

From: Tero Kristo <hidden>
Date: 2020-03-20 09:08:50

On 05/03/2020 12:55, Grygorii Strashko wrote:

On 05/03/2020 07:17, Kishon Vijay Abraham I wrote:
quoted
Hi,

On 05/03/20 4:09 am, David Miller wrote:
quoted
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 3 Mar 2020 18:00:24 +0200
quoted
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
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help