Message ID | 20191027203720.16771-1-michael@walle.cc |
---|---|
State | Not Applicable |
Delegated to: | Joe Hershberger |
Headers | show |
Series | [U-Boot] phy: atheros: add some debug output | expand |
On Sun, Oct 27, 2019 at 3:38 PM Michael Walle <michael@walle.cc> wrote: > > The network driver has to set the PHY node correctly. If that is not the > case, ar803x_of_init() will fail. Add some debugging output. > > If the device tree binding is not working for you have a look at the > ar803x_of_init: found PHY node: phy@0 > output. In the case above "phy@0" is the phy node in the device tree. If > instead the node of your network device is displayed, you have to set > the phydev->node property in your network device driver. For example, > the following patch adds it to the fsl_enetc driver: > https://patchwork.ozlabs.org/patch/1184523/ > > Signed-off-by: Michael Walle <michael@walle.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Hi Michael, On Sun, Oct 27, 2019 at 3:38 PM Michael Walle <michael@walle.cc> wrote: > > The network driver has to set the PHY node correctly. If that is not the > case, ar803x_of_init() will fail. Add some debugging output. > > If the device tree binding is not working for you have a look at the > ar803x_of_init: found PHY node: phy@0 > output. In the case above "phy@0" is the phy node in the device tree. If > instead the node of your network device is displayed, you have to set > the phydev->node property in your network device driver. For example, > the following patch adds it to the fsl_enetc driver: > https://patchwork.ozlabs.org/patch/1184523/ > > Signed-off-by: Michael Walle <michael@walle.cc> This doesn't apply so I assume it's either superseded or not needed any more. If those are not the case, please rebase and resend on top of u-boot-net/master Thanks, -Joe
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index 922dc91835..f68e5f2cab 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -191,6 +191,8 @@ static int ar803x_of_init(struct phy_device *phydev) if (!ofnode_valid(node)) return -EINVAL; + debug("%s: found PHY node: %s\n", __func__, ofnode_get_name(node)); + if (ofnode_read_bool(node, "atheros,keep-pll-enabled")) priv->flags |= AR803x_FLAG_KEEP_PLL_ENABLED; if (ofnode_read_bool(node, "atheros,rgmii-io-1v8")) @@ -236,6 +238,9 @@ static int ar803x_of_init(struct phy_device *phydev) return -EINVAL; } } + + debug("%s: flags=%x clk_25m_reg=%04x\n", __func__, priv->flags, + priv->clk_25m_reg); #endif return 0;
The network driver has to set the PHY node correctly. If that is not the case, ar803x_of_init() will fail. Add some debugging output. If the device tree binding is not working for you have a look at the ar803x_of_init: found PHY node: phy@0 output. In the case above "phy@0" is the phy node in the device tree. If instead the node of your network device is displayed, you have to set the phydev->node property in your network device driver. For example, the following patch adds it to the fsl_enetc driver: https://patchwork.ozlabs.org/patch/1184523/ Signed-off-by: Michael Walle <michael@walle.cc> --- drivers/net/phy/atheros.c | 5 +++++ 1 file changed, 5 insertions(+)