Skip to content

Commit e2ce913

Browse files
Aleksandar Gerasimovskivinodkoul
authored andcommitted
phy: mvebu-cp110-utmi: fix dr_mode property read from dts
The problem with the current implementation is that it does not consider that the USB controller can have multiple PHY handles with different arguments count, as for example we have in our cn9131 based platform: "phys = <&cp0_comphy1 0>, <&cp0_utmi0>;". In such case calling "of_usb_get_dr_mode_by_phy" with -1 (no phy-cells) leads to not proper phy detection, taking the "marvell,cp110-utmi-phy" dts definition we can call the "of_usb_get_dr_mode_by_phy" with 0 (#phy-cells = <0>) and safely look for that phy. Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com> Link: https://patch.msgid.link/20260106150643.922110-1-aleksandar.gerasimovski@belden.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 05b56ef commit e2ce913

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/phy/marvell/phy-mvebu-cp110-utmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev)
338338
return -ENOMEM;
339339
}
340340

341-
port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1);
341+
port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0);
342342
if ((port->dr_mode != USB_DR_MODE_HOST) &&
343343
(port->dr_mode != USB_DR_MODE_PERIPHERAL)) {
344344
dev_err(&pdev->dev,

0 commit comments

Comments
 (0)