]> git.baikalelectronics.ru Git - uboot.git/commit
net: fec: Allow the PHY node to be retrieved
authorFabio Estevam <festevam@gmail.com>
Thu, 18 Jun 2020 23:21:18 +0000 (20:21 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 22 Jun 2020 15:40:49 +0000 (17:40 +0200)
commit4e58882f170fd0add89660e3cad49c07607bd894
treebdeb2539358d5d5c011a39add4e348dd41a7e4d4
parent1ee2dcd2137d77a23b453d75cf8651c5872ad8ab
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>
drivers/net/fec_mxc.c
drivers/net/fec_mxc.h