Skip to contentSkip to conversation

Add OF bindings to Micrel ksz9021 PHY

PATCH Superseded Sean Cross 1 participant 2 messages Aug 5, 2013

Subsystems (4)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Sean Cross

author
#0 lore raw

PATCH v4 1/1 Add OF bindings to Micrel ksz9021 PHY

Some boards require custom parameters be passed to the Micrel PHY. Allow these boards to specify custom timing parameters in the device tree node.

Changes since v3:
- Add an example of parameters on an mdio bus
- Specify values in picoseconds rather than as register values

Changes since v2:
- limited the scope to just ksz9021 rather than all PHYs

Changes since v1:
- removed redefinition of registers and addresses

Sean Cross (1):
net/phy: micrel: Add OF configuration support for ksz9021

 .../devicetree/bindings/net/micrel-ksz9021.txt     |   19 ++++
 drivers/net/phy/micrel.c                           |  101 +++++++++++++++++++-
 2 files changed, 119 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/net/micrel-ksz9021.txt
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH v4 1/1 net/phy: micrel: Add OF configuration support for ksz9021

Some boards require custom PHY configuration, for example due to trace length differences. Add the ability to configure these registers in order to get the PHY to function on boards that need it.

Because PHYs are auto-detected based on MDIO device IDs, allow PHY configuration to be specified in the parent Ethernet device node if no PHY device node is present.

---
 .../devicetree/bindings/net/micrel-ksz9021.txt     |   19 ++++
 drivers/net/phy/micrel.c                           |  101 +++++++++++++++++++-
 2 files changed, 119 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/net/micrel-ksz9021.txt
Documentation/devicetree/bindings/net/micrel-ksz9021.txt new file +19 -0
new file mode 100644
index 0000000..b3e5cd2
@@ -0,0 +1,19 @@
+Micrel KSZ9021 Gigabit Ethernet PHY
+
+Some boards require special tuning values, particularly when it comes to
+clock delays.  You can specify clock delay values by adding
+micrel-specific properties to an Ethernet OF device node.
+
+Optional properties:
+- micrel,clk-control-pad-skew : Timing offset for the MII clock line
+- micrel,rx-data-pad-skew : Timing offset for the RX MII pad
+- micrel,tx-data-pad-skew : Timing offset for the TX MII pad
+
+Example:
+	&enet {
+		micrel,clk-control-pad-skew = <0xf0f0>;
+		micrel,rx-data-pad-skew = <0x0000>;
+		micrel,tx-data-pad-skew = <0xffff>;
+		status = "okay";
+	};
+
drivers/net/phy/micrel.c +100 -1

131 lines not on this page · raw message

Signature · 1 line
1.7.9.5