From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Christophe Roullier <christophe.roullier@st.com>,
Stephen Warren <swarren@nvidia.com>
Cc: u-boot <u-boot@lists.denx.de>, Marek Vasut <marex@denx.de>,
Patrick Delaunay <patrick.delaunay@st.com>
Subject: dwc_eth_qos driver for tegra
Date: Mon, 23 May 2022 11:17:17 +0200 [thread overview]
Message-ID: <4e1cbbc0-1008-b68c-e7ff-a7cb8929f74d@prevas.dk> (raw)
Hi
I'm looking at switching the dwc_eth_qos driver over to use
dm_eth_phy_connect(). However, I'm a little puzzled by the code for the
tegra variant. The comment at the top of the file, as well as
tegra186.dtsi, says
phy-mode = "rgmii";
But eqos_get_interface_tegra186() returns a hard-coded
PHY_INTERFACE_MODE_MII. Now the commit which introduced the ->interface
abstraction, ac2d4efb16e (net: dwc_eth_qos: add Ethernet stm32mp1
support), and that eqos_get_interface_tegra186() function, changed
- eqos->phy = phy_connect(eqos->mii, 0, dev, 0);
to
+ eqos->phy = phy_connect(eqos->mii, 0, dev,
+ eqos->config->interface(dev));
and that last hard-coded 0 in the former phy_connect() is indeed
equivalent to PHY_INTERFACE_MODE_MII.
So which is it? It would be nice if one could just rely on
dm_eth_phy_connect() picking up the correct value from device tree, and
drop all the code which duplicates parsing of phy-mode from the ethernet
driver.
Rasmus
next reply other threads:[~2022-05-23 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 9:17 Rasmus Villemoes [this message]
2022-05-23 10:57 ` dwc_eth_qos driver for tegra Marek Vasut
2022-05-23 11:46 ` Rasmus Villemoes
2022-05-23 12:09 ` Marek Vasut
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=4e1cbbc0-1008-b68c-e7ff-a7cb8929f74d@prevas.dk \
--to=rasmus.villemoes@prevas.dk \
--cc=christophe.roullier@st.com \
--cc=marex@denx.de \
--cc=patrick.delaunay@st.com \
--cc=swarren@nvidia.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