]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dts: phy: fix missing mdio device and probe failure of vsc8541-01 device
authorSagar Shrikant Kadam <sagar.kadam@sifive.com>
Tue, 10 Nov 2020 15:22:10 +0000 (07:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:47:45 +0000 (11:47 +0100)
commit7eef736858712ab65afea3908f49eb4e7775fa93
treef2fdd0df942a35a49fe2c3cf77fdd55acc3b6c6c
parent5fa6987258a757a9fae70ff28188dff07f01bf50
dts: phy: fix missing mdio device and probe failure of vsc8541-01 device

[ Upstream commit be969b7cfbcfa8a835a528f1dc467f0975c6d883 ]

HiFive unleashed A00 board has VSC8541-01 ethernet phy, this device is
identified as a Revision B device as described in device identification
registers. In order to use this phy in the unmanaged mode, it requires
a specific reset sequence of logical 0-1-0-1 transition on the NRESET pin
as documented here [1].

Currently, the bootloader (fsbl or u-boot-spl) takes care of the phy reset.
If due to some reason the phy device hasn't received the reset by the prior
stages before the linux macb driver comes into the picture, the MACB mii
bus gets probed but the mdio scan fails and is not even able to read the
phy ID registers. It gives an error message:

"libphy: MACB_mii_bus: probed
mdio_bus 10090000.ethernet-ffffffff: MDIO device at address 0 is missing."

Thus adding the device OUI (Organizationally Unique Identifier) to the phy
device node helps to probe the phy device.

[1]: VSC8541-01 datasheet:
https://www.mouser.com/ds/2/523/Microsemi_VSC8541-01_Datasheet_10496_V40-1148034.pdf

Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts