* [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host
@ 2025-03-31 9:25 Louis-Alexis Eyraud
2025-03-31 13:27 ` AngeloGioacchino Del Regno
2025-04-23 20:48 ` Nícolas F. R. A. Prado
0 siblings, 2 replies; 5+ messages in thread
From: Louis-Alexis Eyraud @ 2025-03-31 9:25 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: kernel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Louis-Alexis Eyraud
On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is
one but has two ports: one is routed to the M.2 slot, the other is on
the RPi header who does support full OTG.
Since Mediatek Genio 700-EVK USB support was added, dual role mode
property is set to otg for ssusb2. This config prevents the M.2
Wifi/Bluetooth module, present on those boards and exposing Bluetooth
as an USB device to be properly detected at startup, so configure for
the ssusb2 dr_mode property as host instead.
Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX")
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
I've tested this patch on Mediatek Genio 510-EVK board with a kernel
based on linux-next (tag: next-20250331).
---
arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index 60139e6dffd8e0e326690d922f3360d829ed026b..3a9d429f0f14b501ae41551dfe7272f242345138 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -1199,7 +1199,13 @@ xhci_ss_ep: endpoint {
};
&ssusb2 {
- dr_mode = "otg";
+ /*
+ * the ssusb2 controller is one but we got two ports : one is routed
+ * to the M.2 slot, the other is on the RPi header who does support
+ * full OTG but we keep it disabled otherwise the BT on the M.2 slot
+ * USB line goes obviously dead if switching to gadget mode.
+ */
+ dr_mode = "host";
maximum-speed = "high-speed";
usb-role-switch;
vusb33-supply = <&mt6359_vusb_ldo_reg>;
---
base-commit: 1c4df70331c0dc7f82f724166575c16931ec66b3
change-id: 20250328-mtk-genio-510-700-fix-bt-detection-2711cbcbb2e4
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host
2025-03-31 9:25 [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host Louis-Alexis Eyraud
@ 2025-03-31 13:27 ` AngeloGioacchino Del Regno
2025-04-23 20:48 ` Nícolas F. R. A. Prado
1 sibling, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-03-31 13:27 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger
Cc: kernel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 31/03/25 11:25, Louis-Alexis Eyraud ha scritto:
> On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is
> one but has two ports: one is routed to the M.2 slot, the other is on
> the RPi header who does support full OTG.
> Since Mediatek Genio 700-EVK USB support was added, dual role mode
> property is set to otg for ssusb2. This config prevents the M.2
> Wifi/Bluetooth module, present on those boards and exposing Bluetooth
> as an USB device to be properly detected at startup, so configure for
> the ssusb2 dr_mode property as host instead.
>
> Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> I've tested this patch on Mediatek Genio 510-EVK board with a kernel
> based on linux-next (tag: next-20250331).
> ---
> arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> index 60139e6dffd8e0e326690d922f3360d829ed026b..3a9d429f0f14b501ae41551dfe7272f242345138 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> @@ -1199,7 +1199,13 @@ xhci_ss_ep: endpoint {
> };
>
> &ssusb2 {
> - dr_mode = "otg";
> + /*
> + * the ssusb2 controller is one but we got two ports : one is routed
> + * to the M.2 slot, the other is on the RPi header who does support
> + * full OTG but we keep it disabled otherwise the BT on the M.2 slot
> + * USB line goes obviously dead if switching to gadget mode.
> + */
> + dr_mode = "host";
> maximum-speed = "high-speed";
> usb-role-switch;
> vusb33-supply = <&mt6359_vusb_ldo_reg>;
>
> ---
> base-commit: 1c4df70331c0dc7f82f724166575c16931ec66b3
> change-id: 20250328-mtk-genio-510-700-fix-bt-detection-2711cbcbb2e4
>
> Best regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host
2025-03-31 9:25 [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host Louis-Alexis Eyraud
2025-03-31 13:27 ` AngeloGioacchino Del Regno
@ 2025-04-23 20:48 ` Nícolas F. R. A. Prado
2025-04-24 7:24 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 5+ messages in thread
From: Nícolas F. R. A. Prado @ 2025-04-23 20:48 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, kernel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Mon, Mar 31, 2025 at 11:25:52AM +0200, Louis-Alexis Eyraud wrote:
> On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is
> one but has two ports: one is routed to the M.2 slot, the other is on
> the RPi header who does support full OTG.
> Since Mediatek Genio 700-EVK USB support was added, dual role mode
> property is set to otg for ssusb2. This config prevents the M.2
> Wifi/Bluetooth module, present on those boards and exposing Bluetooth
> as an USB device to be properly detected at startup, so configure for
> the ssusb2 dr_mode property as host instead.
>
> Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> I've tested this patch on Mediatek Genio 510-EVK board with a kernel
> based on linux-next (tag: next-20250331).
> ---
> arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> index 60139e6dffd8e0e326690d922f3360d829ed026b..3a9d429f0f14b501ae41551dfe7272f242345138 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> @@ -1199,7 +1199,13 @@ xhci_ss_ep: endpoint {
> };
>
> &ssusb2 {
> - dr_mode = "otg";
> + /*
> + * the ssusb2 controller is one but we got two ports : one is routed
> + * to the M.2 slot, the other is on the RPi header who does support
> + * full OTG but we keep it disabled otherwise the BT on the M.2 slot
> + * USB line goes obviously dead if switching to gadget mode.
> + */
> + dr_mode = "host";
Hi,
while I agree with this change, now that this controller is fixed to host mode,
the connector child node here which is supposed to probe with driver
usb-conn-gpio, which would monitor the ID and VBUS lines and change the USB role
as needed, will fail to probe with:
platform 112a1000.usb:connector: deferred probe pending: usb-conn-gpio: failed to get role switch
as indeed there no longer is a role switch registered.
For that reason, I believe as part of this commit you should also disable the
connector. Since role switching is no longer supported by this controller,
there's no sense in even trying to probe this driver.
Thanks,
Nícolas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host
2025-04-23 20:48 ` Nícolas F. R. A. Prado
@ 2025-04-24 7:24 ` AngeloGioacchino Del Regno
2025-04-24 8:58 ` Louis-Alexis Eyraud
0 siblings, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-04-24 7:24 UTC (permalink / raw)
To: Nícolas F. R. A. Prado, Louis-Alexis Eyraud
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
kernel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 23/04/25 22:48, Nícolas F. R. A. Prado ha scritto:
> On Mon, Mar 31, 2025 at 11:25:52AM +0200, Louis-Alexis Eyraud wrote:
>> On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is
>> one but has two ports: one is routed to the M.2 slot, the other is on
>> the RPi header who does support full OTG.
>> Since Mediatek Genio 700-EVK USB support was added, dual role mode
>> property is set to otg for ssusb2. This config prevents the M.2
>> Wifi/Bluetooth module, present on those boards and exposing Bluetooth
>> as an USB device to be properly detected at startup, so configure for
>> the ssusb2 dr_mode property as host instead.
>>
>> Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX")
>> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
>> ---
>> I've tested this patch on Mediatek Genio 510-EVK board with a kernel
>> based on linux-next (tag: next-20250331).
>> ---
>> arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
>> index 60139e6dffd8e0e326690d922f3360d829ed026b..3a9d429f0f14b501ae41551dfe7272f242345138 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
>> @@ -1199,7 +1199,13 @@ xhci_ss_ep: endpoint {
>> };
>>
>> &ssusb2 {
>> - dr_mode = "otg";
>> + /*
>> + * the ssusb2 controller is one but we got two ports : one is routed
>> + * to the M.2 slot, the other is on the RPi header who does support
>> + * full OTG but we keep it disabled otherwise the BT on the M.2 slot
>> + * USB line goes obviously dead if switching to gadget mode.
>> + */
>> + dr_mode = "host";
>
> Hi,
>
> while I agree with this change, now that this controller is fixed to host mode,
> the connector child node here which is supposed to probe with driver
> usb-conn-gpio, which would monitor the ID and VBUS lines and change the USB role
> as needed, will fail to probe with:
>
> platform 112a1000.usb:connector: deferred probe pending: usb-conn-gpio: failed to get role switch
>
> as indeed there no longer is a role switch registered.
>
> For that reason, I believe as part of this commit you should also disable the
> connector. Since role switching is no longer supported by this controller,
> there's no sense in even trying to probe this driver.
>
> Thanks,
> Nícolas
Can we instead go for role-switch-default-mode = "host", with a big comment
in the devicetree saying that the controller is shared between BT and the other
port? :-)
Cheers,
Angelo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host
2025-04-24 7:24 ` AngeloGioacchino Del Regno
@ 2025-04-24 8:58 ` Louis-Alexis Eyraud
0 siblings, 0 replies; 5+ messages in thread
From: Louis-Alexis Eyraud @ 2025-04-24 8:58 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Nícolas F. R. A. Prado
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
kernel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Hi Angelo,
On Thu, 2025-04-24 at 09:24 +0200, AngeloGioacchino Del Regno wrote:
> Il 23/04/25 22:48, Nícolas F. R. A. Prado ha scritto:
> > On Mon, Mar 31, 2025 at 11:25:52AM +0200, Louis-Alexis Eyraud
> > wrote:
> > > On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2
> > > controller is
> > > one but has two ports: one is routed to the M.2 slot, the other
> > > is on
> > > the RPi header who does support full OTG.
> > > Since Mediatek Genio 700-EVK USB support was added, dual role
> > > mode
> > > property is set to otg for ssusb2. This config prevents the M.2
> > > Wifi/Bluetooth module, present on those boards and exposing
> > > Bluetooth
> > > as an USB device to be properly detected at startup, so configure
> > > for
> > > the ssusb2 dr_mode property as host instead.
> > >
> > > Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add
> > > USB, TypeC Controller, MUX")
> > > Signed-off-by: Louis-Alexis Eyraud
> > > <louisalexis.eyraud@collabora.com>
> > > ---
> > > I've tested this patch on Mediatek Genio 510-EVK board with a
> > > kernel
> > > based on linux-next (tag: next-20250331).
> > > ---
> > > arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8
> > > +++++++-
> > > 1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-
> > > common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-
> > > common.dtsi
> > > index
> > > 60139e6dffd8e0e326690d922f3360d829ed026b..3a9d429f0f14b501ae41551
> > > dfe7272f242345138 100644
> > > --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> > > +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
> > > @@ -1199,7 +1199,13 @@ xhci_ss_ep: endpoint {
> > > };
> > >
> > > &ssusb2 {
> > > - dr_mode = "otg";
> > > + /*
> > > + * the ssusb2 controller is one but we got two ports :
> > > one is routed
> > > + * to the M.2 slot, the other is on the RPi header who
> > > does support
> > > + * full OTG but we keep it disabled otherwise the BT on
> > > the M.2 slot
> > > + * USB line goes obviously dead if switching to gadget
> > > mode.
> > > + */
> > > + dr_mode = "host";
> >
> > Hi,
> >
> > while I agree with this change, now that this controller is fixed
> > to host mode,
> > the connector child node here which is supposed to probe with
> > driver
> > usb-conn-gpio, which would monitor the ID and VBUS lines and change
> > the USB role
> > as needed, will fail to probe with:
> >
> > platform 112a1000.usb:connector: deferred probe pending: usb-
> > conn-gpio: failed to get role switch
> >
> > as indeed there no longer is a role switch registered.
> >
> > For that reason, I believe as part of this commit you should also
> > disable the
> > connector. Since role switching is no longer supported by this
> > controller,
> > there's no sense in even trying to probe this driver.
> >
> > Thanks,
> > Nícolas
>
> Can we instead go for role-switch-default-mode = "host", with a big
> comment
> in the devicetree saying that the controller is shared between BT and
> the other
> port? :-)
>
> Cheers,
> Angelo
Using role-switch-default-mode property (set to host) does work as an
alternative fix in order to keep the dr_mode set to otg and also not
having a error about the connector too.
But I also needed to change the associated GPIO polarity, otherwise the
role mode would remain device and the BT module would not still be
detected.
I'll make those changes in the v2 patch.
Regards,
Louis-Alexis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-24 8:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31 9:25 [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2 dual role mode to host Louis-Alexis Eyraud
2025-03-31 13:27 ` AngeloGioacchino Del Regno
2025-04-23 20:48 ` Nícolas F. R. A. Prado
2025-04-24 7:24 ` AngeloGioacchino Del Regno
2025-04-24 8:58 ` Louis-Alexis Eyraud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).