From patchwork Wed Aug 31 07:46:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12960488 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0886ECAAD3 for ; Wed, 31 Aug 2022 07:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DY1Fr7OqYxBWPfljICn88YvprRFH1w00jhHjMvRRgEw=; b=JlxYjDkWeIYcqN 2Vu0SZEs8bxyml24LRCmhqs1mPYiarFvxrtdbCihXoPshMuemktTVA0fWGXKOGh9L/ey36wBOLDzq OAAWvg0C8RJdLaAMkRI83VyMYIszF+aKGugiSPed671ONxGeNJuFVN1Vso1vYKK+/a7jdtAGU6IKP 0GuS/LnTldJtZJFFGnFNxLVl0dQgnXZJ94ReBzbjEdbzwFKkym6MeSqbX7jce7qxvvUoUK+a6L72Z q9ReRFGsBLUBw0bmxs86sm51okvKPhaShHknacosbWruEamH1RzL8+Q9X9uspB6FAi87zUlC0apOL 8yso/wX/dXx49JqEj+PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIQe-004fun-Bf; Wed, 31 Aug 2022 07:46:28 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIQa-004fso-Mr for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 07:46:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1661931984; x=1693467984; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yAZ2XOwkxSOAkfD0obd00DPm0z35wYrOkSQ6Dd7X0to=; b=lr/B67Cy8Cr/cB375MXaRYLN3xEg5a+CmEPRTE1WTFk/q1TKXdCRi6VJ WCsnlwxbz7Ri94ECQgUjqOtEn+b6sTVs2Ev/jA7yw53s6rVZuF2Si8d6t wBKpjAOtiz1Iqs3QqpGj3aiSaVHkggF7HXFL6m16l0zs8zvxOrL4pshcr TEqeOT2RpVDFuDjS/vaxoZdgY7GWB7iVS3p2nR0fAKhTcPPoilidcq4wY 41cuTqeA9ybn7vHEw01doEZ7PAzT99nvERmxVkY4ulQbDsLY6RFlvnBSL 726F8+RN/LTGdzqvBoi63zU5BRbBZs/pv9nMbhTScWfm8cl3N9bDfxzj9 g==; X-IronPort-AV: E=Sophos;i="5.93,277,1654552800"; d="scan'208";a="25901350" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 31 Aug 2022 09:46:22 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 31 Aug 2022 09:46:22 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 31 Aug 2022 09:46:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1661931982; x=1693467982; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yAZ2XOwkxSOAkfD0obd00DPm0z35wYrOkSQ6Dd7X0to=; b=QFTbdShW4TB55E7Y+IR7TzJyDiG2Bw5u6RovneIJarGqOzJqqRSJ2XAt tL2lDO72MoEbrjFOo0jUhzsELgsFOcO5rf5YI2quPu9tB6bdVUDKBv9/U HKumM3uHA2Y2JIfst+lFSrWO24cXAgIkxk4l4ItsKxVEq+yQY+2FdI2JJ +O6Io7KV8EN6n+Rw1qTd8OMHiCkWf7vVjzyKurFiKHOobXTEabZq0AS3W RKVMNS2FleAlfEpODaDSK7JQyQFR60nU6GC1urbItJcOOR9XssOYr8Ph1 cSnHPTPw5zAZVRea52qPkCZh8FU8oBTHsY7sJB42NIw1HIR4OOxkQZWCU A==; X-IronPort-AV: E=Sophos;i="5.93,277,1654552800"; d="scan'208";a="25901349" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 31 Aug 2022 09:46:22 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 4A10B280056; Wed, 31 Aug 2022 09:46:22 +0200 (CEST) From: Alexander Stein To: Shawn Guo , Sascha Hauer Cc: Alexander Stein , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tim Harvey , Jun Li Subject: [PATCH v2 1/1] arm64: dts: tqma8mpql: add USB DR support Date: Wed, 31 Aug 2022 09:46:06 +0200 Message-Id: <20220831074606.1677052-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_004625_168070_51CFC08C X-CRM114-Status: GOOD ( 12.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for USB DR on USB1 interface. Host/Device detection is done using the usb-role-switch connector. Signed-off-by: Alexander Stein --- Changes in v2: * Split from previous series * For now enable USB OTG only .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index d8ca52976170..b30d75b1fa47 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -459,6 +459,37 @@ &usdhc2 { status = "okay"; }; +&usb3_phy0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb0>; + status = "okay"; +}; + +&usb3_0 { + fsl,over-current-active-low; + status = "okay"; +}; + +&usb_dwc3_0 { + /* dual role is implemented, but not a full featured OTG */ + hnp-disable; + srp-disable; + adp-disable; + dr_mode = "otg"; + usb-role-switch; + role-switch-default-mode = "peripheral"; + status = "okay"; + + connector { + compatible = "gpio-usb-b-connector", "usb-b-connector"; + type = "micro"; + label = "X29"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbcon0>; + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + }; +}; + &iomuxc { pinctrl_backlight: backlightgrp { fsl,pins = ; @@ -666,6 +697,15 @@ pinctrl_uart4: uart4grp { ; }; + pinctrl_usbcon0: usb0congrp { + fsl,pins = ; + }; + + pinctrl_usb0: usb0grp { + fsl,pins = , + ; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = , ,