lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2da6560b-8444-48ae-bb01-397756cecbc0@notapiano>
Date: Wed, 23 Apr 2025 16:48:51 -0400
From: NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
To: Louis-Alexis Eyraud <louisalexis.eyraud@...labora.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	kernel@...labora.com, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] arm64: dts: mediatek: mt8390-genio-common: Force ssusb2
 dual role mode to host

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@...labora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ