From patchwork Thu Sep 15 06:28:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12976853 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 9D7DAECAAA1 for ; Thu, 15 Sep 2022 06:30:21 +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: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:In-Reply-To:References: List-Owner; bh=gPhPuGDms2pHVqfAVAut4dUS87URnPGgfywNJCuwqpo=; b=NY28BooLzhkUkt cs+2/VwB551o1z+ZM8uYPc6F8dvetRN9MoDdVR/El7JUTKvbErWKD6zTQGBxrm/m3rkrpi++KbnGT SYhYyKNE7xPYb3Oszbhak3ZnMvAt+oFBfxXvWlZb+DPg/9EDkebYpmYr4bSDVDLi4zd0PjuOKilMx kGuhQrvfR04rQn0gmvH3c7stB4SKYAJZJAsd/xzyfBdZz1wenaT5RiXl42ykBYeoD/kIPaKAX6BOE 5IyHY01PJz5JmXjxnCTTH0VJNu4PtQSrHs793m4z6EsKyHjFns1shPEJ8hkij8UI8jgBO0G1UsyEM vq3RRYMToJI8aOgXkJ4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYiN8-0023DG-G6; Thu, 15 Sep 2022 06:29:14 +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 1oYiN4-0023AW-0V for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 06:29:12 +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=1663223350; x=1694759350; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yenovilFRNpCqkpDtpDC2f1lhfdhpbwLD7Xa2hXAFhQ=; b=SaVofzppNruYP03cl7ecfSLFZzxhSOazil9UNenph+yhuecm74KT6LBl 7Exu9ZrVzRhOlHB284n/3HZ2JTizXV2iDTUW/35rvNwkyToEXrEPjGVF8 w7PDojFwtTlw7CpJQy+0aK/kpAdxdsukZv4xnXRF62LoUECjMLgIGVK4D Mj+nyBqO2bCR3KlmQyU2I21Ov3zEGsAK1gUFQvI0nC9HuCMpRn44d1oeK 8AToxkqkcMiBrQ9srggHGy+aO2mBigk8LUWWROYuHSRA7B888LwEP9iUs XOkPAcHOLTjsbMRw1hI1QBQdPc6pV/HQ5Mz6HQsPxEuu/0QSJn7DmWXmk Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189606" 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:mime-version: content-transfer-encoding; bh=yenovilFRNpCqkpDtpDC2f1lhfdhpbwLD7Xa2hXAFhQ=; b=Y3G8eh989lOcarD1QrBhrBg2IX+Fs2Pf3L3QluLkBmsb9ay8bxY1Y9T/ MRBKR24jLBfbQt7RAAcYyYZyytoPlcFkzZnZbhHgdwpD6Ajbl3vjKslp2 XEqCTW572cTqDqzBGTPUfi+Q4/tH/hoJjX5uQcouutSQhLSB2f8Hbl0Sm iRX2RoPFMYP8uZqJeCWe9IEOeZyXhL7IogqJa6hfVManwpwu30b2hFuQp pwKDOdBH/dIKAqcR3JBGl0vgEKYR0aY+8hGMAPonItdSuWUSRDFKXktGd 9dLCw3We8qRBu/E2J9PFyO81+KDaHd7oUgiIqC6ORpeBh+Y2tTYxd2gHt Q==; X-IronPort-AV: E=Sophos;i="5.93,317,1654552800"; d="scan'208";a="26189604" 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 D467C280056; Thu, 15 Sep 2022 08:29:03 +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 0/4] USB host support for TQMa8MPxL + MBa8MPxL Date: Thu, 15 Sep 2022 08:28:51 +0200 Message-Id: <20220915062855.751881-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_232910_452960_94592486 X-CRM114-Status: GOOD ( 18.27 ) 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 Hi everybody, this is the next version of this series for USB host support on TQMa8MPxL + MBa8MPxL. Thanks everybody for their feedback on v1. The DT configuration itself (patch 4) is rather straight forward, but leads to the following dmesg errors regarding superspeed ports: > [ 8.549243] hub 2-1:1.0: hub_ext_port_status failed (err = -110) > [ 22.885263] usb 2-1: Failed to suspend device, error -110 This hardware works fine using the downstream kernel, because for imx8mp this ITP sync feature is enabled conditionally [1] & [2]. Hacking this into mainline resulted in a working superspeed setup as well. I also noticed that on some android kernel [3] depending in IP core version either GCTL.SOFTITPSYNC or GFLADJ.GFLADJ_REFCLK_LPM_SEL is enabled unconditionally. So I opted for the latter one using some quirk (patch 1-3). Changes in v3: * Added Krzysztof's A-b to Patch 1 * Added Li Jun's R-b to Patch 2 * Remove 'snps,dis-u2-freeclk-exists-quirk' in Patch 3 snps,gfladj-refclk-lpm-sel-quirk is a superset of the old one * Removed 'snps,dis_u3_susphy_quirk' in Patch 4 This is addressed by patch series [4] & [5] separately Thanks and best regards, Alexander [1] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/usb/dwc3/dwc3-imx8mp.c?h=lf-5.10.y#n134 [2] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/usb/dwc3/core.c?h=lf-5.10.y#n333 [3] https://android.googlesource.com/kernel/msm/+/87a6b154766907020cc74c7726e8a68aaa9d7f6b%5E%21/#F0 [4] https://lore.kernel.org/all/1662547028-22279-1-git-send-email-jun.li@nxp.com/ [5] https://lore.kernel.org/all/1663067426-29534-1-git-send-email-jun.li@nxp.com/ Alexander Stein (4): dt-bindings: usb: dwc3: Add gfladj-refclk-lpm-sel-quirk usb: dwc3: core: add gfladj_refclk_lpm_sel quirk arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes arm64: dts: tqma8mpql: add support for 2nd USB (host) interface Alexander Stein (4): dt-bindings: usb: dwc3: Add gfladj-refclk-lpm-sel-quirk usb: dwc3: core: add gfladj_refclk_lpm_sel quirk arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes arm64: dts: tqma8mpql: add support for 2nd USB (host) interface .../devicetree/bindings/usb/snps,dwc3.yaml | 5 +++ .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 41 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 +- drivers/usb/dwc3/core.c | 8 +++- drivers/usb/dwc3/core.h | 2 + 5 files changed, 57 insertions(+), 3 deletions(-)