From patchwork Wed Jun 22 13:04:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12890608 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 CF551CCA480 for ; Wed, 22 Jun 2022 13:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243103AbiFVNE5 (ORCPT ); Wed, 22 Jun 2022 09:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350274AbiFVNEw (ORCPT ); Wed, 22 Jun 2022 09:04:52 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD3FB23173 for ; Wed, 22 Jun 2022 06:04:50 -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=1655903091; x=1687439091; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IDe+XSP0w6CqM/w7HgCF6rtWL5f6zRKINNcLCNSdqoA=; b=WHL/EGhjSN9oeBKLhgAXmz6s8etUcGQUkhqRvor/OuCADW3BGSjRPNf+ SzH527LB54OQK+/b3XJJYW20s9Rg6m9ummx8288p3uPA2JbwwNdilZVL1 JV0FmXn6uAwFBTtVAWRhYyDqwdtW6L7334wPxzFtt5XpfqnUnB9tNV+AE tAWy57UprINru3jw3+nZnZ1nIJu/nqSUx2TGjYl9t+TvqXi44ps9MyVl/ e1phQZT9MnXU2BSIdEllYPdQMCSQ3LiktRFNKLWFiXpsZa4f24xGAcaJV in5VkoWq9mshc68/mk2ylwRvXrqouqT6+WMmZGLEfC8wWjmbC4mOCDpOf A==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605518" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Jun 2022 15:04:47 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Jun 2022 15:04:47 +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=1655903087; x=1687439087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IDe+XSP0w6CqM/w7HgCF6rtWL5f6zRKINNcLCNSdqoA=; b=i6/XgxzcwNDG3xJM4viVVS21a8izkTSMvoRo1z/CxW90xDfroiBEcz1e PpM5l0O+Q9GyWxtTDCE7pa+rbMygal+au1K8+QVAukv9BwX3U2/oX861n LMA8ue6K2EOxhsZJaOQrRM6hmk0KNKX7TgY63KXgMEWQlctEg/jUgAGpC FlOOv2gBhViDo6A372cNSlCGMmHhjvjXGCdUJRwIJXbQesFntwRfnvtkj o++X7irrK3cL3wZm1jw8M/HCYCNXn5p3io5D8KZtXHmUcatDsYptxuThQ NvyMJNeucFQuIEX4jVv++W9zbJAa+8humr/r+J5abN5oXUfZl6jrqR/A0 w==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605517" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (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 4F46C280072; Wed, 22 Jun 2022 15:04:47 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Fabio Estevam , Felipe Balbi Cc: Alexander Stein , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/4] dt-bindings: usb: dwc3: Add gfladj-refclk-lpm-sel-quirk Date: Wed, 22 Jun 2022 15:04:37 +0200 Message-Id: <20220622130440.955465-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> References: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This selects SOF/ITP to be running on ref_clk. Signed-off-by: Alexander Stein --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index d41265ba8ce2..efc755502d0a 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -234,6 +234,11 @@ properties: avoid -EPROTO errors with usbhid on some devices (Hikey 970). type: boolean + snps,gfladj-refclk-lpm-sel-quirk: + description: + When set, run the SOF/ITP counter based on ref_clk. + type: boolean + snps,is-utmi-l1-suspend: description: True when DWC3 asserts output signal utmi_l1_suspend_n, false when From patchwork Wed Jun 22 13:04:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12890606 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 59A6BCCA47D for ; Wed, 22 Jun 2022 13:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350246AbiFVNE4 (ORCPT ); Wed, 22 Jun 2022 09:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347800AbiFVNEx (ORCPT ); Wed, 22 Jun 2022 09:04:53 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F3DBE2F for ; Wed, 22 Jun 2022 06:04:51 -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=1655903092; x=1687439092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g9p+CdnZ6Dbj2C8XugLowstES1GHafD254UAKc21yY8=; b=SH1+ATP6WlkbBHo3DQtZAO7LwB3dP0e3ViGGNb6n7ge8Z0UO9Nh1EgZz e5RADSyTGVrqjh0TbOI/0ecShZGMpIEFVpIJdZw5QFpm+9xR3NKMxeTIj G6lLOvjyrIx704JYhlTTi3zxqCje1AWkqk6kQSHXwqJXbjpL5vAGVZWWn SGHCQLyobsZuklzATkmoZ0KM8ZXYg9oa/I/o0dehagYiMi8YJ0ALLg5/I bB8agjsPFB5M7c+j+XX3NMamC+9fxkEk4Gv7JOPXQK9/tBytuqmZ97WER +KL4ChXr02SgC/XUUzhlczFUAJDlaItzjB0+lenJE4TBR7EhCB2VEg1nl g==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605520" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Jun 2022 15:04:47 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Jun 2022 15:04:47 +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=1655903087; x=1687439087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g9p+CdnZ6Dbj2C8XugLowstES1GHafD254UAKc21yY8=; b=Nltt6A1T4XMs96HKy07ZgjEh+rlKfd2LJHiw+oiIjJtKgWYHzp1yv7cG 7XTQt0PaYvYQgDITQz/Lu5SzLLpJbnuBUPVDDWmHKQcdd2ulFoCsW1Uet u1Lqle3iTUqYigUl8BlfaIrhirmkz3jut900/xQIu5uhp2Kc/lf/EMn9I q/usJr/KJcrywbpzGIJJbAZJT7jncZlWvSuDC34wiRkq2lfZwJySWpX3h 4b0b9bKaxJ2zrbcZwSFnFXDaYV5lUHfjMfTGcenGDv1b2pcBJQeDAB6dW 7fIlbZCuCOcFKYHz52rYJ9fdKWhOVnzQ95246iWkO0rc86DOzT7Lp796X g==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605519" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (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 78D4B280073; Wed, 22 Jun 2022 15:04:47 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Fabio Estevam , Felipe Balbi Cc: Alexander Stein , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 2/4] usb: dwc3: core: add gfladj_refclk_lpm_sel quirk Date: Wed, 22 Jun 2022 15:04:38 +0200 Message-Id: <20220622130440.955465-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> References: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This selects the SOF/ITP counter be running on ref_clk. As documented U2_FREECLK_EXISTS has to be set to 0 as well. Signed-off-by: Alexander Stein --- drivers/usb/dwc3/core.c | 8 +++++++- drivers/usb/dwc3/core.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index cb8742f2a4b0..e000f3898a6a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -403,6 +403,10 @@ static void dwc3_ref_clk_period(struct dwc3 *dwc) reg |= FIELD_PREP(DWC3_GFLADJ_REFCLK_FLADJ_MASK, fladj) | FIELD_PREP(DWC3_GFLADJ_240MHZDECR, decr >> 1) | FIELD_PREP(DWC3_GFLADJ_240MHZDECR_PLS1, decr & 1); + + if (dwc->gfladj_refclk_lpm_sel) + reg |= DWC3_GFLADJ_REFCLK_LPM_SEL; + dwc3_writel(dwc->regs, DWC3_GFLADJ, reg); } @@ -784,7 +788,7 @@ static int dwc3_phy_setup(struct dwc3 *dwc) else reg |= DWC3_GUSB2PHYCFG_ENBLSLPM; - if (dwc->dis_u2_freeclk_exists_quirk) + if (dwc->dis_u2_freeclk_exists_quirk || dwc->gfladj_refclk_lpm_sel) reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS; dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); @@ -1519,6 +1523,8 @@ static void dwc3_get_properties(struct dwc3 *dwc) "snps,dis-tx-ipgap-linecheck-quirk"); dwc->parkmode_disable_ss_quirk = device_property_read_bool(dev, "snps,parkmode-disable-ss-quirk"); + dwc->gfladj_refclk_lpm_sel = device_property_read_bool(dev, + "snps,gfladj-refclk-lpm-sel-quirk"); dwc->tx_de_emphasis_quirk = device_property_read_bool(dev, "snps,tx_de_emphasis_quirk"); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 722808d8c0af..92ce2743ccc8 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -391,6 +391,7 @@ #define DWC3_GFLADJ_30MHZ_SDBND_SEL BIT(7) #define DWC3_GFLADJ_30MHZ_MASK 0x3f #define DWC3_GFLADJ_REFCLK_FLADJ_MASK GENMASK(21, 8) +#define DWC3_GFLADJ_REFCLK_LPM_SEL BIT(23) #define DWC3_GFLADJ_240MHZDECR GENMASK(30, 24) #define DWC3_GFLADJ_240MHZDECR_PLS1 BIT(31) @@ -1310,6 +1311,7 @@ struct dwc3 { unsigned dis_del_phy_power_chg_quirk:1; unsigned dis_tx_ipgap_linecheck_quirk:1; unsigned parkmode_disable_ss_quirk:1; + unsigned gfladj_refclk_lpm_sel:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; From patchwork Wed Jun 22 13:04:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12890607 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 539FAC433EF for ; Wed, 22 Jun 2022 13:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350274AbiFVNE5 (ORCPT ); Wed, 22 Jun 2022 09:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349892AbiFVNEx (ORCPT ); Wed, 22 Jun 2022 09:04:53 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FEFC17E1F for ; Wed, 22 Jun 2022 06:04:52 -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=1655903092; x=1687439092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0C/9qSsmMcABIeycwGOjKNCnIce0Ux/uWZw0K8/a/YU=; b=kj5ehZEW8fxpUE2LYJjjvBCMfd8F+k+IvLW1gwk9dNVZhO6i5LdHxSYw mnSfveLhzO153JW/enmpYQhXKpDh07GLejlEZtL3eFtf72drIc8KtlAsy 0XMa6Uu8O1aqRWhEddQQhrxtymiO/AyGb8H6PIz/emp6Ot5JrLtja0Mjx +reL++Wnzh95BjWhrHODB56jNiHxxPvSIEWrLiAj2hzlXWYx+BI31yyeT NCAbid8Af4a7DLt9je8wzGYT2KSlNnmuxcuGLi33kPlskiiSU+wlHG06d ra8en28cOyPji/kPpZ9aVJkHbysmP1nJbR7vqEgphh2aMR7HeG0XeG+Ie w==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605522" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Jun 2022 15:04:47 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Jun 2022 15:04:47 +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=1655903087; x=1687439087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0C/9qSsmMcABIeycwGOjKNCnIce0Ux/uWZw0K8/a/YU=; b=PGbuEGSFxpLDFy4DicTiHhFTKdhXyLNvBi5ieGHPcffcD0AZUHmm6EgP yxkMMIOLi8+ZXH0PWrdS6rbnzEyTQ2EImitg3qOsrjdibWC3mMJ1VtCSl PEcmM0naPn6/1gOjl2Ews9/SmtTfJqTclWuXgSUJK4/qYoe6bKzVKfOlz l1prFrDSPaAeVl8Fkwu7mCJga8hsA0fxbFpIaU1HD4WKXo7GGl9F4HpGc v/hP5q5TVwOynrcVCFIjXqz98RTX+CVTTEYImW4aidZYwMfqB0JJytxBk FtEh9L3dncXjYSol/ZO8WX5P8ITdPtkZq5h+2xHN3nt++ujrVVdzHBQqP A==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605521" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Jun 2022 15:04:47 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (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 A293A280056; Wed, 22 Jun 2022 15:04:47 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Fabio Estevam , Felipe Balbi Cc: Alexander Stein , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 3/4] arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes Date: Wed, 22 Jun 2022 15:04:39 +0200 Message-Id: <20220622130440.955465-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> References: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org With this set the SOF/ITP counter is based on ref_clk when 2.0 ports are suspended. Signed-off-by: Alexander Stein --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index cbfe841fa38b..5f10fa6a3fde 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1170,6 +1170,7 @@ usb_dwc3_0: usb@38100000 { phys = <&usb3_phy0>, <&usb3_phy0>; phy-names = "usb2-phy", "usb3-phy"; snps,dis-u2-freeclk-exists-quirk; + snps,gfladj-refclk-lpm-sel-quirk; }; }; @@ -1212,6 +1213,7 @@ usb_dwc3_1: usb@38200000 { phys = <&usb3_phy1>, <&usb3_phy1>; phy-names = "usb2-phy", "usb3-phy"; snps,dis-u2-freeclk-exists-quirk; + snps,gfladj-refclk-lpm-sel-quirk; }; }; From patchwork Wed Jun 22 13:04:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12890609 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 CEFAFC43334 for ; Wed, 22 Jun 2022 13:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350380AbiFVNE6 (ORCPT ); Wed, 22 Jun 2022 09:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350021AbiFVNEz (ORCPT ); Wed, 22 Jun 2022 09:04:55 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1BBC658F for ; Wed, 22 Jun 2022 06:04: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=1655903093; x=1687439093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3hsE+SxtSbI20PcB6X+2FIGDwio8lUT1/4myfdKMjlk=; b=PTpS674y7DLErMj3mUPT617STM6T6IL6MzZJj4cPlIXFLl0roh7KiNLo dHEsixtzIX8MCr6KfC3WShZAvP0C41dI0MTJ9Izw05XjwtorWg1RJtw8t 1Zs9D44d0+XHBG5EjFpSSE5eFXfzphSRxRIof5UPxxaC7Xv1aOfXLlnR9 C6tQ+/guB2mTwuyNGZV0npkMivlMZ0Ma0p4euApEpWhSZliFZul1FvsbI kVhKOxPYNBnDqt3g7CU+HlrUCBGSSkp4TvcwE4GFjr3KXtvKjDyXWSJi/ 7gwDfdloiFT2RxeFWPvsHrvHQF5Pqnku/3TwAj79z+vDnt2QpNh+lTo3u A==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605524" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Jun 2022 15:04:48 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Jun 2022 15:04:48 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Jun 2022 15:04:48 +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=1655903088; x=1687439088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3hsE+SxtSbI20PcB6X+2FIGDwio8lUT1/4myfdKMjlk=; b=JfMOQx546RfjncDhaD0aDXW9/0BOXbwS/Wzev4ntFLdkN0KBQRtO4fYi 878EPnpkoWmJNQVP4AnezpMOuqiU+/Nq5tu5RqlbvWH6mGX+2LHLI8nLL um5yMb5jTDDWn+gPl7d8mjkjSZCq4+xy6XmYj1M5oZlVZma2rHj9W/DCR yCv51tqeTMDUf0dAlSDYK+i5gfAhmdaju+Ja7IkvEBHyBX+FFQvpeXirB ilB8Sc91UdgoKx7Hwx7j7xvSqpbzmrd7/mxhq618w5d9P/n0S4CvicnPm /LHymGQoXR2RjC/Gl+vHvVb9Y5z5QRZEQYk3olezdpsMoQYy5JUZF6yqm Q==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24605523" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Jun 2022 15:04:48 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (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 D20C9280072; Wed, 22 Jun 2022 15:04:47 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Fabio Estevam , Felipe Balbi Cc: Alexander Stein , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 4/4] arm64: dts: tqma8mpql: add USB support Date: Wed, 22 Jun 2022 15:04:40 +0200 Message-Id: <20220622130440.955465-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> References: <20220622130440.955465-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org With last feature bits added, USB is supported on TQMa8MPQL for both host and DR interface. Signed-off-by: Alexander Stein --- .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 68 ++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index 772cbb664b2a..d8947a180318 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -272,7 +272,7 @@ &flexcan2 { &gpio1 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio1>; + pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_usbhub>; gpio-line-names = "GPO1", "GPO0", "", "GPO3", "", "", "GPO2", "GPI0", @@ -282,6 +282,13 @@ &gpio1 { "", "", "", "", "", "", "", "", "", "", "", ""; + + usb-hub-reset-hog { + gpio-hog; + gpios = <11 0>; + output-high; + line-name = "USB_HUB_RST#"; + }; }; &gpio2 { @@ -465,6 +472,52 @@ &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>; + }; +}; + +&usb3_phy1 { + status = "okay"; +}; + +&usb3_1 { + fsl,disable-port-power-control; + fsl,permanently-attached; + status = "okay"; +}; + +&usb_dwc3_1 { + dr_mode = "host"; + status = "okay"; +}; + &iomuxc { pinctrl_backlight: backlightgrp { fsl,pins = ; @@ -672,6 +725,19 @@ pinctrl_uart4: uart4grp { ; }; + pinctrl_usbcon0: usb0congrp { + fsl,pins = ; + }; + + pinctrl_usb0: usb0grp { + fsl,pins = , + ; + }; + + pinctrl_usbhub: usbhubgrp { + fsl,pins = ; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = , ,