* [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts
@ 2026-01-06 15:06 Aleksandar Gerasimovski
2026-01-06 15:28 ` Aleksandar Gerasimovski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aleksandar Gerasimovski @ 2026-01-06 15:06 UTC (permalink / raw)
To: linux-kernel, vkoul, kishon, aleksandar.gerasimovski
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>
---
drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
index 59903f86b13f..dd3e515a8e86 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
@@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev)
return -ENOMEM;
}
- port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1);
+ port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0);
if ((port->dr_mode != USB_DR_MODE_HOST) &&
(port->dr_mode != USB_DR_MODE_PERIPHERAL)) {
dev_err(&pdev->dev,
--
2.34.1
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.
^ permalink raw reply [flat|nested] 7+ messages in thread* RE: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-06 15:06 [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts Aleksandar Gerasimovski @ 2026-01-06 15:28 ` Aleksandar Gerasimovski 2026-01-14 9:48 ` Vinod Koul 2026-01-21 8:52 ` Vinod Koul 2 siblings, 0 replies; 7+ messages in thread From: Aleksandar Gerasimovski @ 2026-01-06 15:28 UTC (permalink / raw) To: linux-kernel, vkoul, kishon; +Cc: kostap, linux-phy -----Original Message----- From: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com> Sent: Tuesday, January 6, 2026 4:07 PM To: linux-kernel@vger.kernel.org; vkoul@kernel.org; kishon@kernel.org; Aleksandar Gerasimovski <Aleksandar.Gerasimovski@belden.com> Subject: [PATCH] phy/marvell/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> --- drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c index 59903f86b13f..dd3e515a8e86 100644 --- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c +++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c @@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev) return -ENOMEM; } - port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); + port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0); if ((port->dr_mode != USB_DR_MODE_HOST) && (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { dev_err(&pdev->dev, -- 2.34.1 ********************************************************************** DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-06 15:06 [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts Aleksandar Gerasimovski 2026-01-06 15:28 ` Aleksandar Gerasimovski @ 2026-01-14 9:48 ` Vinod Koul 2026-01-14 9:58 ` Aleksandar Gerasimovski 2026-01-21 8:52 ` Vinod Koul 2 siblings, 1 reply; 7+ messages in thread From: Vinod Koul @ 2026-01-14 9:48 UTC (permalink / raw) To: Aleksandar Gerasimovski; +Cc: linux-kernel, kishon On 06-01-26, 15:06, Aleksandar Gerasimovski wrote: > 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> > --- > drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > index 59903f86b13f..dd3e515a8e86 100644 > --- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > +++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > @@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev) > return -ENOMEM; > } > > - port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); > + port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0); > if ((port->dr_mode != USB_DR_MODE_HOST) && > (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { > dev_err(&pdev->dev, > -- > 2.34.1 > > > ********************************************************************** > DISCLAIMER: > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. Okay destroyed! -- ~Vinod ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-14 9:48 ` Vinod Koul @ 2026-01-14 9:58 ` Aleksandar Gerasimovski 2026-01-15 4:37 ` Vinod Koul 0 siblings, 1 reply; 7+ messages in thread From: Aleksandar Gerasimovski @ 2026-01-14 9:58 UTC (permalink / raw) To: Vinod Koul; +Cc: linux-kernel, kishon Hi Vinod, Thanks for looking into, can you be more specific with your comment? Regards, Aleksandar From: Vinod Koul <vkoul@kernel.org> Sent: Wednesday, January 14, 2026 10:48 AM To: Aleksandar Gerasimovski <Aleksandar.Gerasimovski@belden.com> Cc: linux-kernel@vger.kernel.org; kishon@kernel.org Subject: Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts On 06-01-26, 15: 06, Aleksandar Gerasimovski wrote: > 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 On 06-01-26, 15:06, Aleksandar Gerasimovski wrote: > 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 <mailto:aleksandar.gerasimovski@belden.com> > --- > drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > index 59903f86b13f..dd3e515a8e86 100644 > --- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > +++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > @@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev) > return -ENOMEM; > } > > - port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); > + port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0); > if ((port->dr_mode != USB_DR_MODE_HOST) && > (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { > dev_err(&pdev->dev, > -- > 2.34.1 > > > ********************************************************************** > DISCLAIMER: > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. Okay destroyed! -- ~Vinod ********************************************************************** DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-14 9:58 ` Aleksandar Gerasimovski @ 2026-01-15 4:37 ` Vinod Koul 2026-01-15 10:42 ` Aleksandar Gerasimovski 0 siblings, 1 reply; 7+ messages in thread From: Vinod Koul @ 2026-01-15 4:37 UTC (permalink / raw) To: Aleksandar Gerasimovski; +Cc: linux-kernel, kishon On 14-01-26, 09:58, Aleksandar Gerasimovski wrote: > Hi Vinod, Hi, Please do not top post Would you good to review the Documentation/process/ docs to understand the process and expectations here. > > Thanks for looking into, can you be more specific with your comment? Your email footer asked me to ignore, I have done that! > > Regards, > Aleksandar > > > > From: Vinod Koul <vkoul@kernel.org> > Sent: Wednesday, January 14, 2026 10:48 AM > To: Aleksandar Gerasimovski <Aleksandar.Gerasimovski@belden.com> > Cc: linux-kernel@vger.kernel.org; kishon@kernel.org > Subject: Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts > > On 06-01-26, 15: 06, Aleksandar Gerasimovski wrote: > 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 > > On 06-01-26, 15:06, Aleksandar Gerasimovski wrote: > > 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 <mailto:aleksandar.gerasimovski@belden.com> > > --- > > drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > index 59903f86b13f..dd3e515a8e86 100644 > > --- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > +++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > @@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev) > > return -ENOMEM; > > } > > > > - port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); > > + port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0); > > if ((port->dr_mode != USB_DR_MODE_HOST) && > > (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { > > dev_err(&pdev->dev, > > -- > > 2.34.1 > > > > > > ********************************************************************** > > DISCLAIMER: > > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. > > > Okay destroyed! > > -- > ~Vinod > > ********************************************************************** > DISCLAIMER: > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. -- ~Vinod ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-15 4:37 ` Vinod Koul @ 2026-01-15 10:42 ` Aleksandar Gerasimovski 0 siblings, 0 replies; 7+ messages in thread From: Aleksandar Gerasimovski @ 2026-01-15 10:42 UTC (permalink / raw) To: Vinod Koul; +Cc: linux-kernel, kishon From: Vinod Koul <vkoul@kernel.org> >> On 14-01-26, 09:58, Aleksandar Gerasimovski wrote: >> Hi Vinod, > Hi, > Please do not top post > Would you good to review the Documentation/process/ docs to understand > the process and expectations here. Okey, sorry! >> >> Thanks for looking into, can you be more specific with your comment? > Your email footer asked me to ignore, I have done that! Got it, sometimes this works, anyhow my bad. Apologize. Do you insist I send the patch over again? > > >> Regards, > > Aleksandar > > > > From: Vinod Koul <mailto:vkoul@kernel.org> > Sent: Wednesday, January 14, 2026 10:48 AM > To: Aleksandar Gerasimovski <mailto:Aleksandar.Gerasimovski@belden.com> > Cc: mailto:linux-kernel@vger.kernel.org; mailto:kishon@kernel.org > Subject: Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts > > On 06-01-26, 15: 06, Aleksandar Gerasimovski wrote: > 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 > > On 06-01-26, 15:06, Aleksandar Gerasimovski wrote: > > 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 <mailto:aleksandar.gerasimovski@belden.com> > > --- > > drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > index 59903f86b13f..dd3e515a8e86 100644 > > --- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > +++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c > > @@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev) > > return -ENOMEM; > > } > > > > - port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); > > + port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0); > > if ((port->dr_mode != USB_DR_MODE_HOST) && > > (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { > > dev_err(&pdev->dev, > > -- > > 2.34.1 > > > > > > ********************************************************************** > > DISCLAIMER: > > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. > > > Okay destroyed! > > -- > ~Vinod > > ********************************************************************** > DISCLAIMER: > Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. -- ~Vinod ********************************************************************** DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts 2026-01-06 15:06 [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts Aleksandar Gerasimovski 2026-01-06 15:28 ` Aleksandar Gerasimovski 2026-01-14 9:48 ` Vinod Koul @ 2026-01-21 8:52 ` Vinod Koul 2 siblings, 0 replies; 7+ messages in thread From: Vinod Koul @ 2026-01-21 8:52 UTC (permalink / raw) To: linux-kernel, kishon, Aleksandar Gerasimovski On Tue, 06 Jan 2026 15:06:43 +0000, Aleksandar Gerasimovski wrote: > 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. > > [...] Applied, thanks! [1/1] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts commit: e2ce913452ab56b3330539cc443b97b7ea8c3a1a Best regards, -- ~Vinod ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-01-21 8:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-01-06 15:06 [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts Aleksandar Gerasimovski 2026-01-06 15:28 ` Aleksandar Gerasimovski 2026-01-14 9:48 ` Vinod Koul 2026-01-14 9:58 ` Aleksandar Gerasimovski 2026-01-15 4:37 ` Vinod Koul 2026-01-15 10:42 ` Aleksandar Gerasimovski 2026-01-21 8:52 ` Vinod Koul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®