From patchwork Thu Sep 15 06:28:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12976854 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 09472ECAAA1 for ; Thu, 15 Sep 2022 06:30:26 +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:References:In-Reply-To: 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: List-Owner; bh=3I8EGrv1DyKKxphREx9gODd8MTvtXURiUFJ7ir61PpM=; b=RJW7rAEFt9j6nB zvRsMETqnGDpNTRellZduILlx/9SvQVw1hPngfo+AYMs5z+LJ28+fSsWL8jcaLReDvkV02ZTzPhRA w9p7W4WE7yGW6FMuULnCthFWqNodZkHjprElvCUpFd82vsbGrnT+DCZ3z4IxAbVADrYVpNM8WdnjQ 3NJNrevCS5qV4Z2iHum/G2HL+Ps8/KFhwPVLQpfzZgvaLjWC5U5BASXJF3wVSJMlQLR6K9X2Ul7Fw MhJpPojCOecqO3lg7rvcTMFGkWFxoSgzhcYM20Ic8JiiElb9s1Gik4lBXYjxd6OqUfLo+bF644une uMhvB9r+E2RnqY715usw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYiNI-0023JU-Ig; Thu, 15 Sep 2022 06:29:24 +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 1oYiN6-0023AW-Ig for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 06:29:14 +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=1663223352; x=1694759352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nz3K58GYkjN1DFzET2mFu+DZKTsC6zB71nsZVaPjp1s=; b=BBe6vg0d06L0FV0jztUMN5a5PwNXWpOHDr/PdyP1lDm5+Ag+yG7mf2oe pkjoOdvIwkvySdN+Yjcx4E3e8S4xLaGmKEB7ysznDaVjHMmWv8xRPmdX7 AG/JR5amqIUVK6rb8Wb1Gq6ex3/ohGM7n8k6yEyY5cmulCgTOgfJODU9n dHuI2XRY5T+PZ6e2KgLuota8YSa5kbHF0xU3ETayAwILL/14N6gRVqfgZ mOz2pKtu3WGmqds67ZfAQOOOUlDH5ULPJnq927oCfp5edUi2AgONCFvhg s1MjDG4PVpE160VUhWVzFzeyhVho8oDza4/hIwy4oS8I3YfGBXqgUI67z g==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189608" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Sep 2022 08:29:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 15 Sep 2022 08:29:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 15 Sep 2022 08:29:04 +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=1663223344; x=1694759344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nz3K58GYkjN1DFzET2mFu+DZKTsC6zB71nsZVaPjp1s=; b=TUQktTGJ3dwed0wxJRHNP8i64kG5vS1Ug9bJ8bd4qsz3JGfUUj8dCpq0 VED91OGE8GJysLw+ce0HVzFTkZeCwNdwOmPzOR929StTTL+WqM1xhCMcv 8kHvAZdOBno3NIEwk8RJyY8JyNyhz8wgSA6eSGwBNPI4paShAFtcvmj6d xoh224x9YfKLie7WC8Mkvxre/p2YD0Zs/CHFk7WKhj7uq8Rf81R8U/vkm Jba++GjNcYrQWICSRs5zDK+8Q5wVrQEIO7qDiMe9eR6j7u2qt57URsu/z TMtdvCptVWsqF1K3FSmUQzncOHBcW00lhZXPuk+PlTv2I0WoxMUThj4iA w==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189607" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Sep 2022 08:29:04 +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 21E5D280072; Thu, 15 Sep 2022 08:29:04 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Li Jun Cc: Alexander Stein , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski Subject: [PATCH v2 1/4] dt-bindings: usb: dwc3: Add gfladj-refclk-lpm-sel-quirk Date: Thu, 15 Sep 2022 08:28:52 +0200 Message-Id: <20220915062855.751881-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> References: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_232912_938443_80A04F26 X-CRM114-Status: GOOD ( 12.16 ) 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 This selects SOF/ITP to be running on ref_clk. Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski --- 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 1779d08ba1c0..2a54d0bb0b15 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 Thu Sep 15 06:28:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12976855 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 6377AECAAA1 for ; Thu, 15 Sep 2022 06:30:38 +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:References:In-Reply-To: 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: List-Owner; bh=ECvlmmQI4ew/y6hhWfH73tcSb11KF8zPtjvebAeb/WY=; b=DqsemOe439pkii 64KLwmzUPv/shj4mi81rTmd56E+XCjn22D5+We3YBJryr98lJcvgJ8EAzAz66ChLk0CSJqlsXHCU6 j/gRpZjeE5mGSqSKivPF89VJYF6I48rJ3BJCcsWE2H0QXNLX0dBGpRVO+GGoe7p7dZ2LDLjRkknBi mwmLqtQ7AXo3exxm6PZx96X4/S0WiZ1HONbTAw1OZE1DmNBbfoLS0D+piD00xUuBDOKgeVk15kqcY qGBckeV77XxN8myKEVB/S1r7EdkxfuHcQ5mmnbyGs9PlUqtrT8mDgsMz4EC2eBv0j4f4H8Ybma6C5 OfjnAeZq/xHwmqEDwjMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYiNS-0023Oo-8c; Thu, 15 Sep 2022 06:29:34 +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 1oYiN7-0023CP-Kw for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 06:29:15 +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=1663223353; x=1694759353; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q9w2m8jL0FbAwvRsvj253ZDURjjBXQk6jNqDtRl4VB4=; b=H22wgVazujaRz7k8UlSLTmihN0myla0gflRL49m7QlfakwgXTB5+pcbq qsXhH/GDInC/R+ZTFMA/oJh+Ec86aZ9UYLhkErK6OG6Rn8I6Z896QfHCG eG66cX31IIJJuiGIM7qDLXYYTJ/vBYF1RELcjnbiyezQA2T+phDxbICZz MV021MwRJ21a1guRvtxz0vt+9ZW94I9lc5LFo69+ATANUNCuUXKf5uKmq 3I0zIDGEvCO84EsdfxInXeYtu8p/nXIimbtmswaGzWGuod6GnMut3iwxw Y/N44tqQOicO/9UOJMBWJDDrmDybNsr6r/k65PREnggAd0VeDGSHa1ioG Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189611" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Sep 2022 08:29:04 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 15 Sep 2022 08:29:04 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 15 Sep 2022 08:29:04 +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=1663223345; x=1694759345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q9w2m8jL0FbAwvRsvj253ZDURjjBXQk6jNqDtRl4VB4=; b=IKvlNNOmLGipacu8WxnLnkGPLbfKj29FyNiro/tWGeP5+6yR5dZB88KC zh1Csc5/FZck1pQ2S4rpOQLoHOvZ3VHGuiVVHxXdelVZa271C4zCq21g5 VFQAW20QJztnai7iRzpjrWLU1SRKHz8qeQaS0qQgYEHzsJ/h0956IWsp7 vjzAE4OY0WKSHq8nXwRjFGl4R0DehcjIPHaLQ2TFQrG3q/MrLJZfQM+nJ OTVmF3wYZ91iMkiIUroZco++Jcz9DxsKHRKZh//bhS5m298DCSWjUTwM4 inJiQP/eLRLLRl4OztJGii902fYp9t2Y51BMYgbQkCB3wWeWG3HU2No3B Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189609" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Sep 2022 08:29:04 +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 6456B280056; Thu, 15 Sep 2022 08:29:04 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Li Jun Cc: Alexander Stein , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/4] usb: dwc3: core: add gfladj_refclk_lpm_sel quirk Date: Thu, 15 Sep 2022 08:28:53 +0200 Message-Id: <20220915062855.751881-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> References: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_232914_009213_3C32C586 X-CRM114-Status: GOOD ( 15.32 ) 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 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 Reviewed-by: Li Jun --- 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 656bbf9285a5..885acc63f032 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -408,6 +408,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); } @@ -789,7 +793,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); @@ -1525,6 +1529,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 7c9368145f37..d28c942e63dd 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) @@ -1312,6 +1313,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 Thu Sep 15 06:28:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12976856 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 397BFECAAA1 for ; Thu, 15 Sep 2022 06:30:49 +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:References:In-Reply-To: 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: List-Owner; bh=sCJ64KPzc4GtNo8L0NA3HGu2qJDu0SzX3oLTOFbFeRE=; b=lQuyDXqMNB7ScZ WrCvEdFlGhllT8zqLLeWJnE/efFQDJMXfyJ5nz2oQyg23qiLzLlNxIB3QZbWxJ61J+bT3YEjNbqXD I+uOY/FnrCn49PPg//Oy+LwyY4DN+3BrzgxPdaTTchCdE986XS+YmzVH6I+egWjrmmT5YQThPaTry SQCbudeAza9jpwJdKSSKoHXtuEpLY6WRV9E87NKzAg6tW1cqgSB2Po70HHeM1qOfMKleC1tHS2EzA dROuZTtQneKfr/Y2vM9ljMU4BVGK/ufQnNI/fSEsqMgFPk1T8bXJofYn0py/h+ehVovq8P2Z06l7t YcS+QDRfrXKc85LaMmbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYiNc-0023Uq-0D; Thu, 15 Sep 2022 06:29:44 +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 1oYiN8-0023AW-HK for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 06:29:16 +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=1663223354; x=1694759354; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y0ZehfxrsLw0nxkn9kFuGZxK3j1l5W8LWS9DgXT3Upk=; b=pLRryIhgac3iRD5q2RFWOXZBhlByIWXnzl/1GXm0LKVz0Ys9Gi8CWqEG zkMda5oftlRWgzFWyP8IctsfwGsD6+I1L7aEtxGx2BO9VcAkzWhmsh/Cw yJOrEVn+FKP9e8eNGFhNMJBIIWDLB8MkzrVYm/pF37PjGNXN+zPk0IPRt FAi24eJx5Gyc1qAVaS8nQ62rBBV/9wpvo2A+7S52tCLzr3KQmyzRXH3ts 2unF6uM1rvqCYETP84DatLRtz/U3Pu4NA/0xkDAjyKfPQLAszjldOWRo1 tLC24CiiVMgfAnPXdPdGPeHgy7UR4tSRjmtpsCmquOe68uv1k/YARqjKi Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189613" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Sep 2022 08:29:05 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 15 Sep 2022 08:29:05 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 15 Sep 2022 08:29:05 +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=1663223345; x=1694759345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y0ZehfxrsLw0nxkn9kFuGZxK3j1l5W8LWS9DgXT3Upk=; b=TDLR9/yQEfOwKIvDbUPLL2OYx49+6V+3+S3qRTlDlJ1tbdLxXS8BmTBt EFoGGM9XwDP0KcBMvCPnQrFhGV9+Wj9a8DlXa1xxPygyXAw5GhElteUn3 qXmIDgbCCGT9Ad1rYY9kqbCGLVmxUGfNPvNFSjTsrS3cjtZxT1/mgRz8f Ns91UYoqsdFfNLCr1fN58yzykCTPa8qJv17ME6F5VYZmfWiE8oqHMZKkk YSEdsznV20J+0mUYTyZU9hzzz9QQ9kxvhABtrQNZ3zz8OaZ5tYIq37o8+ Wg8jvUJ9cjE+tWfpqtvQP1tYeiQpk6Od9R09CfShb3SKKLLgfQc20Uq5s Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189612" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Sep 2022 08:29:05 +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 A30DA280072; Thu, 15 Sep 2022 08:29:04 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Li Jun Cc: Alexander Stein , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/4] arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes Date: Thu, 15 Sep 2022 08:28:54 +0200 Message-Id: <20220915062855.751881-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> References: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_232914_898552_1F635692 X-CRM114-Status: GOOD ( 13.82 ) 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 With this set the SOF/ITP counter is based on ref_clk when 2.0 ports are suspended. snps,dis-u2-freeclk-exists-quirk can be removed as snps,gfladj-refclk-lpm-sel also clears the free running clock configuration bit. Signed-off-by: Alexander Stein --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 504fd5f05395..d944ecca1b3c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1299,7 +1299,7 @@ usb_dwc3_0: usb@38100000 { interrupts = ; phys = <&usb3_phy0>, <&usb3_phy0>; phy-names = "usb2-phy", "usb3-phy"; - snps,dis-u2-freeclk-exists-quirk; + snps,gfladj-refclk-lpm-sel-quirk; }; }; @@ -1341,7 +1341,7 @@ usb_dwc3_1: usb@38200000 { interrupts = ; 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 Thu Sep 15 06:28:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12976857 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 31261ECAAD3 for ; Thu, 15 Sep 2022 06:31:16 +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:References:In-Reply-To: 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: List-Owner; bh=pbHYtAfojBWCNurxistOaK+vJ7hfz8pHlTdsHl3WFWw=; b=CiKAPnFw877HpS pbZit3Yzhg7K3ExmrBrCbz2ofQlQkB/5QjDTI3eqKAS7UawgHYP60x7ZHl9OFXV3rb6d7uq9QumS+ ytmwBHKlJ+lGSsQHok7KQRvVSy8k0hDur9qXA5Y7y+lAX+YAQNdN53VCKL4GTiRqLQ0Tiipzn9yqF hhi2EbG4HYWGzuIxGPyytqVEXpJ/PGO1NY0OPNpmOeO7vvTCL7rUw2IdCa26hGMU6Q+opdg+t7sl0 CBmeIaLGXPoQCbKs7Y2j+2SHV1CduACbO3HNI3munK1tW0I9tN2jXbCL5lKz959eBPn5HtU7Scyef qDmUf3lL17KYokmorRoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYiNp-0023hx-V5; Thu, 15 Sep 2022 06:29:58 +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 1oYiN9-0023Dd-Jp for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 06:29:17 +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=1663223355; x=1694759355; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jizuBE7T9wBky3xHT1WArxRMZ9G8OPi9vTpXWjEpzCY=; b=H9MKGw9kaJTbcoD3Mk7d7i2mU9vt87EF/rOoR/k37BYz8EgLR67keA7M Q6LukcHQJLcPjwUuSWm5gYwbuuK1fsD2z0m7efVvpOfM7zbNq7cOJ9Zye lyqgQQBnlo5L6UAmmXeERg/EPaoNSVVjNQ7cEiviWq3aJVrGXCPblo21H bHbzoaNccZcTeWmE4ZjtGuRKnd/ZSkDP0mD7HdApTAU7MDzvqTpNHsfBQ qn2adhbfOFaunGOzbLxyv3tIx+7sERqrJWznpIuiiwJL8l5s4mo3NB+pM x4UGP+AbVVE0WNWjrZ8QCyX9WdofvarK4LCLFveFstQJIZ7XLA01RJDdi A==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189615" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 15 Sep 2022 08:29:05 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 15 Sep 2022 08:29:05 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 15 Sep 2022 08:29:05 +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=1663223345; x=1694759345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jizuBE7T9wBky3xHT1WArxRMZ9G8OPi9vTpXWjEpzCY=; b=hqZBO/pUvKVe988+dQ7sjsQ9gkMWiCaJwkZbZhesSiK7IBJNoDALk4CS uLWyv63roTP9ezbEeKKwsQCuAaoVBY+kMVwAvuZaRurWgG47N+S3MR0QM GjR0k24rag4DH1/Gygt0GOeU8qWR7fkbWsBr/U4zSYsUsgWzbn9Ljbt6l W8P1hLF69888Xf4UcqVS5bp6B6Nt0/gcnSuyIQjzccjBKFcV4wKEtRdec ZdbYU1ajuoAHNinWuYfXICnQFrHXkRECExFgDbgvTKg2XFnIsRqewgwmE AM9QFbkWEIiGaDEgQqOoPd6ZagvhYXXfWEypW2w/euo4xbX6GL17k1/Iw g==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189614" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Sep 2022 08:29:05 +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 DB8A6280056; Thu, 15 Sep 2022 08:29:04 +0200 (CEST) From: Alexander Stein To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Li Jun Cc: Alexander Stein , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/4] arm64: dts: tqma8mpql: add support for 2nd USB (host) interface Date: Thu, 15 Sep 2022 08:28:55 +0200 Message-Id: <20220915062855.751881-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> References: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_232916_017979_E528BD1A X-CRM114-Status: GOOD ( 13.91 ) 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 The on-board USB hub has a single reset line which needs to be enabled. Signed-off-by: Alexander Stein --- .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index 7bf6f81e87b4..1c440909f580 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -461,11 +461,23 @@ &usb3_0 { status = "okay"; }; +&usb3_1 { + fsl,disable-port-power-control; + fsl,permanently-attached; + dr_mode = "host"; + status = "okay"; +}; + &usb3_phy0 { vbus-supply = <®_vcc_5v0>; status = "okay"; }; +&usb3_phy1 { + vbus-supply = <®_vcc_5v0>; + status = "okay"; +}; + &usb_dwc3_0 { /* dual role is implemented, but not a full featured OTG */ hnp-disable; @@ -486,6 +498,31 @@ connector { }; }; +&usb_dwc3_1 { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbhub>; + status = "okay"; + + hub_2_0: hub@1 { + compatible = "usb451,8142"; + reg = <1>; + peer-hub = <&hub_3_0>; + reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + vdd-supply = <®_vcc_3v3>; + }; + + hub_3_0: hub@2 { + compatible = "usb451,8140"; + reg = <2>; + peer-hub = <&hub_2_0>; + reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + vdd-supply = <®_vcc_3v3>; + }; +}; + &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; @@ -720,6 +757,10 @@ pinctrl_usbcon0: usb0congrp { fsl,pins = ; }; + pinctrl_usbhub: usbhubgrp { + fsl,pins = ; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = , ,