From patchwork Wed Sep 7 14:46:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 604180 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 5E4BEC54EE9 for ; Wed, 7 Sep 2022 14:46:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbiIGOqh (ORCPT ); Wed, 7 Sep 2022 10:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiIGOqg (ORCPT ); Wed, 7 Sep 2022 10:46:36 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05CE87B1EF; Wed, 7 Sep 2022 07:46:34 -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=1662561995; x=1694097995; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jq/LXarroQvKCnR+TWFdrbIO6mQxGew6wfFoa385Hgw=; b=auzo1w2frdM0uF1pYiFd+zHuP9dn5o5ukHUi++5Aw3W2hpRQsjQNLiF1 U5HKfD1evJRnUbUcv594V+bdbhNaeRwpawcTWkn7vPinHuisOLotlGYIb q9KVsUDigB+z1Gnd3UOziIUcxPYfnslyhvPCdWLHxs8DLJwPtfxkDDwVU fe+ZKCWtlJeed/M/JUm7ianPD87x0XTOEXuq+jpwf2HfWZGsb2WXhecHj gdcHC0tssbPSV8X3vkh/MJv6XR/ZjR7DmwGafhrf0C7Zy2+SUyGLE86eu tSfFC6zaEK1MnguUSnob+Wz4TsG17iKNvjm59TYziIQPf4bgYrcOB0mkx w==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047484" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Sep 2022 16:46:30 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 07 Sep 2022 16:46:30 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 07 Sep 2022 16:46:30 +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=1662561990; x=1694097990; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jq/LXarroQvKCnR+TWFdrbIO6mQxGew6wfFoa385Hgw=; b=CsWNCph7KnP/34n0XH6KtYavjH9jxeMVN2LrVqnf5NCG0RtLoN/npTjM /smURe8A0gZK95mPruYP0A8sZhx69flLnLQyj/dLgnAk5iLQYiiEDEQTC LO4Gs9OGjJwmKIpuXgy2JBJYo2wLkP3hxw7qfKUWvA3pU1JLjfr8NaHNg qeP9UESyBKDomSeuHbhczSiewI7wnSKa3tW/0hphxdEnyQRxXdskMZK+i yzI+vO+fAHx+4yCyw1GpdCvV6B/PYpyIVx1Hx4tsUQfL6Xpgn2iVaCpJx Be12KGYIfdJLkDed3JPPoeU8ZNXfOxOwzOBCkMa/pS2AKDtuHSamyUvhK w==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047483" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Sep 2022 16:46:30 +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 69C35280072; Wed, 7 Sep 2022 16:46:30 +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-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: usb: dwc3: Add gfladj-refclk-lpm-sel-quirk Date: Wed, 7 Sep 2022 16:46:21 +0200 Message-Id: <20220907144624.2810117-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907144624.2810117-1-alexander.stein@ew.tq-group.com> References: <20220907144624.2810117-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 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 Wed Sep 7 14:46:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 603753 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 2A0AFC38145 for ; Wed, 7 Sep 2022 14:46:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbiIGOqk (ORCPT ); Wed, 7 Sep 2022 10:46:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbiIGOqi (ORCPT ); Wed, 7 Sep 2022 10:46:38 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB367FF9E; Wed, 7 Sep 2022 07:46:36 -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=1662561997; x=1694097997; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DABEQqz4QfwbbWYVa5sSadQTpuSR2LafHiafic1pYk=; b=QG4tZIn3o0DQ80ymE06Ms1rxblvGB4ZRoSixTRalnvtEt66BJCAzpARy Uw62TmWJoraH64RSjE6nk9S/6TJqWM1d8G1dmh1BRQSkJAY8HoSqBvDmT ae6lkquKaNDSOSQOx6lomcBIkb9enVMs3cYZGQr0XLz+cwCO/YRyyyVti B99/yPjimygxp9qomdCTIQ0Co7rw5oHEMynZwmB7WdCvnWSzgrEO2y9GB kUpln2LFQzCOMFPbuxq+HZtKjBpbF9Q93XCjA/sNIgAB2CcwvP2GSQN1p M+A2LGAok6+JI8dS7dmHq8fgEQuUwMtgFxYo7Z7g7Wm1MZyHD5QRJ6iqX Q==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047486" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Sep 2022 16:46:31 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 07 Sep 2022 16:46:31 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 07 Sep 2022 16:46:31 +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=1662561991; x=1694097991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DABEQqz4QfwbbWYVa5sSadQTpuSR2LafHiafic1pYk=; b=A2viJqYjOx9fjTMy4XjpIg5a3gskrYMDm3/t/6/5YWSWTILtfWQgHf6t db8/lLyrgxGxKDHGHzFng+/zmqMs099C5bWSWHKaJvBT9kjPTQ3L+Uhml ipZvMx0Ppr3kix0oif4FfPXVUljXuo7+r05zrA45p1R0ZaBV52MnvJJDy MFSMRQkY1b+V8GN8noWvcJ7AZETWU1Mh3bOWnEjezTpliaQD5FRAAaToR /4UOzhWvJDCnuvMV8U4bJNLpKU7XoLhTDQm2hSTj0c9m/95r6nXhh13TX 04yxPPJXk/kn1vlqPL7hleX6gcmkY0TKSoSJHcXQGh+Qe0DOShMOG/nVH Q==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047485" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Sep 2022 16:46:30 +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 A2A7F280056; Wed, 7 Sep 2022 16:46:30 +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-kernel@vger.kernel.org Subject: [PATCH 2/4] usb: dwc3: core: add gfladj_refclk_lpm_sel quirk Date: Wed, 7 Sep 2022 16:46:22 +0200 Message-Id: <20220907144624.2810117-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907144624.2810117-1-alexander.stein@ew.tq-group.com> References: <20220907144624.2810117-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 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 8c8e32651473..12e8e7d34cb8 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 4fe4287dc934..11975a03316f 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 Wed Sep 7 14:46:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 604179 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 85F4EC54EE9 for ; Wed, 7 Sep 2022 14:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbiIGOqq (ORCPT ); Wed, 7 Sep 2022 10:46:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbiIGOqi (ORCPT ); Wed, 7 Sep 2022 10:46:38 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB1BD8048A; Wed, 7 Sep 2022 07:46:36 -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=1662561997; x=1694097997; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mcbrCYTDMmAmjpK0PSlD7QA+1uZkZ5/KbbIAh3KJVI8=; b=inHvx/ePUXtQsrwbt9L4WyyY57FNzqdRsFo7ztz/Z5zQXfV8Nb9VGcS1 qi4hHu7l+bR0+AE54eUHAN5OgVC2ZxSzRjaJNdgBgvr+Wj2DMzgbkkTWg 7vQU04GZPzcllMVfNYUMHsSis4ZfIxhetJJg+G09WU1EkaR5gtcShSTbz 1GHGlh1tbPtkmVgMP8CHd04C4UhnV/ALA3vNoSnb7JijVbCaPU5MBlmin MEnDzOKEtgPhAvvzaDv8Tuv75Po3LInE9CQJ+095n18r2j7q0H3XIwhrF 5kujz9LfRC4utDD0e9yNQyrk0bOPTeAElZo+M+V/AMQjluR/MHKgbWqGY A==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047488" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Sep 2022 16:46:31 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 07 Sep 2022 16:46:31 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 07 Sep 2022 16:46:31 +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=1662561991; x=1694097991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mcbrCYTDMmAmjpK0PSlD7QA+1uZkZ5/KbbIAh3KJVI8=; b=F7c+na8qmc4sqAIzRxUFrElUKEA4J6+yjfjzvjmDjJaE4u27z4i6ucvc 8BlHTfdFrocoBcZHmBs4Braox+KyolLt3w0zYetK1SCydLagPLabd/xcL l/Mpzx3nRzCCKHtWL2J1587J7DvmMJyVE6ETwG/Y4iQ/CJH3eIlqmHT68 jh2DODUPxU+rWdMzHTkFrZY7OYwcjKOt4VndXiOuUWQ82a6TvcnjLuBOM CtjnUxyiu8JA4GNuFf+cih26yeYdXh5ozGXvyoCJs3qP9j5XbiGRdnjNg YFdSDx9t3IrSgXhIYTlKMyXCFSy4OfR5L9XICVz53eM9Uf5n+kxxxNwq9 g==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047487" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Sep 2022 16:46:31 +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 EF8A3280072; Wed, 7 Sep 2022 16:46:30 +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-kernel@vger.kernel.org Subject: [PATCH 3/4] arm64: dts: imx8mp: Add snps, gfladj-refclk-lpm-sel quirk to USB nodes Date: Wed, 7 Sep 2022 16:46:23 +0200 Message-Id: <20220907144624.2810117-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907144624.2810117-1-alexander.stein@ew.tq-group.com> References: <20220907144624.2810117-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 53493dc7d976..0e7f5842a3e4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1300,6 +1300,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; }; }; @@ -1342,6 +1343,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 Sep 7 14:46:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 603752 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 3A83EC54EE9 for ; Wed, 7 Sep 2022 14:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbiIGOqs (ORCPT ); Wed, 7 Sep 2022 10:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbiIGOqj (ORCPT ); Wed, 7 Sep 2022 10:46:39 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2466C816A1; Wed, 7 Sep 2022 07:46:37 -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=1662561998; x=1694097998; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nyTN5S1v23pl4QdaIwaYRFWiOie50KxUbC25YQEF+qE=; b=Dd0r10oWAaSjIQPsDbWRvnMe/aPeDOavQN0uD26PnVljwWT/fwPYPWZh /x7BSsciL9n3grlPviDDWfbIKXgNGyD0hrrxT+nLrfgiLR4UczgQlQkZb QYglTewG6NlZ2kxMXhasEbQFGbwJqeS6V5oTQMx/V/91sODRsp0QbT0mu BzZlj3Ds3genUkOHPttlvRT+A2/b8LTK8cUe2vNAaM3OXJgzkFe42Vv6j 6rgdtzGe5QtgsHJTudRpXkhOasmiCllXAb4Fz+4LOVhug1oVE9nVXWJ6P RjkJxGerrewkBZ3tCTSJlw4kA3PDBJMxnMR0AI/X1C5MV/jBK0nyYz0lb w==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047490" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Sep 2022 16:46:31 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 07 Sep 2022 16:46:31 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 07 Sep 2022 16:46:31 +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=1662561991; x=1694097991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nyTN5S1v23pl4QdaIwaYRFWiOie50KxUbC25YQEF+qE=; b=H/+ss8aiTVjn6nEFkYtz8MJ555sVCCVi3URoeZtWObVZIva0so/g0ax/ xs71b9Zahss8j0Z8Yf0FzpIJ8fhrTiCW/RsTriQJn/sO13oNSVwQKB3NH iKmIvxUv2PU1nQFwDXjE2ljIjoaPotDJCq5G4iOLtG8SNVnmdAlYE/tSJ mxypT+/P/C3rBA7pLvMJcOB4ITd8Z5BYfPV4+NThIkxdafQz6OEGgZZDf IjvLyH7aKHb4d4kpDV0Ktv+tPtkyqV4U6ju9Hr8YyFsQDEMQLICOi60Ma VbNASU7e5AtLbzSH3Wn96nURc6rzSKhaMrcJk1xFfXvX4PEdaqa4YGse7 Q==; X-IronPort-AV: E=Sophos;i="5.93,297,1654552800"; d="scan'208";a="26047489" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Sep 2022 16:46:31 +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 33601280056; Wed, 7 Sep 2022 16:46:31 +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-kernel@vger.kernel.org Subject: [PATCH 4/4] arm64: dts: tqma8mpql: add support for 2nd USB (host) interface Date: Wed, 7 Sep 2022 16:46:24 +0200 Message-Id: <20220907144624.2810117-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907144624.2810117-1-alexander.stein@ew.tq-group.com> References: <20220907144624.2810117-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index 0091430f6154..09c80ffae4b6 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -459,11 +459,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; @@ -484,6 +496,32 @@ connector { }; }; +&usb_dwc3_1 { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbhub>; + snps,dis_u3_susphy_quirk; + 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>; @@ -714,6 +752,10 @@ pinctrl_usbcon0: usb0congrp { fsl,pins = ; }; + pinctrl_usbhub: usbhubgrp { + fsl,pins = ; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = , ,