Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7308418rwb; Tue, 15 Nov 2022 10:16:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7TC4NG1K+rsxW0saUksudaushjqMQno3hPVT8vuzjF2qgRjBWd/rxDmpIRTa9D3OJxOVsK X-Received: by 2002:a17:906:c298:b0:78d:4ebb:7ea1 with SMTP id r24-20020a170906c29800b0078d4ebb7ea1mr14402167ejz.357.1668536207798; Tue, 15 Nov 2022 10:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668536207; cv=none; d=google.com; s=arc-20160816; b=h756jW5fTqMXjMYC9P7HMc0QM7Qc3HNQSgh3CIK4GiLIlshGxoLnaliAerSfjuoE/B vevCj8POgSpXAXlN7gnBBCOLODz2u/YyUc+g8SSCDdjIKD9U8G9yZP5BFv6E8teZ9/ia 7S9blkIQFFW4VDcbMLghI52UDg9BsdaUNQ3X0g3EmoBHq07AiBScJJj3La5nTpLGbZ/g 2SApiwsw9FXSfj4suD2RR2x64PUyc54EPOmU5uU+jI866gCUlip/ft5far764qw27lxX b/TOm7el1piG568yMJPKWprjL7qbHmoLUKTCEO0JGuX5GgE0G6BPzSWPmMocol3ER+0Q V1Jg== 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=CpxQkYpetbbsPgnlvpK76XTEHWZvksvnFHGK0Pe7x6s=; b=XOxAjkhqWRUbOekap/c/0KLt6oOyOo0IKZ8RQ0eDaJL94CA3FicxTdQLPnWCwPUdgD 14Nal1u3L7XGi3wZfudTgJv/jK3V75qHIJyToYiIT2F6p4CrpBIpF5Wl9Rt+dkznE6x5 qXYK7ToqlgoSc77OJVuK+6BNrwxvjIKIuCoaDuVyOuj244fZAOef28gcZIyLZETbLUSC XUUoK3Tj5Sqo83aiBP/5wmmI/Ev1sWgPEYqrrzXlG6wX8fb7aZk51qSHCN9Kx+lV3eje O58S6FoQPbTp3jHSt+ze89pXxn9fyeR+/H16mL7fjFlQVKib2mRotNy3NfyUlEiJLfmu BE+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=lt1lC9fQ; 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 f22-20020a0564021e9600b004617bf36c3csi12674599edf.308.2022.11.15.10.16.17; Tue, 15 Nov 2022 10:16:47 -0800 (PST) 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=lt1lC9fQ; 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 S230425AbiKOSGg (ORCPT + 90 others); Tue, 15 Nov 2022 13:06:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbiKOSGc (ORCPT ); Tue, 15 Nov 2022 13:06:32 -0500 Received: from smtp-bc0b.mail.infomaniak.ch (smtp-bc0b.mail.infomaniak.ch [IPv6:2001:1600:3:17::bc0b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382C2305 for ; Tue, 15 Nov 2022 10:06:30 -0800 (PST) Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4NBYyn3rHZzMqFk9; Tue, 15 Nov 2022 19:06:25 +0100 (CET) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4NBYyl11H9zMppYF; Tue, 15 Nov 2022 19:06:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1668535585; bh=Ppwbtaour3/Jw/cgaDOFjnjF7G+KdfGQVdagBHehM/g=; h=From:To:Cc:Subject:Date:From; b=lt1lC9fQVWKV5ufGh4LiBh1eGcYTsK9YSrmV7QZRKqi8erKNY1aWKxRmeQpd8P9AX PaOpnGoBFZ8w8PEAtP8UJMRpVZasp+s2sIaPmZFY21+v8tyhXFqUnmXqmA3yV/gJUe 8GmT1kNxgu/F494LF658bQB/L+IBwhXtuyLdcQS4= From: Philippe Schenker To: devicetree@vger.kernel.org, Shawn Guo Cc: Alexander Stein , 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 v2] ARM: dts: colibri-imx6ull: Enable dual-role switching Date: Tue, 15 Nov 2022 19:05:54 +0100 Message-Id: <20221115180554.73696-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. Make use of this GPIO by adding it with usb-connector framework. Signed-off-by: Philippe Schenker --- Changes in v2: - Switched from extcon-usb-gpio to usb-connector-gpio arch/arm/boot/dts/imx6ull-colibri.dtsi | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi index a4429ba1f2ae..336ab2e0534c 100644 --- a/arch/arm/boot/dts/imx6ull-colibri.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi @@ -24,6 +24,28 @@ backlight: backlight { status = "disabled"; }; + connector { + compatible = "gpio-usb-b-connector", "usb-b-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_snvs_usbc_det>; + id-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */ + label = "USBC"; + self-powered; + type = "micro"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_dr_connector: endpoint { + remote-endpoint = <&usb1_drd_sw>; + }; + }; + }; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -280,6 +302,13 @@ &usbotg1 { srp-disable; hnp-disable; adp-disable; + usb-role-switch; + + port { + usb1_drd_sw: endpoint { + remote-endpoint = <&usb_dr_connector>; + }; + }; }; /* Colibri USBH */ -- 2.38.1