From patchwork Mon Jul 6 09:44:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11645305 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 0370192A for ; Mon, 6 Jul 2020 09:49:45 +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 CD58F2073E for ; Mon, 6 Jul 2020 09:49:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nnq1hdZP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cbbrFIHO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD58F2073E 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: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:In-Reply-To:References:List-Owner; bh=IVDlK6/N73R+P1tdQ+js1Dcj1+6APfgaImyOKkKrkf0=; b=nnq1hdZPeTkwBDLRksNErhOZWE qz8W0sbUlfp0gYaYFqVjyl7A3gdlWpxB/QlFAC4znbv/FtPbZjHTybR6a6zFZfm676ysOpp0o/lfg 4W+NBYwJfMYK3LTIfUn4D2z7y79UdLzzjerIBRfaleECcTrFLn9Vs8R4PX9mNG/hB3Uil8rJdiYAO IxGRSVappL48K+O0R5lMxCznhGaqYf7MgkPgWRF7fnIVk12cnypLZtDHqSQbSSDcpIXP3YGH2lR1a G4yzXeny9EK0af8lEPIRGjvi6lFBMVMI8OyzypKSzzOLzotZogOyg67MMQg4QJ5bQPdojXd5fND8G mOCf78TQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjR-000732-DJ; Mon, 06 Jul 2020 09:48:13 +0000 Received: from mail-eopbgr80048.outbound.protection.outlook.com ([40.107.8.48] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsNjO-00072E-HC for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 09:48:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amupD1tI16MX3/ZdcxcCRX7Fopsiu7q16TJZB+PoJvd0ejDE3LvuKa+0apzvQhbBdinB98rj34leyMJhjF6Zu4StI6l/27kcsjt8pWNXBP4w7miOG+OsObp6fPADDHGVxVgcFyQmRGN/RyzQLO8EGO0HaN3znZ2HshXCkmTfuwXooqghBdfCofOs/pLSKx9mmieuVtrdJYYE682e5gW59CB6re/RGjImx9XaSc2ScR2Y+5Ip/joE3C76yTwxb63farkp/O0JG9GEYp25BYdtn6qsrJePPOdA4p4sFiB0fZ66SEYeiT+qLzPAQ16KqPB+s3aaax9pw/EORjURfl00Ag== 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=L9XOVFxS6hVtLqoS3s5STCm0Zn3zTowG3uOfnwRZMwE=; b=G1udlfvphD/WgjBylwwOO4dgcrB0VH9NU+pdBrjV641YQq4Qu/NcMH+xuGU0Oefa3n1JplXOtE/yD5arL/DJcdaJRef/vyZ/ar7fRkPc99xcg0pj53jVIsLLCJmXdsAxXKkZFedTPhYzCJWStyUJXYZefKvj9LH9/EaSUbbUNXJ9gq2LB6dn8YdV/ULNGh9+ixTo15CX5SKUqQd7fwnz3Byr94bCxnBwFhm5+vKJkzW2M5agsxJUsoSkVk5bLAfkC72kAC+mplkxPDm/zpz62YsZRitZqeOkCroMAk56bpAvJuBESnLwpMUNIiVyUzjVLgjY1sKIWPlq720bR+1VRQ== 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=L9XOVFxS6hVtLqoS3s5STCm0Zn3zTowG3uOfnwRZMwE=; b=cbbrFIHOufecIdjRV0G5RJ8xKmHZNR7WtwE3LkFpPUjNY0XVtDY7UZ2amlvqTVvJwMANhXjQcS+8jkfuqo9TlRm9y5HL5Z1VOIemky5R5RtNgMZeJQly4OfKjWfQ9e+0lH03wOk06CzFfbqpOVhn6ncEQZ/jA4pQ9Mjquz/uWLo= 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:07 +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:07 +0000 From: Li Jun To: balbi@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Subject: [PATCH v2 0/5] add NXP imx8mp usb support Date: Mon, 6 Jul 2020 17:44:54 +0800 Message-Id: <1594028699-1055-1-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 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:03 +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: 1ebebf69-9f85-4095-d22f-08d82191af79 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3520: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 04569283F9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 42+opubEzsyrxdzgrA7R9ReKWIACb1QCbTrOfQMA72fFS9R/9ezGxfxpx3ykoy5kNy3DfrR3Tu0a9IPIK3JCWVyrNpd//AtHjGfKMQOM7AyZmuUinIjsQE3NiS1njBmrYs9CpK11ptw9pj2cjLLm/OV80MOU314W/L6fYN3cRO7PCM+seaq7Szqn1DruraCpCK3PRNCi/7DEp35+zqShyHWjIWyOI1i9h5IBYjLcKGZq9Ej710LdKSa/pQJFk88mMzMTMma/GTmeZ10EG62PMfXZ1syDnSj1/zGViFVuKHT0zmK91YBhssXgzl4F6fM0Omm/7cwcqCVRCSUmcGKmsmy6AZu54EsAn5+Hi63EIWKK71ng6zCYvdgCoKzlndgm5D2k+8UxRFgidT8IzovZhIGxGl6fwNF8zdZqC7ZLM7SQx+OOYhshoFIwePbcw0l+6skYisFzjUpSW1N6V+bV1vC/EmV08YXbQYNMof4/Uf0= 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: dhA8RWlIXx+oJg8n5SXfpmisLuNV3nPj32FAQUNNulYdmWri+AUsQMYBQQhQwgjmhU3iYnnOo+4oU2UcMtj8qL2+DHW0qhCWR7V4WpUfSWn7Mkrt+aIJHJG6eAiogIhxMtL7UXaSlxdX/ZptdO7myyJ41DHHfy5Ia0Xx9FU0k2ryG9e8GBy0WBPOvAlJqTzGUBeHOGoQ2jba0wNanLsDaK9kfem8EdMz5e819rp0J4/+Z6lQsMmf7tazh5fcuk83r5/vNTU2qjO0no0HxpbiMX+p5Uys2NGrEg6mDOZ+6HCufz0XZ/Qb3oP4hnQLEHJSQxO7S3IHWNco6I29u5BmbMmm9cQRU5Gh1VsHMdRc2ifAvG7Nfb9P0cxN7sugvLNGC3Je/zQaI4FKIk7fW3In9858WOVf+H1yztWsNta5GQs8IOt++WvfDzxNbA+2Uxnhpuo2NbbIYBOOCRQBQOcLtJ7oDGaX3Yf00GsfWCjaUEo= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ebebf69-9f85-4095-d22f-08d82191af79 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:07.3004 (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: mu4RT+rrdNYAx4bHTwkYdijVwOyxttn1ksTmZnu7hAOZ+/JDR244uTVwMmprpDCi X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_054810_777257_910EE739 X-CRM114-Status: GOOD ( 11.80 ) 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.48 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.8.48 listed in wl.mailspike.net] -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 imx8MPlus integrates 2 indentical dwc3 3.30b IP with additional wakeup logic to support low power, this wakeup logic has a separated interrupt which can generate events with suspend clock(32K); due to SoC integration limitation, a few quriks required, instead of create new properties flags, introduce platform data and pass it from glue layer to dwc3 core, those xhci private data can further pass to xhci-plat. Changes for v2: - Drop the 2 patches for new property("snps,xhci-dis-64bit-support-quirk") introduction, as suggested, imply by SoC compatible string, this is done by introduce dwc3 core platform data and pass the xhci_plat_priv to xhci-plat for those xhci quirks, so a new patch added: [1/5] usb: dwc3: add platform data to dwc3 core device to pass data. this patch is based on Peter's one patch which is also in review: https://patchwork.kernel.org/patch/11640945/ - dts change, use the USB power function of TRL logic instead of a always-on regulator to control vbus on/off. - Some changes to address Peter's command on patch [2/5]. Li Jun (5): usb: dwc3: add platform data to dwc3 core device to pass data usb: dwc3: add imx8mp dwc3 glue layer driver arm64: dtsi: imx8mp: add usb nodes arm64: dts: imx8mp-evk: enable usb1 as host mode dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings .../devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml | 87 +++++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 21 ++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 77 +++++ drivers/usb/dwc3/Kconfig | 10 + drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/core.h | 5 + drivers/usb/dwc3/dwc3-imx8mp.c | 374 +++++++++++++++++++++ drivers/usb/dwc3/host.c | 9 + 8 files changed, 584 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml create mode 100644 drivers/usb/dwc3/dwc3-imx8mp.c