From: Claudiu Beznea <claudiu.beznea@microchip.com>
To: u-boot@lists.denx.de
Subject: [PATCH 6/6] net: macb: take into account all RGMII interface types
Date: Thu, 3 Dec 2020 11:25:56 +0200 [thread overview]
Message-ID: <1606987556-20217-7-git-send-email-claudiu.beznea@microchip.com> (raw)
In-Reply-To: <1606987556-20217-1-git-send-email-claudiu.beznea@microchip.com>
Take into account all RGMII interface types. Depending on it
the RGMII PHY's timings are setup.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
drivers/net/macb.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e3003cb4a619..127d6e899bad 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -630,7 +630,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
#else
/* need to consider other phy interface mode */
macb->phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev,
- PHY_INTERFACE_MODE_RGMII);
+ macb->phy_interface);
#endif
if (!macb->phydev) {
printf("phy_connect failed\n");
@@ -857,7 +857,10 @@ static int _macb_init(struct macb_device *macb, const char *name)
* to select interface between RMII and MII.
*/
#ifdef CONFIG_DM_ETH
- if (macb->phy_interface == PHY_INTERFACE_MODE_RGMII)
+ if (macb->phy_interface == PHY_INTERFACE_MODE_RGMII ||
+ macb->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
+ macb->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||
+ macb->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID)
val = macb->config->usrio->rgmii;
else if (macb->phy_interface == PHY_INTERFACE_MODE_RMII)
val = macb->config->usrio->rmii;
--
2.7.4
prev parent reply other threads:[~2020-12-03 9:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 9:25 [PATCH 0/6] add support for sama7g5 ethernet interfaces Claudiu Beznea
2020-12-03 9:25 ` [PATCH 1/6] net: macb: use dummy descriptor for RBQP Claudiu Beznea
2020-12-16 6:54 ` Eugen.Hristev at microchip.com
2020-12-16 7:17 ` Bin Meng
2020-12-16 8:29 ` Eugen.Hristev at microchip.com
2020-12-17 5:22 ` Padmarao.Begari at microchip.com
2021-01-14 11:19 ` Eugen.Hristev at microchip.com
2021-01-15 4:02 ` Padmarao Begari
2021-01-15 8:04 ` Eugen.Hristev at microchip.com
2021-01-15 12:26 ` Padmarao Begari
2021-01-15 12:42 ` Eugen.Hristev at microchip.com
2020-12-03 9:25 ` [PATCH 2/6] net: macb: add user io config data structure Claudiu Beznea
2020-12-03 9:25 ` [PATCH 3/6] net: macb: check clk_set_rate return value to be negative Claudiu Beznea
2020-12-03 9:25 ` [PATCH 4/6] net: macb: add support for sama7g5 gmac Claudiu Beznea
2020-12-03 9:25 ` [PATCH 5/6] net: macb: add support for sama7g5 emac Claudiu Beznea
2020-12-03 9:25 ` Claudiu Beznea [this message]
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=1606987556-20217-7-git-send-email-claudiu.beznea@microchip.com \
--to=claudiu.beznea@microchip.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