From nobody Mon Apr 6 08:07:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8323DC54EE9 for ; Thu, 8 Sep 2022 15:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbiIHPmu (ORCPT ); Thu, 8 Sep 2022 11:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbiIHPml (ORCPT ); Thu, 8 Sep 2022 11:42:41 -0400 Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF7B3F913E; Thu, 8 Sep 2022 08:42:39 -0700 (PDT) Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1oWJfi-00GV34-9t; Thu, 08 Sep 2022 15:42:30 +0000 From: Tim Harvey To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Krzysztof Kozlowski , Rob Herring , Alexander Stein , Jun Li , Tim Harvey Subject: [PATCH] arm64: dts: imx8mp-venice-gw74xx: add USB DR support Date: Thu, 8 Sep 2022 08:42:27 -0700 Message-Id: <20220908154227.4099410-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add support for USB DR on USB1 interface. Host/Device detection is done using the usb-role-switch connector with a GPIO as USB1_OTG_ID is not connected internally. Signed-off-by: Tim Harvey --- .../dts/freescale/imx8mp-venice-gw74xx.dts | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts b/arch/= arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts index 9fb492a8b045..e0fe356b662d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts @@ -598,20 +598,35 @@ &uart4 { }; =20 /* USB1 - Type C front panel */ -&usb3_phy0 { +&usb3_0 { pinctrl-names =3D "default"; pinctrl-0 =3D <&pinctrl_usb1>; + fsl,over-current-active-low; status =3D "okay"; }; =20 -&usb3_0 { - fsl,over-current-active-low; +&usb3_phy0 { status =3D "okay"; }; =20 &usb_dwc3_0 { - dr_mode =3D "host"; + /* dual role is implemented but not a full featured OTG */ + adp-disable; + hnp-disable; + srp-disable; + dr_mode =3D "otg"; + usb-role-switch; + role-switch-default-mode =3D "peripheral"; status =3D "okay"; + + connector { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_usbcon1>; + compatible =3D "gpio-usb-b-connector", "usb-b-connector"; + type =3D "micro"; + label =3D "Type-C"; + id-gpios =3D <&gpio1 10 GPIO_ACTIVE_HIGH>; + }; }; =20 /* USB2 - USB3.0 Hub */ @@ -870,7 +885,12 @@ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140 pinctrl_usb1: usb1grp { fsl,pins =3D < MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 - MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID 0x140 + >; + }; + + pinctrl_usbcon1: usb1congrp { + fsl,pins =3D < + MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x140 >; }; =20 --=20 2.25.1