Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp799435rwn; Thu, 8 Sep 2022 08:57:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Ii1RWi9NDp4ZaFB35mMQVe6dVWrPGmLeq6GrYTdJMzAbbUTY87c7bYrTcUcc0TGJ7FDLE X-Received: by 2002:a05:6a00:1ac7:b0:537:4186:c106 with SMTP id f7-20020a056a001ac700b005374186c106mr9877212pfv.76.1662652659666; Thu, 08 Sep 2022 08:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662652659; cv=none; d=google.com; s=arc-20160816; b=GdaP/rtgJEJDdWdCVuPFu6TnYb3dAYUSkG57e19TWiyJkfoY+jSOyay23VdABiTIUi UV87C6DyurtdQGX3G3WvgT6SSVPGZyY5dP7EVoCsH4gZzaWePXVtIcvXc/N/A9CwfR86 6QwMylQikAL2sth4W2kG8pFfHcsYOgR66egLEo8nZKeKMh6oArmg7F9tvSBCjoaDM9Lf 891Xc3+RC6w7iRCbGArQ4PozvZV9RaoWuaZc2SA9LWBTokLhoiVQzjIW+byFiOX3y1s8 qptQ4DQcFVTWDxWMl0KwhShR64Pqiuv41sgXKuJ7cwaq5xSAphE8BC0vNRivIKIfgdj1 J1KQ== 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; bh=/xNXu0y8QnJEgz86rbSdIeA0OOvEDofdvyPi55Zu1HM=; b=Zy7fvK/T4MCTeB+dxJyxvoDj6eqDHljz9HcwHczVc6iETLOYVNXcAoLe/4erxw/feP C05yrMV7aO6Jvl+luZLDlU9J5sUEXOBEpY9YL27e5R8hZePcJgXgnggEImOI7qA7rst2 K+Xdfac1d9p8+sNMMqHA8aH44Dkz+ROqqalht07wJ3IV4gzaSCTfLiRw3WWi13TpYgEy h7d6H9iVG1bzM46aorCQJKEsplDeB3G53TcuvosLoc2RZ25R5+haFXnAk70oe0IX5MQP qn9QVMUHxVd8tXvyqiVCu8Xd3ML3GI5ELDM1cgT9ZSNuAbHQyuZvAZovPYSEQuIQL7KY 5jbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a63fc09000000b00430a25e2c1dsi7385098pgi.117.2022.09.08.08.57.27; Thu, 08 Sep 2022 08:57:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230392AbiIHPmt (ORCPT + 99 others); Thu, 8 Sep 2022 11:42:49 -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: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 { }; /* USB1 - Type C front panel */ -&usb3_phy0 { +&usb3_0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>; + fsl,over-current-active-low; status = "okay"; }; -&usb3_0 { - fsl,over-current-active-low; +&usb3_phy0 { status = "okay"; }; &usb_dwc3_0 { - dr_mode = "host"; + /* dual role is implemented but not a full featured OTG */ + adp-disable; + hnp-disable; + srp-disable; + dr_mode = "otg"; + usb-role-switch; + role-switch-default-mode = "peripheral"; status = "okay"; + + connector { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbcon1>; + compatible = "gpio-usb-b-connector", "usb-b-connector"; + type = "micro"; + label = "Type-C"; + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + }; }; /* USB2 - USB3.0 Hub */ @@ -870,7 +885,12 @@ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140 pinctrl_usb1: usb1grp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 - MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID 0x140 + >; + }; + + pinctrl_usbcon1: usb1congrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x140 >; }; -- 2.25.1