LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Murali Karicheri <m-karicheri2@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Tero Kristo <t-kristo@ti.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Sekhar Nori <nsekhar@ti.com>, Rob Herring <robh+dt@kernel.org>,
	netdev <netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>
Subject: [for-next PATCH v2 3/5] phy: ti: gmii-sel: add support for am654x/j721e soc
Date: Tue, 3 Mar 2020 18:00:27 +0200	[thread overview]
Message-ID: <20200303160029.345-4-grygorii.strashko@ti.com> (raw)
In-Reply-To: <20200303160029.345-1-grygorii.strashko@ti.com>

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


  parent reply	other threads:[~2020-03-03 16:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 16:00 [for-next PATCH v2 0/5] " Grygorii Strashko
2020-03-03 16:00 ` [for-next PATCH v2 1/5] phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy Grygorii Strashko
2020-03-05 11:06   ` Kishon Vijay Abraham I
2020-03-13 15:07     ` Grygorii Strashko
     [not found]   ` <20200316140859.GA30922@a0393678ub>
2020-03-16 21:16     ` Grygorii Strashko
2020-03-03 16:00 ` [for-next PATCH v2 2/5] dt-bindings: phy: ti: gmii-sel: add support for am654x/j721e soc Grygorii Strashko
2020-03-03 16:00 ` Grygorii Strashko [this message]
2020-03-03 16:00 ` [for-next PATCH v2 4/5] arm64: dts: ti: k3-am65-mcu: add phy-gmii-sel node Grygorii Strashko
2020-03-03 16:00 ` [for-next PATCH v2 5/5] arm64: dts: ti: k3-j721e-mcu: add scm node and phy-gmii-sel nodes Grygorii Strashko
2020-03-04 22:39 ` [for-next PATCH v2 0/5] phy: ti: gmii-sel: add support for am654x/j721e soc David Miller
2020-03-05  5:17   ` Kishon Vijay Abraham I
2020-03-05 10:55     ` Grygorii Strashko
2020-03-20  9:08       ` Tero Kristo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303160029.345-4-grygorii.strashko@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    --subject='Re: [for-next PATCH v2 3/5] phy: ti: gmii-sel: add support for am654x/j721e soc' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).