[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9848F2DB572E5649BA045B288BE08FBE015ED2F7@039-SN2MPN1-023.039d.mgd.msft.net>
Date: Mon, 5 Aug 2013 01:58:37 +0000
From: Duan Fugang-B38611 <B38611@...escale.com>
To: Sean Cross <xobs@...agi.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
CC: David Miller <davem@...emloft.net>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: RE: [PATCH v3] net/phy: micrel: Add OF configuration support for
ksz9021
From: Sean Cross [mailto:xobs@...agi.com]
Data: Thursday, August 01, 2013 5:19 PM
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/micrel-ksz9021.txt
> @@ -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";
> + };
> +
The phy binding must be the phy node, not the ethernet node.
Pls refer to:
Documentation/devicetree/booting-without-of.txt
Documentation/devicetree/bindings/net/phy.txt
> +static int ksz9021_config_init(struct phy_device *phydev) {
> + struct device *dev = &phydev->dev;
> + struct device_node *of_node = dev->of_node;
> +
> + if (!of_node && dev->parent->of_node)
> + of_node = dev->parent->of_node;
> +
If phy binding is phy node, there only check of_node, don't re-evaluate the phy node.
Thanks,
Andy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists