* [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy
@ 2023-03-22 8:42 Stefan Herbrechtsmeier
2023-03-28 6:36 ` Michal Simek
2023-05-06 14:54 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Herbrechtsmeier @ 2023-03-22 8:42 UTC (permalink / raw)
To: u-boot
Cc: Stefan Herbrechtsmeier, Joe Hershberger, Marek Behún,
Michal Simek, Ramon Fried, Vladimir Oltean
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Read the phy mode of the external phy from the device tree if available
and check that it is a RGMII variant.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---
Changes in v2:
- Check that the external phy mode is a RGMII variant
drivers/net/phy/xilinx_gmii2rgmii.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 7376283956..853a0df659 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -48,7 +48,14 @@ static int xilinxgmiitorgmii_config(struct phy_device *phydev)
return -EINVAL;
}
- ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
+ ext_phydev->interface = ofnode_read_phy_mode(node);
+ if (ext_phydev->interface == PHY_INTERFACE_MODE_NA) {
+ ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
+ } else if (!phy_interface_is_rgmii(ext_phydev)) {
+ printf("Incorrect external interface type\n");
+ return -EINVAL;
+ }
+
ext_phydev->node = phandle.node;
phydev->priv = ext_phydev;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy
2023-03-22 8:42 [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy Stefan Herbrechtsmeier
@ 2023-03-28 6:36 ` Michal Simek
2023-05-06 14:54 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2023-03-28 6:36 UTC (permalink / raw)
To: Stefan Herbrechtsmeier, u-boot
Cc: Stefan Herbrechtsmeier, Joe Hershberger, Marek Behún,
Ramon Fried, Vladimir Oltean
On 3/22/23 09:42, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> Read the phy mode of the external phy from the device tree if available
> and check that it is a RGMII variant.
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> ---
>
> Changes in v2:
> - Check that the external phy mode is a RGMII variant
>
> drivers/net/phy/xilinx_gmii2rgmii.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
> index 7376283956..853a0df659 100644
> --- a/drivers/net/phy/xilinx_gmii2rgmii.c
> +++ b/drivers/net/phy/xilinx_gmii2rgmii.c
> @@ -48,7 +48,14 @@ static int xilinxgmiitorgmii_config(struct phy_device *phydev)
> return -EINVAL;
> }
>
> - ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
> + ext_phydev->interface = ofnode_read_phy_mode(node);
> + if (ext_phydev->interface == PHY_INTERFACE_MODE_NA) {
> + ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
> + } else if (!phy_interface_is_rgmii(ext_phydev)) {
> + printf("Incorrect external interface type\n");
> + return -EINVAL;
> + }
> +
> ext_phydev->node = phandle.node;
> phydev->priv = ext_phydev;
>
Applied.
M
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy
2023-03-22 8:42 [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy Stefan Herbrechtsmeier
2023-03-28 6:36 ` Michal Simek
@ 2023-05-06 14:54 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-05-06 14:54 UTC (permalink / raw)
To: Stefan Herbrechtsmeier
Cc: u-boot, Stefan Herbrechtsmeier, Joe Hershberger,
Marek Behún, Michal Simek, Ramon Fried, Vladimir Oltean
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
On Wed, Mar 22, 2023 at 09:42:47AM +0100, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> Read the phy mode of the external phy from the device tree if available
> and check that it is a RGMII variant.
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-06 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 8:42 [PATCH v2] net: phy: gmii2rgmii: Support external rgmii-id phy Stefan Herbrechtsmeier
2023-03-28 6:36 ` Michal Simek
2023-05-06 14:54 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.