From patchwork Mon Jul 6 09:44:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645307 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 4C1D992A for ; Mon, 6 Jul 2020 09:49:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 254C32074F for ; Mon, 6 Jul 2020 09:49: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="pWiQDSnS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="AB3CAvfO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 254C32074F 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=merlin.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=Dui5fCZo+nzfeCN34foyn6W11Ra94tgJtGzIxYTUTT4=; b=pWiQDSnS5jPLK26OaynGocnKp LIWyQMBnmybzkIB87mBpAz5QSSk6oC31zWf9bR0xh/VNE49YojVWsOlpoWnJg1rb4skQ0OlpcXJDg hGbav+qY3odbrVZ2fmXP/6uC6qGMZss6/iNtG20CG6voAwtLl2UIgLs6VvYFm8rA/Us3eGr/TWrzs gIsrTCsz48fsXu8NXtQ/vdV/e9Ufby4cZ+e595ZPQSpRLf62dBTMXrAgqVKJhWtHx55PHpw4EJCig oY85YSEjToQgp7qudAiES9ITBpancXwk6MlI4toTSrepAfCnA2xr6NnRklHoF4i9IORC8mS8b4zes iRtL3WiDg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjU-00073x-Du; Mon, 06 Jul 2020 09:48:16 +0000 Received: from mail-am6eur05on2059.outbound.protection.outlook.com ([40.107.22.59] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjR-00072u-TR for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lbbOPHCGj9zIZnlEgakCLGDufV4Tpr3itG42X9/x3RHO9pZ/gvzSWwx+G/zfJuOYIj1AZ/VQOskvc1MASXNsBZ5qxwlPFxAczqEivMSJfkklke1JKeZOhK16NWAMyCSAJnuJHRPNQrNNrmuSEr7FPT8cgTR81YxokKSsb1IPJoqWstFCTRX0lucMm+T9ktr1BhewnDQmZB3Z/GIPfwhFlIglCSnElOC+HckwrX+wZann0ru0BqFm7oWHVUNXiYFx8NtSpW0SCoF947ZFYFZpOBAes/4Reh819Z1yfkt8vkIlxR7EoZVel3C1CHWuv+Upz8JgeaoXJFiB+GxEJVXRGg== 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=d5z041zoxAKG7Y8lm3GtfSokHblVRMFY/kzIHvWzMys=; b=l0skVZc8Ni5sZ1a7JJW3ETxB1aNmZht4GqtKRQLm8l4x/UbbnhX94p9/iugSUYSZnx/xvifOPjxAs+gSmwulrNNyfbrdqUboltMvo+jqSYORB94ReY7ISXw4r/clJ4wOKbZBOx4C8QAhuea49s+FY0ZNbnHSxt43lMF+K7Vvgq3AJA80sgtoQSIXkZ/UY1UtyPZixyK+dQz5EJxkkjhguhCaj1iGKq1mblLUFALYfN29quLVm75tw8foPl0rcvH2C6kP9Ah3++HlHMPKzul6A1jBpsgirCVjRjRmmRuKeNZR2EsfUDcEWO55qSPFu/DQmTTLpapmowfuykD6o/fWzw== 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=d5z041zoxAKG7Y8lm3GtfSokHblVRMFY/kzIHvWzMys=; b=AB3CAvfOrf/nvVGwv/IKkJ/zUVgAL4t4s/RfJJbOelPL+dla1rtjd+pt5OZyyxRuHAsaMQ+dwyFZJ/iJ2y/wRl1o/j6GbR4IvOpjwiEvrUwqoE7wA9bkJNb/SOZ9IRHx4f4SQa3Ck4vVnZl3e5RINKnEtuIbQgPJlNd/qX3PgAE= 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 VI1PR0402MB3520.eurprd04.prod.outlook.com (2603:10a6:803:6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Mon, 6 Jul 2020 09:48:11 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e%7]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020 09:48:11 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 1/5] usb: dwc3: add platform data to dwc3 core device to pass data Date: Mon, 6 Jul 2020 17:44:55 +0800 Message-Id: <1594028699-1055-2-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594028699-1055-1-git-send-email-jun.li@nxp.com> References: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) 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.67) by SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.20 via Frontend Transport; Mon, 6 Jul 2020 09:48:07 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 51f92c73-3204-4dac-173c-08d82191b22d X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FMhbqY+lh0/qYlRRaPA4TyRfjCxHwwvvzkLPowDzzDGF/tUVYb68yUPha2Npg+4LzNF1OhGYnK7Nf9wz/eDrQ0CNjWbsO4FkBFKclqHXiSqGkQXwmWedDxwkHZVHw63zFt9/gk1/rTmTyh7fDmuhLOfy3N5OA/0jiFB66RU+GZhCoQxSI/X1Ml5crg4PsOBQ2Wc3GuykEIwF67Uos+GuNBd0tW+E6GW5j83sWgOhvnW11WB48J/IDeD2tkSkBV2L56J7gvZWhY2yPKg+IL91x5V0e+h+QeUQ4PyV4nQodf+tGZZ8pwWgc6GocQz/6ebE86SHq7l1thS6bD6bk+iIqJZQR5JTyITTm/1/XKh7c+uccoABFrv2hl8FYIFa2u4p 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)(39860400002)(136003)(376002)(366004)(396003)(346002)(8676002)(52116002)(8936002)(956004)(2616005)(186003)(16526019)(2906002)(6512007)(6506007)(66946007)(66476007)(69590400007)(66556008)(26005)(86362001)(478600001)(5660300002)(36756003)(316002)(7416002)(6666004)(6486002)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: z/zO//SlnNXPkHcfef43Z1Nemo6EanvlQQs1MWVAnSc/BDWGqkeOgi+h1tg/hd8nYTK3AaZPv6JLLBtijemSdV6D5+wdW+0VtuScHfDahTpTD6Bw12CSKEF+NgdzuLdA73t2R/CkASTc5F03IJLL4RZ9rAlYrwha2sv8rqbcMjkkWUYMdoc2HmwAMcPLYh00DTZRSlzbFdqxnAgo+OSjikS+aou7TCWBzz4DSiIDq6Gx/kjf26vjsCoELJoF78q1Ql/Jcv5O3910NqxkxEGBLaicO/CY5q7utaNlDyeIVEYtPLKqkNipRyrPx59GaonQ4NaGT8XJntlogxpUF5dLgUM4qqlPtqQrqx77pS8o/1FVgQAc/jukYx/WLka998MpPh9+VWgqcztVyRk1bHLYZ1g3ziDBnhm67b7U37xLg3OIbzkK+E7ZUCtVsiScHgkoa+u3/x+2k/2B5IjCHsbjsIx9l4zH9wqK0laRmZt15lk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51f92c73-3204-4dac-173c-08d82191b22d X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2020 09:48:11.7948 (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: hF6o7YHxcVlKPJY3j1owD1ja4fRr/YX6vHrTfKtsL4S4PrY4KMTvmBBePuiM8jap X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054814_030460_A93C92DA X-CRM114-Status: GOOD ( 12.82 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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.22.59 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.22.59 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: devicetree@vger.kernel.org, peng.fan@nxp.com, horia.geanta@nxp.com, Anson.Huang@nxp.com, peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.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 In case dwc3 has SoC specific customizations, dwc3 glue driver can base on compatible string and pass it via platform data to dwc3 core driver; and pass xhci private data further to xhci-plat like quirks. Signed-off-by: Li Jun --- drivers/usb/dwc3/core.h | 5 +++++ drivers/usb/dwc3/host.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 0b8ea8c..3146697 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -29,6 +29,7 @@ #include #include +#include "../host/xhci-plat.h" #define DWC3_MSG_MAX 500 @@ -924,6 +925,10 @@ struct dwc3_scratchpad_array { __le64 dma_adr[DWC3_MAX_HIBER_SCRATCHBUFS]; }; +struct dwc3_platform_data { + struct xhci_plat_priv *xhci_priv; +}; + /** * struct dwc3 - representation of our controller * @drd_work: workqueue used for role swapping diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index bef1c1a..4f8514a 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -46,6 +46,7 @@ int dwc3_host_init(struct dwc3 *dwc) { struct property_entry props[4]; struct platform_device *xhci; + struct dwc3_platform_data *dwc3_pdata; int ret, irq; struct resource *res; struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); @@ -115,6 +116,14 @@ int dwc3_host_init(struct dwc3 *dwc) } } + dwc3_pdata = (struct dwc3_platform_data *)dev_get_platdata(dwc->dev); + if (dwc3_pdata && dwc3_pdata->xhci_priv) { + ret = platform_device_add_data(xhci, dwc3_pdata->xhci_priv, + sizeof(struct xhci_plat_priv)); + if (ret) + goto err; + } + ret = platform_device_add(xhci); if (ret) { dev_err(dwc->dev, "failed to register xHCI device\n"); From patchwork Mon Jul 6 09:44:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645309 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 8C7EC92A for ; Mon, 6 Jul 2020 09:49:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 584C22073E for ; Mon, 6 Jul 2020 09:49:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ue88+D/9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="q0i9ZZT5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 584C22073E 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=merlin.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=lbITi5OE2p2cjnWNpz+FdvpTYV2OEN+p7+HJZJArosY=; b=Ue88+D/9NyfZ24qh95cBignKP P0s0h1lutdXp11tqck56KTqCr6xh9Spo52XrZLT5lg61cNTwuuQL3wpdK2LUVd2KZIx/FVp+hwfff CVTO36B1+NPEI3glXc7Oe3xnnYJ/ahMBKBlxrwJujq5cVBsHlOYhwQ2T2vIFT/rUBmY8PBRe9IlQY AxBRZiH3oFugpANG81iehgcNzDhfDO6Cixxx2eIPEUk1Gbfstg0n8XAd1HgczlXlhaXqqilK3o5PY LmwWxAntQ9FnvbgLFtVRHEfWwf36IzIOjzzS1ClEFvC35oZsUxh0eQZC8botWWfzEG+pfPfJAqva4 5RL+SQ+Gw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjZ-00075Z-E6; Mon, 06 Jul 2020 09:48:21 +0000 Received: from mail-am6eur05on2042.outbound.protection.outlook.com ([40.107.22.42] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjW-00074R-Ta for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1gyLBO/OFGclzVuGyPiAmOjivTOpHqS1me13EZQBDKdZZiSednK/Wr6BakW9/6NP0N8e9c8GBlyTak5tBDDv3iBcMTxJ8NbuE1jnjuA+g7mKgFQYeoi2zO29YFhofa2wsOACaAiFJZFnARg2B+JWm8IipyG1R079LJWjQH2Mhb4nse/iYk0XrG9jj1JaGXO6vuFN1Q0k5lxTNNnJhj0L/Z2K6zFH16Tz0siGhexAqqTYwgH+BIv3YJ+RiCaTiEbeU1VzxTjzik1ytpHTIfgTslbr1IGM2J1/txh7DV78PqRWtpAvHToL89+9ysvwv+0sxVNh8hDI2fA4rVGsRwgYw== 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=M7eQwdtbePdJhUINhBRWnjZmGPPL+wlLtxFGwqIT1cY=; b=a6oHhguQ8DtHbaO4HOvoaLMfn3yCkuRGGXTJkUmxEry9xEchbYD4Gy5SZf0lpEPAFJkROox6HX42TGiBZxtZAitxUC/aRd5kvZouVMlo0ZS1FuVONuCOsX+1teoNZKP0WgCx6jfmM3upKnxGzd5O7RstzQOqfDJ4/6pK8wiSgKDh0wkL9rUY1PMri0VQgamgEhWKB+rgPfqCxBe062EX5sykT/BeM5m8GnNPuO2a+UmU64oCRrIxez5S11J1ttvjJbz1y/CThlj8jfBh2gZRJgaMKbJ1wl9kS818nIJFEe+gzg9kP4jyZK7UasR8+GmA7rMz8NRHR23UHanggE+FvQ== 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=M7eQwdtbePdJhUINhBRWnjZmGPPL+wlLtxFGwqIT1cY=; b=q0i9ZZT5gJeoaKsSlXikMYq8vsqIQ6o10lJosYVsm8hgV6pt6iVhafSY+rO6OxuGc9Pswdwra7OrfkE4xty7vLjXq7famx259xMVRllDY8RlPmdn6UbLEgpM8I5m9CApHpEExDX9e8unikhK/LroFxZdR/VWySYfKvGs94TMCl4= 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 VI1PR0402MB3520.eurprd04.prod.outlook.com (2603:10a6:803:6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Mon, 6 Jul 2020 09:48:16 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e%7]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020 09:48:16 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 2/5] usb: dwc3: add imx8mp dwc3 glue layer driver Date: Mon, 6 Jul 2020 17:44:56 +0800 Message-Id: <1594028699-1055-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594028699-1055-1-git-send-email-jun.li@nxp.com> References: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) 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.67) by SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.20 via Frontend Transport; Mon, 6 Jul 2020 09:48:12 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0472050c-a404-487b-7b14-08d82191b4db X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +vtlrWnfsCJdPuQPP1w7sQ+UXHJ+/pRRQ7mdFcBUcfiGqqnTZaBTdTrqxFrqQDp2DNGu+LGkcNCv3iSid0SAsfAH8smsfuwy+SZ7vmNBF4ypDvh+jjgrSbhSnlOntsaxFQIWQnlgVaNmIVTJ3B4sS53Vy1+lP//u9EJKYasTZjIILhkOk/FSlAmtaiYmNcu86S9r1NuqMNXeFJI9V7JVV/mFK+CuFF5rXEMPQYLPa5bnXikRmjVqSvUnR+taAuIjZOHo3xGdKPulnGH/ARG0Gr0tdMAHWUfpTOqwcwzvVzcKOwVNpQLKbuD92ra9kbN4Bm+px//MdpcHKKZm6bU/WjrprIawDUkUq73qHpXmmWWlbCV2E0CZysvQ3ZyjfjGJ1/J+Tc5JjqBwLEj3hyKTqA== 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)(39860400002)(136003)(376002)(366004)(396003)(346002)(8676002)(52116002)(8936002)(956004)(2616005)(186003)(16526019)(2906002)(6512007)(6506007)(66946007)(66476007)(69590400007)(66556008)(26005)(86362001)(83380400001)(478600001)(30864003)(5660300002)(36756003)(316002)(7416002)(6666004)(6486002)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: iBb2Yr/cGKBVw/AEZOE8i9lrSyADmptVGkcQeFQuiBlSfA4WpSA5MbZSzXqXocfixG1O+MC/FDTA99spLi+Q6HX3WjxLLgUQDmoobkwFnVmtox2jwY05QNo9MpHf+6JyErfkGDKoJ5wPWqHLaaVFmQHW6FLMno2E1AP1ZUmwUXX/RxUxJQaBzCyYhnlDdX4ZjZzv7e9cdmXn2J/hJ2wnve65gn3FRBlce0E/7yEvZpfTzarOWEQ8Mk9cRWv5E/YXQNlhfSXoTuXS7TLPmcMMesUwcOaFisYnC02yznPrVtJLvTSFOzVu/0zMNDNqifjFYwo4KCzJj91NXX3nS/l2JOjy6EYDnz0xAv4vNpCQXvaBYjvD5li3jpuGSASJEAw2BvlMCanUCJfHUed2lVuioTQC765fTmUjt7Hdn9MK6g2RFh20x2NaT5NWdVi2Jduda09m5p53Tujx/X7oz+eeMKGSQfnfU08T0KIr+Zg4ZAU= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0472050c-a404-487b-7b14-08d82191b4db X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2020 09:48:16.4430 (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: adQUG8QzbVL+ywvN/vv4936Okj7caJTscXIveI/UmFok5fajJfQ0Y0i6r18mnEez X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054819_186630_DB64B4E9 X-CRM114-Status: GOOD ( 23.57 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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.22.42 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.22.42 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: devicetree@vger.kernel.org, peng.fan@nxp.com, horia.geanta@nxp.com, Anson.Huang@nxp.com, peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.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 | 374 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 385 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..e67d404 --- /dev/null +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -0,0 +1,374 @@ +// 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 struct xhci_plat_priv dwc3_imx8mp_xhci_priv = { + .quirks = XHCI_NO_64BIT_SUPPORT | + XHCI_MISSING_CAS, +}; + +static struct dwc3_platform_data dwc3_imx8mp_pdata = { + .xhci_priv = &dwc3_imx8mp_xhci_priv, +}; + +static struct of_dev_auxdata dwc3_imx8mp_auxdata[] = { + { + .compatible = "snps,dwc3", + .platform_data = &dwc3_imx8mp_pdata, + }, + {}, +}; + +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, dwc3_imx8mp_auxdata, dev); + if (err) { + dev_err(&pdev->dev, "failed to create dwc3 core\n"); + goto err_node_put; + } + + 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; + } + of_node_put(dwc3_np); + + device_set_wakeup_capable(dev, true); + pm_runtime_put(dev); + + return 0; + +depopulate: + of_platform_depopulate(dev); +err_node_put: + of_node_put(dwc3_np); +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 __maybe_unused 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 __maybe_unused 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 Mon Jul 6 09:44:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645313 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 9EB4113B4 for ; Mon, 6 Jul 2020 09:49:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 781E32074F for ; Mon, 6 Jul 2020 09:49:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="11MjU4Hz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="acCjCaXO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 781E32074F 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=merlin.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=sPay0c8KDGAQ9LC4kYkjYebGuXhhb7rqSqms+pe8/ls=; b=11MjU4HzgIyOX7enQNERR4lc3 3+JzQeZjA0F0pUX2wh4UtoW3kC5aoKz+lB62PLgklWBDzpCHtl9dfnQTOYdswDt+LyMQAX7ZHApiI Xm6LOl6HneGWv/kjb7Uq3hz+Sa7eGI35l50EoX7uFnCSfmnJ5S8qstQr8AmIZq30SmqgpHzNsxZs2 wW3rGvYh9Nc9Jw+580sX3IB6Gb4ny6631Ud7HMfA7tNnbXF+QholfC92F2joMaMMB5oP/KM6PPCg9 iaTPbSPU23JtVlJRIPQFxFhEkBu72l4pXAqeaR/BV7edMIpNI7A+2othNEpgNx0TysdZ7JF52umxi UX3LSDlaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjf-00077U-Gj; Mon, 06 Jul 2020 09:48:27 +0000 Received: from mail-am6eur05on2057.outbound.protection.outlook.com ([40.107.22.57] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjd-000765-0h for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dD6u3dofN886K4/biiPuTowCGCdint+dkMH9XZ3aJvDx83DtJm6R5WJZ33IVVOpFkfYdonPKUcZscwb+L/DbmEcm8VKfUKGYzvqTzUE90FqyZIrOvkTPaJzMOooGojdXxU5eL9NtKAR5iO6Si3DqLLSHdK95KFaqgAS+xCr1fkesv30d6Lbu6/4PAwIhqYXJjyfKZI2R6xLP7QsSbDyHxwfHtjztFWSkwvHqCWDUIyIn8Nh/O0YbrgpwghLscNcCA6VPehFWwaBMhN6B6jorp6HGRK+CizPV+xiFPhYSTTPGo76JsOSpU/EMAl/AjA/I1QvQQb5i1zr24wZ/8G9yZg== 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=7kXDC+0Ag4Ui6l5XrVs8CEH/nL2OJ+Jw1VmgLloVCFE=; b=FP7mc4K43v/zl4F4Oc8SSdETJ/SpBnXOCtDADAqgXiWmJSGXN08YpnWuilPmkWX/DXy6US0qadUzhODTgYqmZ1MKerdELS4WyzpcKutKE2sqBEBDLNEs9Rz0gnk55XWHkoLG1KXPFJ8buOQewG8zqPiWsM6YkLl/uqVz2q/ROvyMsv6gRdC8FiHC79O+Bw2nDyyfircUSNXzcgJ+Z7gr35tC4uGY32yx6bXBzOY/bxXXc+vL9h+ipqDnTOK+fzwXRqvGpGVRqTuG2mejQT+LOdcmSxNTnPyobfFIQE5Yt4lCefp5JmFtzFopge4XheqSB2IguqRjR5jGXuQBwn+M6w== 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=7kXDC+0Ag4Ui6l5XrVs8CEH/nL2OJ+Jw1VmgLloVCFE=; b=acCjCaXOSe/H2X9eKh9XIWlHqODDt0K+cTKJoO6qN9zy5ILW5Fo63gVDTjf8xPo97QMSA5REXE7cKeQddOsEwQSSH1lmfXbBkP+UXUGc2RlxE0XYP+8jYiO00BXh9OVtZf8x9/ROATHtpwHNd0hFXxnEax+aec9NLiUX2R2EdTg= 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 VI1PR0402MB3520.eurprd04.prod.outlook.com (2603:10a6:803:6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Mon, 6 Jul 2020 09:48:21 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e%7]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020 09:48:21 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 3/5] arm64: dtsi: imx8mp: add usb nodes Date: Mon, 6 Jul 2020 17:44:57 +0800 Message-Id: <1594028699-1055-4-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594028699-1055-1-git-send-email-jun.li@nxp.com> References: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) 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.67) by SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.20 via Frontend Transport; Mon, 6 Jul 2020 09:48:16 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8fdacbfe-47be-4d9e-c723-08d82191b7a5 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wEqB7FV3ezhtuVRfGMQ1DXh5wBnRUcvnh3pIFpNVANgzRJlg0pYLbio1UbCyGeguHs/we1dKej/QEZiUNwvLH4mK4YSIapSa5d/UTVSZ4wm0Ge4bNXwdX99Ygsrf0JfW2WWno7jkn22nnD0BtggDBug6GLT1PJT1jOurpm+wDiwXucl+55+byuAilV/2YX3zJKe0T1n5sylE9Uslg0nP7SFkRULZ+dPrRQvc23WWLLColPC51tO/NsEnO/iQF1g+EfDUVLOiPyT9LG/7i42Ea+rt+N5rVdHnswgCIVODENTFT8DEROe1IbtdFCUs2WWRh2ObCCl7RuPabq+5T9W8zEDtlh1Lip1xmI2kzx8Nam2dVY3+YNRRRr/2VO7k8+bd+FgpAmvesrlYYXW99E0ugbTLjtpeavRNYUh1xwx0o8o= 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)(39860400002)(136003)(376002)(366004)(396003)(346002)(8676002)(52116002)(8936002)(956004)(2616005)(186003)(16526019)(2906002)(6512007)(6506007)(66946007)(66476007)(69590400007)(66556008)(26005)(86362001)(83380400001)(478600001)(5660300002)(36756003)(316002)(7416002)(6666004)(6486002)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Vy9oZInww7FZJrwX8bu4jJz8RQqEdjXfF0Ta/GVwHgyT4FA0Tt7txXIqWCOmcDvUw4vIvkYI2Bs4Lk5k9OinG0RL4WJkABxERNdXHhFqiqofnkdetB6hQWCXpBAaS3KFWcTCu52pYkA05B5Bu9wbYGL+H9bPEjZmcf1J++KO47YbjL09LGHoOc07ySQJEgmbdAkthwimZTIk5iqWaOwM0Lj0n3H5Z0l1eZI+NRkj7aAMgjYp11BUQrRspAL85KnqpBgRyUNpF7A0sbvdzG1wdgzNxzZfmQaPhI9nivqZbphix4isMpDB3CbxlpxjOWT2VRAj482Vbe8lIlxZ8wyRYFP9Z78ljEk43BRL+xQNkNsuhNZ+Z6WpLpgYHLhkXzFD/PCJpcYAprCuSiiAALct9e9fFGVRe93FujC/89sTfLMgEZRzKpCEQhWhU+IlGYTizTTgGq49XZHyVTYx2agXpZL8WPo9BV/O9zrHPdVLy4k= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fdacbfe-47be-4d9e-c723-08d82191b7a5 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2020 09:48:20.9523 (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: W0AINcdysME8qWsOGXDfw/yBJljoacgDfwOmsv1Ay2GywbU05wuEgYqIwnFAk4yn X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054825_078758_9D6D429E X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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.22.57 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.22.57 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: devicetree@vger.kernel.org, peng.fan@nxp.com, horia.geanta@nxp.com, Anson.Huang@nxp.com, peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.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 | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 9b1616e..f3d671f5 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -650,5 +650,82 @@ 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,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,dis-u2-freeclk-exists-quirk; + status = "disabled"; + }; + }; }; }; From patchwork Mon Jul 6 09:44:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645311 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 98B6192A for ; Mon, 6 Jul 2020 09:49:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 71BC22073E for ; Mon, 6 Jul 2020 09:49:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="veCszKD0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="izP8aIej" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71BC22073E 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=merlin.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=ljcdtKnpewyLD31EWCGtKQb9ETbj5fv0ASt2xi7MGZI=; b=veCszKD01LgF1B6JjPzuneyU2 8mQA1aMehV4MZiaR0hQau9QprFh9DD/UCMTeiKWnfut9nlgoUf1eLy/q90DJ9kp0BHYLszIyK/NH+ w2kyKQPlpFO799HHyMwVtFE+Cm1QSFBzTI+H8AGp9I2yoTv5Ip8EgN2uLP/JHNaa2NOys7A7Qsruc BOd7sxTiPe5c2C+gtKtci1vPGNgiVVAEy+vZMmT7v40RyTVvSkYAzmAytjfR8DHUKR0xyPee+UISL y0TjHc4hN+Wy5LoO4UO99oL75U60ZNSX+6CU9mqvc3O5ghOQ57F6rJlZUcU73Hj7c2m0cbmGjPKpc jJXHGYW+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjo-0007BC-Vf; Mon, 06 Jul 2020 09:48:37 +0000 Received: from mail-eopbgr80042.outbound.protection.outlook.com ([40.107.8.42] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjf-00077S-VV for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fptryQ8Z8GOoDrOE4Dmdx7QhbFOdcCHJQ/U1nmteIIRHaoDhBXoGC16wxhyw/PBbnLuge8TQYMSpRL9B/egJATvBk86J9ry3/dG8C4KVjNIaqH40qdk6Vgn9ntVtbx4N5VpMbfXDLcaYOd+INn4DJuJCNjNgrqsy9OIUHZPIseZ3U3CqZCkf+IFFI3afGD2ao5FM2ZX7m9f+idwTOHUAr7BaMq00J8a1BmtBrEHUyYXZpRfQVbwPZ7QSVpbu6aQeRyOD/2QQOVRZOdY9kcZlUs0BaycrXMnmWdsWu7pqttngpum0ta2/91ABykS0qXl1iuMbGqzc1QFBxIRXg77cig== 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=f0/2eNqVSHwdUlUW/ivftevamb9lQyty+9qIuaaW50Y=; b=aVq5zSs/74Ztc1talJimHPZAJJGM7adgYj8bratrAY9MFc378dPxy1h91CYwkkM1ayNG+ddocImyOMjKdZmjn/S14natxC8jrmip2J3xpqe+iUzMObWt9KQOyJ2auKUxMqnAoEe3UWIZzcflP/sojEOjSknx9QNobFhFEMDAM6MUgFnuLkfejwtehZLBy2o1IzRQwH5q65OuEi3pSAutA1eZcplXFOR9YcvSYrkFKkfI03+h+VmMUcY4H/hG7Jnatocu05k3GeN5uV2cX0WHZlp+ve89kjYSaCl33jXNkhOTQAMMTEvZ5Pk0ITRS9GQNJGf6ftFF9ynCZnMlBqyT4g== 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=f0/2eNqVSHwdUlUW/ivftevamb9lQyty+9qIuaaW50Y=; b=izP8aIejtX3js2t8/yYLcTYSN0xlVw+imgZUyayzTrVOgPknrqHnBh1nKdwm/ZVD6S0mzmseZgNjV1edqApEn/xJdMaFsi+9U23Y4S4D2Hm/6lFpiUETUCJ/1wT67Ih8KG16NPLFzl+ayAgs/Re+Seo/ueyAZ/UEX7ShkzLK8fk= 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 VI1PR0402MB3520.eurprd04.prod.outlook.com (2603:10a6:803:6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Mon, 6 Jul 2020 09:48:25 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e%7]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020 09:48:25 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 4/5] arm64: dts: imx8mp-evk: enable usb1 as host mode Date: Mon, 6 Jul 2020 17:44:58 +0800 Message-Id: <1594028699-1055-5-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594028699-1055-1-git-send-email-jun.li@nxp.com> References: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) 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.67) by SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.20 via Frontend Transport; Mon, 6 Jul 2020 09:48:21 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e6332cf5-f7b5-48ed-19ca-08d82191ba53 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:200; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fmk5pcBqcRqkV7U5+8buzUGJzFfoAyM/tWc7XlkQ5YxmCkPdiJti+5gg8Hi6C3/8mjDismHMG4vHkz52rnfUEJKOjfUje+21xswHSvYjG5VJBn2NRmmLNyx5JCI8ysGI8oqetr9kxSH+3NsIN2wIZ+tug7VViMhMmAK7aUThuGsJuE7eX6ZRzBD9HdJMNFAOYquS5l6dgVMfCsCM0/5G7YDMxVhQXsXX2jaqTz4AielZp/VEyLab7YCgfLWmEaFUvXsQC9gDGwGsH0kzPA2Fk+UAdanV1pCiy40F7tD0obwSBg25LRTcJA2ynQ3KWN3ngQEzuEW9yJWNaa10PdArLn8DZev4bgvy1wBQoRZB/nOX0/EDWfkORr7vxKLSb7feZDmHnk7JVrD1snA43hIg0yOmKzAq8e0xMlzXkDxPXvxzuJgp5T2k2R8exZoCSfCS4SzCIb6otWmP8G7KdrOu8g== 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)(39860400002)(136003)(376002)(366004)(396003)(346002)(8676002)(52116002)(8936002)(956004)(2616005)(186003)(16526019)(2906002)(6512007)(6506007)(66946007)(66476007)(69590400007)(66556008)(26005)(86362001)(83380400001)(478600001)(5660300002)(36756003)(316002)(7416002)(6666004)(6486002)(4326008)(32563001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: PiAQOcK+rKHr5DQ41wpM32jhd7pcuiN4Fa1VYR4DM0gG2qCOQLk2AKTa3rLV7UB80zoklDgQnb0cEmpfadJegq6brp1TzqRBrgq0Dbt7v9CbmrFBCFyIJ9aTF/20JcEmmtRiaItR+7FOsK2mOedVHCYSFaao/YSJH8dlHqV5fbqLhlx2f8jaYaaTA2Jai3FPCxjsWKstVE1VFYW8k1bV2CgsK2BVeG6Kt+yDGhZBSOkHwdG4rfT7clBIsj13zZa7ZRYpX0zY7+6CYNpEvJ0Xpc9NGCDRHfvPU9PGSvCwXchUgXDXgEjxpX+PL5yaPeX/Uou/naIYXg+HMzPlLBJDoanDiN0354UYt5EjQ8jutefp8nrXq/AztmYv1qrrcuyBcUARjE+faY2O61uHs7GqWivGqFetUvt2gGhuxZ/iqUaKtACmCS0x2Fs76u4w3NAba/X2dByGoV4rV6g+HAWUTNNcDwWH7zHzPZow1DW3AcQ= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6332cf5-f7b5-48ed-19ca-08d82191ba53 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2020 09:48:25.5876 (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: GBuHCM/1UJfVS0kTzduC3qJUyHBv8qZYOnGvK5cXIuAMeJWI5/lvyyX69TT+a3p/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054828_138837_FD38E196 X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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.8.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.8.42 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: devicetree@vger.kernel.org, peng.fan@nxp.com, horia.geanta@nxp.com, Anson.Huang@nxp.com, peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 3da1fff..c7cacf2 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -91,6 +91,21 @@ status = "okay"; }; +&usb3_phy1 { + status = "okay"; +}; + +&usb3_1 { + status = "okay"; +}; + +&usb_dwc3_1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb1_vbus>; + dr_mode = "host"; + status = "okay"; +}; + &usdhc2 { assigned-clocks = <&clk IMX8MP_CLK_USDHC2>; assigned-clock-rates = <400000000>; @@ -172,6 +187,12 @@ >; }; + pinctrl_usb1_vbus: usb1grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO14__HSIOMIX_usb2_OTG_PWR 0x19 + >; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190 From patchwork Mon Jul 6 09:44:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645315 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 827AC92A for ; Mon, 6 Jul 2020 09:50:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5A2752073E for ; Mon, 6 Jul 2020 09:50:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oKb3/BSZ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="KW6lra3Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A2752073E 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=merlin.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=oKb3/BSZOFXqoM1Nn6bnpAVqS 2o/j9MeHmKdfRHCckMqlqnXNyuafCHYJX43p5d555/y+z7qpDrTnGlsyzB0ZdnwOEYl6lqCuhn5Eb ohF1nehf+vbxeaW/5IxVPsoDZCsYHBks2zb0rjhMt6eF74WIOZRLoJWoVIR7WHzCcCs9Dr44qM4sP yXu17FTX8+6E50a3wiU77RhFdhaJO7r++JczeQnLADSm6M4jvKW/LLSnS9LQGEKS6rFv+PFyQ8vSY AKUBhr7nVGL/Khb3DnEGRX9f1cauVE0SRz9zxB0uXNl+c98GAptLsnTjo3eg6kFVK85NH58hzIvQT NOrJQk/1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjs-0007DE-AS; Mon, 06 Jul 2020 09:48:40 +0000 Received: from mail-eopbgr80042.outbound.protection.outlook.com ([40.107.8.42] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjj-00077S-AP for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EJCwXibrgX1Qx6jJHyLiomouwrbtvtQqqsEugX4dYk0upA/Ihl3NVxT85VK/oUsitndV1iTqd18/B0mGLoqlHUiy9mPltz3wn2XcRb/31zjuehvtdpWrdjRjexF1uozqWJ4HskST6Nlpt2qd6u+jZV0tVMa7+3gZi1XAbGx0/SZ8ffpsrNgs5uviGonwucGL4R7LrFLcNiEwUM31YAU9UeH38hzO5nUTg24y8ikL1Fo67Gmd6KyD9wYNMhiP4JrKhhZZw+pDQLJDBUolccUim1rqwKjmRcmaz8mbr93yYcPrXx8BQ2ssv0CXnUj4TSwLp1QUxRTCAqS9/stFFlVrrg== 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=AKfiJZoEwP2HMA4HJVC2TD1lBcdKFJcmbEt5dvCWl+aUFmmFbJoW8Xo+lx/YAcPbejost68s9iG2I2rq055sDNIjBMca5uMWPJnS9n/wbBssGmYJd61JRQw57KbuMaSxHslwCLOjyNDf6+yqeTDW9mm/k4F/qys/IxLdhkRNm6px6W9qbisxKsrGlfg8L0xjBGFrQWUA5lxbNzjINIwROF7HFdL9aDAG/nPk5AN+LJh6yq+W1LeLlcNatUsgGEPtX6yKb7+vJayzzxbg5kCGix4HCmEGjGZPGYWcLYrNWoIFxaU8wkd1TkM7q6rDeRPMGQHuW/1va7Hkm6RYGHF+eQ== 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=KW6lra3QMc59B/a6GviklcFi601VXhL/Mz044QIJjyMAd4l7ggMtp4SH2zNOBaMLnyFWCg16+fqJPnL0EDNwpixamTGufp38MIJJDjqgjpZ8QRH3r16Kz5pAGXYjtxn4HWaTPzLx+29XJPRGJLzKbKddSZXX5f9AvgXqhhNUeuc= 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 VI1PR0402MB3520.eurprd04.prod.outlook.com (2603:10a6:803:6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Mon, 6 Jul 2020 09:48:30 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::30e2:71b0:ffd3:e39e%7]) with mapi id 15.20.3153.029; Mon, 6 Jul 2020 09:48:30 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 5/5] dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings Date: Mon, 6 Jul 2020 17:44:59 +0800 Message-Id: <1594028699-1055-6-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594028699-1055-1-git-send-email-jun.li@nxp.com> References: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-ClientProxiedBy: SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) 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.67) by SG2PR01CA0117.apcprd01.prod.exchangelabs.com (2603:1096:4:40::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.20 via Frontend Transport; Mon, 6 Jul 2020 09:48:25 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 56ff15da-294a-4634-737a-08d82191bd17 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VG8ImI89S1WlgUNHvMQQarfkI9J+zqxv3nH4/210lMJxYUThknksleoF8m7bt8DWPD3oLDPW3KSHvq/OqLYOsITohKQPxEztLOtziFnVBPEGHczLRw8gpz86302Bz8eahri1K8jJnV1KbO0nm7GlIdItlsIy7wgUZRbGerrRegEgwS5UsK0X5MgtMC4i7Zrd3Cme9PAqH7Z2Y2IRHGttFSNQT9tA06zKSzxpFtaRnPLDybJPnH6/upG6gZpyzuLvFTeF+mbAvBaTVHNGZca5mBK5kzOMIH4o35S18ZQJn9mdfqyXrUuiCb7ZdVfDEtC/I6BiLjLCRflGbFwrAt9BknIkNUZ7JJ7irrRts5Ik+pEbagsfl6gpVjvy1I/zBzfrU91pKT+eOwEm48rYbVrq+IKXagjDq4wjiil2Yip52UWyuwvtSzc0ZSt+RgrEwvTOFkn4nIkcAh1+1mgbhxExAsSSBq+umJjeCGpfLAbrPKI= 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)(39860400002)(136003)(376002)(366004)(396003)(346002)(8676002)(52116002)(8936002)(956004)(2616005)(186003)(16526019)(2906002)(6512007)(6506007)(66946007)(66476007)(69590400007)(66556008)(26005)(86362001)(83380400001)(478600001)(5660300002)(36756003)(316002)(966005)(7416002)(6666004)(6486002)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2OhKSDGbfFLztlZMVS52+Y7xwTjHsylAbykKlTngYWs5ZB+b2zSPyvnSJa8yWNC9QEpsl/nA2xMBzNiN7F9BEoZxeIaOysvPUkmIN2Q2OgybMcJfJeqaFjggQvio+X2+jliF9iZXcmwZ5ks8m+LzkHDRxw/jZuAA7HYF9LAa2XUV+PUrCZeuzyYYvHTvE0OKh7yR5yaAJitxBt2lMBotllP4yAVOQr65fIP1aIiiN+TmyEuV+pVA5EEMJZostM/vLyOL1abNEodB423Jzt66Vf/wpxDAyF2uNdnp9OExWqfTUrZqJ1Mknnm5n4klR6sWMno8adg+d3ZSGqcLUBlok4C9XuaVA13NObY9Ld9QNaLY0r0RcVm5zozBT4+ypLMnQHvu27k2rtGzn3RpvSwglHd2sUrk+jllbO9aQU+ZOkjO/0m2svRKCGI2deQiI+KcvL0hqPqltOefXBiOi2j/2WTuBP9/4tzM3keTwT0UnyE= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56ff15da-294a-4634-737a-08d82191bd17 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2020 09:48:30.2208 (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: DeI8wBKFqiiOk8QmQ6XOh4ywCzCND2M3CLvGIE6m87JACQVicGyIU2d79YnybVP5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054831_436069_A49C35D7 X-CRM114-Status: GOOD ( 13.23 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.8.42 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.8.42 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: devicetree@vger.kernel.org, peng.fan@nxp.com, horia.geanta@nxp.com, Anson.Huang@nxp.com, peter.chen@nxp.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, linux-usb@vger.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"; + }; + };