* RE: [PATCH] phy: ti: gmii-sel: fix rgmii_id mode config
[not found] <20250725084640.845760-1-aleksandar.gerasimovski@belden.com>
@ 2025-08-19 7:43 ` Aleksandar Gerasimovski
2025-08-19 9:27 ` s-vadapalli
0 siblings, 1 reply; 2+ messages in thread
From: Aleksandar Gerasimovski @ 2025-08-19 7:43 UTC (permalink / raw)
To: Aleksandar Gerasimovski, linux-kernel@vger.kernel.org, afd@ti.com,
s-vadapalli@ti.com
Cc: linux-phy@lists.infradead.org
Hi there,
Any opinion about the patch? Or maybe I missed the active maintainers of this driver?
Regards,
Aleksandar
-----Original Message-----
From: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com>
Sent: Friday, July 25, 2025 10:47 AM
To: linux-kernel@vger.kernel.org; afd@ti.com; s-vadapalli@ti.com
Cc: Aleksandar Gerasimovski <Aleksandar.Gerasimovski@belden.com>
Subject: [PATCH] phy: ti: gmii-sel: fix rgmii_id mode config
Without setting this bit the RGMII_ID link does not work reliably, we have found this thanks to the U-boot cpsw-nuss driver that is setting it. The bit is undocumented in the AM64x reference manual (see CTRLMMR_ENET1_CTRL register).
This problem is not visible if the Kernel is booted by a U-boot with enabled networking, in our case we see the problem as the U-boot networking is not used, and it is disabled.
Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com>
---
drivers/phy/ti/phy-gmii-sel.c | 41 ++++++++++++++++++++++++++++-------
1 file changed, 33 insertions(+), 8 deletions(-)
diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index ff5d5e29629f..60a1312acf33 100644
--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -210,19 +210,44 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_soc_dm814 = {
static const
struct reg_field phy_gmii_sel_fields_am654[][PHY_GMII_SEL_LAST] = {
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x0, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x4, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x8, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0xC, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x10, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x14, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x18, 0, 2), },
- { [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x1C, 0, 2), },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x0, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x4, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x4, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x8, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x8, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0xC, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0xC, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x10, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x10, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x14, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x14, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x18, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x18, 4, 4),
+ },
+ {
+ [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x1C, 0, 2),
+ [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD(0x1C, 4, 4),
+ },
};
static const
struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = {
.use_of_data = true,
+ .features = BIT(PHY_GMII_SEL_RGMII_ID_MODE),
.regfields = phy_gmii_sel_fields_am654, };
--
2.34.1
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: ti: gmii-sel: fix rgmii_id mode config
2025-08-19 7:43 ` [PATCH] phy: ti: gmii-sel: fix rgmii_id mode config Aleksandar Gerasimovski
@ 2025-08-19 9:27 ` s-vadapalli
0 siblings, 0 replies; 2+ messages in thread
From: s-vadapalli @ 2025-08-19 9:27 UTC (permalink / raw)
To: Aleksandar Gerasimovski
Cc: linux-kernel@vger.kernel.org, afd@ti.com, s-vadapalli@ti.com,
linux-phy@lists.infradead.org
On Tue, Aug 19, 2025 at 07:43:12AM +0000, Aleksandar Gerasimovski wrote:
Hello Aleksandar,
> Hi there,
>
> Any opinion about the patch? Or maybe I missed the active maintainers of this driver?
There is a v3 patch for this already at:
https://lore.kernel.org/r/20250819065622.1019537-1-mwalle@kernel.org/
Regards,
Siddharth.
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-19 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250725084640.845760-1-aleksandar.gerasimovski@belden.com>
2025-08-19 7:43 ` [PATCH] phy: ti: gmii-sel: fix rgmii_id mode config Aleksandar Gerasimovski
2025-08-19 9:27 ` s-vadapalli
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).