Thread (5 messages) flat view 5 messages, 3 authors, 2021-11-03

mdio: separate gpio-reset property per child phy usecase

From: Radhey Shyam Pandey <hidden>
Date: 2021-10-27 12:58:59

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 [off-list ref]
AuthorDate: Tue Apr 25 11:33:03 2017 -0700
Commit:     David S. Miller [off-list ref]
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 [off-list ref]
     Reviewed-by: Roger Quadros [off-list ref]
     Signed-off-by: David S. Miller [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help