Skip to contentSkip to conversation

net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider

PATCH New Florian Fainelli 1 participant 1 message Sep 21, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider

Allow the configuration of the MDIO clock divider when the Device Tree contains 'clock-frequency' property (similar to I2C and SPI buses). Because the hardware may have lost its state during suspend/resume, re-apply the MDIO clock divider upon resumption.

---
 .../bindings/net/brcm,unimac-mdio.txt         |  3 +
 drivers/net/phy/mdio-bcm-unimac.c             | 83 ++++++++++++++++++-
 2 files changed, 84 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt +3 -0
index 4648948f7c3b..e15589f47787 100644
@@ -19,6 +19,9 @@ Optional properties:
 - interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
   to this hardware block, or must be "mdio_done" for the first interrupt and
   "mdio_error" for the second when there are separate interrupts
+- clocks: A reference to the clock supplying the MDIO bus controller
+- clock-frequency: the MDIO bus clock that must be output by the MDIO bus
+  hardware, if absent, the default hardware values are used
 
 Child nodes of this MDIO bus controller node are standard Ethernet PHY device
 nodes as described in Documentation/devicetree/bindings/net/phy.txt
drivers/net/phy/mdio-bcm-unimac.c +81 -2

130 lines not on this page · raw message

Signature · 1 line
2.17.1