From patchwork Mon Sep 5 07:37:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12965866 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 A2532ECAAA1 for ; Mon, 5 Sep 2022 09:26:57 +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=2pStCRNq2E0llVWBarp7xUdeloi7ACnBFhvrxgXtDlo=; b=KVY7e0utzwaoM/ 3goihtM9s4ITiuY1K1oBRF8NVRO+pjNj8GLgqbPdlQrxNe7FZWt3qicehZ3H63GghvjSrLYMcFMgD EBOlx0cm3jzbMIPs6KCeWmfx52wl2CsTUfCpmQIcmEyzBQNaM5JPVaY+zl7bQkRqoaZ9kmmWixP1p jwOuHyWNq4YmcjWx7oYdNqqsYboJ7ovkZvE4H8xd3x7aOz0u8yPyjt7HSYLP3RNLtqxKlc+nr4zEe NW49SKxHzWYUqs4nypDuSz0qqtZ29Mo50N20Qc7cg0+L6Ebp5W/mQgaBGx/8QCxLClWetfTUmyyTv eFJDX9cV6QZmLsc1ndIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV8MJ-00G41P-7q; Mon, 05 Sep 2022 09:25:40 +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 1oV6g7-00DSEh-9S for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 07:38:00 +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=1662363475; x=1693899475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=njF9NKCaEaIKOiLI5wzuJzZxw4r2LlZSIkq096aUrHc=; b=ck6njCSvVwQ+YzEx4Bvx2zSRzIk6JVF2xT9zOiogX9w5N7hl91zjnB27 AlvPIzgQnS+VCpa0oxFfN3y0VgqucOdq33CnUw+csXlJ/OKTLqPLMiG2l ufBFwZXzU919iT+Q+ze6Oqewys7YQ/ihtLkFOlX9RR3qyPNlxkRnR9Lpj BDsjcyKJbmKYz4YWRl2CkSrjYq0toYm8O9s4x19X50ExL3OwvEljgUieH 07GDKLmpFwHbk6dGHcy4ggHODVTnb5llcj/3TnEW7JhmQ4il1iDkCUhQc vPiBhwhm5Xy7oUMPL08nXAgAoBXqe3jTUnv2rZ7y3jrOQBqBDI14U/0Tg w==; X-IronPort-AV: E=Sophos;i="5.93,290,1654552800"; d="scan'208";a="25980402" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 05 Sep 2022 09:37:52 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 05 Sep 2022 09:37:52 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 05 Sep 2022 09:37:52 +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=1662363472; x=1693899472; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=njF9NKCaEaIKOiLI5wzuJzZxw4r2LlZSIkq096aUrHc=; b=AyEK2sLXwXWFWwyGWIcl6oHBjOTD7TXA+ShrF5zxPveIEc54ezSLMVPK 0oitMBgqLXFeSf4kvVm97Lpm40B/3wROjslBJUXcrDCOvUcjXb2qW3cKj iu+6atyKaNjgaN+U2rAwuV7cPrIcyu/XjSVzV0tvWCECEyX8EUAnTGxTa 1ZZQNxtAk5M7e4UGJpMg9oKQYUAhbru+A229U0fTv7chICKlRW4bxF0a2 PLV8LLKb6Xwj2xHmdwEl+p3bKz4/J8PKfsRs5O9xEt7+oe+JJoH3YyqnG VCzBu2+s0SAdzfaUEp2ootNKWBWobnrWUhFIki0vWOllszxYnLwCcGOqJ A==; X-IronPort-AV: E=Sophos;i="5.93,290,1654552800"; d="scan'208";a="25980401" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 05 Sep 2022 09:37:52 +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 DB6F0280056; Mon, 5 Sep 2022 09:37:51 +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 v3 1/1] arm64: dts: tqma8mpql: add USB DR support Date: Mon, 5 Sep 2022 09:37:30 +0200 Message-Id: <20220905073730.199462-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-20220905_003755_901256_D41FC6BF X-CRM114-Status: GOOD ( 12.93 ) 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 Reviewed-by: Fabio Estevam Reviewed-by: Li Jun --- Changes in v3: * Moved pinctrl to USB glue layer node * Ordered nodes alphabetically Changes in v2: * Split from previous series * For now enable USB OTG only .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 48 +++++++++++++++++++ 1 file changed, 48 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..88579e8ac93b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -139,6 +139,13 @@ reg_vcc_3v3: regulator-3v3 { regulator-max-microvolt = <3300000>; }; + reg_vcc_5v0: regulator-5v0 { + compatible = "regulator-fixed"; + regulator-name = "VCC_5V0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -445,6 +452,38 @@ &uart4 { status = "okay"; }; +&usb3_0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb0>; + fsl,over-current-active-low; + status = "okay"; +}; + +&usb3_phy0 { + vbus-supply = <®_vcc_5v0>; + 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>; + }; +}; + &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; @@ -666,6 +705,15 @@ pinctrl_uart4: uart4grp { ; }; + pinctrl_usb0: usb0grp { + fsl,pins = , + ; + }; + + pinctrl_usbcon0: usb0congrp { + fsl,pins = ; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = , ,