From patchwork Fri Oct 2 16:30:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11814017 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 5C76E112C for ; Fri, 2 Oct 2020 16:36:31 +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 2B68F206FA for ; Fri, 2 Oct 2020 16:36:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="flIJL5J/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="EmA6mPoj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B68F206FA 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=24jbis/Xl3bRhORiviwCkk/vSnwDadEOx0MXJn89cFw=; b=flIJL5J/sWma4gy8JdSlmocV5 YKUdOYST84IjuoA30Orc19x7NZnQp3sEO3chVhfcWfMrhQ/UXayCa0qP2Xy/y5bLP6HLMgJOgVm44 XqpdxljU1JZQv9wprmbjBH+uezBTZZZXad+qjDeBHZAMh0KQREAmGjKzOMDJs/eToZX/2kDHWyj2v 6EZiGd1y7toZq4uHTMcRRQWsHxagnRWOwjYgBAuhuLrrehi2p4hkCho/1F6/2LrCeaSNgYFEvL9Nt xfHTYJQkjo2Eri3/NXeonPrphsgXhEoujqboIIWkQsih7tmURrcs/Bf2KjfFl6zSuIwLrsqZKr1TD rnEC5bG2g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1T-0005vU-Dj; Fri, 02 Oct 2020 16:35:07 +0000 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1P-0005tZ-Gn for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:35:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iivO7H9HWNbAEECc/pAZFPxSPFIVU3LVIzvHk3d6I454cCjcVu0bqiLENv50z+OXDu6cTKrybhiwATm1z8qzC9eJ0W6b+L/xeAc90MMRPkBHcM4+YyUcnJIIDARyABOnID25pbiYX8SsFiZjh01qjav0J7qOluHRbzEj+XZkB9uVzjw2dqCeLSZ/O0zNo3kFqEO8CvtgmLWgzP8Rj/SI6CwHaJ2nu/jXJP4phbtEmj/dP/o8nMYTCBmvBcDNxrBDWZVc2kqOScfx6Rz5KFbeOX/C3lQ4UujWP/IQRTO7EkA1wXHAeQUleICGw7ZVAeD1kBBhRaG/WZDjFCMEcbd6UQ== 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=XDk7C19kuaMI/5I+0YF1/csKJqPOVWRZvu0PEdXJ6Mw=; b=kalJ5DyvC7vXEhpTP8d7erNaAMIg1vkEX2XpOD7pMTZbafs86Nh47/mZlyoPm+4ECSUozHUUiEbMM7mg5m/3Ax/qF+q22ErslX4LgRzAHDlma1iwucCkzlD24x5q6BF8r2EKvGeP8SBQSJto/MLQyBZKaKFHAs3eye01STyL+0XhGqN4SVhcAnsUbhOPOBplYog1PLvrVKRR+INcHjnX2hVVk7TfFVjnu0jFZKnjYOFZWTf29G4tMBpwbFEXX5GNzF69b5773wwl4zm/Sab3CgEJFZb+l4EVuaxZRy9VK+u7FMwXdxKgHNhsalAbqDCygLWYADZBOm8yiUt6JdocWg== 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=XDk7C19kuaMI/5I+0YF1/csKJqPOVWRZvu0PEdXJ6Mw=; b=EmA6mPojXUax3m43P4TmUFqH3vZazmlF5NmMoF9nv/ZUWvPpFt0olpV6M6wOr6257VlMwPnj/qizhKDbe77RQ4uEg40wLXe9tB/K3vUOdkF+u79wAb+7vy3aE9gPMFLaCIMSR60EpAgG2S8V8z3o8lFMTmueeF2Ye2KIL8nP15Q= 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 VI1PR04MB5213.eurprd04.prod.outlook.com (2603:10a6:803:54::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 16:35:00 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7%4]) with mapi id 15.20.3433.035; Fri, 2 Oct 2020 16:35:00 +0000 From: Li Jun To: robh+dt@kernel.org, shawnguo@kernel.org, balbi@kernel.org, mathias.nyman@intel.com Subject: [PATCH v4 1/4] dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings Date: Sat, 3 Oct 2020 00:30:35 +0800 Message-Id: <1601656238-22232-2-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601656238-22232-1-git-send-email-jun.li@nxp.com> References: <1601656238-22232-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) 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 SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 16:34:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: acba30b9-8166-405e-e236-08d866f11aa4 X-MS-TrafficTypeDiagnostic: VI1PR04MB5213: 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: ddKYH3cSIvMXe8CRTFFHBbZ0xHyxH6n2T23pdQf+htwpj005+aXlvRiNj/uldL7385HVXzyAeqdQPaOyjqDJbd2olQiA5lwp4xOEAB4ZJkvmKVYdsvR5RYrGWWDRJbHtTtV/7d2rqfg9Hju/8bJk2lkTCCOj7xtg1bLqZsfz0r9FdEzTLME1GJBsu0LRXF/tl8CFgct4vW2KgY5xAZdU7g3n2Tk8sEFRErZ672pOrNUb+PwdNxws5K02ETJBs59Ooz7ZiaRsPRSj9N+pMckEoUnjjLVqR7CTVG/zUTU27VUIVk38kyNg5Y7X9YnAxYwooZDvx10jYRQkaTPDKDhzCd4Dl1qvO341VVfUbthbiuocvG2DDDuaBYCqqHUqFXGXnRBRLZLkzfdehWi4u18JqSeMkKjhcvxxfwxrIFei7TpUjv2y7PK32FCnZiPVPHuh/Zlft9UhZMf6f+Xe8uNfKquy+Bl4HXdS0CizLwtIMwg= 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)(346002)(366004)(136003)(376002)(396003)(39860400002)(966005)(6666004)(52116002)(478600001)(8936002)(6506007)(16526019)(4326008)(69590400008)(6486002)(26005)(186003)(83380400001)(2906002)(956004)(316002)(86362001)(8676002)(6512007)(2616005)(83080400001)(36756003)(5660300002)(7416002)(66556008)(66946007)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: i6nRHOaIDelM3MTpErx0JngBwoOFR6qULsgINkbT2WLiSitzDNINUSGubwemlSk9024mQebGxyds+Fhi9PQeEHkkqYuM1k0s6oozIBy8jWBqGZuRpODBhtPpV171iC50fSb4BpLX2E+L+GEc2EdEyxZXd1feKoPoQmsALyy0NSzg3B9bw5x0CyH1YBGp6o7tffLHmkcvt4oXM+NYGfD4q1xayXA3WJb+D5IDMuHGShPuVO8VpnqHCu66+5QecSNSAc0//rh3wBv+zkCRxL4OJGz+WdYuYKhiBG2y7teNmo/7kmXQWbLBPEs8FHpM3pKltb3VMsm3Qwmfq6VrQCldrZkfNU5J9aZjR34x3DjgL4Zmk+xnH/DoFcBaB15sC1Y3rYeQNsD2yOiE3jC5bzHRUOtPQxP28sIbXxfbq4Jkz8kLei/3gmECYvn5g8SMWPU2AwpNR8UFdBnzR8ZeAoSrXUF+m3YNptWLxVTLNxv+U2ggGZJRB7KQxhVAnrDtaLu+CZidkYCUno9dNKZTjaSocIMWH3wwqqE28o7RLfAsOj3grmTUASQGoGvyMyTNrIZg0n9IEFHnrmCFJ+K5oM7rPX9PjttKEw9IKt+HedRoydApSxfiTooQFEw9oyKUw1uK0uyO3gCegRtW3b7MJ/YZaQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: acba30b9-8166-405e-e236-08d866f11aa4 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 16:35:00.6722 (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: tppWEdjgZW7IFIiHQb0KtJdxVqY5Pl4yWiZO85/r3ifYW1ioHf2fRJu61RwLSsal X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5213 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_123503_623427_4633066D X-CRM114-Status: GOOD ( 16.87 ) 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.21.77 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.77 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, devicetree@vger.kernel.org, peng.fan@nxp.com, fugang.duan@nxp.com, horia.geanta@nxp.com, Anson.Huang@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, jun.li@nxp.com 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 | 106 +++++++++++++++++++++ 1 file changed, 106 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..c16c94c --- /dev/null +++ b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml @@ -0,0 +1,106 @@ +# 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 ] + + 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 Fri Oct 2 16:30:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11814021 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 770B013B2 for ; Fri, 2 Oct 2020 16:36:42 +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 324C1206FA for ; Fri, 2 Oct 2020 16:36:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SPNx0Fcf"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="bvtQIjNj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 324C1206FA 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=cxhGu8XK4FSOlEqPwKpm2C7kfV4UzqdiGZnBJBay/EA=; b=SPNx0FcfOExJxQMIJMRcy23MX jxfFrwFqn3T1JI8G3QlG5to7JLG0/6Jv+MvuIIPRMLgRNpDaD/x6QyVj8q/J5UBXmy1lknOrNarfw bOLTqn8+hdP0xROgizggxr5HhnzB7za2OkhPhNL59r7yY0OnMhTFVzj6lBW7gGG/KG/2W9PX6TJKx 6c2AbIuLr5boqE81P3PHCgy7cqK6G4Kc7FWSgdwGA6jcfkdNo8n8Qf/8tRgS0sEM7wjOrq+2Jnett orQfrshqxz2uKWGeM7NsKRKfXuAJBMnbqcwHGCqSmtm3q5gcEdF8Dqlwlwq3GNQolYAgH9bQsCNpp r4ySyUuAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1X-0005wZ-Tw; Fri, 02 Oct 2020 16:35:11 +0000 Received: from mail-vi1eur05on2086.outbound.protection.outlook.com ([40.107.21.86] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1V-0005ve-1V for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:35:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oixx7U/adOp2IWgNYpc7EU28HRIp7IW+9fcc7qiiAPQ7pqtVtCKfQhSXzOocE8O6S9gcmWj5+Hnqqzs3MFMZFYq4ADsY2SK+5buhZFCzAyuZA/IPzgKu2zlTYZCyqkdQymYT8CXaH2JM/gRKvu274JuhzQd0dkMiUDzsmyalkX9nqFic11HV8hGqQEYLm4JmDy6ben0Mc/xieZs4mMvTO619MuEPo+s43EYFn29lKV4ysRSMMA7LDJQTu0mFAQxLL6ohi7/VjPh50IUQ8kf5j6+IXMVxhV/RP/V4wYLP4yAgkxlgKp0HgdMAtRXe7B7hMbW5jNmWfFQC3uA/8gXbmg== 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=OKh2UYPNTUkCSO+gC68Y3xAm5TElfnintnKUJLc8uMEJAlgxjKEetu0si2qc/yipXgosytmZ0t9GO/iHG/KavN/8qvM5vlfb41aPUKITBN142+SkC1InDbpwB4TAArI0wsbFwXuFHsTEcjtT4dQVxeqQDEJoE5UzHpUfm0925fX78u6QKUEDLmV6BVOAdQdNyc790+LdCUtcyZ6wXBkri05bmEbfV0Jx9sapxCfVwXscM0Kho4mEDx5NhNZ5qvjxfmIVOver7w80udZ/E98Zbrbe9WJkmECW8QPgd7GjAL7D47qwLHWd2AS9s7dLL5s8GOXNq96sTLliXWevCp82jw== 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=bvtQIjNjU7+sSXvbsNSoPq51/gEWXr18g4BKBEzZTC+OF82NfUIL7Aa6zVa2LuNq+CPhjGp+H7vy0XBAqcRXT5s3SABrmeAgjk4pRCuZlN7UoPM3ApfnJ6OgCP9GXYwcNIjuwe75xCCgnmgiK3ewl1JBOFwZ1PQSZdsxbrVOnus= 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 VI1PR04MB5213.eurprd04.prod.outlook.com (2603:10a6:803:54::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 16:35:06 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7%4]) with mapi id 15.20.3433.035; Fri, 2 Oct 2020 16:35:06 +0000 From: Li Jun To: robh+dt@kernel.org, shawnguo@kernel.org, balbi@kernel.org, mathias.nyman@intel.com Subject: [PATCH v4 2/4] usb: dwc3: add imx8mp dwc3 glue layer driver Date: Sat, 3 Oct 2020 00:30:36 +0800 Message-Id: <1601656238-22232-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601656238-22232-1-git-send-email-jun.li@nxp.com> References: <1601656238-22232-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) 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 SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 16:35:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3a3f3570-8740-473c-474e-08d866f11e96 X-MS-TrafficTypeDiagnostic: VI1PR04MB5213: 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: oaGn8K1u+HK44ZBMYGc3qDCmh8UyYpKIGLaiK8UYjqz64KLZo0rXtIFZ/srKXbucE6soyQElVHsQOEU0iG6LudxHhvcQZNVg4+p0ppJoV/QoMKd4XmQlH0Vdm/DGkfK0+RSiT+ymJ6iMnq3KrGo4LGYNNduOxXKmw/3rxs7GOs2KG/X6QEEPAsluuvNRfpMb3MgSz7b9egVbLaQYUNF2HhPv+gzAwY03i541yVYEUUOBOHiduLJZMONmGqOvP5gjo+xPcLG3ZW9Js1iwcF5m5AyPktj8oXOvvnISKmmKKVAkVfCnRLjXrC2Dm3s5Kc8axxYwO8xa1DeYMu0bqhp4th43yPVLNjeCcInVLLZHtKoMhjsS+OwTeekPyVRJIk1oMkbmwA3kotKu2vRUPfhcNQ== 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)(346002)(366004)(136003)(376002)(396003)(39860400002)(6666004)(30864003)(52116002)(478600001)(8936002)(6506007)(16526019)(4326008)(69590400008)(6486002)(26005)(186003)(83380400001)(2906002)(956004)(316002)(86362001)(8676002)(6512007)(2616005)(36756003)(5660300002)(7416002)(66556008)(66946007)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UQ4ZCvPLFCNUn/WqE7NLbMiWDNu9+ybwBPSvA1ld7hpe0dxXTCOJ2Gt4CIEW+nnF/IK3+XdIJxXUQd6tiXEiEtD0yz/5CONJ0xsgTMlu/q+2FjMa4EIc12XmqJId+2uyaC+vv7367wpjLmKQMmjA7XEUG1SI5y6LHPBRsThxWFgD8G8tICnr7qvxiBOiQ2vtVTcPHDw0QPl1nBuMYuRc6asHxnqNmddl/luf6lcMV3BH59CZ2Kr27J/DcxCxdVdBM3bbekZs9voJSJnG4cMQ6uco88Fjyfd9E45lCR8iPa7/aof5ElI8Td5GbGf9JjmBjPhDE4U72Dp2D6nX+hQT/TguBCgVIqMHPS1wiLJueGDdm8YCCbSdYuvMns6LhLDrT9aTEK06GBm/2TpqO+OYPbuDbs9Noyn1UaK1vpTagABqs+KQXWEjkLFcnj2CVqRSF3b2tTcAlg8eq/XUqnNS5oGZLpb0yTI2cZv5aNZ7oWM0F1uRwI2FbPAOvDEN7BC5PJe9P+O2rRvx4tMzkMdO63FaqCzfYn7M7PFhkeL6QnItaMasQGEn+kerQ8kT6bumiNZJBz1dDDntCEbqRr/Z2Ec4mSKSpFdlbcy2donAfcQ2fXHFsoluAVigVdjfZn3KAiXp13NANgyDKXkeKEPYqA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a3f3570-8740-473c-474e-08d866f11e96 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 16:35:06.3969 (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: vnI32hn3TCvsXLCksb0GE8pEvpHFUuTiT3WAVhVRcZA71uIvu1IVX8Txogl9DA8C X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5213 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_123509_223493_AF62826F X-CRM114-Status: GOOD ( 25.00 ) 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.21.86 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.86 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, devicetree@vger.kernel.org, peng.fan@nxp.com, fugang.duan@nxp.com, horia.geanta@nxp.com, Anson.Huang@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, jun.li@nxp.com 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 | 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 Fri Oct 2 16:30:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11814019 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 C0916112C for ; Fri, 2 Oct 2020 16:36:41 +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 8942F206FA for ; Fri, 2 Oct 2020 16:36:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WApFSU2b"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PKOZcQPC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8942F206FA 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=izd8BwruPUV08dyRclXOq6l7m4V31FJqg/QdMspd+X8=; b=WApFSU2by2pXXMNpH0C6fnJnG NdfzGjqgCBsGkxJBGsSSGJp26Pm70Cf/bOEpTc5SQm8tj/qM2YdNRfF4x14jtUd7bIselwyBNgHWJ HTVaeDrbOuHuuqrwiCY2SeMjecUqv0v0YLKn3Xu5BA3+8X/+R7523co5R7FZD7SErxuPE+wk8ZlMt g+4sbK1V/k8nsoUw+3IMnRd1+h5vTjA3qv1LF3deXyfgLlZ69w23WLsqMF7OF1ESbotFOD51Xj7Ni fwLRYewDCnaQXX5T8FNCwoT/lqpXy/jeFewL8xCtdswxBtK7YPwvrG9KI/RO0Zmn4Wx5YHFd/MOOQ zvlD4+Etw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1f-0005zS-9B; Fri, 02 Oct 2020 16:35:19 +0000 Received: from mail-vi1eur05on2088.outbound.protection.outlook.com ([40.107.21.88] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1a-0005wx-Sa for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:35:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NnwZlngejtZtZDxDLm51jMzMctBVIBPEvsq5qWPUtSKMRRYAozbf4bGPrJnpQaqC1U+advheU3vIz5i13cu4zHFUkvvZKpYdXN7xNGfbO6zT3j/1q8xgcWeAQ9OwgtvUmW0TJIWHD2MghJlL5iKNQNAG2NQfXEJgvqku7U8tZFYlQVjt4zQKN5dtayYbN8pGM/WrUmhFVNpHh+q28umNTEH8EhlE/FExrejsJwEueaxm+pMwT3s/SrPfGSo+YGLA4lENab/TGJr7skVpJLsoEii1wORZ9wwg29ao1RujjPSEkvRpWa94zhiAJkIDreqbXF8/QK5X5LZxfpNh1QIzxg== 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=sGx+Z3/QdDoUoM5iX01NE8PnOAQvfCrbtQp5XCZtKAc=; b=Wt6Il8aM5xsSPbzsS7z0w1t+S9bKhvLSc1XPyTfuBLUALjD3dVLQh8SGjURh6OoNwCXCbmjaJigOzypwxkgsV5WWM2do5AHTzx1sbefEyoxlZcoLeiFclu0pzKr9PBPlUmgiJQtp+3pnHcnxk7uJM9/ne7kYIhis91ot8SUO6OO29bg4t8tG1rDh+hnpLptZ+5xBWfdnZ3LV2xFlD9PTGqgie2ggVUZ/Uh5wupR57fDN1BSlYx1Mxxx/g1dScf1oH6q8RfgR7vRnlxNBtOFkEQyr/CC+91AxEDUEUPuuYkDbYSvweMPUEmb1Wl01a3KAcFa7/ov7K7I6HJtBIiHdbg== 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=sGx+Z3/QdDoUoM5iX01NE8PnOAQvfCrbtQp5XCZtKAc=; b=PKOZcQPCOPozI8g2hKGTWxsfs0OrmDD2oNApZr3BQIT/wKpCKGhczvg8sBvdxjwIBnK9ibXgoAYW/aVKb7EeuZ0OO+9Sm5ySlSHrdFlgVV+uIrbCqK5gbQiHLqBJH6KdYkgcbnq8rbG80W6zAF7E0vHQHGA17NJewWvGogW+Eao= 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 VI1PR04MB5213.eurprd04.prod.outlook.com (2603:10a6:803:54::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 16:35:11 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7%4]) with mapi id 15.20.3433.035; Fri, 2 Oct 2020 16:35:11 +0000 From: Li Jun To: robh+dt@kernel.org, shawnguo@kernel.org, balbi@kernel.org, mathias.nyman@intel.com Subject: [PATCH v4 3/4] arm64: dtsi: imx8mp: add usb nodes Date: Sat, 3 Oct 2020 00:30:37 +0800 Message-Id: <1601656238-22232-4-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601656238-22232-1-git-send-email-jun.li@nxp.com> References: <1601656238-22232-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) 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 SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 16:35:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: de4aa2ea-a61b-462c-fe81-08d866f121d7 X-MS-TrafficTypeDiagnostic: VI1PR04MB5213: 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: 5Dv9AuRVTYtbBCYGH24YRDF+V/khs9mDKn5P0jsiYCp88saGI4q8BvFaFgRQnYwBZL6Hf9WqUrhxTZM//hyQTj89GcL2pX5/ia6bz2j2hIOs8Pmte+U4qaJMigYyONeCQk+ZGvW8ZV7vJvJK9FL2/MusUeHPfiaiAe00VG+URlDK/IcEDfAIJNDVagXOcKJeWLln7w9ixgcaRVzBpvlM4sCLNQujFFgnjk9qk1yKXZx+ibWAnn1/dtDz2KmuOoG4AH81M97xoBY8WNVQ85WjfWyI6titUQMqFqHTuZa8r/WxFqn7SYV0e24XiDFIP0YsqsqcEBQqZugMrawpM+5R/eKhJcXqdgZP4v29deFpAzxZpCnWCIFc9ix86B5LSRV6/HezgH9p53AkL2Tege8fm8gjvQXRI0HjmV0xo4UzQ6k= 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)(346002)(366004)(136003)(376002)(396003)(39860400002)(6666004)(52116002)(478600001)(8936002)(6506007)(16526019)(4326008)(69590400008)(6486002)(26005)(186003)(83380400001)(2906002)(956004)(316002)(86362001)(8676002)(6512007)(2616005)(36756003)(5660300002)(7416002)(66556008)(66946007)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: eKFnUBgImiA9BiqBJt+lreiiChnoujnAg7hmZlt4EfQs5A8x0XtuZNmUnDNTOdMyQXzSzJA66D7/+xJaIlPiDuAWWFt2p3moFDijYMnNHOQvbI+hmpfI2JsCMZ4yF+MvmfRU75mt854emjSYnbmvDASNeM/mpqREdyFZ5ZYPvHJQr7n1XeUZjSs61Lgp3ZhOeNQMItHWh8QR4bqtDEwcuQDukL5Uwd/p5RJLyPhaZNrFBxeaXcVVZQjTR0jpv2qUN3rZRPWX8jrqccjwvmYaSZudYbGYOWwwMzlhrqQPWro5BGATmKVhIcsnrFamH5NZiieh6jG3/bISVGYVaoWn9byamP2iVWJrR7RWLcrXpoVyh8Wwrk7FG7NjqmqBs1nSZxn6Zc47ws6iyEVhC8ZGAGu4mPag0pT7njoeE3gGkYvVl5FiOCoiVWvCszxSvKdLA9v/idqDpzmx4QOb+HS+3XfeJmGHwgduiAXd/dkpUTzk4/3r9PvQNCVQ8HYlYeCWwBaIb85NXFDwyqaWI2S9ZhQEQre8LuqCiOAZ2u1eAPKVl0MK/4suCJJaG1FPJmv8v5WOpL/NYEnBttdlO/cU8XI9O2qkurftmLWoiPywEJmR91j5Y7LLUK7uQinv+2rJ4LYO4f6CKWedfnMBzZpBdw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: de4aa2ea-a61b-462c-fe81-08d866f121d7 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 16:35:11.6378 (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: vON4vZRTnFGZHgI8ElFag0DxwS5RnptxJzT7aZfZkNZqgk1LUAPUzahQumljCqKP X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5213 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_123514_959730_AC3D146C X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.21.88 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.88 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, devicetree@vger.kernel.org, peng.fan@nxp.com, fugang.duan@nxp.com, horia.geanta@nxp.com, Anson.Huang@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, jun.li@nxp.com 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 power mode, so the glue layer need a node with dwc3 core sub node. Signed-off-by: Li Jun Reviewed-by: Krzysztof Kozlowski --- 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 9de2aa1..2d2efc9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -750,5 +750,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 Fri Oct 2 16:30:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 11814023 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 CFB5D13B2 for ; Fri, 2 Oct 2020 16:36:47 +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 9D1E6206FA for ; Fri, 2 Oct 2020 16:36:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C2S7FMR/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="WiZK6GSa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D1E6206FA 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=TALlaVVn4FVmyCdLtGAcpamb6iZlxEnAOuhZIA3kyFc=; b=C2S7FMR/wzBsKzO+iiGNk+jyR gIAyip1G/ni042vXw1gYVxiTmNZ/MLqi4M36UmjDmMNu4eZqKqj26qacCBnlc84wuVLC9ch4hDu36 mcM7eAcda11DLvlmoCnJXPeWjhwdg+UD7tty3NzsC1LGrqjDzfp2oUTPHQ28Dm2RboBVHnaWd7Pvl 98+qKpn/uGCkdHxawCpat2QHBaHrsDR6UadKCSa3lbxJfwfCqFgsfcLkJhwEG+cUOURsSiUB8i+RN pXUeNWT1tCqngMUm0AATbrgq+uj09/mqGIYNkKngWwgFhlcVtmgEgdlk/QpgxC+Ek9lDrnmgdi6aA x4+G8dfjQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1k-00061l-JF; Fri, 02 Oct 2020 16:35:24 +0000 Received: from mail-vi1eur05on2089.outbound.protection.outlook.com ([40.107.21.89] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOO1f-0005zI-Ek for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:35:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YyPNgmrMv1hQPZz7oKaCyM6mcqnXd77WhCEs9GLKI4FS7woJs8GaBO3oOZIC+XDpaTiCPP93cJi9mNf/llTzSI/ra2HESQNaQUyRIzzzNhQiNFoUdeEKyOqIFzy6XM8sfXnFjYxjRpFG9SyO43IX8dkdh1a5ihO/rBUn0lPcHvC0OTl6pZMl1Kz/0v7UvkUJHACrc0EJo3MgpKy+93CyUsHpCrogrez4d0dzh1oCtjgu2ItzUg60Z+uPp3aWFSBAiJ0XkWwh+twSx+Gs0F4xukasPtMHuLiWxEGWL7EHxg7wuzjRRRJQiXqwwxymfm8MLU04JdTEhqLAWWL0DGlVyg== 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=QI4zXmZg7Uo6OKFNqSKKwim+JAGdaV75yasTPS+Lg1k=; b=fF7cWdJONzvTKzTBVvS26GWE6HFauMhg79VM1m8JOzw/sqV5AszRtYm83cYoBnH1WCiBdU35HPq/nbNYU7qfEzfjfJSWGrVLMO0CafL2+OSq7tRXai1Ezb8kKULMn4eT4evDWH2VQKjxlh5LWpZsUckuSkLWQBgL6R4B6/T4tltEPupn91C3Vp6X3Q1vu4w5fB8fl1oFvOIGoBVEiQ2kIP5yk+Uv3ZK9r+hhOABtQUCkCA1sTXHze4fh10CHPkH7wmevSG22czH4uvzm1E6fNGbiQ0M2wnmvGXFT8DBz9tWJYTZ3wuGV7FgWV8pvIUQmanic7koppeLRqB/OVpqT4w== 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=QI4zXmZg7Uo6OKFNqSKKwim+JAGdaV75yasTPS+Lg1k=; b=WiZK6GSacd3A9m3b+3vWQL+7PynYaDZ+oS2P62JPyzQ2I1vx1SzMLIcadi9k2RUPkGcA2ay2ZSjLsu9U0M6233fwdyOYVdAPr20vPcQL0e/gFdInYUOtUFBzByiE9yE8UxQA+mUFw78DyNlLcbUgdtbruQERb3wlBU/9p3y6hKI= 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 VI1PR04MB5213.eurprd04.prod.outlook.com (2603:10a6:803:54::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Fri, 2 Oct 2020 16:35:17 +0000 Received: from VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7]) by VE1PR04MB6528.eurprd04.prod.outlook.com ([fe80::acd3:d354:3f34:3af7%4]) with mapi id 15.20.3433.035; Fri, 2 Oct 2020 16:35:17 +0000 From: Li Jun To: robh+dt@kernel.org, shawnguo@kernel.org, balbi@kernel.org, mathias.nyman@intel.com Subject: [PATCH v4 4/4] arm64: dts: imx8mp-evk: enable usb1 as host mode Date: Sat, 3 Oct 2020 00:30:38 +0800 Message-Id: <1601656238-22232-5-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601656238-22232-1-git-send-email-jun.li@nxp.com> References: <1601656238-22232-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) 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 SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 16:35:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4d19faee-1c29-454d-0129-08d866f12501 X-MS-TrafficTypeDiagnostic: VI1PR04MB5213: 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: QVb/3A7KvefgU/pJZLRjN2OL03G0U7BC39LGXVgDLn0sC60qt19VCXrPIwx1KGMvO4DKGrZcKE6d2fzcDfUUwsjTt1LOT9RI5sJ494337prQ6ROOk420P7FM5/6cZc4a/ARgbzGBtY34kBlxci53+VhDbgH5j0/gW10uyEuJ5n+M31R5QTqpYYkhqHG7xE9oSaXBoclOtfYP16AyZ5iJZoaKbyUxgCTbg84ifrTIs/1mUI6J7g49iMCvHazAuJV51oGHMRr/FYOXq21a8/4ZUtLFovuYnXJ8ZGjrsKyCiy9RIotENLmQ6OTKsc/lvxATBC33rb0xnsGGmSnn9VCwvBmyTQt7f1gqGsKhNFTc2gL4HXhrZcj3I8ehMw9GhxAC9oC20lIYVwphpqMkUHDsy4ABYAawGcHSZ5pOrSDEi/Xs3/o3p/O1UEVHSDdPJBRj65v+kCdK8e4awnmOMSc+wQ== 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)(346002)(366004)(136003)(376002)(396003)(39860400002)(6666004)(52116002)(478600001)(8936002)(4744005)(6506007)(16526019)(4326008)(69590400008)(6486002)(26005)(186003)(83380400001)(2906002)(956004)(316002)(86362001)(8676002)(6512007)(2616005)(36756003)(5660300002)(7416002)(66556008)(66946007)(66476007)(32563001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Zge0Ousali8M9fmonFK+JMePowg3XCYMsiB+r5w8P4uYasgXJFXHCuwamHtrPTymep+5Fyr+0CKOLncxk7aJoa29y2QET6xd0CgGRN59pJdXImQOFHvLMlai6hT3yrrA6t1MvxQflGiHgGnAs0IEjw7G9NrcPIMsUJenbWI4BfPrey6XD8xyuGgSYcqUlJNvprrQ0zMOX8HnMrjFqFKSep2RQ3IprRPjQHtPkknxHN4iRj3U903ZeaxWvAV5VlQ5U0eH0KkAWBX8lCUmswXWk6H4Hq8h/LqcziRFYaZNQ+Fr1s6AdOPu3n76WPTM2ogcRSfdKcYToj01HVPDMjr1f7vVOUBOfzqc441NXhk5reAGKEqjlZWJ7Dz6S9CZ1VnhGwXX0wrIwuP2maWRgCe0L+M+eSZCZHglvBU7zOwayJpYQX+zXm4JxHo0wCq6S9+byLxOWHBai+iBjJJrhFtGFqIMb5hEqwSwvPtRajeRcRGLk0y/w7a/kQUZteo9Fk5Ax7aZABuxrFNCvwvlykr8HFd7AhKhQPWO5DLnnUmMmh5OAEMhEA2hTX8C2HEHBDMyWzdVHSZJ7/4KMBxuEyaiBBGDLCFOz3272M7t/kW5ULDmkKL/I0Nv6mTy1mtI9B/Lu+Y+3IsPfO2vyDXcxw+yog== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d19faee-1c29-454d-0129-08d866f12501 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6528.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 16:35:17.1197 (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: VFFKkLuZl2W5St41snfg8LxFa/vwiyEITGFiZHyDitGmQV43Jqp+pDQx0sTfGGmZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5213 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_123519_617671_01A38703 X-CRM114-Status: GOOD ( 11.75 ) 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.21.89 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.89 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, devicetree@vger.kernel.org, peng.fan@nxp.com, fugang.duan@nxp.com, horia.geanta@nxp.com, Anson.Huang@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, jun.li@nxp.com 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 Reviewed-by: Krzysztof Kozlowski --- 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 432c1a7..0cb3b16 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -176,6 +176,21 @@ }; }; +&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>; @@ -276,6 +291,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