netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdio: separate gpio-reset property per child phy usecase
@ 2021-10-27 12:58 Radhey Shyam Pandey
  2021-10-27 17:17 ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Radhey Shyam Pandey @ 2021-10-27 12:58 UTC (permalink / raw)
  To: f.fainelli@gmail.com, netdev@vger.kernel.org; +Cc: Michal Simek, Harini Katakam

Hi all,

In a xilinx internal board we have shared GEM MDIO configuration with
TI DP83867 phy and for proper phy detection both PHYs need prior separate
GPIO-reset.

Description:
There are two GEM ethernet IPs instances GEM0 and GEM1. GEM0 and GEM1 used
shared MDIO driven by GEM1.

TI PHYs need prior reset (RESET_B) for PHY detection at defined address. 
However with current framework limitation " one reset line per PHY present 
on the MDIO bus" the other PHY get detected at incorrect address and later
having child PHY node reset property will also not help.

In order to fix this one possible solution is to allow reset-gpios 
property to have PHY reset GPIO tuple for each phy. If this
approach looks fine we can make changes and send out a RFC.

mdio: mdio {
 #address-cells = <1>;
#size-cells = <0>;
reset-gpios = <&slg7xl45106 5 GPIO_ACTIVE_HIGH>, 
<&slg7xl45106 6 GPIO_ACTIVE_HIGH>;
<snip>
 phy0: ethernet-phy@4 {
};
phy1: ethernet-phy@8 {
};
};
 
Thanks,
Radhey

> commit 4c5e7a2c0501bd531aad1d0378c589a92cb3cc31
> Author:     Florian Fainelli <f.fainelli@gmail.com>
> AuthorDate: Tue Apr 25 11:33:03 2017 -0700
> Commit:     David S. Miller <davem@davemloft.net>
> CommitDate: Wed Apr 26 14:45:34 2017 -0400
> 
>      dt-bindings: mdio: Clarify binding document
> 
>      The described GPIO reset property is applicable to *all* child PHYs. If
>      we have one reset line per PHY present on the MDIO bus, these
>      automatically become properties of the child PHY nodes.
> 
>      Finally, indicate how the RESET pulse width must be defined, which is
>      the maximum value of all individual PHYs RESET pulse widths determined
>      by reading their datasheets.
> 
>      Fixes: 69226896ad63 ("mdio_bus: Issue GPIO RESET to PHYs.")
>      Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>      Reviewed-by: Roger Quadros <rogerq@ti.com>
>      Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-03 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27 12:58 mdio: separate gpio-reset property per child phy usecase Radhey Shyam Pandey
2021-10-27 17:17 ` Florian Fainelli
2021-11-03  8:50   ` Radhey Shyam Pandey
2021-11-03  9:02     ` Russell King (Oracle)
2021-11-03 10:47       ` Radhey Shyam Pandey

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).