diff options
author | Fabio Estevam <festevam@gmail.com> | 2020-06-19 02:21:18 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-06-22 18:40:49 +0300 |
commit | 89b5bd54c1a425e416d67ce21b0fd5fd7da6a1d4 (patch) | |
tree | bdeb2539358d5d5c011a39add4e348dd41a7e4d4 /drivers/net/fec_mxc.h | |
parent | 338d9b032a2ab0dbbcfcf1bfe373b4852399a636 (diff) | |
download | u-boot-89b5bd54c1a425e416d67ce21b0fd5fd7da6a1d4.tar.xz |
net: fec: Allow the PHY node to be retrieved
As we move towards driver model, it is required to let the FEC driver
know how to properly deal with an Ethernet PHY subnode in the device tree.
For example:
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
phy-handle = <&phy>;
phy-mode = "rgmii-id";
phy-reset-duration = <2>;
phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy: ethernet-phy@0 {
reg = <0>;
qca,clk-out-frequency = <125000000>;
};
};
};
Currently the PHY node pointer is incorrectly associated with the
Ethernel controller instead of the PHY node itself.
This causes the PHY properties, such as "qca,clk-out-frequency" in
the example above to not get parsed.
Fix this problem by populating the phy_of_node node.
Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/net/fec_mxc.h')
-rw-r--r-- | drivers/net/fec_mxc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index 0e8f08a51a..659d62646f 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -250,6 +250,7 @@ struct fec_priv { struct mii_dev *bus; #ifdef CONFIG_PHYLIB struct phy_device *phydev; + ofnode phy_of_node; #else int phy_id; int (*mii_postcall)(int); |