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: 602848 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 202FBC6FA86 for ; Mon, 5 Sep 2022 07:37:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236281AbiIEHh4 (ORCPT ); Mon, 5 Sep 2022 03:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236154AbiIEHhz (ORCPT ); Mon, 5 Sep 2022 03:37:55 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 146211A3B3 for ; Mon, 5 Sep 2022 00:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1662363474; x=1693899474; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=njF9NKCaEaIKOiLI5wzuJzZxw4r2LlZSIkq096aUrHc=; b=d3ctaFHOPnn1AWRd4WcTvrWgbfyKnOrYXHAn2OvaABU64dkkVi5bjFBR Jc44ZMq8bht4ohsEXDQe0xvfG5xDoJilpEYm4HMnGnHetmvViZHv4jyjD OO2N/ENPG/cgDJKwDmIKJRfaWRUnmYnCTaqMvcEFf7o/utMI7iWOuOkgQ oLSISQa7c5jj4NIQR4X6O27k2N5N2RzNtJqI0OELw0YL/5ghAb+531TdR dtO8ECLTwiHNmyzxFB68tVO5RTcNNAULNP2PZxnd4yo1scyjCLyv2JUu1 2hMOPcAWmp1HW5TCdbRJf00TxuWgV+atpRoGsb+ZZhEzpvu3sLVWJI6VZ A==; 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 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 = , ,