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: 12890610 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 99B45C43334 for ; Wed, 22 Jun 2022 13:06:04 +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=MF1tCJXVxvFXw6H//rPk6A9KuKWGwj0EJBdZ9eebzD4=; b=CUYeHDggnALUOS eMhBv3sU6DgByA79TbDpANDhSJvOJtI3eVJKNpax5YWpE//+wvkOw5bq28Q1+7Yy6xV0w0AdE1BVR jWaTc8kZCe/N8nZoVZkZ2p9d8zGdJH2S9OwPl/F/e2MWj5Xa/H/lafBJPWL+1M0lGAPNXgRHL2Zl5 U6QudobVz+jRoM8upjO2Kzd26wd5ZFVVTtyIhODSMyxZoRMbEqGYk6/CU2gDxOq0aDBrZ2ygdDZWD NOYpFu7E+abPaNrTX48SXSGZgzSwkKMCqOwa+Rvhn/j817lHc52/4Fhd/HRFhuRgcU0uRfrRDiPSF aPSxQM+qX761MvyEfrsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o402Z-00AP8M-Ha; Wed, 22 Jun 2022 13:05:03 +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 1o402P-00AP5V-FP for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 13:04:55 +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=1655903093; x=1687439093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IDe+XSP0w6CqM/w7HgCF6rtWL5f6zRKINNcLCNSdqoA=; b=YrQHTGJautqrDrIZkQCNoeeFZjARCnr/qPAHRglyOhsVgvlGgGgTn1xB qzlqT5YHKZPLCSpVvTlQHaeqgM0M2s1UOQWmFmnmqdYdxOM4fHRrGmleH MG9gUAJuKKkah4Ap8rxHNe3EIZg/UTvVMim2vV56p3FVCqLwx7DHfGHD9 3T77bRCb8P6CFCHqKy1lijaVBiTNJcueWyf8k5cQAeMTRKEVDtJxpdbT5 QzUNo91AHYekkdmeqv6/MYPcnf1pB74VGYMkt8K3SQCd82uf+w7n58xBk 9YHcUSszKyyHeXnhC7IpXgD1/32SNm4VK3XBDUEHSACG0ozWdtv5br5b8 Q==; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_060453_843470_C5867448 X-CRM114-Status: GOOD ( 11.55 ) 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 --- 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: 12890611 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 1A9D5C43334 for ; Wed, 22 Jun 2022 13:06:08 +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=2PK5tP/Uccv2AVu9vVMDCCghOpqkyTI9UVhtARRsCQ4=; b=u01bNqi01yyPYy JvWjcbdmFzV8wZBoSy6jdPeKYwXuJlR7yFhHbDY2+Rk94Pw6gFPj0UmAvRxLlKDULnwiBeCPPSpq7 XHL9lL6g7w79SiYGp2Umnols0MotWENNO887ZpYbuZeDhlJOUwUoqCoOCC3ClNwPYsALslt+2q2BT iTOMu1omkpLqFcZ0oBWgN4Gs+jojVMraw3r5nMINmOeeVUEZ73eyG4irBR9tsEHyr/yrxfVvlJcau oA3m0HMrSfgA9itCgFkQUcX2FAesGgOd/CnZ1kKWxi72HQ+9GUcnMOaJzIC5Jgk1RDlrXXL3jSbYS nESQBtN5pZZ6LBUQKqbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o402i-00APA9-G1; Wed, 22 Jun 2022 13:05:12 +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 1o402Q-00AP63-JF for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 13:04:56 +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=1655903094; x=1687439094; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g9p+CdnZ6Dbj2C8XugLowstES1GHafD254UAKc21yY8=; b=Vj7H0IRJ7ja+7ixeH1g5qmg/sZpThmlvOMqKW/ygczREZRbsdYCO/mnz mV38olVzlrpbetfQ8tTJhNk5MaF33gdhhsJFxN5zPkPMc+dF1CFYjRJ48 RbxSxXjGTKlIkyiLsGRl37O5CdulnLBjgnnE/L+s8b587vxdDjUU6NclB Zq4B1XqKLAdy1JkIKsMilWzfrCQ0u8C030ZUvvfkshIrsTpVGb2Ygg5RN 85bezIGe0eA+PV0bi76jhLCn4KB8sBcgk/1ShVIYbrYuSiRYF1rQ6bGTZ BbKY05U6LZKe/fEmgwpTvgCx8v74mas68OuQrfhB5qqEQbdczSM1+mI9O A==; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_060454_985544_D9CC79CD X-CRM114-Status: GOOD ( 15.13 ) 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 --- 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: 12890613 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 75A16C43334 for ; Wed, 22 Jun 2022 13:06:20 +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=ZXTeYohdJmeFiIM9Te5/2SscEbTI6ou1AxmFvLFp2ag=; b=hr6TvP+DRqpJKm FRpbSp41TpgeXKhcH0HGYxohIqKx+upXMe22gd8lUXhlR1R2PmZWMF+9QerY1+0UJHm1hUUSqS/Gw oarDCbuSe0loJXkWTKjCckjo2ktbAeP6PrKmjGuZ6rK7dRuhtvToJIF34Gn7zrvYrIEP5Qr7uRviU BC3O3iz1XhNpyjDxooCUCqnlubQOK6GI/IcIKnvvZQZjKYzJT1Syltw6XEkOm/J+GKUn6dp0J4swV LQ3+zrnvyBoBAvwwoX4CGOrAtHJZw/M/ZT4TDicgytaRq0fFELZay5V/DCwgvj7nwl5WDDQGhiKoF xWt7omNPNiUVKv1kRwVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o402r-00APBh-N6; Wed, 22 Jun 2022 13:05:21 +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 1o402R-00AP5V-Gf for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 13:04:57 +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=1655903095; x=1687439095; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0C/9qSsmMcABIeycwGOjKNCnIce0Ux/uWZw0K8/a/YU=; b=EPg+x5ByK+wNOPIOef6nHVl88f0JmpInY++l0h2tnA9QgHUdmYPoUSxk c3XmJzcW0xJ3JAfAnDUr0rOs+Rp7t5dSRUia8f/YdcqeeNjNZ5P6JJStr 1CKyKiwaZJdwC8s+eH5e5bN3/tWC0o+un8I1tUXWCtbEIe96E+66I0kiA crUxmsmrdeAdBUMN5NvaHqbcjFYAWjVDm2gfBJB609VkhaIpZd+6UMZ5O qaT/DYBqRRIADe2/nrdRvma3P6sJBxOUxqqMn0RiuIX0u91jmGPeYYPn0 M8Ghvp0Rz1H68TTHAN+zAYQlfbl80qTzBAglU817sWMVVW/b0XD0BK7Hx A==; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_060455_880678_9D5403F6 X-CRM114-Status: GOOD ( 12.06 ) 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. 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: 12890614 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 6CADEC433EF for ; Wed, 22 Jun 2022 13:06:32 +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=F9oMNK/eRihx5Omm3QenvQREXQY4mBPtUlx6OBcbVlc=; b=aPsQEjs7inw54V gwwcJeQKoaCsHb1EdsgGMXPxFDYIHAuR13BtTWhGa5ylUEU2ZKERWEpywIHUOu5WSn8tRcBdv+vAi uOiiuxh0Y4oX+2+RZTpoq1f4psbfcAJzBIeRLHe0fEtwqr2U0/n1xv0xU6mpYq080gc2jJXcjcMiT HGJSe+sUzAGZFOxX8Sn0vY+Aw+uVC0N+nITqmfwXIJEmeRPr3cZOPdCTLZhkcoD83Pu2pKqHi/pxI 5ezHBPmWAqk9Y6LimxN2++RyE1C4puObBDCxwB6iTLaIuEy7OLfewYvKiN9pwf6LEBH/ZTdDAz7Yx 0VelLysJFm3sRG/Rb2gA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4031-00APDn-7e; Wed, 22 Jun 2022 13:05:31 +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 1o402S-00AP6g-Ki for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 13:04:58 +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=1655903096; x=1687439096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3hsE+SxtSbI20PcB6X+2FIGDwio8lUT1/4myfdKMjlk=; b=BVmc6Zd4wJbvVx0T2oepK7B/a6LEg4WLLa+mpIuZ8lW5J3MDVKTeT156 OihT2bFfs3+DTiyT4mUI5QX4yer2F/IloAo6xXfcQ8l8cwtZmttYf/G+k CrirHBPbNsieL9R+kxNcKaAU1N22cIU0Sr60UHUOHVjW3SYjdxPmpbKzU FVgX9XrKfVYdBrTA3uF+zh8jigruKohfJ8UYyG/e4FzfAl/5GRFxKPVMC sTogJmfu6Gupz78EHSVQWb8TV+DnAeybkBqlBZ0JgupdLBFqn364Wo6hQ mjeFDg9pfYbivd3hX8O7BLDGeXi2Ygzk9hr3IfLro2tw4W/nhXZLG+RSL w==; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_060457_080619_6FF2D354 X-CRM114-Status: GOOD ( 14.37 ) 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 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 = , ,