devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Philippe Schenker <philippe.schenker@toradex.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Fabio Estevam <festevam@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Philippe Schenker <dev@pschenker.ch>
Subject: Re: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching
Date: Thu, 03 Nov 2022 08:46:58 +0100	[thread overview]
Message-ID: <4964263.31r3eYUQgx@steina-w> (raw)
In-Reply-To: <20221102155226.51587-1-dev@pschenker.ch>

Hi Philippe,

Am Mittwoch, 2. November 2022, 16:52:26 CET schrieb Philippe Schenker:
> From: Philippe Schenker <philippe.schenker@toradex.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@toradex.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@ew.tq-group.com/
>  	srp-disable;
>  	hnp-disable;
>  	adp-disable;





  reply	other threads:[~2022-11-03  7:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 15:52 [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching Philippe Schenker
2022-11-03  7:46 ` Alexander Stein [this message]
2022-11-03  8:04   ` Francesco Dolcini
2022-11-07 12:00     ` Philippe Schenker
2022-11-11  5:17     ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4964263.31r3eYUQgx@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=dev@pschenker.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philippe.schenker@toradex.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).