Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Aleksandar Gerasimovski and committed by
Vinod Koul
e2ce9134 05b56ef3

+1 -1
+1 -1
drivers/phy/marvell/phy-mvebu-cp110-utmi.c
··· 338 338 return -ENOMEM; 339 339 } 340 340 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); 342 342 if ((port->dr_mode != USB_DR_MODE_HOST) && 343 343 (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { 344 344 dev_err(&pdev->dev,