From patchwork Tue Jun 9 11:12:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595285 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F6E01391 for ; Tue, 9 Jun 2020 11:23:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2BE5D207C3 for ; Tue, 9 Jun 2020 11:23:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uo2Uokbu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="N5SmyOfO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BE5D207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TswomJi2i+Fu+4QM3S5CPrNZRh6GyXMPto9stnEh6+U=; b=uo2UokbusztFhg ACXPSm9QHonW/R6x5UgC6kqHj/1e3RToSQQ5hzh+qwiaDkwd/btHeyLdJn0RBE7s5GtEQ2DDQDJUw m7+rvaPRILt4F1lZf8LJ8TCveb8XyDhE6MYJYEUqL2n78fo7jG552I149WfAxfztaDu21BL/OXT2n /iBlIdCkb8VRKaLyQh9zWo+6yf0XY0Du7YbvIbrXAuhMIUaQhOqr08Le1t008i1MrDgbSg4Hr/U+0 bBkGkJ6MwEXM6MRsW82kVe92vy/kaMZ1PQK6MLWrMIdovGq/Gc8OMIMTVxo7qbnpIAUIoM6syUuHs lqztE4eEI9e5+xjGVkVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicM7-0002L6-Au; Tue, 09 Jun 2020 11:23:47 +0000 Received: from mail-eopbgr20070.outbound.protection.outlook.com ([40.107.2.70] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicM1-0002CC-Rd for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KvAqLHG1vHqS9ze0oxIFTgVs7h5Utj7J2aTjhb8iwLamcESJfkEmJjXMdghysdP0qlJ7XLbWyiYGPcelB+wLxKiLyTcoP6CBfZTU9vWIkYLY8j+HITW1oBenrE5R16q1J8GSzHBuuTGUg5usttlLmeelht1qlE4y2nyZGUZhdvZxjz4ikKQr1D8H7gD4cutiWps7X4QC4I9KQ2TLb0YaaeQU6YAqvwihDFUkkBhWRSlV9fQUJlEyFSHgDLmUgtcfvPkcPmXFn9A+nK0nMZTxcHLKUquDvMYSfBnPuHziQ4QAa4JITyLKdW9GCOB2PXKWukcmjGZNxD4PDnNVYK9rvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rL08SX8hcrkb8eCwvF3PVaHOTsY9yVgpEWR1bJY3NIE=; b=J5Nq/s3WvNERBE/ZHHmBgFJSO1vgBe8mAd43HmTLeMF/BC4skXwCuD7Y4SzJ5X3q3JD5J4DLON8XGwreVdyJuFpwCBPFBXlRNGhR6vQYLEFPvax2UaA3czm3bjsb3rWJj7QFsCYqEXoxF5cjZH1u26MATt/3sqyL4JNf2YjedlbHymCukvd/1ZOuxM4180PGBPSG7kmvQEh0JNHGgyCuGCV5i/Vfu5xGjIpu0OUCcWD3ziwv/Ctq1Pa4cvKY66c+FOMkNmAC44XM3YtSfwzGkCKf35+rQBLUBfMaCQ85StXqb8UY0Uw/kKtSVYmWoNhMmS1UGesidPUr26VonVeMxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rL08SX8hcrkb8eCwvF3PVaHOTsY9yVgpEWR1bJY3NIE=; b=N5SmyOfOBi5eDfbswmyGAlE1/3/e83QuVrkXYOPVs3JEogrqWcndVRaFSzeUvqrzGuuhKxxIiEy0IjtdvCQqlc0LZTpr/HidQfKMMNcrIUGf1/2FbCtX/CNpoGDYkbGERvSZM1hKsrTYJViP/JDrqUGpJn4poCd4h3eE1tZtUD0= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6589.eurprd04.prod.outlook.com (2603:10a6:803:128::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Tue, 9 Jun 2020 11:23:34 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:33 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 1/6] dt-bindings: usb: dwc3: add property to disable xhci 64bit support Date: Tue, 9 Jun 2020 19:12:40 +0800 Message-Id: <1591701165-12872-2-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:30 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c22d46b9-71ae-44ab-d7c6-08d80c678b85 X-MS-TrafficTypeDiagnostic: VE1PR04MB6589: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xseajbf1z4AGIpwOFVi7GnBq+2ydpcb8eDBqbkstK5g0kfTIHSCj3De1mfar8xxUcrw7/btVWleIKYUGqhyhQfkuv5G/lA0p8ajDGF6xfX7yFXsIG79XZrc3LW25Ql1nEpJ1LdDCzKN1eK+OPjxFpGoYtsXNcofEK5ebB5CDvk6feCHM9ennCXtVEgHPt1HuR2xB/2esLk+tVrCM874sG+sWK6APnepOceL4gao/DCA85PDpenTHO1mF5DJMdL7yGnrAd6wBHLRLvpnRLxU7rQMjW4gkwqusJ3vu1yx1pYBc7UFXYw+gqlvRt8itdPZB2VOhaCJz1FaCcmSa001/bA+AmsSHUdBCinniogf8gWSC/6THRGrNE0KZM2IgTbX3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(8676002)(4326008)(8936002)(66556008)(66476007)(5660300002)(66946007)(86362001)(16526019)(36756003)(498600001)(6506007)(69590400007)(2906002)(6512007)(26005)(2616005)(6486002)(956004)(52116002)(6666004)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yt4j/eLc0PELDZrJO/bNPwz3gjAm7QANAOd55xkPzqZHM2t9RxPbCzevNgXvTsPBrtAEcq0xprbnvXWQNRtYwwfgcktu0OOWgMr+JsqRPU2kwxtYLuit3xP6ZTthJIAKRkxvyWeOKJt8kPv9L9R/0ASlBSQS91mzQSSmY9XabD96l6vP8mK4jxSkAffeYwJX9E05xZB/aKYoxVMD+k/bi1ViM60EwSKescwjVIJSbDUBVQj9lpXJuzvmlhsqWDzGthAd0qzdzqvlXa0klE6Cep4MMDhJa+DAWslNKTiyJwpRXAKPbrrrCPFnz9M8g5x95e3Wk22tqRSP8au5/0EUKBBhlfHdPQflifLW+ljz9dbuBWwGDan1sQV3nyxdlWwE+y0J8eoc/X0xHC9ylLO/E1SaxeR3soiJqxJMtLpYDb5et5JkyoO7ZwsbIyE/F7WMvWJSqqh7Bj1wZ6ua3sbBoBseZrznSAJbmbtuwnmUVqo= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c22d46b9-71ae-44ab-d7c6-08d80c678b85 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:33.8182 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jF+Hrzgk4oF7GhVYu7IbKr0hUCKehPcWZZeuA2wk1mpLx5iHz/+gmltItiZoHVNt X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6589 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042341_916878_8BE547D8 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.2.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.2.70 listed in wl.mailspike.net] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a property "snps,xhci-dis-64bit-support-quirk" to disable xhci 64bit address support, this is due to SoC integration can't support it but the AC64 bit (bit 0) of HCCPARAMS1 is set to be 1. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index d03edf9..d16cba7 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -109,6 +109,9 @@ Optional properties: When just one value, which means INCRX burst mode enabled. When more than one value, which means undefined length INCR burst type enabled. The values can be 1, 4, 8, 16, 32, 64, 128 and 256. + - snps,xhci-dis-64bit-support-quirk: set if the AC64 bit (bit 0) of HCCPARAMS1 is set + to be 1, but the controller actually can't handle 64-bit address + due to SoC integration. - in addition all properties from usb-xhci.txt from the current directory are supported as well From patchwork Tue Jun 9 11:12:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595293 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E510913 for ; Tue, 9 Jun 2020 11:24:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EC4AA207C3 for ; Tue, 9 Jun 2020 11:24:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HsXLYz1m"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="FU20Wls2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC4AA207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C2JxVxeuKMV3wcqMEU4D9jphCCpeJMI4NQ00i6tF9O4=; b=HsXLYz1mu1d0C6 1YGq3yj4n5dbrQ55TkDWvRnLvnt8PAU4e3J7PpGTqJgVYL7gsZ9TBE1lkzUZmzeY6BIqgsc31PNtZ a9xMzFRSpRn9EiFM3KKJDF9qAxiG7XsajWkZwMvnLH6QY0ynMLdQJ81U94L81Ak4sXBWEGw/hYGwj F4m0lYjhMwh+uBQ1wyZLNtxypn+RSG9DW7oS9O7uJlOhFWm6lTcEpDb2z/Tun8GZMHugBeOkbVoP9 tvYAsX23a7oph6I+cq3kl1O6XXG50d4YhXEBF3YuNQnQ81E3huX9yNVUgZw8s+OxoJVmmjPEQhr0m q5xwiuMA8Ku9CAzxUpPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicMN-0002cH-Mw; Tue, 09 Jun 2020 11:24:03 +0000 Received: from mail-eopbgr20070.outbound.protection.outlook.com ([40.107.2.70] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicM3-0002CC-M5 for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TtiBWgcyIU9lmUH6A1Bs8j66GFJyl06RoM+7pfrvATluADaQ51WUe5VYPbFDyVYJH/R014jeWIHodfQE3cAxdFxKRWhNgYFrePihkJfFb51MOxL4X3Hc0NfVTZXEQ14jcEwqVcqTXQkKzCiJjErR/TZ4QAP8WufmxYQFGVCUYmUptFfdvNRPV1fxTPcwsWds823b4R2yEgsFPIb0wtPdZf4t2DThfLggQk7XkQ4+bBUYnjyLoiknul0Q0hwcrFF3sZwAHaCACPflqdyr/lZZHBmexwCR9PJE77Y0E2riLiNkCf1Aj0RQe56WvEp7pwD9onC3y3QqER706Ltm0lydbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+2I4E5ymUx2K4KjoTr/nrL47JWnZ73Ap2qG5vG/4xz0=; b=aV1K3T2ujA+EPwON7iaKDwrvWjSi8lWJX4W1RITgDO7ZixdmpijGo9qWf5FDljod/xvjieKtX2ehdPXObFgp2z7GcSJfVyLUjsp5XRHN3aC/1P/MOBJkUC5bqJq/RkRRMovS9hIv3QyLqfD6/xZlZ+yx3mao6u6YZbKNh+tai+7kkkSqxfqkNw4Dl94uHfuzunRyhhhlWYBPmeGUypFJeqDJp5NplT8onpYtUBtFz1p3bCe207CNwyli7W58Qgx6ZGb5eeSv8dn/8eTV04+yp9YfyJSVb5tvUy1wdKf+Vni0R2HtsImMQ8WCbeon+7qkSNW/NDGdIsN7YRV4Vkavww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+2I4E5ymUx2K4KjoTr/nrL47JWnZ73Ap2qG5vG/4xz0=; b=FU20Wls2fcZ59WiEPZPWYsjhIX88BaliCKNkyu8/s3ikVvYnGLT3nhkLbICSLsmXNkNRXzqTpnNEN+BPROyOer8O9Lsvd6IkROgABlH0G/QzLU/Mq3Fy84E4ywG81G69VZoEqRIfbxMyeDH5kKe1ghPtxNQVYSZGVFEZdf2AMXI= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6589.eurprd04.prod.outlook.com (2603:10a6:803:128::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Tue, 9 Jun 2020 11:23:37 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:37 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 2/6] usb: host: xhci-plat: add quirk for XHCI_NO_64BIT_SUPPORT Date: Tue, 9 Jun 2020 19:12:41 +0800 Message-Id: <1591701165-12872-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:34 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d673955a-6ebe-4096-0576-08d80c678dc2 X-MS-TrafficTypeDiagnostic: VE1PR04MB6589: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MDd4rcd39QKst4NuCi21b8xBPhoqERF1GnAIyHNyeyzaLXP1JC+szA+4pvf/CQCUUAEX8aT1RGVgxcYQELVLf3RR7cw6g/fHayIeaCxXytF1cPmz1GYWEAMbBMZP0xmyoz3BOr3ciLZ9PVRRi4lqAnEy11Hpt9zZUZQw+gPmiNfPx83SWcJdejTTg7pwKnUeXSnlxesq0iOOeSpGhWQjXRyb47AkEFeSEqjmOuXufyasD/xJEI97qt4UmwH3tfFEaFLmj8vbohoS+4QhTHKb763xw9y9JdEt+taCJ/BFSWswLREbnQSkYWnPZMzFzZ6onTyGk/iCbXX8U1aMvV7lbgY8huHO+EH2x9N+WtunYl5Myrktio5evRsIXDG65LKP X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(8676002)(4326008)(8936002)(66556008)(66476007)(4744005)(5660300002)(66946007)(86362001)(16526019)(36756003)(498600001)(6506007)(69590400007)(2906002)(6512007)(26005)(2616005)(6486002)(956004)(52116002)(6666004)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: naxa/der2HKEhyxheYmrOFYipNfsGKzeUcm4jvAsyGlfVaGjjZoZP0sMjEpIgN9JKKMKMMG8TXR0j8XcjvL2IKjxXyV/u3lY9SjQWgS5WYNAG79jPPikerhMjyZpG71c7n7NE8ZsamLkc/YsU4q3lCQJIdQFyBv4SijZH04NWBYaGC2n02+agH7seCu9svpH6cqV56tTcscdZ+/R30WT0b5cL90d4S+6gYqQLFOsw+pBjrY9muUCmMSNPodPhtzC5O+twBnbVF5DBIzFZtW5PRXiuDpNzz2Gt12GzENMkGrFYE7KOdq02HNED/rv5KwaMxi3yynM+AwKboOxFSPJn0DiAJx6bIJN6yyhg/lYPv+UaxPn1Zn8/LEsMEwTUYMwvgDFKODJix6qHkUGvtGnorn4MvgldrAVPwITdAdM9zOd2/DIv6+LR6yVsxYE617T3abUmeQGqOx6B2XPXNu7pJs34ExmI6GJtx95qrCF59U= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d673955a-6ebe-4096-0576-08d80c678dc2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:37.6150 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jxWbxQx7mCXZ1vxaiYkXQHdJD7TOz1SsAiBTuH57YvzpzsR4MSN/b9wVzy2PvTgB X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6589 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042343_731865_6FDABD12 X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.2.70 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.2.70 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Some dwc3 based platforms may also have the problem AC64 bit (bit 0) of HCCPARAMS1 set to be 1 but the controller actually can't support 64-bit address when SoC integration, so enable XHCI_NO_64BIT_SUPPORT via dts property "snps,xhci-dis-64bit-support-quirk". Signed-off-by: Li Jun --- drivers/usb/host/xhci-plat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 1d4f6f8..f782aea 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -290,6 +290,10 @@ static int xhci_plat_probe(struct platform_device *pdev) device_property_read_u32(tmpdev, "imod-interval-ns", &xhci->imod_interval); + + if (device_property_read_bool(tmpdev, + "snps,xhci-dis-64bit-support-quirk")) + xhci->quirks |= XHCI_NO_64BIT_SUPPORT; } hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); From patchwork Tue Jun 9 11:12:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595295 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 416F91391 for ; Tue, 9 Jun 2020 11:24:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1B029207C3 for ; Tue, 9 Jun 2020 11:24:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="boLEZ2M8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="E6zZCmcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B029207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T0pe1uOB3wBpdI9vIRyEnH6k2/cPbdFbKhghpvH9UCo=; b=boLEZ2M8ts1w6R +I4+ygTF+ZNlxvjqzq0Z6ZOUwQ/dq3e6aXrLfEhcMyHiPd4kK3M+1bUsWvkHNeiEcodFf94u5BReo EyPe2a5mlQegJVBOGowMbTdMHlu6edEBcgshdKfM77vVY+ocYNhacdvPWQzre2tALedWV4ndCIapF Y70Cr8S6LVaOKR7c2mIYngKj6d6R+oeWH0MDag11xzC5jelrEuJILP0/dHqIBoHsNZXNkkoiqvlaY APO2IpyP+fO8QJPW+gaLaf/ktx7BAz1NTbUSNjYl5yGQa+T20bJswB6QlvxKUSvAimcayu9f2H2mJ Tp/K8NjhHpclx2WjPklw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicMj-0002sI-Ql; Tue, 09 Jun 2020 11:24:25 +0000 Received: from mail-eopbgr20070.outbound.protection.outlook.com ([40.107.2.70] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicM5-0002CC-BY for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6NfUFgetmGfNFO5SypJw42P3RmAg6zc0CCu+VKHJkcNhKcize6BYDK/MsHeJkKO7675UCiB6t4N3QnsG42njQufGBnAnZR3eMcHoShsvJTOblU/AdVTxfDYB29+g8jyjYxoHZdqyqfRewmoZcuP9s5fNhPnnb6mAanHNMtmPHA1vuGpvlF6sBWrP66Bm5bGScHdb0PQbihbC4y0em3ETa+NkkvJHKKyPC+L1pohADf3N8o6J5EE7POCsOtq+Gd9JU7CKfmUzcOiN1thq3DPj23ddm1Hh3RQTIeiVc/4TmAbyWoJzKOz7/vxJMcUeJo398BDLS0M9D4a2ua8iDF4sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7kp8bj7T4nxJtCEHeWWp4HzvkwSChzVbMD6szEdH78=; b=eTC6uXm/y8pLwr3KmztsmFohGMM1Rph4TLF6me3LZOUMvBYkYSSqkxgf1MvWZQhbP9f9gXl6qNgYdqlwpcDX+NLuyL9YQmuY3q7cG48cUcyOJB03e70N/Fw+WQMWEfSBot7KDEDjY6SWV1PkQ6IXX4YaGKgnFqJanL6fwPXjJN6H8uzNdvbMfVS4YcuuXsfl2sqY3JAeX+QA7mcvLop6av33fcRexrDKUvdsHJ4ObDp15V76DdTTgYLhLC7B6iZVr1wCLy55468BfjvBItLISLqe6ebfAlxEYc6tnOrfzHn8jCTFhI/1b9Bv2r68E0+MSkU/mX3Kr7vmmEp5spymHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7kp8bj7T4nxJtCEHeWWp4HzvkwSChzVbMD6szEdH78=; b=E6zZCmcNvE91qLnKYzISUgrlMzO6f/uL2eYCZsF0qNlLIvSov263kyIEvWoR1bG0w08+uMYAD/Y5VLTP8agmjJHDSVOGeLHUZ0Kmg8pHg8LCRSOZaFritdw5zN/qIPEtvxxLbRun34QCoCNI700Iq/yZqkzVyZwHBCWwsqmNXu0= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6589.eurprd04.prod.outlook.com (2603:10a6:803:128::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Tue, 9 Jun 2020 11:23:41 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:41 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 3/6] usb: dwc3: add imx8mp dwc3 glue layer driver Date: Tue, 9 Jun 2020 19:12:42 +0800 Message-Id: <1591701165-12872-4-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:37 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 86846476-5e28-4f17-6ad5-08d80c679008 X-MS-TrafficTypeDiagnostic: VE1PR04MB6589: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r7iD44GSsSB2/jV0mkLNynXnUVxXxyVQqjkv0HnvaQSREI52Wl2DrRUJ7YMDEggqNT5whGHZSLNg9Z6UsBi/w+qaxLAuSKK0HkG7kLhyQe4OT89LDuWtpdg2iMCcYaHv+xGiIjzlPglb3sIzMRH1oxVevOumR82+RqXIHpaopjis8wXWBIZvKqy39XcmoZ7Ub5SljECHeqc/8ClkeeN9x5EJmG6wEDa44mAaSEFW7Hazg5+oJyXmN1kzvOW9pkdLpWz5BFlraCTELFIysRzhZhYXRPNq3bo8couDT2yip3vcAedgjCElc5/Xqragu6xjqRYLQ1tbj8O2xWBUYtDibBymvuVsLQEXFJguvi+MbyiRBdkih6BKngGxe6m7W87uK6iT8YwWMfp5dbz6JweBjg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(8676002)(4326008)(8936002)(66556008)(66476007)(5660300002)(66946007)(30864003)(86362001)(16526019)(36756003)(498600001)(6506007)(69590400007)(2906002)(6512007)(26005)(2616005)(6486002)(83380400001)(956004)(52116002)(6666004)(186003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Oe2lld5WTWDUPVGgnUl9dzqHJiJIe08+M2YG88J6wh233BIF/+iMr6WYX8w3p8IpOvjf0PxRtkb6wkYcGqmUVPsEKdwhoZZrsqxxvHysI+38c1W/xico93AUrNj//xA1RUYLsp9GAS02TlOH5kHXAUU8tNmajshVcMBQ8aLzbalbzhU67Z2cZECCW7THV/43yU3OHK/2FVOtX9mwua6BzcGTdcJllZd5q5SdwG2p9LVJOAlznC5fcveO3p9GHdG9JZctBw/GVd8ugr8Ka8uxV3Rpc/+rk9ZQrbYFyEASCFcMU7agp2gafUk4kNPXXdZ3HoKu0jgH/+UPxKnqw6mmx5c08Izfk1G/H/WkjRCOCa4LXG+dkpcG0XI8JLPleNOTzoHfr8kFAFYZGkl8oFNiYxzJOGLvoqfW5aCKTHJEdvawkd8XugEVHY+lbjnbpZ2IHa53isvi9H48jkrX7brZc02dnZo9OAFQ+0LrVS2Bq+c= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86846476-5e28-4f17-6ad5-08d80c679008 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:41.6917 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nZZBXWXPQjjAUuZsLXXVulMwEkeubzYZd4mUvmoibVxyJq+TQsDlaltro2YjaiKw X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6589 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042345_577769_8183305E X-CRM114-Status: GOOD ( 17.89 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.2.70 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.2.70 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org imx8mp SoC integrate dwc3 3.30b IP and has some customizations to support low power, which has a seprated wakeup irq and additional logic to wakeup usb from low power mode both for host mode and device mode. Signed-off-by: Li Jun --- drivers/usb/dwc3/Kconfig | 10 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-imx8mp.c | 352 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 206caa0..7ef2339 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -138,4 +138,14 @@ config USB_DWC3_QCOM for peripheral mode support. Say 'Y' or 'M' if you have one such device. +config USB_DWC3_IMX8MP + tristate "NXP iMX8MP Platform" + depends on OF && COMMON_CLK + depends on (ARCH_MXC && ARM64) || COMPILE_TEST + default USB_DWC3 + help + NXP iMX8M Plus SoC use DesignWare Core IP for USB2/3 + functionality. + Say 'Y' or 'M' if you have one such device. + endif diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index ae86da0..2259f88 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -51,3 +51,4 @@ obj-$(CONFIG_USB_DWC3_MESON_G12A) += dwc3-meson-g12a.o obj-$(CONFIG_USB_DWC3_OF_SIMPLE) += dwc3-of-simple.o obj-$(CONFIG_USB_DWC3_ST) += dwc3-st.o obj-$(CONFIG_USB_DWC3_QCOM) += dwc3-qcom.o +obj-$(CONFIG_USB_DWC3_IMX8MP) += dwc3-imx8mp.o diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c new file mode 100644 index 0000000..d4e9e99 --- /dev/null +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -0,0 +1,352 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * dwc3-imx8mp.c - NXP imx8mp Specific Glue layer + * + * Copyright (c) 2020 NXP. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "core.h" + +/* USB wakeup registers */ +#define USB_WAKEUP_CTRL 0x00 + +/* Global wakeup interrupt enable, also used to clear interrupt */ +#define USB_WAKEUP_EN BIT(31) +/* Wakeup from connect or disconnect, only for superspeed */ +#define USB_WAKEUP_SS_CONN BIT(5) +/* 0 select vbus_valid, 1 select sessvld */ +#define USB_WAKEUP_VBUS_SRC_SESS_VAL BIT(4) +/* Enable signal for wake up from u3 state */ +#define USB_WAKEUP_U3_EN BIT(3) +/* Enable signal for wake up from id change */ +#define USB_WAKEUP_ID_EN BIT(2) +/* Enable signal for wake up from vbus change */ +#define USB_WAKEUP_VBUS_EN BIT(1) +/* Enable signal for wake up from dp/dm change */ +#define USB_WAKEUP_DPDM_EN BIT(0) + +#define USB_WAKEUP_EN_MASK GENMASK(5, 0) + +struct dwc3_imx8mp { + struct device *dev; + struct platform_device *dwc3; + void __iomem *glue_base; + struct clk_bulk_data *clks; + int num_clks; + int irq; + bool pm_suspended; + bool wakeup_pending; +}; + +static const struct clk_bulk_data dwc3_imx8mp_clks[] = { + { .id = "hsio" }, + { .id = "bus" }, + { .id = "suspend" }, +}; + +static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx) +{ + struct dwc3 *dwc3 = platform_get_drvdata(dwc3_imx->dwc3); + u32 val; + + if (!dwc3) + return; + + val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL); + + if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci) + val |= USB_WAKEUP_EN | USB_WAKEUP_SS_CONN | + USB_WAKEUP_U3_EN | USB_WAKEUP_DPDM_EN; + else if (dwc3->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) + val |= USB_WAKEUP_EN | USB_WAKEUP_VBUS_EN | + USB_WAKEUP_VBUS_SRC_SESS_VAL; + + writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL); +} + +static void dwc3_imx8mp_wakeup_disable(struct dwc3_imx8mp *dwc3_imx) +{ + u32 val; + + val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL); + val &= ~(USB_WAKEUP_EN | USB_WAKEUP_EN_MASK); + writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL); +} + +static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx) +{ + struct dwc3_imx8mp *dwc3_imx = _dwc3_imx; + struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3); + + if (!dwc3_imx->pm_suspended) + return IRQ_HANDLED; + + disable_irq_nosync(dwc3_imx->irq); + dwc3_imx->wakeup_pending = true; + + if ((dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc->xhci) + pm_runtime_resume(&dwc->xhci->dev); + else if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) + pm_runtime_get(dwc->dev); + + return IRQ_HANDLED; +} + +static int dwc3_imx8mp_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *dwc3_np, *node = dev->of_node; + struct dwc3_imx8mp *dwc3_imx; + int err, irq; + + if (!node) { + dev_err(dev, "device node not found\n"); + return -EINVAL; + } + + dwc3_imx = devm_kzalloc(dev, sizeof(*dwc3_imx), GFP_KERNEL); + if (!dwc3_imx) + return -ENOMEM; + + platform_set_drvdata(pdev, dwc3_imx); + + dwc3_imx->dev = dev; + + dwc3_imx->glue_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(dwc3_imx->glue_base)) + return PTR_ERR(dwc3_imx->glue_base); + + dwc3_imx->clks = devm_kmemdup(dev, dwc3_imx8mp_clks, + sizeof(dwc3_imx8mp_clks), GFP_KERNEL); + if (!dwc3_imx->clks) + return -ENOMEM; + + dwc3_imx->num_clks = ARRAY_SIZE(dwc3_imx8mp_clks); + err = devm_clk_bulk_get(dev, dwc3_imx->num_clks, dwc3_imx->clks); + if (err) { + dev_err(dev, "Failed to request all necessary clocks\n"); + return err; + } + + err = clk_bulk_prepare_enable(dwc3_imx->num_clks, dwc3_imx->clks); + if (err) + return err; + + /* Double enable suspend clk to keep it always on */ + err = clk_prepare_enable(dwc3_imx->clks[dwc3_imx->num_clks-1].clk); + if (err) + goto disable_bulk_clk; + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + err = irq; + goto disable_clks; + } + dwc3_imx->irq = irq; + + err = devm_request_threaded_irq(dev, irq, NULL, dwc3_imx8mp_interrupt, + IRQF_ONESHOT, dev_name(dev), dwc3_imx); + if (err) { + dev_err(dev, "failed to request IRQ #%d --> %d\n", irq, err); + goto disable_clks; + } + + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + err = pm_runtime_get_sync(dev); + if (err < 0) + goto disable_rpm; + + dwc3_np = of_get_child_by_name(node, "dwc3"); + if (!dwc3_np) { + dev_err(dev, "failed to find dwc3 core child\n"); + goto disable_rpm; + } + + err = of_platform_populate(node, NULL, NULL, dev); + if (err) { + dev_err(&pdev->dev, "failed to create dwc3 core\n"); + goto disable_rpm; + } + + dwc3_imx->dwc3 = of_find_device_by_node(dwc3_np); + if (!dwc3_imx->dwc3) { + dev_err(dev, "failed to get dwc3 platform device\n"); + err = -ENODEV; + goto depopulate; + } + + device_set_wakeup_capable(dev, true); + pm_runtime_put(dev); + + return 0; + +depopulate: + of_platform_depopulate(dev); +disable_rpm: + pm_runtime_disable(dev); + pm_runtime_put_noidle(dev); +disable_clks: + clk_disable_unprepare(dwc3_imx->clks[dwc3_imx->num_clks-1].clk); +disable_bulk_clk: + clk_bulk_disable_unprepare(dwc3_imx->num_clks, dwc3_imx->clks); + + return err; +} + +static int dwc3_imx8mp_remove(struct platform_device *pdev) +{ + struct dwc3_imx8mp *dwc3_imx = platform_get_drvdata(pdev); + struct device *dev = &pdev->dev; + + pm_runtime_get_sync(dev); + of_platform_depopulate(dev); + + clk_bulk_disable_unprepare(dwc3_imx->num_clks, dwc3_imx->clks); + clk_disable_unprepare(dwc3_imx->clks[dwc3_imx->num_clks-1].clk); + + pm_runtime_disable(dev); + pm_runtime_put_noidle(dev); + platform_set_drvdata(pdev, NULL); + + return 0; +} + +static int dwc3_imx8mp_suspend(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg) +{ + if (dwc3_imx->pm_suspended) + return 0; + + /* Wakeup enable */ + if (PMSG_IS_AUTO(msg) || device_may_wakeup(dwc3_imx->dev)) + dwc3_imx8mp_wakeup_enable(dwc3_imx); + + clk_bulk_disable_unprepare(dwc3_imx->num_clks, dwc3_imx->clks); + dwc3_imx->pm_suspended = true; + + return 0; +} + +static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg) +{ + struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3); + int ret = 0; + + if (!dwc3_imx->pm_suspended) + return 0; + + ret = clk_bulk_prepare_enable(dwc3_imx->num_clks, dwc3_imx->clks); + if (ret) + return ret; + + /* Wakeup disable */ + dwc3_imx8mp_wakeup_disable(dwc3_imx); + dwc3_imx->pm_suspended = false; + + if (dwc3_imx->wakeup_pending) { + dwc3_imx->wakeup_pending = false; + if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) { + pm_runtime_mark_last_busy(dwc->dev); + pm_runtime_put_autosuspend(dwc->dev); + } else { + /* + * Add wait for xhci switch from suspend + * clock to normal clock to detect connection. + */ + usleep_range(9000, 10000); + } + enable_irq(dwc3_imx->irq); + } + + return ret; +} + +static int __maybe_unused dwc3_imx8mp_pm_suspend(struct device *dev) +{ + struct dwc3_imx8mp *dwc3_imx = dev_get_drvdata(dev); + int ret; + + ret = dwc3_imx8mp_suspend(dwc3_imx, PMSG_SUSPEND); + + if (device_may_wakeup(dwc3_imx->dev)) + enable_irq_wake(dwc3_imx->irq); + + dev_dbg(dev, "dwc3 imx8mp pm suspend.\n"); + + return ret; +} + +static int __maybe_unused dwc3_imx8mp_pm_resume(struct device *dev) +{ + struct dwc3_imx8mp *dwc3_imx = dev_get_drvdata(dev); + int ret; + + if (device_may_wakeup(dwc3_imx->dev)) + disable_irq_wake(dwc3_imx->irq); + + ret = dwc3_imx8mp_resume(dwc3_imx, PMSG_RESUME); + + pm_runtime_disable(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + + dev_dbg(dev, "dwc3 imx8mp pm resume.\n"); + + return ret; +} + +static int __maybe_unused dwc3_imx8mp_runtime_suspend(struct device *dev) +{ + struct dwc3_imx8mp *dwc3_imx = dev_get_drvdata(dev); + + dev_dbg(dev, "dwc3 imx8mp runtime suspend.\n"); + + return dwc3_imx8mp_suspend(dwc3_imx, PMSG_AUTO_SUSPEND); +} + +static int __maybe_unused dwc3_imx8mp_runtime_resume(struct device *dev) +{ + struct dwc3_imx8mp *dwc3_imx = dev_get_drvdata(dev); + + dev_dbg(dev, "dwc3 imx8mp runtime resume.\n"); + + return dwc3_imx8mp_resume(dwc3_imx, PMSG_AUTO_RESUME); +} + +static const struct dev_pm_ops dwc3_imx8mp_dev_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(dwc3_imx8mp_pm_suspend, dwc3_imx8mp_pm_resume) + SET_RUNTIME_PM_OPS(dwc3_imx8mp_runtime_suspend, + dwc3_imx8mp_runtime_resume, NULL) +}; + +static const struct of_device_id dwc3_imx8mp_of_match[] = { + { .compatible = "fsl,imx8mp-dwc3", }, + {}, +}; +MODULE_DEVICE_TABLE(of, dwc3_imx8mp_of_match); + +static struct platform_driver dwc3_imx8mp_driver = { + .probe = dwc3_imx8mp_probe, + .remove = dwc3_imx8mp_remove, + .driver = { + .name = "imx8mp-dwc3", + .pm = &dwc3_imx8mp_dev_pm_ops, + .of_match_table = dwc3_imx8mp_of_match, + }, +}; + +module_platform_driver(dwc3_imx8mp_driver); + +MODULE_ALIAS("platform:imx8mp-dwc3"); +MODULE_AUTHOR("jun.li@nxp.com"); +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("DesignWare USB3 imx8mp Glue Layer"); From patchwork Tue Jun 9 11:12:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595297 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F22FE1391 for ; Tue, 9 Jun 2020 11:24:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ABEC620812 for ; Tue, 9 Jun 2020 11:24:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RnNXTwDk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cyDn+hvB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABEC620812 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pdwpwsDU7KLMHZZKAKfj0UZN1Teuq1sjFhC1CEsRomU=; b=RnNXTwDkuJdbo5 ak7v6C31NyiGU2uNTdgWkM9kNkejWUv366hBFoflaXCutEUhLIFzNMhlR5j0nG/ETv7B6jbnH7rxJ OlhChnNiNLd10V35a4Vvn0aa4+MLSYQIMmTMxv7Z7yfwEl11AwadAbZocXgKB+/GUhxQ8n7JmQ2at wNUC297/rlxYovlIM81IGaODYFIFVDjhHTHkyT0gbspJfnkGL/HUwGhswohqndCQRvtToFbvdL1Ss vTQiXlonOPnb/67kiwpZsL6MylSVYbH300ExBo/YlO9GPVsa5n778NK1t6jZCbWXFebsIlyrv6EK4 N0pS7ppLn+6y24P8KiLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicN9-0003Bp-Km; Tue, 09 Jun 2020 11:24:51 +0000 Received: from mail-eopbgr20070.outbound.protection.outlook.com ([40.107.2.70] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicM7-0002CC-TB for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bJ3eX1D54W2wYfeSL6z9AKsp0SY5d5ymMbzOsabwACn1K16qv+aeqktcO1H2cTE3jlRjjqLEvfH2ZAwR7n1HkCy8TdgE4m5v5/tk/1pLosTw7Z/fvOG+z4ROfT7/CUtIXxfkgDRUDY0XwehiNVab3PG/4QaDm/iFjSDBoNLKPcAPs1gvn0syMI3OZDduCRWfnm0OUAzGiQhZCj1ij2/tD2jPjytAFe9JEQX/oIxgeMJja7pRNOGuPn1l1bQ6pCCm+pn6jPSy2eHGUQXAG6mOUtHgEjBYLAZBYE+QIPLYjcc2m8T3iuKoZqRUSAW/hMIcuWQHjFz/zOvuMu0Adqhaow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v9vjlQyqVDnTL6D2PcHulwJP09ovPZl4b6VF3ZnoUME=; b=j2iu+sJGjmfDsEife+WTnDRvJGVf4iSRgZ+e7/RNi4gIIPrC5r8e1i+Fw74791og5XN96OjpNB0K9GEYrSs4U07UIsh5HqyKtLL7m1swFveL1x4Ev75ofZmRAv/Gr2dwCml7HNM3mkr7c+uJoaI5DCPIu1HINroZ8y6yV0OYCfmBk3trTaHzeyn04Gc2vs7ffZqycifAd9P2bjomUlXpMtMvcR9czerYyYb0nf+ugPiNOjaI+u/PO26LyEVmFnRAxfofMcgddMN+AohWdQUtoX0SPX57JvOpcDHZ9nEN8X7Ms4qP9ZgKWzX4/xQP5+gIJM77a+SZv0Zrd0t0qIFLlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v9vjlQyqVDnTL6D2PcHulwJP09ovPZl4b6VF3ZnoUME=; b=cyDn+hvBrL6D2cGflsV6Yre8E/YeZST9zz/Wy14eYy5AhsnokF8y4GbvtaBQVQ+H3dy6qZw8vHb+RK7PVTVok/0w/WJJ2ZmvxTqOp427mGviT44OmMJIG1H5VDaOZ9ld4h1pyvD0SCR2b7kitzG54vGgepXHCgVamOH/VdXyoU0= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6589.eurprd04.prod.outlook.com (2603:10a6:803:128::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Tue, 9 Jun 2020 11:23:45 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:45 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 4/6] arm64: dtsi: imx8mp: add usb nodes Date: Tue, 9 Jun 2020 19:12:43 +0800 Message-Id: <1591701165-12872-5-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:42 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6c2af535-833c-4c67-e7e0-08d80c67926f X-MS-TrafficTypeDiagnostic: VE1PR04MB6589: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bo+lFgJbHKsjQLb9/9JhbkrLkOJIOI27ypm9Qj7KfrMqbJiACZBFB0CHec/d0rd89S7Lw/au2z3tus7sDc2TUj0wNtEqo+uiBLcNvW2cR3SM7GdTQ6QZTL5VNOweVqkg3VY/JCk1L9EXiMSJ6/6Kp36L/yOCXOmtpjkGPsHu4f49aXENcsGXFcsrGkpnRHFWG5jGrAyLafi7g1VT+59N3WOoT4BJoxohiDPppXC2YyLZvVvQxAKxsb+Xm0GBa6bMEdjb0LPdJIsQ0aYAgznG7AlLAyUGfDu/tvOWBG94NA7IJA0DH8D3YavmB5MsiZPw7icmZkwWplvkjuXoI4QM7JhZjhjnIWqMl8+x8ZgBqeDd/eVRzf800bfT5Bdd3M1Jlv6jlXuFY7alqKgnYGvqrVNAjO9AbSscfJ1WU6JGjBg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(8676002)(4326008)(8936002)(66556008)(66476007)(5660300002)(66946007)(86362001)(16526019)(36756003)(498600001)(6506007)(69590400007)(2906002)(6512007)(26005)(2616005)(6486002)(83380400001)(956004)(52116002)(186003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GtwYerJbBGOc1gQHF+5++ciOXnS/wYCWY36PnU37Gp292ktyBBY77V8nTS5VTT2jpAmuPvdL1Ey/xNo4RzfyQTsP9M71nRNeZlHZf0j5zwycEGMYIruzI+xHQqIwayvokobC9fMdfifoPqQsuAiZXyVeUQ9PAbX1Rqn4qkD0W/QLrbDR/1QVueXzJez/LrImaf90v7zDf3iKAwjqNKj7c4SltQHXai/bBi3KSNdY3eA6/40/iSRKNXvEPKlUad9qaQB69SkrA0033NyX0psSE9/UJoeBKSEGpWJjzQ4Ev4JvxnvIo4xmeeG8Ji70Pa347zvcwcx1N4mOK0AUPBwP+oUcrAx2r9JMKmL1dC6d4FHz79jFQvtqj2eGVPpKgx2vc/CEGqsl+ZC2TthpUxU4Ixn67j1maJJarR/rc/QPmo1uHC2h9jnTN6imN0ukQjL86lhztlbDgDPRt/UxKCurov2b2K8M5x+YURV4C2BWpJk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c2af535-833c-4c67-e7e0-08d80c67926f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:45.3315 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: of8FsjKhrxKCHA3Mp2WXinzZXrb2iqUagOpQM/jrrIT0SOobCAyggoxYPP/sSu5s X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6589 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042347_947117_4F4EA1AA X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.2.70 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.2.70 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org imx8mp integrates 2 identical dwc3 based USB3 controllers and Synopsys phys, each instance has additional wakeup logic to support low powe mode, so the glue layer need a node with dwc3 core sub node. Signed-off-by: Li Jun --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 9b1616e..b0a0de8 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -650,5 +650,84 @@ interrupts = ; interrupt-parent = <&gic>; }; + + usb3_phy0: usb-phy@381f0040 { + compatible = "fsl,imx8mp-usb-phy"; + reg = <0x381f0040 0x40>; + clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; + clock-names = "phy"; + assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + #phy-cells = <0>; + status = "disabled"; + }; + + usb3_0: usb@32f10100 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10100 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_HSIO_AXI_DIV>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "bus", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI_SRC>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + usb_dwc3_0: dwc3@38100000 { + compatible = "snps,dwc3"; + reg = <0x38100000 0x10000>; + interrupts = ; + phys = <&usb3_phy0>, <&usb3_phy0>; + phy-names = "usb2-phy", "usb3-phy"; + snps,xhci-dis-64bit-support-quirk; + snps,dis-u2-freeclk-exists-quirk; + status = "disabled"; + }; + + }; + + usb3_phy1: usb-phy@382f0040 { + compatible = "fsl,imx8mp-usb-phy"; + reg = <0x382f0040 0x40>; + clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; + clock-names = "phy"; + assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + #phy-cells = <0>; + status = "disabled"; + }; + + usb3_1: usb@32f10108 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10108 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_HSIO_AXI_DIV>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "bus", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI_SRC>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + usb_dwc3_1: dwc3@38200000 { + compatible = "snps,dwc3"; + reg = <0x38200000 0x10000>; + interrupts = ; + phys = <&usb3_phy1>, <&usb3_phy1>; + phy-names = "usb2-phy", "usb3-phy"; + snps,xhci-dis-64bit-support-quirk; + snps,dis-u2-freeclk-exists-quirk; + status = "disabled"; + }; + }; }; }; From patchwork Tue Jun 9 11:12:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595299 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26549913 for ; Tue, 9 Jun 2020 11:25:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 74CD1206A4 for ; Tue, 9 Jun 2020 11:25:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MmstRURJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="H0d5X8bO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74CD1206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4JSCFecnDMJhDlmxJf8eKnVjBRar1nPBfbqohvOEPnE=; b=MmstRURJgs0+Ck kj8X4Lyi7JXuuZRoSUbwYbDVSxodjH8WkpaXhHlwWAYg5nOhmJrBbhfEi0WdK04RvU6kjf+hlmMPY J4MJjvnvF7rppDQqYr+SyxBf/vtObIFBzrYTsiiitWDeC0rw46Fb4WIQpaBplvP03NW20CpEXp0ed xprriNxNYsIgIkFdJbgreUmC/Wz2zybQGb8nreQVLN6QditXPNkbblzibkOUd+1boE33JXHAo2rpn mZjZezOJE3fNL01mUlf9tUvMMrdM73InGLBojCnZxGRecMkSQpW8XiaOD7XFSYlYA9fqooGzcUO/w ZTyufzFjAFaTgsgHW9mg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicNd-00067C-8G; Tue, 09 Jun 2020 11:25:21 +0000 Received: from mail-eopbgr140042.outbound.protection.outlook.com ([40.107.14.42] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicMD-0002QG-RZ for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U475S3149HZoTnD/YRuP4lNMn3+FZLBMtJ3AFTAjycGWOpf0uHnEScs+1Hx2uxqOF73hVSE91zCTcwh5JSUxaqFFtklqOaDlVmJ5+enMpLd7uG0HTV9OEf8CMaxellUKB6nyzhG0uKv7Bp6NE/MJOHi3A8B7aHBc7weCU2POhuIso4O8/8ISvQMpc/DbeHn0727y3F3uwL9Ry/UrGUlORYXfkr5NRVUQ3MXw7wJA9UfnImAxj4xTfCKCdgT4ORko2Na/J44Bi2bgM1g6pWGJVL3Gn8vFBRVTUqdHK6jHCjITezihN10hdBhwjkify3vvIGkRGbpUAKMa6sLewHkjdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ur3qjH9e9P3rT8fJg5DFtU/aRKtEyuKrmcab7NQHpa0=; b=XHJ4QOp8l0eIqs75TbcqezcDh+Zfu8BJ+S8lFvUzqXaDwSQYQmyUeQ/U1jz/S5t9SRPveO7Os9ku9Fau5NZXyQMk0iPI9L+/999bxtXtTgx1/xyndTyeQrgkLtTeQ2stAnty2h9aYUk3NrJgv7hqyIfTVtqDrJBM53eBjJ1sTYBHbx+B1Tt8T96VSxmfCGvFyCCkkA2VvSESmbDjRXNy771z0EYZJO6LuVn6Kg+shzfK4apWuSJJsIDaOOEz5Xa1GCn1OLu3IT+BeGKG1CPjxK91G+oHQzqiQ1g4bC56y/R4AKoK+8m7CFVxJib2+UtcL9Cg1YzES9X0ZIf1OKYqTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ur3qjH9e9P3rT8fJg5DFtU/aRKtEyuKrmcab7NQHpa0=; b=H0d5X8bOm8d+vmoxxRk/k+UQxu4v9XBcPuDVqYcLSCGMdiwWHc+gje874W066UTaTOqQib/wndzPboLJ26V0+g5N7wPSzzze+lIjVQ95fxjIR6/6vMqQBhXUF+HJHh+NQaRGeomXdKPEvl7Rlq59pRLLZdFyyneQwIl3p3whAr4= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.20; Tue, 9 Jun 2020 11:23:49 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:49 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 5/6] arm64: dts: imx8mp-evk: enable usb1 as host mode Date: Tue, 9 Jun 2020 19:12:44 +0800 Message-Id: <1591701165-12872-6-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:45 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cfd6d3e6-bd59-4d81-34f2-08d80c67949e X-MS-TrafficTypeDiagnostic: VE1PR04MB6528: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:200; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IqaDeP/VzQTghCmgOFsNgLsDldE4hLWr0+rc9aQ1eYeigm5GX7SP4EubHIZ5pHJTbz4fP3EK4l5IXRNt5USP83iBe34x4t+n/OgfpB+YebHCmTsrbBnNXws3cC8Z1hrQiD0KMoZgkFEMAWq2BMOx27cu79FjwAFPrV13zgAX7Ch3fUTD+Avc4ylRwPSK2hYmmyaH+E+SatPVKO9VIU0FAo5v5LrYIKbDjphUqqX/CVd3dpWqDIWfWsxgoAMf7YQdLCBqyczMnNprCj2PIvR6CN7urvcE8EHmq/9wUzAih1NR4F7k2iYJor6i9RaZgHnZUW6IbYZkT1Of/y8DGJGhCTXy61E9C+WOkSfF+ZtbPpVnJaC8lglPsN3s+mttoYQN0WSeurxmQrcL3mOekw4NE2QRzdyk3IEtTiVDNuHqKOvZePJBJJRgIyFOtO+tplkhKZtpBV3Ske430F87bS/bGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(66556008)(16526019)(186003)(66476007)(26005)(66946007)(69590400007)(6512007)(498600001)(6486002)(52116002)(36756003)(8676002)(86362001)(6506007)(2906002)(4326008)(956004)(83380400001)(8936002)(5660300002)(2616005)(32563001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5/i08jes765fokUNtG90AgfJCVeGRHQjEl/GrXWeJM/ycl3hD1NpNEejkr2mo6LpWxNlh14Jy9FWPxeEuX/KDVMYbQAD1oUJx6VRklmQzb1ZE/yV3tq1cyEsGJWdHV/dep7I95Xz526VFU2UfLuZufIaqd9Px8sA8r5ErKgtApg8Zr4isI5N144fQJOw8lnbFC3TxFF+3nHo7ekuBE0RonNYQZj2f9fG2XH85SEpDfx1eLMCCe5c3o05sFupC22HdWKVzVpQfMpddj+YuVU3Qy3GIFwP0bDSUT+6pnuHRyRDXF9O9KwjmHegByHdcWxHVLNIt0SjW7rJVrYLFamcZvfyPU9N0PoGeIg3mMUD2lQA08AuefJG58PE2qu/BVV22aLW+YNSOWrsOnOy84s9ffTWg2k512200r4PHfoDgdBqOUfvVXS41kgVNMZVrmdQynPR+I0g7EiM1i7DvSqNdaKuempjO+yd3FW6eQ+WW8w= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfd6d3e6-bd59-4d81-34f2-08d80c67949e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:48.9674 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EdIQWzQXUumpu2qFxr66R1Rf5Opy5vKmSYP3IZnnDmI0F8qlnm8XPOcBW//q73Vd X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6528 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042353_944628_B88A0503 X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.14.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.14.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable usb host port with type-A connector on imx8mp-evk board. Signed-off-by: Li Jun --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 3da1fff..fbe056c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -43,6 +43,19 @@ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + reg_usb1_host_vbus: regulator-usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1_host_vbus"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb1_vbus>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + }; &fec { @@ -91,6 +104,19 @@ status = "okay"; }; +&usb3_phy1 { + status = "okay"; +}; + +&usb3_1 { + status = "okay"; +}; + +&usb_dwc3_1 { + dr_mode = "host"; + status = "okay"; +}; + &usdhc2 { assigned-clocks = <&clk IMX8MP_CLK_USDHC2>; assigned-clock-rates = <400000000>; @@ -172,6 +198,12 @@ >; }; + pinctrl_usb1_vbus: usb1grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO14__GPIO1_IO14 0x19 + >; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190 From patchwork Tue Jun 9 11:12:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11595301 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56AEE1391 for ; Tue, 9 Jun 2020 11:25:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0DFB8206A4 for ; Tue, 9 Jun 2020 11:25:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pILLirJ3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="IljScxy/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DFB8206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pY8IKSksnXFn5V7UtB32azWW3A6X8r4AiAqYceq3+Ko=; b=pILLirJ35GzR9I lF1OTfjMHASr9LfAUDLZXxrOlJN3y6NaLAmkyV7Ul2U4TT4oq7/1haxWHMf+z3tSl2G2PWz3Ei6Yf bHRvoiMa2gMW0vXyzKRm9SdI7KhPiEPu7MhRtQgvKwqw85j1JJq0PRQkOKHJnVl5FX7Ab9WwoFiI+ bqW8txLcSkcMs7+L76xJpTMzdmz0ZP0p4cl7noIduE5WYAmi4r/bG+wiPhxwOWsMMm9lgW1LjHbMz no6TpIjEOW7wN4pZnuAmaBydCwhAjwFWNzQjf4r6rwPJguYl4FKHmFIY+w+tTAE9onc5EYxKwSn3H X4DdeYXwzzQ7LMwFf13Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicNv-0006Sf-B5; Tue, 09 Jun 2020 11:25:39 +0000 Received: from mail-eopbgr60062.outbound.protection.outlook.com ([40.107.6.62] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicMH-0002U5-8r for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:23:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YjmSV/Lya2LnxEvvsfEPOkAHGcJgey4Iwj2Vcr5nvOHEjqWcDxZm5OWVpY0q+EzR60ZEcGzjj1yI3Ktohw47XNCXpm3dpzVA0PVBSECmJQ96plEmOV/wkD+QcSrCHVL5f3trABwKc/UcBk3NSVkyi13KtGDMUniRCfKTDkwIVPxUqFbqdPrYszxdHD5FObNoURFmsi2Gh9uxak8dJZWYgGSlCO3+Int8ik0Qqg4KjM6nkChtkQ0WVf6L4Vp0z0izlZyzG6q1QAXwvxihtqdZQuknFpWvdvyB4QFUQGtK0yjPZ8gfveIiYKqOO/BrB1bX6fQRayUDKu092+M1CTxt6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qb2iSjwpZHYsE3KCI9+2iTK60OIDs5FkpAvv2TiiRBk=; b=EMlik7tibEkS/KTskvIND0kSb6QxHTeCA4Wy3hiWJMhFb40sEw+DJM91nfoPHHVR2FRm/cL2UihjZrlwAJxjbq7ATkgM5otBlvGa0KDIvKt94dUbWmGzCLEc9KyCnBugSYjmwJjoSIVnafXNOzXsIqKo08/qb+JLaJvS4ro1jXCbM6tz27UHLBdwFEzqU2Sikwt6pdCRdqKgV3faDRVjkOVK/RnhU/3l/nXHqayLvBBMZRrMA4PdDGZH0wSKHsE+3pR3/FG+3Q8qkVcCaTOIsivCFm2l9PgcaPho8zlxIkjTcI1DSxiIowvzNluUa4xBf6Z5pFOkxG+RhYFTndNKVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qb2iSjwpZHYsE3KCI9+2iTK60OIDs5FkpAvv2TiiRBk=; b=IljScxy/uAEVOnpCEEnrwEewpJMVD4RFROlAkv03nJWX5b4ILMgaQijgHbjQqct6zr68VX1KXDI4lT3wOuQgojqvxuNlchNL+RbRNpChvG5oQOZ0ZCWgFt2RInjhsEoKreZNXza+fqMBiCBBcoz/QrUEWeiBwsrKYCzsC1L29QY= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6622.eurprd04.prod.outlook.com (2603:10a6:803:121::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.20; Tue, 9 Jun 2020 11:23:52 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::5086:ae9e:6397:6b03%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 11:23:52 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org Subject: [PATCH 6/6] dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings Date: Tue, 9 Jun 2020 19:12:45 +0800 Message-Id: <1591701165-12872-7-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591701165-12872-1-git-send-email-jun.li@nxp.com> References: <1591701165-12872-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) To VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0069.apcprd02.prod.outlook.com (2603:1096:4:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 11:23:49 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d8e4a52f-f952-48a7-1a59-08d80c6796c6 X-MS-TrafficTypeDiagnostic: VE1PR04MB6622: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 75IXlFsjAFA8GMKdQdW60e/3+0tP2Hr1TMjbh896dfjBrhiGoSJ35Z7Z8GZodU7GnB4hEZvYoNCZXcgNQizMCiMU4FV5Gl5ChSeDtJzoqUPmGZ9sUrEerZkyidG4zwKKUADIkcwvqmYVCpLXaLgfJVWcwScLN9ivbE4Z5DTGImIagbWQpZ+LaqJfxqRqtQjrULUWGCLTDn7XKmQI3NNMNT6RDRGFxcvJ3mtpwb5K6UZzOLBGtfitLQbiBmwdt3SzwY+wzTP5SB+0LhkjZwAS3O+6kc1xBrXiYrbNxlXhnrau0oTrqTdqxH1fBy5PjJojG2Vpo8Vl+UUlkJ5qLGeRrcpxwDiZGNcd7pjRfQxD3g70TYfTViNeJ+M4MB6qs8AqMESoLkKvHR8Pc6FtTkdPnr4EBC7kG6d6hyH6LvYlKgeg+2CfX/Lhmu43xwHZZj6ut2s03FnBuvn95daJGlsYylqIHsdi5oCE6Whr9mzwg0s= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6528.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(26005)(186003)(8936002)(8676002)(16526019)(4326008)(83380400001)(86362001)(69590400007)(498600001)(5660300002)(66946007)(66556008)(6666004)(6486002)(2906002)(6506007)(36756003)(52116002)(966005)(2616005)(956004)(6512007)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1jJfodwmo/x3L5t7kzK4I/qPsSkaiePyY/sTAAjsuXoumge8QfesHCi4iaeohaoyRkYCMhltsCSqkTTI714of106LU3s0FHSrstXVkW5GIdUUG73oj7DNNi1vkbjJKCdYm0WSRtsIUAFYxpPUjOBT3VKBPnsH5HlSB2jnMAWgax9HG4SRwj2iKLB+VZHm7cqhuiaKs01ZaNIhm6zYyzUineaYEDtc/C8eLswAcGTHQ/XGSs+1INP7ATRalqpsc7bu3BLu+CwMq+fxHEEqUumeZOtsS0ovQ152SPnH9XaMDvHE6yaK9yQo5+3utobnZaPGHN5WLc/h30H+6pbwUZj+9icD7uEkLat0eZLmWY2i7A/cPoSSRO2Ri9D5R84KoWRM0VZiGe4wXlNKVjQrxaqQLLv/1gUf/zz/HlklC4g+JyakZM7LZ5ACyNgQB6FjyHpMx9qo1s9tewyU7prw5fwREFEfF4kCkK2FOZlFv3msL0= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8e4a52f-f952-48a7-1a59-08d80c6796c6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 11:23:52.5943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iPfPrZz/2vef+Hdxde735Yuk+5KomyZV8CyTT58aiIzgWNerkNea/4x5HZs7ceZz X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6622 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_042357_373032_E7A969D2 X-CRM114-Status: GOOD ( 12.50 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.6.62 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.6.62 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org NXP imx8mp integrates 2 dwc3 3.30b IP and add some wakeup logic to support low power mode, the glue layer is for this wakeup functionality, which has a separated interrupt, can support wakeup from U3 and connect events for host, and vbus wakeup for device. Signed-off-by: Li Jun --- .../devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml new file mode 100644 index 0000000..823db058 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2020 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP iMX8MP Soc USB Controller + +maintainers: + - Li Jun + +properties: + compatible: + items: + - const: fsl,imx8mp-dwc3 + + reg: + maxItems: 1 + description: Address and length of the register set for the wrapper of + dwc3 core on the SOC. + + "#address-cells": + enum: [ 1, 2 ] + + "#size-cells": + enum: [ 1, 2 ] + + interrupts: + maxItems: 1 + description: The interrupt that is asserted when a wakeup event is + received. + + clocks: + description: + A list of phandle and clock-specifier pairs for the clocks + listed in clock-names. + items: + - description: system hsio root clock. + - description: system bus AXI clock. + - description: suspend clock, used for wakeup logic. + + clock-names: + items: + - const: hsio + - const: bus + - const: suspend + +# Required child node: + + dwc3: + description: This is the node representing the DWC3 controller instance + Documentation/devicetree/bindings/usb/dwc3.txt + +required: + - compatible + - reg + - interrupts + - clocks + +examples: + - | + #include + #include + usb3_0: usb@32f10100 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10100 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_HSIO_AXI_DIV>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "bus", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI_SRC>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dwc3@38100000 { + compatible = "snps,dwc3"; + reg = <0x38100000 0x10000>; + interrupts = ; + phys = <&usb3_phy0>, <&usb3_phy0>; + phy-names = "usb2-phy", "usb3-phy"; + }; + };