From: Michal Simek <michal.simek@amd.com>
To: Tapio Reijonen <tapio.reijonen@vaisala.com>, u-boot@lists.denx.de
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Jacky Chou <jacky_chou@aspeedtech.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Ramon Fried <rfried.dev@gmail.com>,
T Karthik Reddy <t.karthik.reddy@xilinx.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 1/2] net: phy: Let gmiitorgmii converter create additional PHY
Date: Wed, 22 Jan 2025 14:57:47 +0100 [thread overview]
Message-ID: <9ebdf3e6-8fcb-464e-922d-d596e55f4ccd@amd.com> (raw)
In-Reply-To: <20250122092250.722356-2-tapio.reijonen@vaisala.com>
On 1/22/25 10:22, Tapio Reijonen wrote:
> Change the order to connect gmiitorgmii before PHY creation.
> The gmiitorgmii create additional in DTS configured PHY during
> it's configuration. This ensures, that converter sits between the
> MAC and the external phy
> MAC <==> GMII2RGMII <==> RGMII_PHY.
as I said please extend commit message to describe reasons behind this and using
that dt config as you use.
>
> Fixes: a744a284e354 ("net: phy: Add support for ethernet-phy-id with gpio reset")
And we can discuss if this is a fix of this commit. It is more or less
workaround for Linux kernel limitation and not actual fix. Because with correct
DT binding existing code should work.
Obviously correct way to handle it would be to fix Linux kernel driver not to
convince U-Boot to use Linux kernel dt binding.
M
> Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
>
> ---
>
> (no changes since v1)
>
> ---
> drivers/net/phy/phy.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 716a1d461115..740533adecac 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -939,14 +939,14 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
> phydev = phy_device_create(bus, 0, PHY_NCSI_ID, false);
> #endif
>
> -#ifdef CONFIG_PHY_ETHERNET_ID
> +#ifdef CONFIG_PHY_XILINX_GMII2RGMII
> if (!phydev)
> - phydev = phy_connect_phy_id(bus, dev, addr);
> + phydev = phy_connect_gmii2rgmii(bus, dev);
> #endif
>
> -#ifdef CONFIG_PHY_XILINX_GMII2RGMII
> +#ifdef CONFIG_PHY_ETHERNET_ID
> if (!phydev)
> - phydev = phy_connect_gmii2rgmii(bus, dev);
> + phydev = phy_connect_phy_id(bus, dev, addr);
> #endif
>
> if (!phydev)
next prev parent reply other threads:[~2025-01-22 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 9:22 [PATCH v2 0/2] Fix bridge gmii2rgmii Tapio Reijonen
2025-01-22 9:22 ` [PATCH v2 1/2] net: phy: Let gmiitorgmii converter create additional PHY Tapio Reijonen
2025-01-22 13:57 ` Michal Simek [this message]
2025-01-22 9:22 ` [PATCH v2 2/2] net: phy: gmii2rgmii: Add support for phy ethernet id configuration Tapio Reijonen
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=9ebdf3e6-8fcb-464e-922d-d596e55f4ccd@amd.com \
--to=michal.simek@amd.com \
--cc=erosca@de.adit-jv.com \
--cc=jacky_chou@aspeedtech.com \
--cc=joe.hershberger@ni.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=rfried.dev@gmail.com \
--cc=t.karthik.reddy@xilinx.com \
--cc=tapio.reijonen@vaisala.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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