Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp85676rwi; Wed, 2 Nov 2022 09:34:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mFS441+wTe3nrXjk9YD8rE2Uxj2jOcfeU23fhqEoTvMZqAaMIl3B5+TIha1+p4ml24raI X-Received: by 2002:aa7:d650:0:b0:462:d945:3801 with SMTP id v16-20020aa7d650000000b00462d9453801mr25636829edr.117.1667406874280; Wed, 02 Nov 2022 09:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667406874; cv=none; d=google.com; s=arc-20160816; b=iWQfWQ35UDD6h2ykXGQzLkmijksSgp/IjM9WbVzEuCCa0f7SxnT3DRNSsLVYXNvER/ ttYkyws2ADY9Udur0z/lNesZkWYBtQd79UTN2UBVNgynL084h8e2O0YAXOuqYCy47bFA JO3SEOmkqYhKGFDdSE6XpFoaa6ex11GGcIECu4FBfWCVYfY3Hiap7euLaIn1eLVUl67P mKCyXcB1zGgyhw8U9Idx7+Y73tg4CmHqVz54sW/rLBmxh1Wr1h6MPrnJW7fV3QKZr6UI mfEfhERLbOyCI98GethQGyeGLBJtkw2EhxkRbexJpQguxQJ5bHcgqnegzcLC50VOLqhT lLqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7RAJSVbnPaockqds5kr1cdmh1ys2f76FTq9CJvS8rHg=; b=FdsSbK4s+YwnUL13qIfUwNEUEF/YYaKGqHSfvSN0kiPQLvO40JyaaFBOFnkv7n+w3N WnPWJae/CeFo7/nOtXwzoCpdTTSxEfGLc1If1ehQdFh9lNp+nrQngrYfbsSMbxVYOHIM wfKII7XrmqipVn47J8moNUQvwl14T/AO6WkZvF+TT3OFaxj8SUv1KXyJh95o9adcYPAh bV9t6bI699iP7VJtzk15eC2fQ396KNuUExXF3PgursJ5CdPmGFzHN+B0K7v9q3LRXFga Bmyo0TWC5VN/ZAMUr6m3NDHqxlU2solnEBFfG0Rdk8Ae5VkN/MX4SXt4uS6PQ9wcyipN e7UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=TQm8+MuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a1709066d5500b007878f030816si11539904ejt.109.2022.11.02.09.34.04; Wed, 02 Nov 2022 09:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=TQm8+MuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbiKBPwj (ORCPT + 98 others); Wed, 2 Nov 2022 11:52:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbiKBPwi (ORCPT ); Wed, 2 Nov 2022 11:52:38 -0400 Received: from smtp-bc09.mail.infomaniak.ch (smtp-bc09.mail.infomaniak.ch [IPv6:2001:1600:3:17::bc09]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64A2C2AE35 for ; Wed, 2 Nov 2022 08:52:35 -0700 (PDT) Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4N2WcK0L8xzMqNZt; Wed, 2 Nov 2022 16:52:33 +0100 (CET) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4N2WcJ40DVzMpqBV; Wed, 2 Nov 2022 16:52:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1667404352; bh=hsmqP6LW9Hc8mmhziJ3amvKnlktfxLKv2Sastr0h7Mc=; h=From:To:Cc:Subject:Date:From; b=TQm8+MuVUwOG0FZujEOnW7Guwm64m8a1xGcEzqlHvLxisaRwxJuzqvTua50ZFeZ+X WaTLDPNoYxMGvittPp5RHg9Qxp6YowAa+4AbXgQ0O7bT+VF+dU5UR0okp58kB1PKra k1IgbmLnWIgyikD4GOCunTDajWVD1JyWv9QxjEUk= From: Philippe Schenker To: Shawn Guo , devicetree@vger.kernel.org Cc: Philippe Schenker , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching Date: Wed, 2 Nov 2022 16:52:26 +0100 Message-Id: <20221102155226.51587-1-dev@pschenker.ch> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Philippe Schenker 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 --- 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>; srp-disable; hnp-disable; adp-disable; -- 2.38.1