From: Ramon Fried <rfried.dev@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/6] net: macb: add support for SGMII phy interface
Date: Tue, 16 Jul 2019 22:04:34 +0300 [thread overview]
Message-ID: <20190716190436.21251-4-rfried.dev@gmail.com> (raw)
In-Reply-To: <20190716190436.21251-2-rfried.dev@gmail.com>
This patch adds support for the sgmii phy interface,
available only to DM users, dictated by current driver
design.
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Tested-by: Anup Patel <anup.patel@wdc.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---
v2: nothing.
drivers/net/macb.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index a968a4bd06..cf76270ad8 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -759,6 +759,13 @@ static int _macb_init(struct macb_device *macb, const char *name)
gem_writel(macb, USRIO, GEM_BIT(RGMII));
else
gem_writel(macb, USRIO, 0);
+
+ if (macb->phy_interface == PHY_INTERFACE_MODE_SGMII) {
+ unsigned int ncfgr = macb_readl(macb, NCFGR);
+
+ ncfgr |= GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL);
+ macb_writel(macb, NCFGR, ncfgr);
+ }
#else
#if defined(CONFIG_RGMII) || defined(CONFIG_RMII)
gem_writel(macb, USRIO, GEM_BIT(RGMII));
--
2.22.0
next prev parent reply other threads:[~2019-07-16 19:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 19:04 [U-Boot] [PATCH v2 2/6] net: macb: add support for faster clk rates Ramon Fried
2019-07-16 19:04 ` [U-Boot] [PATCH v2 3/6] net: macb: use bit access macro from header file Ramon Fried
2019-07-25 18:41 ` [U-Boot] " Joe Hershberger
2019-07-16 19:04 ` Ramon Fried [this message]
2019-07-25 18:42 ` [U-Boot] net: macb: add support for SGMII phy interface Joe Hershberger
2019-07-16 19:04 ` [U-Boot] [PATCH v2 5/6] net: macb: add dma_burst_length config Ramon Fried
2019-07-25 18:42 ` [U-Boot] " Joe Hershberger
2019-07-16 19:04 ` [U-Boot] [PATCH v2 6/6] net: macb: apply sane DMA configuration Ramon Fried
2019-07-25 18:42 ` [U-Boot] " Joe Hershberger
2019-07-25 18:41 ` [U-Boot] net: macb: add support for faster clk rates Joe Hershberger
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=20190716190436.21251-4-rfried.dev@gmail.com \
--to=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox