[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4964263.31r3eYUQgx@steina-w>
Date: Thu, 03 Nov 2022 08:46:58 +0100
From: Alexander Stein <alexander.stein@...tq-group.com>
To: Philippe Schenker <philippe.schenker@...adex.com>
Cc: Shawn Guo <shawnguo@...nel.org>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Fabio Estevam <festevam@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Philippe Schenker <dev@...henker.ch>
Subject: Re: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching
Hi Philippe,
Am Mittwoch, 2. November 2022, 16:52:26 CET schrieb Philippe Schenker:
> From: Philippe Schenker <philippe.schenker@...adex.com>
>
> The Colibri standard provides a GPIO called USBC_DET to switch from
> USB Host to USB Device and back. The Colibri iMX6ULL does have the SoC
> ball USB_OTG1_VBUS connected in series with a capacitor to ground.
>
> This means that we need to provide to the extcon framework VBUS and ID
> events using the single GPIO we have. The Extcon USB GPIO driver does
> use id-gpio also for VBUS event, as in our case where vbus-gpio is
> absent.
>
> Signed-off-by: Philippe Schenker <philippe.schenker@...adex.com>
>
> ---
>
> arch/arm/boot/dts/imx6ull-colibri.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi
> b/arch/arm/boot/dts/imx6ull-colibri.dtsi index 577a424b0e1d..feb1fcd9a684
> 100644
> --- a/arch/arm/boot/dts/imx6ull-colibri.dtsi
> +++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi
> @@ -24,6 +24,13 @@ backlight: backlight {
> status = "okay";
> };
>
> + extcon_usbc_det: usbc-det {
> + compatible = "linux,extcon-usb-gpio";
> + id-gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 /
USBC_DET */
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_snvs_usbc_det>;
> + };
> +
> gpio-keys {
> compatible = "gpio-keys";
> pinctrl-names = "default";
> @@ -275,6 +282,7 @@ &uart5 {
> /* Colibri USBC */
> &usbotg1 {
> dr_mode = "otg";
> + extcon = <&extcon_usbc_det>, <&extcon_usbc_det>;
How came you up with this double entries? Is there some documentation you need
two phandles?
I have a problem on imx8mm (same USB host controller) where on USB device mode
no device is attached on host side. I fixed it by using usb-role-switch
instead [1].
But it also works on imx8mm using extcon with two phandles instead of just
one.
Regards,
Alexander
[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/
20221101093031.278241-1-alexander.stein@...tq-group.com/
> srp-disable;
> hnp-disable;
> adp-disable;
Powered by blists - more mailing lists