From patchwork Tue Dec 29 11:37: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: 354028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97DD8C433DB for ; Tue, 29 Dec 2020 11:48:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6109720825 for ; Tue, 29 Dec 2020 11:48:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726048AbgL2LsZ (ORCPT ); Tue, 29 Dec 2020 06:48:25 -0500 Received: from mail-eopbgr70073.outbound.protection.outlook.com ([40.107.7.73]:22087 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725964AbgL2LsZ (ORCPT ); Tue, 29 Dec 2020 06:48:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ja5QLKdG5k7faoiU9qJNoPxzSoJi9bTXcM9NyO13hOW374CWaCpZqV4zGXRhSkEoQhL5H8ASsrQ7bkCRLRifSCl1ZD4R78VO8HSjgyPIySZfh4FhzupZbBd9U5lZ4h8uoUAQumO2LmNTOWBUE1iWfgF7Ot7VTIzvfPEpTyx+xl/lmVy6baDp/+g6sUlSqn9u5wAPGq8YcWBhgV20bD3KiZpXokwme6noHKDcchR+8JDggJXFLbmPEPFT+zr9hDioKFR+Zihb2ia30I0PyrKpC44xpV2tpKABPU7yhQPkwF4FTacZPv4p94Oj15x8Yl56n1FJ3D2HaFBQwl1stjkKtg== 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=pi5IoNqCVSXu3k+yMSmyz1YTsW4xWzki+R20lI2sZqQ=; b=cGMkaf/LzFTCZteXyTCdpE+cUdpZQJhwGbFLqBZo/UxD5pX2Xh8N/rS69ETclRcwlr+7xnYCFykLNqqADUEvmTq7DvOWymzUnKd/XEIJIWSP/ZU3YYxIQRA8heP9OvVKlo0u2NrEq5Q50FWTDttKHcnsIM9IQNrUMvZzHK90agvcvjl76A9ZPpijhZtiqkZ4UFTZcyMPsFqK7eweJNee5R82IDy2DzSTKxFoWjV9BNmULfjaOGwUqrm6N7neTAOtK0GwpvzjQuLBLGJjJ2o2jCRxgZdk1ixnNRTwBqyZydq9kveo21xfoKRpSdnUuuNGJBZkz6tFXh47JPW2MjeZFQ== 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=pi5IoNqCVSXu3k+yMSmyz1YTsW4xWzki+R20lI2sZqQ=; b=Bi3toXRPWtHPJ+4EXNvLJUHFGFx3ERJbRP7In/PNObdYfvRmb1gvYr41KRru2VlgboSTMpJxuN32D1kf2wNPmOjzJS0F1rr/o+LXwNCL+SuCyBVEzvvQ9+ARKNi1wRtQz9aAgGFVRZ1ugm3DB6VZj2GmcRsO++TMHZbnjlSUo1k= Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; linuxfoundation.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6653.eurprd04.prod.outlook.com (2603:10a6:803:122::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Tue, 29 Dec 2020 11:46:59 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6%7]) with mapi id 15.20.3700.031; Tue, 29 Dec 2020 11:46:59 +0000 From: Li Jun To: gregkh@linuxfoundation.org, shawnguo@kernel.org, robh+dt@kernel.org Cc: balbi@kernel.org, krzk@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, l.stach@pengutronix.de, jun.li@nxp.com, aisheng.dong@nxp.com, peng.fan@nxp.com, peter.chen@nxp.com Subject: [PATCH RESEND v5 1/4] dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings Date: Tue, 29 Dec 2020 19:37:43 +0800 Message-Id: <1609241866-9508-2-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609241866-9508-1-git-send-email-jun.li@nxp.com> References: <1609241866-9508-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) 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 SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3700.27 via Frontend Transport; Tue, 29 Dec 2020 11:46:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5ee47d43-f8bb-4665-4431-08d8abef7358 X-MS-TrafficTypeDiagnostic: VE1PR04MB6653: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PuCChEWFB0vmb0mVAHy5KTqnvs9yf0JVD6jLY7liimyqY9FBwHfM0hOIbUDB/A2lejlhNTSNWigJhG9WYeNoRv0ua09wYcJkwcwI4ftAbR67TBsACEtzlSMu1bflw3yP+BORUsUgXO0XYK42H8i3h25dLRk0P08u5xv/cRat+RwTTuHT2r9LwLl8rn7SeUWSLlDgQV9gKB1Ahmv0DW7/VDfna6/xPdS0dJ1OsDyC90/venCd0bviEd2OKBuKpHz7QT64AfBu5whFQLuNJ1tRX2bxik7VvVftF/FBCeiIbF/PGrdMa0hGv8zIaEeXrywOBWOH8Lw1GmaPFYVM89UI2uZZl3tNQoEsRFZjmi5Cb7XCKEGbo9UaCteUvGjnJKKdKTG93z48V855KsWWETQe7H1zcpcymQDn0IjN8SVTrrBAR226Ct5gJ+CAi7Lt16e+c1298oqGuXBwhhs4bpfxkmdMdAYoKPj8QaH1BklfK5oTZN+sGRUEJAevJ9SJHSERCkWgLVyBxy5XF4rnbV1r7YJJzX6d7GmXurhMW24KCTY= 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; SFS:(4636009)(366004)(6486002)(6506007)(66476007)(4326008)(83380400001)(26005)(8676002)(66946007)(956004)(2616005)(2906002)(69590400010)(5660300002)(66556008)(966005)(16526019)(6512007)(498600001)(6666004)(8936002)(7416002)(52116002)(186003)(86362001)(36756003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: JPLVHp5PRkX8gn7ncvnLSvr2pT2lD2KOdWvpykQsbsYI31rFYS/q4Rdxj8f4H7+i/Fbaz2ULOzRv/GqoA7+uiay1b/NC7LrJZp8AGke99GdNB7c3WIBCCekc30ZDW8jYTAFn2vufePfKqC0VkUwJtkF8frHOactl6hC3ftL7LoAjQ4hJHp7FS9tdKya+2Fcj+uWPS1W9ooGv8ksdx7qBLGNbqaNwjDmRjtbnlkHrIBu9M9Ey/X9meVB6wxMlNCjVV1M6Wo3AfmATelX4pkm4dZ4kLBta+lO/2L+57SD0QHqJo3paBGHLN/CLVuCtmY7yoLQ831K6ii0X08qqMBKgvQRn89yGOlHbyeR/FeSmIux8ExDdykhqoHaovoPhKNNcoMG8Ec2ybxD5uzdMGfZ1UlFFDKrT5xp1YTVhI4b3lIsHUUVpyPgRIEtCFZ44mrO4VwbNNSqAB6cQqtbtGkuq8qMwb2QhJsB/iDDC7UteiV/N0YCMmRJkFAzeaBTm51LiyxVhXy8U+XXYpU0pixc1qa7eb7QEmhQoYva9q6gkfXjKj8BcFB1N6n5tK/SeJ/kqJUd/ANzQk6Nf2uLORIGgnMxpcinuuAyh/m7zc7UbnTuh1adLqZKL1A0BB5AVkfwDBvV1cGWmmC6HhdyeFjD6b6rCOg6py3XSnTzJylS97M49lYR8Htc8+NrlD2L7phuzsgbqXPuOod0ccxbj2BLTOZAOCc1Npgws+ZHgk5C/0u7OsSbb0RwFz2fSseAwrWR1t1c39HTvjGIbsDWocxULCNLXvi2Wu5i0mlxr5myBrgcNTJO/mb/YX/ewMliIJ4HUoUM8xdNMDjT6K/SXJ+U8pimB59J6q0syGqLlnsdfjLXaROoxGbiLIAQ5daTpmGwp0AGLdG6BEPxG1t7Pz16qiDV727i6Ede2DQhesnhIvK/czJ0ilDG4axY87OJ3o6R2VJmaj+pmzQ8QxdC4xwpnTQnt4bXVB+XkGvZYYjhdV/x8WzO3btQUAb5S83kvp4// X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2020 11:46:59.2653 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 5ee47d43-f8bb-4665-4431-08d8abef7358 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: m6dR2hgsTEr27tpW4BcAyxA/MbQHm1YVO3kPIjO5bxN2PiP5E9bP49SafENP5MUi X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6653 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml | 105 +++++++++++++++++++++ 1 file changed, 105 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..cb4c6f6 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml @@ -0,0 +1,105 @@ +# 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: + 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 ] + + dma-ranges: + description: + See section 2.3.9 of the DeviceTree Specification. + + ranges: true + + 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: suspend clock, used for usb wakeup logic. + + clock-names: + items: + - const: hsio + - const: suspend + +# Required child node: + +patternProperties: + "^dwc3@[0-9a-f]+$": + type: object + description: + A child node must exist to represent the core DWC3 IP block + The content of the node is defined in dwc3.txt. + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - dma-ranges + - ranges + - clocks + - clock-names + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + usb3_0: usb@32f10100 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10100 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "suspend"; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x40000000 0x40000000 0xc0000000>; + ranges; + + dwc3@38100000 { + compatible = "snps,dwc3"; + reg = <0x38100000 0x10000>; + clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + <&clk IMX8MP_CLK_USB_CORE_REF>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "bus_early", "ref", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + phys = <&usb3_phy0>, <&usb3_phy0>; + phy-names = "usb2-phy", "usb3-phy"; + snps,dis-u2-freeclk-exists-quirk; + }; + }; From patchwork Tue Dec 29 11:37: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: 355361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E78CC433E0 for ; Tue, 29 Dec 2020 11:48:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA5F720825 for ; Tue, 29 Dec 2020 11:48:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726016AbgL2LsN (ORCPT ); Tue, 29 Dec 2020 06:48:13 -0500 Received: from mail-db8eur05on2086.outbound.protection.outlook.com ([40.107.20.86]:50497 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725964AbgL2LsM (ORCPT ); Tue, 29 Dec 2020 06:48:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fiG+mc0DgyCS+htbQ/NAiqHxAh4E1IaEJU8+RbgViGbeI56kjC2mJzFM3GOco7Lg8Dpdd+43nKk+QRMX3ffm/99pOM/xnbw+ttsOYxMAIpkJyOUnyHVDKhuI+QNs6/oG6RBV+lKpwEA4kcYDkosXEll448nrYB87c5Lq7VvseCSbOPH83uWSD4OTYlvlIolbVg58+Q7gZDvjaQxFd3tCLkOpDiD50Ag/cr0+4PSa8Lmcp7f84Ft4flR2Q5NHkTvjU9YHxaxeLzykFxCn/NfCHJglc0z9db68lkOofa6ZqI2m54iqS/WoJ/qYS1ndkUAHkDvXGQmgxVRW0g9uq8iBZA== 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=J1ZHb9nKC1jaMU0wzeDCWAt3Wlj7zGMTGS/Y2i2RtTs=; b=RnKF3DQKzwDDGjat9Zblpndt8XLb3iXHISHRsme60xqLKZ6/Dx1kbISVdjR5oGImt4cW1FYYXf1LWACx8GnPUW7eWLKXdzSnVsZSZemGmyLZ7aYGlW92RSasvKhU7/r2w0zEfoDp3lrcSBPs39SZhwXFHO7sSQDQlna42ZKkCn4wAXEAvcKLPGlgVCQpmZfyWdpRSQ8Omq+6kQ5D7JfLtyeENBGS/kufAmlfUNbH2UTVpvku1wHbSEcLQ48R/SHh5YaPSTvJZfa09AumBdnDZxZOyuZz/RX/7TvpxUm7HUCrPGTjGA1P8uxxs6GXDRtwG5CniKn8WmLDahwp68E1uQ== 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=J1ZHb9nKC1jaMU0wzeDCWAt3Wlj7zGMTGS/Y2i2RtTs=; b=DzwkFFs95ezlYsvYDV9dAyriQg11UFiEiggASHfV2qOXb3+Umf+Q8fu5xb1Jy1WPOz7uX52BpW9AEl+MJ40Mm0eVVHUKOBtL6oZ9kxYO9Nx2r2pXqTf1A79MkmapvsD+xfCJrOfzTc1qU9r6cntcs2vmIN6xT5SAzQB+kCIPz2g= Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; linuxfoundation.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6653.eurprd04.prod.outlook.com (2603:10a6:803:122::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Tue, 29 Dec 2020 11:47:04 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6%7]) with mapi id 15.20.3700.031; Tue, 29 Dec 2020 11:47:04 +0000 From: Li Jun To: gregkh@linuxfoundation.org, shawnguo@kernel.org, robh+dt@kernel.org Cc: balbi@kernel.org, krzk@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, l.stach@pengutronix.de, jun.li@nxp.com, aisheng.dong@nxp.com, peng.fan@nxp.com, peter.chen@nxp.com Subject: [PATCH RESEND v5 2/4] usb: dwc3: add imx8mp dwc3 glue layer driver Date: Tue, 29 Dec 2020 19:37:44 +0800 Message-Id: <1609241866-9508-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609241866-9508-1-git-send-email-jun.li@nxp.com> References: <1609241866-9508-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) 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 SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3700.27 via Frontend Transport; Tue, 29 Dec 2020 11:46:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 81fdc84d-ba4e-4eb8-b1f8-08d8abef765a X-MS-TrafficTypeDiagnostic: VE1PR04MB6653: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:605; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zjMiEJf38qLOkZEUxGKAaip0tK78MYyGQMn+/DCGAAKs6ndmXzrwKxCPztFdqOPlqa6eJBbl6EVMWQqPQ+DfPUc5kD3P5u6zMqyWtwKyvZogFfs2j4RUROCxHbegVxYJoigcIkSmDZ+yBNto7ke1/MtvjmaoeGhNO85e4g8ltzat0pQ5PGccnHydq0PuB2vUbSfIyGveXDp0YXupS4+40mn+nEyRebZnDpld9u0dcwmoWHHM0feEvMx+yzU7t+/9+4Ts5+Z8N3z64I+KzvItzR8zaYjPbkynz63+zaYH6TzbS8icRygcLf8nJyvQOz1vRGV4AvJkWwXFDw5IqqtTcSPW03NchjGUkAGYIjHpsDq3YJRUkVxte+5IkU6bNYKhUfAiA9bPs0QA7F/m9hF8nSbtuRobKFzEYSJFm+WxE4n+8NMGDwMqU83ClvzU4gL3tOYk3+jxKn2ffli29Md0LMrpjvKgulRLY8p4gCozq8M= 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; SFS:(4636009)(366004)(6486002)(6506007)(66476007)(4326008)(83380400001)(26005)(8676002)(66946007)(956004)(30864003)(2616005)(2906002)(69590400010)(5660300002)(66556008)(16526019)(6512007)(498600001)(6666004)(8936002)(7416002)(52116002)(186003)(86362001)(36756003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2CAOiZDUz+YuQgsNOslkp07nZ8ejbl9l5m1ixg8DzlY014rcFN7hXJfM2WtJvGlWFzvtOFaCrvjcltDJweUM6MRwF/yLFRqnm4WHeAPyV3HfmGFoUg1RqqHUlqhrJbZa/b10mLFrzBRp/NBjNXpof+geXtYSmmnBtKmJmSISwzm45RwVFRcsaUwu1fDjAftFz/nJeJmIeCLdsIADNG736DOkBmppRXrehIJodVACxJwWRgTrwCr7fM77VwXtXUVTmxmXynWo5rnDvNK4aTu3KRimSDgEOJAxOX2WMscbWpyqKvtFM//b1UYlMeUXUDoEJosVnWS6krehB/qX+Mrg/JfO7bIw6mr4df346PVUYMlsjitK7dmK8pvh5GWjZK4sVLgIixcB/JjNej80wa7srgzGzi236pEKle4n8FslBdFSANsJQCX+InepcrUB+WjfamkZg+kIEMDPqMDRNSaH/x9xe5Cjd+mUaes9IFiClyC4u2AZml+kZMS25knE2nzNJ+LFO2Oax1wKUASbQHYNLZjG13U16ehNYK94zYIyJXGiRT95YAspL4uiPDQvWoenWfNf149H0E7es5hiGMmh8FCf4SRI2FD268k8N31q8uDhTwWs87w60QFaV7QtZ1bKhA8oRgTJkTsBnXgCDEuEWbiGXoxpZGqs8vkVh1KbuzuyJfUSPD2CgAVLb6bVlaFzPZI+n2wOFZMllbQqWMCVmldcHQPQbDL8myGJNb8ewxmRhgKxCgKNb3ekkiGb6ikax3OPPb9gHR7L5PJwWTmE9LsbMuQAErjFkPWDhDk21zsuf1a5UWiasn9LMpM+Mo8+dFtWwcuIlhoXL2VZ01A7D/mhqTxiDsCDpUIJ0VNl8+Nu17bCS7l2+DRC8zBYmhRPM6vi2d/P14gBB/mS6Is6a6Y8m8y0WgDtStotB+j7Y+USLS4wGCFFZy3wMNv8Qm4ReujI4IQUrBIdahXYHv8MvqTzS53sIuoXJd+9OM762a6W2jHV4b5IxHgibbEC8PKR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2020 11:47:04.3214 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 81fdc84d-ba4e-4eb8-b1f8-08d8abef765a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wGYDdUIpbvBNa3tajveQxdecfhk1ioY6B8NYoFT8AdVGzlg+2RRveEFbXiQFc79D X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6653 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 | 363 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 7a23045..2133acf 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -139,4 +139,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..75f0042 --- /dev/null +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -0,0 +1,363 @@ +// 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 *hsio_clk; + struct clk *suspend_clk; + int irq; + bool pm_suspended; + bool wakeup_pending; +}; + +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->hsio_clk = devm_clk_get(dev, "hsio"); + if (IS_ERR(dwc3_imx->hsio_clk)) { + err = PTR_ERR(dwc3_imx->hsio_clk); + dev_err(dev, "Failed to get hsio clk, err=%d\n", err); + return err; + } + + err = clk_prepare_enable(dwc3_imx->hsio_clk); + if (err) { + dev_err(dev, "Failed to enable hsio clk, err=%d\n", err); + return err; + } + + dwc3_imx->suspend_clk = devm_clk_get(dev, "suspend"); + if (IS_ERR(dwc3_imx->suspend_clk)) { + err = PTR_ERR(dwc3_imx->suspend_clk); + dev_err(dev, "Failed to get suspend clk, err=%d\n", err); + goto disable_hsio_clk; + } + + err = clk_prepare_enable(dwc3_imx->suspend_clk); + if (err) { + dev_err(dev, "Failed to enable suspend clk, err=%d\n", err); + goto disable_hsio_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 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->suspend_clk); +disable_hsio_clk: + clk_disable_unprepare(dwc3_imx->hsio_clk); + + 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_disable_unprepare(dwc3_imx->suspend_clk); + clk_disable_unprepare(dwc3_imx->hsio_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); + + 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; + + /* 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); + else + clk_disable_unprepare(dwc3_imx->suspend_clk); + + clk_disable_unprepare(dwc3_imx->hsio_clk); + 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); + } else { + ret = clk_prepare_enable(dwc3_imx->suspend_clk); + if (ret) + return ret; + } + + ret = clk_prepare_enable(dwc3_imx->hsio_clk); + if (ret) + return ret; + + 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 Dec 29 11:37: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: 355358 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5167EC43331 for ; Tue, 29 Dec 2020 11:49:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24BC5206DC for ; Tue, 29 Dec 2020 11:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbgL2LtG (ORCPT ); Tue, 29 Dec 2020 06:49:06 -0500 Received: from mail-db8eur05on2086.outbound.protection.outlook.com ([40.107.20.86]:50497 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726354AbgL2Lsg (ORCPT ); Tue, 29 Dec 2020 06:48:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ok1k4mWCHUXIVhHcU5ZMQvZCeX1aiU9mL/O2ITjQl50tI+YfHXk7z2XIK79pbb4/4WsGtNVaFamvmUBtetgRXIq3S8JhCQcm+x0VM0W96mDJZvd1XUxxY1S47/0HPALWN2Fa2/dIxzNVfs6CYBi3TmNNLW+h6e8UFlqYSvt/591dhG0i2cKnPGGTAoMsNo5WPrsnxVFSf1P1fGoSdsZZnhjw7QZ2iNOtV4R4hi7rmb80Qooy0MU/r06+uvCjupFtbDc5TuLEuWu+ou7zdMPFKtUWQHIf8GBF1sBnEp62NXgrMcDubXX77t0IQklJuo9tYlOmEgiYB3kNsp9cIFWjig== 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=wxN7nDy6tJZnbK3PjRnVd1h6xDMixzZSHlIYLZJckXo=; b=H2ickL7UJfYFYUCK7Z+CLpa2rlzzb8eP5WL6MLUw2JBh1QBlFNPcwITcIuqGDMyMvWutVZrl+dCZa/9ZlNGQyc6jnhZIWLGbjM7rC6SQbocJ3GmIMcOJuc9wjLuyKRHAV31mpHymHHHpXSKy1BAxJz+BWed3Coy0URwz1GQFlDgfMJNJdDvGitYy3/vnTPDEEySHtPMi0ShcWfVCjo0R6IBYfoDlfNgn7NGyaBq+b0y0L7akE9ZsE2ILS/WUeWts+qZsDOhG7QMtE8+pU298G3eLyTd+TW7j/PQcN8a6j2t7z1fT4nbSHul7EwcXuGz6Ro6JJG2QlHty797GPRr8ug== 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=wxN7nDy6tJZnbK3PjRnVd1h6xDMixzZSHlIYLZJckXo=; b=dtJ/KXCabQEmkWv+IJV2A+YOmUh8eFrPPctmfA0N3e70eILZUf4hZAP9xN1gIgw4VhdzKYRf6iNTFN8+0Vlv3+5ZnTcWMDCnjgr9Am4ZG3hczmb7fGCSBP9HCL/91p+lIO4oAPHQyfNdYO/3h6OoWRzkJXqAxzoFbChmW1Qvroc= Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; linuxfoundation.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6653.eurprd04.prod.outlook.com (2603:10a6:803:122::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Tue, 29 Dec 2020 11:47:09 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6%7]) with mapi id 15.20.3700.031; Tue, 29 Dec 2020 11:47:09 +0000 From: Li Jun To: gregkh@linuxfoundation.org, shawnguo@kernel.org, robh+dt@kernel.org Cc: balbi@kernel.org, krzk@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, l.stach@pengutronix.de, jun.li@nxp.com, aisheng.dong@nxp.com, peng.fan@nxp.com, peter.chen@nxp.com Subject: [PATCH RESEND v5 3/4] arm64: dtsi: imx8mp: add usb nodes Date: Tue, 29 Dec 2020 19:37:45 +0800 Message-Id: <1609241866-9508-4-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609241866-9508-1-git-send-email-jun.li@nxp.com> References: <1609241866-9508-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) 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 SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3700.27 via Frontend Transport; Tue, 29 Dec 2020 11:47:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fd7dc1ae-ae95-4358-ad1b-08d8abef7975 X-MS-TrafficTypeDiagnostic: VE1PR04MB6653: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 63YvHa2SRDghLkMJoRgPTW7TdpY9IBpQYZ9FqzrY/vNrB39CX2qVOyfEEm0thC7XZshrE6F776UzunU2iAYj2ggVSXJc10wyvss9HxJmiZWnv5a0t9fi9H0iSLnTk6+mu1VkS4aKV8uhNfUqHhoTOBj0tu8HFtiDCZtsG0v3cUMRPTYCHGKT8QV97A/+wbiAC1EqcfgXZ45DijLj/fx1qTHICnZ28gIFUsHR7ZWkNcsBNJvIF361KF/j6jr19rlnkq0q1ZUPJLjqfkiSVwe5hNmr2xanPRTdsEiYWujGmfYb8HZmZtjTKY8mI8hrVFSAVnmILT4trFR094VcUwleWb7qj7n4csUb0E+fHaHKbUcGYujvqw3wgcmuaM1JexQdQwMkqGKHZ2+4CLPkPObU0RFlvwoGqpEAOOKczMGXbf3jT+J3CiKIYG1wpMLd8PTFUPI7vSdmchc+7/W3EnO392niAMP8vpKFwl7A9v9iog0= 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; SFS:(4636009)(366004)(6486002)(6506007)(66476007)(4326008)(83380400001)(26005)(8676002)(66946007)(956004)(2616005)(2906002)(69590400010)(5660300002)(66556008)(16526019)(6512007)(498600001)(6666004)(8936002)(7416002)(52116002)(186003)(86362001)(36756003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zAEkT38sA5Aj3Xl9NMOEtL7VVwUu5Ogug0j5Fr8G3QRJ2wUV6/00FSqh6igQ+6vnvzXQO+zVdcSsBLp1JmOccqi511G37TKsoTIGbsU0oxLoh6cyVz1+cIGjGqPJzzp8Fgh4VcLzK+EX29dNhiObWkNHrCsPq0q8KSgEgSYj9JpN0nYgPicMNLg+uZOV4MaSBYugYHAd1DO4iNLfRbJpoZPY3631agbf3anyJ1kJwvW7GiCicRMj2lUeRLQJ3sL0IwMx/IeFjfC+tvsKyMOTgbHSNukv/cuv38lXpfWWowP33D7H5RCVcU/IRSgUcB/fus+qcNhY6T0K1bLxR6RPkkrIIAd0S9nc4GIGyjxgnRChxY0CXNXs2kEwbKb26EksSDbMNrUr7mdq/4VSvWpK5iuZMU4OFZ1yIQU7aE8PAWi7ORV1+HGrrpw2XA/weJmbgmolwSrgaUXdI/i7JgCApzyNeKZeVhv61ghjxDmPj/fred9eF+oQ1NhzG2oxx1B1fh/0uezmJmhn+w9giTKraMHgsht6ByHQmPdiq9v5IgkoUOzXHWy3M2AxxqZpYUen5UwRn04KqVQpFYqfN1km6StQXu4iWBqgRwKcFK6FwZhNajKs9ZUwup678653MC8+cCqLXYiAuNytSLjb/mbVjazeMrVEBOrt262GYhE2s1frUACxL+vNCY1pKRVCEYJ6T7AgnIhFyuerktNa4iRkeSW5fGFO5ucwJFCpS39cjVHdVcfQc8DtfrPtcV2dbYyCfFu27mwiya6I0nT0JLaMhHJbifJp/LLHA+k49ptbc32wCQs0k+qpVvajniw++ArQAbsxYiifjtdfEzVgX7zz9H/NlmGPhyHM0u9bUunsOI/9qu23JtnbVjhd+DxC3+5fnYCbbrSesfGLQ2tO380S5Jp7WmwOUcSBvgvRVoJqDGm34xBHhSyvzkPoYkh9FVFlPSTdrYE3d7dyLzSYJsefOiGxzVd8m9ZBUi6n4xafz3AMGXKqUJNyiFL1SsCcM+yM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2020 11:47:09.4454 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: fd7dc1ae-ae95-4358-ad1b-08d8abef7975 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HJWm4iPO14RE8GCGVsZQMUtNm6+D+g3jfredli9U1zyVGy2V8nJV8iQhwVWRQqza X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6653 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org imx8mp integrates 2 identical dwc3 based USB3 controllers and Synopsys phys, each instance has additional wakeup logic to support low power mode, so the glue layer need a node with dwc3 core sub node. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Li Jun --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 82 +++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index ecccfbb..22db53f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -788,5 +788,87 @@ reg = <0x3d800000 0x400000>; interrupts = ; }; + + 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_USB_ROOT>; + clock-names = "hsio", "suspend"; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x40000000 0x40000000 0xc0000000>; + ranges; + status = "disabled"; + + usb_dwc3_0: dwc3@38100000 { + compatible = "snps,dwc3"; + reg = <0x38100000 0x10000>; + clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + <&clk IMX8MP_CLK_USB_CORE_REF>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "bus_early", "ref", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + phys = <&usb3_phy0>, <&usb3_phy0>; + phy-names = "usb2-phy", "usb3-phy"; + snps,dis-u2-freeclk-exists-quirk; + }; + + }; + + 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>; + }; + + usb3_1: usb@32f10108 { + compatible = "fsl,imx8mp-dwc3"; + reg = <0x32f10108 0x8>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "hsio", "suspend"; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x40000000 0x40000000 0xc0000000>; + ranges; + status = "disabled"; + + usb_dwc3_1: dwc3@38200000 { + compatible = "snps,dwc3"; + reg = <0x38200000 0x10000>; + clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + <&clk IMX8MP_CLK_USB_CORE_REF>, + <&clk IMX8MP_CLK_USB_ROOT>; + clock-names = "bus_early", "ref", "suspend"; + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; + assigned-clock-rates = <500000000>; + interrupts = ; + phys = <&usb3_phy1>, <&usb3_phy1>; + phy-names = "usb2-phy", "usb3-phy"; + snps,dis-u2-freeclk-exists-quirk; + }; + }; }; }; From patchwork Tue Dec 29 11:37:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 355359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE1CDC433E9 for ; Tue, 29 Dec 2020 11:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D70F20825 for ; Tue, 29 Dec 2020 11:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbgL2Lst (ORCPT ); Tue, 29 Dec 2020 06:48:49 -0500 Received: from mail-eopbgr70073.outbound.protection.outlook.com ([40.107.7.73]:22087 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726502AbgL2Lss (ORCPT ); Tue, 29 Dec 2020 06:48:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fsdg4KUPbWpLJQ0YU0OhVlaRBg1kQH7HVtSSzyCu+Qqfxb+W51/ceYSR0SPadm4BSpcPVbsqAAE181cVDu6VvHtrPN1xbzSu+XroaKLrW2SMdGxjDFhQuAMR4Ea6Oe2rGZEXvQibLJzk1aL1ctOnV4XTcVulAI0JoPOUg64AGP/y2gLavUy1gaXp+YijZM8ThG1uK1CSFe1nau7t5IbqBKyzIYcTc8NzUSfushz7LF4h3jBb6UFDgMOTz0PLrVOUx1NpUJEPvKLd3aJMZXJ87mo9/1UcVx+bChEcJ7l52wD2nU8Lk02lMxha2mHA39rPsDUo/J/prd58vF0k53hY+A== 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=QWMyP96KTLLg4ZSJ/mYsX69PIzF2bgURpvD9dte1CQU=; b=n/Jm6vq2Z4oLSbTi56dguwI/DrT8yv11EHDho0tVuyDGY16gxbRq16alydbXIWhCcfSsIpf4drwiiaUUqHKRHraKx0p3jzX0hecHVZrQTH74Wsnm8y35jITHrwagchTz9BXR17fmJgFU67WRV6Sqb+uNOpdY1gvjz/QB9jm5c4O/etxDO2gsSztlocrjGtSPEE2NrQlwe7y48ynozN41CRRuOT68owUnY4aDmq4tktnVg7DQmLPDvhTLyXr6ys0zn3aosPsb7THdQzzzDbiLnDeSRzoytzivSlQa8zyObYU/Y2SRvy4Z9n0/zVcW1q2r85gKfaDTsXGPb/icoPqKlA== 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=QWMyP96KTLLg4ZSJ/mYsX69PIzF2bgURpvD9dte1CQU=; b=dZNyde7vMmKGRmmUPynScaMIYBWpAh/LhqU24qKk9KwAEWR3LBNSbD4aOw0GxqEEaL0y8MSaG4MOlDN9UTdnIdKHd3fItNskl+TMclT449cgWlFFieo1uj58WPQBIaxX38LYtr9m0bmNuypLXOIxXWb67Crs0ZrkQj8+SYPhUzY= Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; linuxfoundation.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6528.eurprd04.prod.outlook.com (2603:10a6:803:127::18) by VE1PR04MB6653.eurprd04.prod.outlook.com (2603:10a6:803:122::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Tue, 29 Dec 2020 11:47:14 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::b035:d158:c99c:57c6%7]) with mapi id 15.20.3700.031; Tue, 29 Dec 2020 11:47:14 +0000 From: Li Jun To: gregkh@linuxfoundation.org, shawnguo@kernel.org, robh+dt@kernel.org Cc: balbi@kernel.org, krzk@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, l.stach@pengutronix.de, jun.li@nxp.com, aisheng.dong@nxp.com, peng.fan@nxp.com, peter.chen@nxp.com Subject: [PATCH RESEND v5 4/4] arm64: dts: imx8mp-evk: enable usb1 as host mode Date: Tue, 29 Dec 2020 19:37:46 +0800 Message-Id: <1609241866-9508-5-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609241866-9508-1-git-send-email-jun.li@nxp.com> References: <1609241866-9508-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) 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 SG2PR06CA0173.apcprd06.prod.outlook.com (2603:1096:1:1e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3700.27 via Frontend Transport; Tue, 29 Dec 2020 11:47:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4cc6a4e7-ffe5-4c40-3d62-08d8abef7c7a X-MS-TrafficTypeDiagnostic: VE1PR04MB6653: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:200; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PcgzH8JZhW6uKRPd6RCpbw5tR6f5153IiflhGQHN+eMxrV0BP1GYMMSUjQBehx0aqxKkhJGDisYpCelInpxcTlg7VOalMyaC8bO4rI2aSBf/sCj2xG6B1DuwU+oMk1cdqeRw6cAXJihISqPp4fdfAvs1FVRrLX6QpdmCgas/tX99rBitkKnA+TcQHxw5og5VbZ+5bUMD37+YxGYPuIce0jG1g64hh41Zl5z1MSjGJFDNOkyewAMVUEgBK+Tj36Ztq0FBgWnxI7ntsKVwxnfAaXmzEBuCPnMG/6XS1jub856O14ZIpV9T8dB78AytpCw5LTpbWJ9vaCmwncFFvIqy16gaIUFZgMC6dqjJtmxFtSfCDO+CEkPpf9TKiPx9T/Echb8sXUhUJOGRwc8XfcG+Bpf7hwdiKjrpBKv9c3rVO8lLm67yxoHqVikry63VG4wXfSS4asdO90ojUYSnsFgmPI2Mvi6l2GG9jkV/1lFItmwfqLSPemfh8c9uDOBv1m3sjdDpaZisncfwW1Old+w85w== 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; SFS:(4636009)(366004)(6486002)(6506007)(66476007)(4326008)(83380400001)(26005)(8676002)(66946007)(956004)(2616005)(2906002)(69590400010)(5660300002)(66556008)(16526019)(6512007)(498600001)(6666004)(8936002)(7416002)(52116002)(186003)(86362001)(36756003)(32563001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: rm1L067JCIr/sD23Y/ST9k3/vqxALoexKIVMWOckkcN+0cCkjj+ItcNu/DeZY2rwnJpCH8nijMJW0EfXTjYAQseBtY+D+18o7smBB0xQXt+S29GhyaUJRb85yRK8wCAes+F0XuatkTyj04Kb4yRs4FaxCUmU161YC7JywigG0DrUtqNQRLdyjtwm/6llOky6PlAq8s4f8m3hGPCyaAGWfMBf2W3tmtCGJIG/Ilj/bG9PwSOJcALtj85kcJux5HrhkUf0zdVtb1SjGCT9v3l3H1dzk2miVfGuNTHdJRSksfvOXRInXoA+3mzks484TZ4JFDrXAQ0ldWNRA6S9eaJfgTvVOiW7MP4/gyOhBDEq0vokj8mjaRqwkckHkEF+tU07qOgCjQ7cok2kimem3Y8mtF9vVxJEShQ1q+6i8NExJmLiaaSGSwPhER3PY8ieltPXb7mEjzCpnshhvTvFQUILNTNCkDjdN8oz2vGeHsAMsf2NyyR1+5m+hsQoO8a3ZkmP7vkGEHbnDWogJFhQvWPffagkkHnYToWwawDBKriCgB939U3e4ckXjpChF4C3AF7Y38gE0lLfVKCxN+SxVPDfy+Hu2omWWOFy2+SSE4t9DwFzJRqm9723Aj5pnjkB/znHLwZtIxgv2dNkNfSulHNpLg+A1r37SruP3QzpNPfT2zEm5pICBa+7urakT/f17Td6+3VSVl458WaFxyLTATuR8bhfmup4/vi6hGAaTwqP4M6mkBkH02o+wQiB/+03QALTt+S0x6J13GoYnhdNQOzxje0rnFozKiIWYDsGkrmyInV7cstCOTBklWZDtXzQVTGMflYRyC5Lx09yMZGbBhH/qdOK4d7C068lJ2Kqd/3DHh/q1DUQpYiSjNSeYqqvo9cnUgq1FAFpdHCICrEA7IuWOXF0VtVBXHg/0AutjW+g9gkbpZ0o7yPN6uaLwrr6QAy7PtTmFPYPzpgug6VxQQ50B1PmjxA8R4KieJrZcvbs+1YckpeTe2rrKPds+oTGldfA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2020 11:47:14.5825 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 4cc6a4e7-ffe5-4c40-3d62-08d8abef7c7a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vnajqx15cpyQru+TriUa4lH9fDe8GdP37bZGn+bVxx2RxZLD4K6ML3WpyN/tQLG5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6653 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable usb host port with type-A connector on imx8mp-evk board. Reviewed-by: Krzysztof Kozlowski 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 b10dce8..7db4273 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -127,6 +127,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>; @@ -232,6 +247,12 @@ >; }; + pinctrl_usb1_vbus: usb1grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x19 + >; + }; + pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190