From patchwork Mon Jan 16 05:41:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43969 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1040950wrn; Sun, 15 Jan 2023 22:06:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXtTc7x072GKyUYKobmUnP1OLr4E2D10cjqqB7dburEAJX/En1XgAbV3Dzedq+vq+uJiqYIw X-Received: by 2002:a17:907:628d:b0:86a:316:d107 with SMTP id nd13-20020a170907628d00b0086a0316d107mr17372672ejc.72.1673849211920; Sun, 15 Jan 2023 22:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849211; cv=none; d=google.com; s=arc-20160816; b=rHn0B/cFIfoCB8j/K+byJL7jwQt/FdUgqgIRQbzMUu+Ghxjb2S3lwO30Mbr3ndKwzt q7eJEf56yMGFk4YWJji1XbFpMYTsJXdpu1kP7WPViifVjSoWQEXvQyPfopZB3/CWZe5N 8JrjmQD3cpOIGa9LLcFpwP309LXbsSoeOMDbz4I3zu/1LEx0kqCDVOKa+EYqtJtU1P4X TVYRCg4Zwf4GiS4PJrtFqujeLu2AWZ+uphVBhUNpeiONaY3hmuiiRYjVuiCboYTz0AQF ekr4mmPRjFdXjPsvFxp9V34Mtck8jgj7QVTyNkLY/l26IEax/PcOe5MBgUX6QjlVBe7D NHRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=i012sUzn9vBC441DtWe6XJKicsq4GTSK7YoJQ/lINH4=; b=bRYMev66F/S6nDT4t2YlSSIz4svzno+ta/MazkbT3koCjEfoDChLP2hFyNXTsedsXg UQvpGfz30Enii2eCKYtzAmXgtbEIzuGeciyjHn9PNMbPKUcxCFHXybeWD30NiEq5/gIg Z/d95Os8mIcLDQwyQtldt7FfDI/jnKtqLupl19zB6Z96B5hAUPKlcRRx9y7k3hz05G0g 7jGdNmIb0loujWrFVwS5DCbifi3sqM7VJvz9NE2CxUanpOw4j81NoWkYY+F9VaHFGoBa exXivrTj/EYXuUQ3H6bTK7j6ws9OE/OFF1FKbrZez8C0tZJ8CqcUXxAB/tWyGNNjWVP6 PUMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn15-20020a1709070d0f00b007e0b70df1b9si31607024ejc.67.2023.01.15.22.06.28; Sun, 15 Jan 2023 22:06:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbjAPGGJ (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231686AbjAPGGA (ORCPT ); Mon, 16 Jan 2023 01:06:00 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A1AB445; Sun, 15 Jan 2023 22:05:57 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C599B1A06DA; Mon, 16 Jan 2023 07:05:55 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 98D451A06E5; Mon, 16 Jan 2023 07:05:55 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id BDF94183ABF3; Mon, 16 Jan 2023 14:05:53 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 01/14] dt-bindings: imx6q-pcie: Add i.MX8MM PCIe EP mode compatible string Date: Mon, 16 Jan 2023 13:41:11 +0800 Message-Id: <1673847684-31893-2-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158111685773220?= X-GMAIL-MSGID: =?utf-8?q?1755158111685773220?= Add i.MX8MM PCIe endpoint mode compatible string. Signed-off-by: Richard Zhu Acked-by: Rob Herring --- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml index bad980902f66..6a547aabe729 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml @@ -24,6 +24,7 @@ properties: - fsl,imx8mq-pcie - fsl,imx8mm-pcie - fsl,imx8mp-pcie + - fsl,imx8mm-pcie-ep reg: items: From patchwork Mon Jan 16 05:41:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43970 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1040991wrn; Sun, 15 Jan 2023 22:07:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvNxj/gl08K6d7ulj8O5MnqNAKRcqbWIf/oR4DsJlzTI+6AhnCrZ0K46eOUIG3R0Z+N34e1 X-Received: by 2002:a05:6402:17cf:b0:498:dec8:f41e with SMTP id s15-20020a05640217cf00b00498dec8f41emr7854341edy.3.1673849223692; Sun, 15 Jan 2023 22:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849223; cv=none; d=google.com; s=arc-20160816; b=Fs1+SQBJCoR9ivkgfssnu0BLNKS+IYL/fMwFeuL8pT58E8ZJ2OI7s2Cmr0u+kqCwc0 ubA7mZrlr6T1FEN/FynaUe1CDlr3cZn/kgQSdgG5zWO6Dn7wrl0Yce5mDENWEx4L+zow OcdvEBO47vm6TITvL8IqGQIdL/IlAd++qXvQvsbSoltMNYWqpEHbzTS7Cjj8PNQh1aa/ SmVF+czHjMPPNR0mN6XEnq+kkr6UVPDAwzu1UuB4X8hT2LRDCzunvFQux7mtyF+YFao0 t0fOFeqONj71E7gl7NqRosn4tvgDaL8tcfhuvnme+GFOo37BiayUBtQQkykF03XrZ6eQ idzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=RY3XoZEVOUp7Hbocu7QzkWglR71//0qVAYSjG6Cvir8=; b=h35TZFbLXUT1bo9KpIlhbo92itVKKmoAQ04v7edKDlAK4JTPdZl3rzJnRhGr6Nl5KC DtHH/u7tBTP15Vnkj7zrqEfH9rGY0cFbbuOj9jG3szUQVxqTihCZn832YGbwbWgvSiiO Iyf/FZIPvl32DhWoX6CSujd9dUxTE+zjdDpD51HkXWOn/qC7R1EM0KjbhqFb5YInq6aK 5ZAEQ09vdKm58MkEUL3s5nkWzLqabQjFXg9376QfvkqkD+EIfd7LA4RBArpSti8s21o1 YxZa2bkp25ONPFzyauz66PdrGh7d5fDf9AKIHNG1sZj/3wATmb4t4YpnlHx+uI7P7krW GeVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a0564020e0900b0049e21096f4csi521800edh.177.2023.01.15.22.06.39; Sun, 15 Jan 2023 22:07:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231882AbjAPGGO (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbjAPGGC (ORCPT ); Mon, 16 Jan 2023 01:06:02 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D4893D8; Sun, 15 Jan 2023 22:05:58 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 27CAA200753; Mon, 16 Jan 2023 07:05:57 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E4E47200E53; Mon, 16 Jan 2023 07:05:56 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 24EFF183ABEF; Mon, 16 Jan 2023 14:05:55 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 02/14] dt-bindings: imx6q-pcie: Add i.MX8MQ PCIe EP mode compatible string Date: Mon, 16 Jan 2023 13:41:12 +0800 Message-Id: <1673847684-31893-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158123435280598?= X-GMAIL-MSGID: =?utf-8?q?1755158123435280598?= Add i.MX8MQ PCIe endpoint mode compatible string. Signed-off-by: Richard Zhu Acked-by: Rob Herring --- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml index 6a547aabe729..b57f748acafa 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml @@ -25,6 +25,7 @@ properties: - fsl,imx8mm-pcie - fsl,imx8mp-pcie - fsl,imx8mm-pcie-ep + - fsl,imx8mq-pcie-ep reg: items: From patchwork Mon Jan 16 05:41:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43971 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041041wrn; Sun, 15 Jan 2023 22:07:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXuxVDGjkXaOBEl5Zhz8R5T1lwo4brUEI/2IoUGdff2m9cwpPuCspbaxyKyUtVhi5shiJuf4 X-Received: by 2002:a17:907:8c89:b0:871:ac32:88a6 with SMTP id td9-20020a1709078c8900b00871ac3288a6mr84784ejc.39.1673849233828; Sun, 15 Jan 2023 22:07:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849233; cv=none; d=google.com; s=arc-20160816; b=TP4vnO3MYGUeol8HidjiFTd9BmSlTBYjqevLCyQfksBREGXOjeK7AWe/BDG4XI2Fm5 rbqhFqxTeil2dVC0VVvYfcGVQJ190g/oAgdBJsSNAAuGa2Ug3qFGxyCKpwhwGUqKMDos X76oDb+a/9ckZBBjmMuyo5FB4/Y8Vfc5iA2xEGS5mXALWzgHo5usr8tcpC49JQPAcCfh 7FtAeZevGeADmi+QWfGCfw5KLmX0gmluuTZ0GIceNDaGtJo0DudR0Zw89bPSjCHjGfMH rGnI0vo9jVyavCRlxj8ZSPvkiVO3rcXLHmXchSfbSJVPIfVra/hpNpVFOhoKC9AgfIEt JCdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=KQMxPpiB63o9SRkLkrkcFqs297N1qkC/s5JxjPHaJQE=; b=HTctZubO/Aob9nDH7dXM0Iihfza39ZuiIGMixnNPZwLwRB0D8iVXWKFvfWJvtLRBXW q9DtNf0PtEM0gTymlqel0qUWSncmVHXiSkScD2Nf2H0k92DRuZ7902qY53ounsYCx4Cl XljtK+wvZtdJLHQHPZ7Swmb505XY/7o7FLcTCEOg44+QLGB314MlWSxhsYDlO0jRPYP5 e2Ukpumpiyx09OEedip51eVBvY+ps6fyDWuuolfCQdDHZyLcqQoTNQndbVrTdcx1HY5j +xYTHse7aX4kDqTOVGDhWFBDjsVHNY1EL5U0m4QZZqJAl4O2hbb3tDkh6sAJAXAo2yeL Lg4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he33-20020a1709073da100b0087124db83a3si1184340ejc.880.2023.01.15.22.06.50; Sun, 15 Jan 2023 22:07:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbjAPGGU (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbjAPGGC (ORCPT ); Mon, 16 Jan 2023 01:06:02 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7BAA279; Sun, 15 Jan 2023 22:05:59 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7CF891A06D2; Mon, 16 Jan 2023 07:05:58 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 45C8C1A06C5; Mon, 16 Jan 2023 07:05:58 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 715FF183ABF9; Mon, 16 Jan 2023 14:05:56 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 03/14] dt-bindings: imx6q-pcie: Add i.MX8MP PCIe EP mode compatible string Date: Mon, 16 Jan 2023 13:41:13 +0800 Message-Id: <1673847684-31893-4-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158133999087566?= X-GMAIL-MSGID: =?utf-8?q?1755158133999087566?= Add i.MX8MP PCIe endpoint mode compatible string. Signed-off-by: Richard Zhu Acked-by: Rob Herring --- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml index b57f748acafa..f13f87fddb3d 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml @@ -26,6 +26,7 @@ properties: - fsl,imx8mp-pcie - fsl,imx8mm-pcie-ep - fsl,imx8mq-pcie-ep + - fsl,imx8mp-pcie-ep reg: items: From patchwork Mon Jan 16 05:41:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041202wrn; Sun, 15 Jan 2023 22:07:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXuw7WkqAgIHU/dsh2ugpxYXOtIS3WmT5j3SrFaRUP4qUeqgj6NidlIq8hqn5GzWzJCPWJLR X-Received: by 2002:a17:906:eb09:b0:84d:34fa:f1a4 with SMTP id mb9-20020a170906eb0900b0084d34faf1a4mr27571622ejb.60.1673849262583; Sun, 15 Jan 2023 22:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849262; cv=none; d=google.com; s=arc-20160816; b=bfD/x9dbalGWcMT3rbSIrNumkzSknbFD5PmrFjyRz67+bWmLJjVeNNuPl7r1KO4GBI 9yhhk9SxFbysOE336jcFaEFOL9RheJrHscf8PAJ7+HECSWBt3MZmutfxRtmac98ceuKK jLD+wk1fa+hM+LFBwm/4LsNkYvUdW/hrrQ4fxYZMHn6q4NXNbcm4ZZtWrAJLzmbg14i+ GjlfZ310RdefcT2my7hgg2+GPukhcaDLJRMwu6sW4G6dwbw1VFfvj48vnyQKZ7gK4//E mGTzKmwfEoh8i8gnOmPkn5RidO7ZtiM4O/y5emeQjf8Iou9TNccdaWr91RwLFbNGkAHn xRgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=O2HVkJLdkGYQj54G9H3tvPRmU4ed1M/CXVl7yySXuX4=; b=kQI8DXMGuTHHtWLJytmyvtPqwS41lSP4QeFPl0qeTN10ZPH+XoTLMvAi9vipoWc3Wr f1PWl3f0hcWXcx+Oy2yzJItBfffNzneUwJ5LgY+Ry7AeZ5Lx67wQCjU2r308uL5BHzYZ hmq4obLN1iI93yX7bittGI/q+9cNkvmNRzW5yvUh7KMxYwrBFTsCazidWEmRGpBfowp6 x1unqQ/U5MMKXRJ6VCW0E1w8Xg/Fkr18Y9XQsoWozXT5/rzg27l4yiTAvINT+sfYTnkZ eT5/T1GodjskeVd6aIgqIs2u1bnqCS6TrnTNlK+hLtjTl24Ujl82ExoomUi1D1eH84EY QZBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs15-20020a170906dc8f00b0086d67a10589si4479096ejc.848.2023.01.15.22.07.18; Sun, 15 Jan 2023 22:07:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231730AbjAPGGY (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231855AbjAPGGD (ORCPT ); Mon, 16 Jan 2023 01:06:03 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D2AB441; Sun, 15 Jan 2023 22:06:00 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 764211A06D4; Mon, 16 Jan 2023 07:05:59 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 401D01A06BD; Mon, 16 Jan 2023 07:05:59 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id C7DC7183AC0F; Mon, 16 Jan 2023 14:05:57 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 04/14] arm64: dts: Add i.MX8MM PCIe EP support Date: Mon, 16 Jan 2023 13:41:14 +0800 Message-Id: <1673847684-31893-5-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158164026730964?= X-GMAIL-MSGID: =?utf-8?q?1755158164026730964?= Add i.MX8MM PCIe EP support. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 4ee89fdcf59b..8124761f629c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -1293,6 +1293,26 @@ pcie0: pcie@33800000 { status = "disabled"; }; + pcie0_ep: pcie_ep@33800000 { + compatible = "fsl,imx8mm-pcie-ep"; + reg = <0x33800000 0x400000>, + <0x18000000 0x8000000>; + reg-names = "regs", "addr_space"; + num-lanes = <1>; + interrupts = ; + interrupt-names = "dma"; + fsl,max-link-speed = <2>; + power-domains = <&pgc_pcie>; + resets = <&src IMX8MQ_RESET_PCIE_CTRL_APPS_EN>, + <&src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF>; + reset-names = "apps", "turnoff"; + phys = <&pcie_phy>; + phy-names = "pcie-phy"; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; + gpu_3d: gpu@38000000 { compatible = "vivante,gc"; reg = <0x38000000 0x8000>; From patchwork Mon Jan 16 05:41:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43972 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041141wrn; Sun, 15 Jan 2023 22:07:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXtV9HuEa93IxoTQkzyZrHoE+JkqoHasiCyNjCIk9+88DXNnN65FGVeSNY+Mv+mReLnlX+Jy X-Received: by 2002:a17:906:5786:b0:78d:f455:3105 with SMTP id k6-20020a170906578600b0078df4553105mr72237054ejq.45.1673849250805; Sun, 15 Jan 2023 22:07:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849250; cv=none; d=google.com; s=arc-20160816; b=ssXwNw1h6h+EfTP7APGxIrpFqqX6Uv9Hpu6zCQesHXDwwzhg3EcUMWOUpJcjK3nbAu EsCZrvUXV1+rg2+hitDFNObOALkF320kosrn7DnlSDMEmu5qKzC+/mhS0y3PgUbbK/Od t3WriHrgr8rz1ZX++/zlj+2JscmufCCSEamXzzZgr3HXel+V3o471qVB4PQxAtR8lPCo TNa1d05sWfnXjMkO+h+bhf5SHb1lHCbXqWuGei3sfSwBDwwILI5ghQ7wBywjMHyfNA7+ 5xY8oDMt4TK3ZGIqYWHTTNp7hlNl+3cwu1PS5n/vgOlAnJeVUTPpA4494g0AJxfuFKjG vJZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Iz+MCQjFYoT8Cnhb4AOi9Y5biJaZ4utKeJ0Eccfdixg=; b=iWS8crUh37ppMJkg6GWtNd/1ywQfuej/UZQU5YERI/1u+NoSJv50v7cMNgb6Xlvd8q A9a4fcv4dexhZqTJNPDZxqkwyBTk6K06yTUE83lQuvDfLTWKysGgWsB2JCKYWnXZtL7R 536u3NQN8QKccQwvn+k97beDj9CCv6yN3ODD0bF1cQROy7LClTxVsaYnQKr/FlfGmx4j EE4ir3O8MPECxI2AErgUxKgYJWyRTbRVsbssAKu7ZA0E+5OwCzbPxGORYs/nc95W5l/P XGENPMhZTwrvjV3ND+7diCSDT+/OCYZGG76K+iI5UmIWc8L3215UZB1IAXp++xtRFrUq zXEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw9-20020a170906478900b0086d67a10566si6782141ejc.190.2023.01.15.22.07.05; Sun, 15 Jan 2023 22:07:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232004AbjAPGG2 (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbjAPGGG (ORCPT ); Mon, 16 Jan 2023 01:06:06 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB96444AD; Sun, 15 Jan 2023 22:06:02 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A58051A06BD; Mon, 16 Jan 2023 07:06:01 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E20BA1A06D5; Mon, 16 Jan 2023 07:06:00 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 20D32183ABF9; Mon, 16 Jan 2023 14:05:59 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 05/14] arm64: dts: Add i.MX8MM PCIe EP support on EVK board Date: Mon, 16 Jan 2023 13:41:15 +0800 Message-Id: <1673847684-31893-6-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158152011019014?= X-GMAIL-MSGID: =?utf-8?q?1755158152011019014?= Add i.MX8MM PCIe EP support on EVK board. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index e0b604ac0da4..894118704156 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -372,6 +372,20 @@ &pcie0 { status = "okay"; }; +&pcie0_ep{ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie0>; + clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>, + <&pcie0_refclk>; + clock-names = "pcie", "pcie_aux", "pcie_bus"; + assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>, + <&clk IMX8MM_CLK_PCIE1_CTRL>; + assigned-clock-rates = <10000000>, <250000000>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>, + <&clk IMX8MM_SYS_PLL2_250M>; + status = "disabled"; +}; + &sai2 { #sound-dai-cells = <0>; pinctrl-names = "default"; From patchwork Mon Jan 16 05:41:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041302wrn; Sun, 15 Jan 2023 22:07:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXteyEDWt48RmpzYQqN2gUDQenPpPkJMdc+c+dNRWxIjR3EsoqbiidSyLKyZcgYQqPeQGMio X-Received: by 2002:a17:906:698:b0:861:9b5b:4c3b with SMTP id u24-20020a170906069800b008619b5b4c3bmr11865591ejb.17.1673849277984; Sun, 15 Jan 2023 22:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849277; cv=none; d=google.com; s=arc-20160816; b=GzI+C5aCzkWe6m531sdT7adXKH3WnjAWJfX+y2/46k1M7p6ERTv/O//gHQrf9AOTb1 dv8U1a1GCy0dyQ1LQiBbrL70MCrnqf9FTFHWvYfgMTUFDREpYSU2ZABSB94+r2mEnJBq 2FRZD48H24cgZeLRUlmS/tUxDiPIYDuEswOqjBKpA7AgbY8Tnd5gFst5o2XQFn321+zD 69W/hqVOMv2d668QodNvCvWVEH4jSPiTerCcnxZRfskblSqvlN99VwVoWVUZHNdYAAcw VbFJJjT/AwziEEtc+Elrjo3JF6arWXcJi72hPnWQsN79T167+JOJzoRUvjnb9gKUi3dW ITgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=M7BRmdwCFAy8MX0MjNyKOg9nQ8AxbX2TEMNKDH6vJQ4=; b=m6neQgCYkWMuUp6EK7nm4sPlXKtQ9GzUkiAuOQfgC9C0kvlZxmDnJM22BgzNmtI7mh xViUjx1FMyvDpTByBZbpmKC9mkZkkt3yqwBMbERWyIoL49AnjsrWPawiYJu7wFmF3gVC Am2nb7XI9epjFPvSzZE4yxWjKyO8CQ2XevF5jPLgmcdCeIWBILhRWO5DKczlmb+EbGAh yW0hRH2xJ0vmdiJ2nH/Y7ffKJ6Bh1c2HIYJm8QFQC/ldw9kiPzzrfR+F5bEdJjLagBhe bPeZDX3L7fJRo6ZFw1WRtmMOw1dkbk/WD5I+bfIgn9NcC+2ju8LlCHbILygTnNzYxrRt WS9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq14-20020a1709073f0e00b0086e0234d94csi6372084ejc.19.2023.01.15.22.07.34; Sun, 15 Jan 2023 22:07:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbjAPGGe (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231917AbjAPGGG (ORCPT ); Mon, 16 Jan 2023 01:06:06 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD12455BA; Sun, 15 Jan 2023 22:06:03 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D2171A06D5; Mon, 16 Jan 2023 07:06:02 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 356F81A06E3; Mon, 16 Jan 2023 07:06:02 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 6F1F7183ABEF; Mon, 16 Jan 2023 14:06:00 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 06/14] arm64: dts: Add i.MX8MQ PCIe EP support Date: Mon, 16 Jan 2023 13:41:16 +0800 Message-Id: <1673847684-31893-7-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158180721025762?= X-GMAIL-MSGID: =?utf-8?q?1755158180721025762?= Add i.MX8MQ PCIe EP support. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 7ce99c084e54..90a1f026ea48 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -1583,6 +1583,33 @@ pcie1: pcie@33c00000 { status = "disabled"; }; + pcie1_ep: pcie_ep@33c00000 { + compatible = "fsl,imx8mq-pcie-ep"; + reg = <0x33c00000 0x000400000>, + <0x20000000 0x08000000>; + reg-names = "regs", "addr_space"; + num-lanes = <1>; + interrupts = ; + interrupt-names = "dma"; + fsl,max-link-speed = <2>; + power-domains = <&pgc_pcie>; + resets = <&src IMX8MQ_RESET_PCIEPHY2>, + <&src IMX8MQ_RESET_PCIE2_CTRL_APPS_EN>, + <&src IMX8MQ_RESET_PCIE2_CTRL_APPS_TURNOFF>; + reset-names = "pciephy", "apps", "turnoff"; + assigned-clocks = <&clk IMX8MQ_CLK_PCIE2_CTRL>, + <&clk IMX8MQ_CLK_PCIE2_PHY>, + <&clk IMX8MQ_CLK_PCIE2_AUX>; + assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_250M>, + <&clk IMX8MQ_SYS2_PLL_100M>, + <&clk IMX8MQ_SYS1_PLL_80M>; + assigned-clock-rates = <250000000>, <100000000>, + <10000000>; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; + gic: interrupt-controller@38800000 { compatible = "arm,gic-v3"; reg = <0x38800000 0x10000>, /* GIC Dist */ From patchwork Mon Jan 16 05:41:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43973 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041169wrn; Sun, 15 Jan 2023 22:07:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXttqx9qYqGvRu33eLpbgacnQiT1bOcabXMMFrSQH8O7woTju5kgsTKw3Ju2066DhusC1A44 X-Received: by 2002:a05:6402:12da:b0:49b:7416:e3ff with SMTP id k26-20020a05640212da00b0049b7416e3ffmr13329105edx.5.1673849256060; Sun, 15 Jan 2023 22:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849256; cv=none; d=google.com; s=arc-20160816; b=s0MCPTOntlN1Dv/58O3fw4/sO/wEqrJslunMhINrZiLOg9kYXFU3GlyBTQo6U879HW O2eLINb9D928YUNw78PCQmjoNE0veeM5IMLAx5aIkftLgURA9VkEDsQVfz36mr/Wacm5 MpQdima5W6c72QEoVzxt91YHILuhAkfvFfUB6bFjSQHyVsOkNfzPIsOJy4Uj8L7doN8N YfWFea2kxpl2/Kg8eGcj99077fxKi//By3hESzAteqCy+MMci1eiHRQN3StKHXvlrQ/r pXIi4BXBfuYXXptOLufMslwllS2bWud1HsOcSX882/Npgf6LINvDE/rZgvhVUA6VgYUP 68KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=huLo128bXTIteWEgnjFI6GaEtqxNzRSxzotybtKiVYk=; b=WJP1TWVRHS/KYshQt0bypyHQht8cymBJBLAbz8Sf/ZDCAQ4Rst86bOZ9Fh/WKQGsHa f8bRLqpcCwiiDaQmDB3DQQMTbluPXLg38Pxlbij+ynsbzJHqmRYEPkmfKYYt8S4OxXBd i5kOwHp8Pekc/ZNfYMj5EcLgxco5Z089nUfUpsANM+06gksVGDM9o9F9vL4yRt6k0wP6 mTdEpu0CHYKaBCjhKofTx5NjT3cNKywKXJnEu4K55cVq522/TfMfam22nXreO+LqBzNq jyRVGW7lt9iRaiz62/lROQIlsX+0FJh2/GbO1QU1hlTVIhOOmUyyFkNF/X7NHVVBb+WK Muog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm24-20020a05640222d800b0046aff5119c6si25978596edb.428.2023.01.15.22.07.12; Sun, 15 Jan 2023 22:07:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232018AbjAPGGi (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231921AbjAPGGI (ORCPT ); Mon, 16 Jan 2023 01:06:08 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC720A26D; Sun, 15 Jan 2023 22:06:04 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B3C9D202063; Mon, 16 Jan 2023 07:06:03 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 85785202069; Mon, 16 Jan 2023 07:06:03 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B42AE183ABF9; Mon, 16 Jan 2023 14:06:01 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 07/14] arm64: dts: Add i.MX8MQ PCIe EP support on EVK board Date: Mon, 16 Jan 2023 13:41:17 +0800 Message-Id: <1673847684-31893-8-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158157553646241?= X-GMAIL-MSGID: =?utf-8?q?1755158157553646241?= Add i.MX8MQ PCIe EP support on EVK board. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts index 78937910f403..c815c4b8907e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts @@ -378,6 +378,18 @@ &pcie1 { status = "okay"; }; +&pcie1_ep { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie1>; + clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>, + <&clk IMX8MQ_CLK_PCIE2_AUX>, + <&clk IMX8MQ_CLK_PCIE2_PHY>, + <&pcie0_refclk>; + clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus"; + vph-supply = <&vgen5_reg>; + status = "disabled"; +}; + &pgc_gpu { power-supply = <&sw1a_reg>; }; From patchwork Mon Jan 16 05:41:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43974 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041180wrn; Sun, 15 Jan 2023 22:07:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJa/zUOcwRg23z+5QBlg3m8Q0h/x565q1kYroRTG9YTqnlHQWuERYNjXPh1qhT81yIFTy7 X-Received: by 2002:a05:6402:685:b0:479:ab7d:1dad with SMTP id f5-20020a056402068500b00479ab7d1dadmr95815519edy.32.1673849259716; Sun, 15 Jan 2023 22:07:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849259; cv=none; d=google.com; s=arc-20160816; b=zRzX1kiEE4nmE7F+uDkWBg1bRrr1vBIO7B4UtLFWC0q0UsQDLm3THI2bOaRCSWU2pK AnZiPZqqt62UUdC6uSpMnpDnr5uoD8k/YiguwnImfYDQClu5IM6wS+qA2Bm1StWRsOq3 e5i2kKkC/DiYi4HuxES234lIXCK9yoFxPzxm9ys8/FC6tbjoT/xUQKiNv86vcA1W3mVM Cthdj8K6Xkm6Ry+XiTQoiJ/6N/VBF792kJZPWAv9ZK+6w96+pFt42/ljRRcDea9fcc6S IQfXxer9RJp7VQnjYZR/fIamDA+bCfD0IaiW3PJ/z5ifYqhe25ETKmXEc7281YvDm1ay WutQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=OCoGASWlWXDyGb8sFIMIj+j7BBYJh0+i+YxM0daBQGM=; b=H8mAGyDahmMcTjscI85wzBgoKRvrKWQ/b1LDKPd+dIAyuYGfo/d29djkFsnbrmQzcb +mHYBvd8v7ddkj1nMLBth17uK2lL2sA3OeXmza8mzsHRQC70FO/dxwUGBApxuvsbIgo6 LDoseIf7JS7GupAkeB+9ltBUqAhGmbz/+QdNZpSw0WO/hEn5JvKrQiWML+YH7IPSgFx/ iFHGQ8ExxE0ErpofNp6uOKDkT6wS2/i6cBfAjH5fNPuI/eB9w0L6IM4TqwaOD7I5sijk Dkcjj/PWUYGmDLlmnGIfByd00KQwbl8oJCxqzemzyrvz1c7LxQEByKyFxxN9xUKQKrG2 7PRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ey7-20020a0564022a0700b0049216736fd2si14325368edb.542.2023.01.15.22.07.15; Sun, 15 Jan 2023 22:07:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbjAPGGo (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbjAPGGJ (ORCPT ); Mon, 16 Jan 2023 01:06:09 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BDDCB442; Sun, 15 Jan 2023 22:06:06 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 01801202076; Mon, 16 Jan 2023 07:06:05 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C7814200E53; Mon, 16 Jan 2023 07:06:04 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 0C7CF183ABF3; Mon, 16 Jan 2023 14:06:02 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 08/14] arm64: dts: Add i.MX8MP PCIe EP support Date: Mon, 16 Jan 2023 13:41:18 +0800 Message-Id: <1673847684-31893-9-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158161545836670?= X-GMAIL-MSGID: =?utf-8?q?1755158161545836670?= Add i.MX8MP PCIe EP support. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 4ef36ebc6bfe..9ad9edd18e09 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1217,6 +1217,32 @@ pcie: pcie@33800000 { status = "disabled"; }; + pcie_ep: pcie_ep@33800000 { + compatible = "fsl,imx8mp-pcie-ep"; + reg = <0x33800000 0x000400000>, <0x18000000 0x08000000>; + reg-names = "regs", "addr_space"; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_PCIE_ROOT>, + <&clk IMX8MP_CLK_HSIO_AXI>; + clock-names = "pcie", "pcie_aux", "pcie_bus"; + assigned-clocks = <&clk IMX8MP_CLK_PCIE_AUX>; + assigned-clock-rates = <10000000>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_50M>; + num-lanes = <1>; + interrupts = ; /* eDMA */ + interrupt-names = "dma"; + fsl,max-link-speed = <3>; + power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_PCIE>; + resets = <&src IMX8MP_RESET_PCIE_CTRL_APPS_EN>, + <&src IMX8MP_RESET_PCIE_CTRL_APPS_TURNOFF>; + reset-names = "apps", "turnoff"; + phys = <&pcie_phy>; + phy-names = "pcie-phy"; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; + gpu3d: gpu@38000000 { compatible = "vivante,gc"; reg = <0x38000000 0x8000>; From patchwork Mon Jan 16 05:41:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041490wrn; Sun, 15 Jan 2023 22:08:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXuoMfipQPOe2MBhAW27FrBv4SbzN9DXXBm+AJgVxbsoipG+A04dp8sEa4gc96h9DXDokH0u X-Received: by 2002:a17:906:b855:b0:864:8c78:e7ff with SMTP id ga21-20020a170906b85500b008648c78e7ffmr10395961ejb.23.1673849311278; Sun, 15 Jan 2023 22:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849311; cv=none; d=google.com; s=arc-20160816; b=M/7vupyinDq1T+mmXzuYCB8DP0Ahm/8kugk2Wqa0HXaZc0vwv0R6dBwbuZsIjgVG7w +RX8tbZOcoyO5//2FRf+D+KPe3XAUdAE0Zcu4TGO3IpEcSNbJGVdILMirN5DOFhbu6y7 JGIYRHVSJ9uk/VBeSswjW7J7Z8r4d7lf2YYYH8hqGbNyKnyh2dfer0S5V1vU0oZ9PPlQ lvHydYPrwoIZPG1pbpHcjZBSiNh/qpFyFGPNQlsElSlFgSW2cyBFWIocsAgXDmPBNsoy EUwsDF+05k+IQML2y+oci0fyMQGU3t+gWf2ER282ElSrnASJCAWEs7phhCGL2Zfkv0vW pk8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=enDxbMAts7+mrd0jex3rJgIMPij2S+/hVD9tLXsen64=; b=sgIt8t2M37x2mE6jOzUo/Qb1YNfzaVNwm0+puit7GDAEDX03pGA5hFQ3bYHa+D3JBR gcRKgii9UZ/1WSWOYaerN1Jtc7r4zbcPUvZn3CG50nPm6KKq8sdAmkXI/kYB4e71TqYB acf+HVWdwp0ppiyHXHe8+bn8im3/Hiv+9/YnBNTeM9zmzNeDb5v7C9o9Ldh1k2FQEAci P9kDsBs7djmx0Hdb5VqDWDr3Isz9UZ/MnR3y8JEdjqTNxaUHXpwmLAcVJDAh4nipiHGD GD99w/dM9KT4uMT8tJ79uB7eCQmZZ5zOkvyaESBdaq72Dn8948zPgYxFWInJOa+iS8Ya TDTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170906654500b007c11f2411e1si22501802ejn.815.2023.01.15.22.08.08; Sun, 15 Jan 2023 22:08:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231890AbjAPGGv (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231933AbjAPGGK (ORCPT ); Mon, 16 Jan 2023 01:06:10 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 930F6A279; Sun, 15 Jan 2023 22:06:07 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 57E141A06E0; Mon, 16 Jan 2023 07:06:06 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 205D91A06C0; Mon, 16 Jan 2023 07:06:06 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 50D01183ABEF; Mon, 16 Jan 2023 14:06:04 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 09/14] arm64: dts: Add i.MX8MP PCIe EP support on EVK board Date: Mon, 16 Jan 2023 13:41:19 +0800 Message-Id: <1673847684-31893-10-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158215742176578?= X-GMAIL-MSGID: =?utf-8?q?1755158215742176578?= Add i.MX8MP PCIe EP support on EVK board. Signed-off-by: Richard Zhu --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index c4ed505b8707..c0dd04d9f106 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -404,6 +404,12 @@ &pcie { status = "okay"; }; +&pcie_ep{ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie0>; + status = "disabled"; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>; From patchwork Mon Jan 16 05:41:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43978 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1041626wrn; Sun, 15 Jan 2023 22:09:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXsKZdYBuCd53ry63l2YFifyc3vd9715dh9YerwZFQmsHtMqzZ9Hh50kG6okmQwXA7NE67QF X-Received: by 2002:a17:906:6dcb:b0:7c0:d60b:2887 with SMTP id j11-20020a1709066dcb00b007c0d60b2887mr77555822ejt.69.1673849340978; Sun, 15 Jan 2023 22:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849340; cv=none; d=google.com; s=arc-20160816; b=Dp+t9cm7HHZ2QiMrRwQj+WMB/qB8tfjfa7zYVCkC3j94+950/sWDmEcX4BxDIK0yj+ f1UvRIn0L9nNky6Zaku+/nQGyZ6YtR7n3kCopXpFvIejw///vHcAzC0nkowteY1b1Phz ChovrJQtQ8Qpku7/YrA1XuCketZ3rsBJ4FeomVLGzKnqAwMimi2gfhS5Wnh58ms//0Tz EVpiLtg8YST7nZb9guX/BdRPq9vitgj5o2Vo45ITlc/rguA3RkYE/sUmGglQDLRav7x8 +fvkL2/YR0KfNq8BG7L4H5YtXssiJtAm4Db3eCRT9h79XaNNbPsef96SehpIjFaKTksq 3xvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Ca2SlBb+oCFVhPJMig3EC5BwDT2x57boD25CeuYlGAY=; b=e9IVpnOdxeQ2PEDdfrzkbsN1Y2tusm9SZnhMycrh9LvN42gP4x/U3G3akyW+6E5n8W ugpL69r49vdCW2KB9duJK+srJNSBl75Zm4rBD8MFJxTqicjUKToIErGzF2ehWO5TSSPH 8drjGaPQ1wRYD78TfGXM12ouorWsqkKAeSw08Q07BQ8VnhQugwFttoKnN2rePubZBYpM hK+AK2NjnK71UHY/ofXvcWt+sowlD2VosTeSeDypJdAg7UhHmNtOHL/yegT6e9D543uH 3CIxWVzDhKUIzS9KZlhbTwTtXfEDDEex0Cr0JOTxV4JnQvseYOz8N5JdYE8iKtcMwF1D IFWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a1709064fc700b0084d34979424si31823792ejw.334.2023.01.15.22.08.38; Sun, 15 Jan 2023 22:09:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbjAPGGz (ORCPT + 99 others); Mon, 16 Jan 2023 01:06:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231952AbjAPGGO (ORCPT ); Mon, 16 Jan 2023 01:06:14 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35F4DB44C; Sun, 15 Jan 2023 22:06:08 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A759A1A06C5; Mon, 16 Jan 2023 07:06:07 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6F59D1A06BD; Mon, 16 Jan 2023 07:06:07 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 9E009183ABF3; Mon, 16 Jan 2023 14:06:05 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 10/14] misc: pci_endpoint_test: Add i.MX8 PCIe EP device support Date: Mon, 16 Jan 2023 13:41:20 +0800 Message-Id: <1673847684-31893-11-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158246681120334?= X-GMAIL-MSGID: =?utf-8?q?1755158246681120334?= Set the DEVICE_ID of i.MX8 PCIe and add i.MX8 PCIE EP device support in pci_endpoint_test driver. Signed-off-by: Richard Zhu --- drivers/misc/pci_endpoint_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index 11530b4ec389..e2687229955d 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -72,6 +72,7 @@ #define PCI_DEVICE_ID_TI_J7200 0xb00f #define PCI_DEVICE_ID_TI_AM64 0xb010 #define PCI_DEVICE_ID_LS1088A 0x80c0 +#define PCI_DEVICE_ID_IMX8 0x0808 #define is_am654_pci_dev(pdev) \ ((pdev)->device == PCI_DEVICE_ID_TI_AM654) @@ -980,6 +981,7 @@ static const struct pci_device_id pci_endpoint_test_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, 0x81c0), .driver_data = (kernel_ulong_t)&default_data, }, + { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_IMX8),}, { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_LS1088A), .driver_data = (kernel_ulong_t)&default_data, }, From patchwork Mon Jan 16 05:41:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1042834wrn; Sun, 15 Jan 2023 22:13:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJ0b84Q9Z4cX5NIK4MJ4lbhV7sS8RPb+/oU4lvs+XsJ3OA+Y5unbRpTUoq+7v5U1QX46bV X-Received: by 2002:a05:6402:454:b0:499:376e:6b2b with SMTP id p20-20020a056402045400b00499376e6b2bmr25095409edw.0.1673849597981; Sun, 15 Jan 2023 22:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849597; cv=none; d=google.com; s=arc-20160816; b=mHQQBbkZrlMVlSdeCUxKBlpEx6yH64uAZaTwSESMssQEwpXXF0W41SKT8Zm69BuOQc 7LyKTNgHaZt4NEfPMbB8RbBSqgChH73GYLJqjgC9KvPfI1x4oYAT7ixWeWdR1+5y/GAq C98M3J/PLAwSaofdewGInzjNzOHrJwVrUd0TyvxodMBIbVyt4HsqqyHDTTfWXsJzwagy PCVV5qyXx3+MDYxtgnVXsxsWcHvr+WdBFA28bJ2YZoQD32RUS08tDyd2eOkN6e9ggTKw vlh7Vh/sL2rB1bK7O/EOThcp/PAryCOw2fMZVNQM3sIX0SBq74z3PlM2Nt/R+fpiJ9St M3dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=SFCPIHGpCEQ3IOyOkt1xoEccwKhrh+G6qiYctWfjm24=; b=X7nPEi/xI32T712s72BRqVPpjPO4cNdjbGDZjXAoF4TXSvyKLR7EeJCzYUjc+wev9Q NrzVCZwUpFnBzNe1IdLXNtWSBTXydsnu17xLgJxTY+NDJXyfyM9noq34rRn6/bAAbYBc h9FTXMdEKKUFHIJabImRDHWTStA6aa9Hn+PLXJwGQhU1FVrnrYNVnYpeM0DBYgY5mznK HqFZJdPNlvNFj9eLBY+veB7kVvor+v9n8L07XJYIl8nxLgcaEqXpMbQP9ZR1cSbE/462 TofDzyCNwFmxmCQdx5EfJJb8S8mihnyUN/fk34qZadf6VJOK47ffi4Q1GF5AXh/7yBEt kAHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ey7-20020a0564022a0700b0049216736fd2si14325368edb.542.2023.01.15.22.12.54; Sun, 15 Jan 2023 22:13:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232089AbjAPGHH (ORCPT + 99 others); Mon, 16 Jan 2023 01:07:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231965AbjAPGGS (ORCPT ); Mon, 16 Jan 2023 01:06:18 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D641B455; Sun, 15 Jan 2023 22:06:10 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2B8A2201A70; Mon, 16 Jan 2023 07:06:09 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BE4B8200749; Mon, 16 Jan 2023 07:06:08 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id EF55E183ABF9; Mon, 16 Jan 2023 14:06:06 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 11/14] PCI: imx6: Add i.MX PCIe EP mode support Date: Mon, 16 Jan 2023 13:41:21 +0800 Message-Id: <1673847684-31893-12-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158516256650026?= X-GMAIL-MSGID: =?utf-8?q?1755158516256650026?= i.MX PCIe is one dual mode PCIe controller. Add i.MX PCIe EP mode support here, and split the PCIe modes to the Root Complex mode and Endpoint mode. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/Kconfig | 23 ++++- drivers/pci/controller/dwc/pci-imx6.c | 128 +++++++++++++++++++++++--- 2 files changed, 137 insertions(+), 14 deletions(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index a0d2713f0e88..dffd7fbdfb98 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -92,10 +92,31 @@ config PCI_EXYNOS functions to implement the driver. config PCI_IMX6 - bool "Freescale i.MX6/7/8 PCIe controller" + bool + +config PCI_IMX6_HOST + bool "Freescale i.MX6/7/8 PCIe controller host mode" depends on ARCH_MXC || COMPILE_TEST depends on PCI_MSI select PCIE_DW_HOST + select PCI_IMX6 + help + Enables support for the PCIe controller in the i.MX SoCs to + work in Root Complex mode. The PCI controller on i.MX is based + on DesignWare hardware and therefore the driver re-uses the + DesignWare core functions to implement the driver. + +config PCI_IMX6_EP + bool "Freescale i.MX6/7/8 PCIe controller endpoint mode" + depends on ARCH_MXC || COMPILE_TEST + depends on PCI_ENDPOINT + select PCIE_DW_EP + select PCI_IMX6 + help + Enables support for the PCIe controller in the i.MX SoCs to + work in endpoint mode. The PCI controller on i.MX is based + on DesignWare hardware and therefore the driver re-uses the + DesignWare core functions to implement the driver. config PCIE_SPEAR13XX bool "STMicroelectronics SPEAr PCIe controller" diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 1dde5c579edc..572faa91eea7 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -60,6 +60,7 @@ enum imx6_pcie_variants { struct imx6_pcie_drvdata { enum imx6_pcie_variants variant; + enum dw_pcie_device_mode mode; u32 flags; int dbi_length; const char *gpr; @@ -159,17 +160,20 @@ static unsigned int imx6_pcie_grp_offset(const struct imx6_pcie *imx6_pcie) static void imx6_pcie_configure_type(struct imx6_pcie *imx6_pcie) { - unsigned int mask, val; + unsigned int mask, val, mode; + + if (imx6_pcie->drvdata->mode == DW_PCIE_EP_TYPE) + mode = PCI_EXP_TYPE_ENDPOINT; + else + mode = PCI_EXP_TYPE_ROOT_PORT; if (imx6_pcie->drvdata->variant == IMX8MQ && imx6_pcie->controller_id == 1) { mask = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE; - val = FIELD_PREP(IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE, - PCI_EXP_TYPE_ROOT_PORT); + val = FIELD_PREP(IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE, mode); } else { mask = IMX6Q_GPR12_DEVICE_TYPE; - val = FIELD_PREP(IMX6Q_GPR12_DEVICE_TYPE, - PCI_EXP_TYPE_ROOT_PORT); + val = FIELD_PREP(IMX6Q_GPR12_DEVICE_TYPE, mode); } regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, mask, val); @@ -1003,8 +1007,99 @@ static const struct dw_pcie_host_ops imx6_pcie_host_ops = { static const struct dw_pcie_ops dw_pcie_ops = { .start_link = imx6_pcie_start_link, + .stop_link = imx6_pcie_stop_link, +}; + +static void imx6_pcie_ep_init(struct dw_pcie_ep *ep) +{ + enum pci_barno bar; + struct dw_pcie *pci = to_dw_pcie_from_ep(ep); + + for (bar = BAR_0; bar <= BAR_5; bar++) + dw_pcie_ep_reset_bar(pci, bar); +} + +static int imx6_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no, + enum pci_epc_irq_type type, + u16 interrupt_num) +{ + struct dw_pcie *pci = to_dw_pcie_from_ep(ep); + + switch (type) { + case PCI_EPC_IRQ_LEGACY: + return dw_pcie_ep_raise_legacy_irq(ep, func_no); + case PCI_EPC_IRQ_MSI: + return dw_pcie_ep_raise_msi_irq(ep, func_no, interrupt_num); + case PCI_EPC_IRQ_MSIX: + return dw_pcie_ep_raise_msix_irq(ep, func_no, interrupt_num); + default: + dev_err(pci->dev, "UNKNOWN IRQ type\n"); + return -EINVAL; + } + + return 0; +} + +static const struct pci_epc_features imx8m_pcie_epc_features = { + .linkup_notifier = false, + .msi_capable = true, + .msix_capable = false, + .reserved_bar = 1 << BAR_1 | 1 << BAR_3, + .align = SZ_64K, +}; + +static const struct pci_epc_features* +imx6_pcie_ep_get_features(struct dw_pcie_ep *ep) +{ + return &imx8m_pcie_epc_features; +} + +static const struct dw_pcie_ep_ops pcie_ep_ops = { + .ep_init = imx6_pcie_ep_init, + .raise_irq = imx6_pcie_ep_raise_irq, + .get_features = imx6_pcie_ep_get_features, }; +static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, + struct platform_device *pdev) +{ + int ret; + unsigned int pcie_dbi2_offset; + struct dw_pcie_ep *ep; + struct resource *res; + struct dw_pcie *pci = imx6_pcie->pci; + struct dw_pcie_rp *pp = &pci->pp; + struct device *dev = pci->dev; + + imx6_pcie_host_init(pp); + ep = &pci->ep; + ep->ops = &pcie_ep_ops; + + switch (imx6_pcie->drvdata->variant) { + default: + pcie_dbi2_offset = SZ_4K; + break; + } + pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset; + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); + if (!res) + return -EINVAL; + + ep->phys_base = res->start; + ep->addr_size = resource_size(res); + ep->page_size = SZ_64K; + + ret = dw_pcie_ep_init(ep); + if (ret) { + dev_err(dev, "failed to initialize endpoint\n"); + return ret; + } + /* Start LTSSM. */ + imx6_pcie_ltssm_enable(dev); + + return 0; +} + static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie) { struct device *dev = imx6_pcie->pci->dev; @@ -1279,15 +1374,22 @@ static int imx6_pcie_probe(struct platform_device *pdev) if (ret) return ret; - ret = dw_pcie_host_init(&pci->pp); - if (ret < 0) - return ret; + if (imx6_pcie->drvdata->mode == DW_PCIE_EP_TYPE) { + ret = imx6_add_pcie_ep(imx6_pcie, pdev); + if (ret < 0) + return ret; + } else { + ret = dw_pcie_host_init(&pci->pp); + if (ret < 0) + return ret; + + if (pci_msi_enabled()) { + u8 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI); - if (pci_msi_enabled()) { - u8 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI); - val = dw_pcie_readw_dbi(pci, offset + PCI_MSI_FLAGS); - val |= PCI_MSI_FLAGS_ENABLE; - dw_pcie_writew_dbi(pci, offset + PCI_MSI_FLAGS, val); + val = dw_pcie_readw_dbi(pci, offset + PCI_MSI_FLAGS); + val |= PCI_MSI_FLAGS_ENABLE; + dw_pcie_writew_dbi(pci, offset + PCI_MSI_FLAGS, val); + } } return 0; From patchwork Mon Jan 16 05:41:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43979 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1042495wrn; Sun, 15 Jan 2023 22:12:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXs0LOFjhlnyxA7s9TsnKd94Ndg+f+GAu7V4ykyHvUPMg10R2I2fpg8A7PqHzKHzBzdtM9x1 X-Received: by 2002:a05:6402:2069:b0:496:37c9:b8e6 with SMTP id bd9-20020a056402206900b0049637c9b8e6mr7914206edb.8.1673849528161; Sun, 15 Jan 2023 22:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849528; cv=none; d=google.com; s=arc-20160816; b=kmFutHV49RzJapap2CXjd0oAK1UM/251q6YQiNAsqKrx4ZCYzKBBHCKFI87PvdgQb4 xVuixGItYV0CryVW42lqzPRUC0bnOXjgDj1EQzl8ZTbRTWkepM5R8zxNKR2zlOIVeJdr bghNnKJsHzq7L0AXmGRxF06fzTIjOSslbPlLxnC5mrk+GcwWFMMyknK+OpiTXBE7Kh7L sf3pxc1/TA9O+vGhg/jGPPy3KwsO8Rmb1hgPH0YqnTMg+Oc8FCXM4jBeIBCA75dhwekV FIcvJOgeCnyQxZcui66bVqdMTY/57UDm60Q+drwQS4nt5XQbQwoJW0l0agJJ79T6ueoO BETA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=5hT2aeCPFFWg3AWeiPZlWvsjBnFHkb9jVSR8KBphPRI=; b=p0WeGYzF7gnQNd438srfh49XZNWdIT8QVi4YCU2utv/Y05Q6AomEz4wvBOgOvULB4J YP//Pz/FoIzi8QCZ23yZDV3JL1kLH226mEXhSb7J8MJ/umgxlPSIvdmfZpX0qPAfPehX n+q2o1i3Z8bDrhXTEEc28zS4kkY08jyWI2kioBFy2iz0+yViB2w1LnKzhSM6s8IO2pTS UswHIb8q2ZLwPKFuwDXAlgx7yiFkBiHl1PWYGTOzobg8+4hES6JCM8S3Rn+4n84bBh4g 6aPVX2L/bUs2HeXRNQbzBLgT58jincndMBw+xT+esZQWgotw7xVU+88KVdwDKrtmKOkk ZRXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm24-20020a05640222d800b0046aff5119c6si25978596edb.428.2023.01.15.22.11.44; Sun, 15 Jan 2023 22:12:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232076AbjAPGHC (ORCPT + 99 others); Mon, 16 Jan 2023 01:07:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231966AbjAPGGS (ORCPT ); Mon, 16 Jan 2023 01:06:18 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0682B758; Sun, 15 Jan 2023 22:06:11 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7CA1420206A; Mon, 16 Jan 2023 07:06:10 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1B856200E53; Mon, 16 Jan 2023 07:06:10 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 4CFAA183ABEF; Mon, 16 Jan 2023 14:06:08 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 12/14] PCI: imx6: Add i.MX8MQ PCIe EP support Date: Mon, 16 Jan 2023 13:41:22 +0800 Message-Id: <1673847684-31893-13-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158442636009857?= X-GMAIL-MSGID: =?utf-8?q?1755158442636009857?= Add i.MX8MQ PCIe EP support. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 38 +++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 572faa91eea7..8190b1de67f9 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -52,6 +52,7 @@ enum imx6_pcie_variants { IMX8MQ, IMX8MM, IMX8MP, + IMX8MQ_EP, }; #define IMX6_PCIE_FLAG_IMX6_PHY BIT(0) @@ -153,6 +154,7 @@ struct imx6_pcie { static unsigned int imx6_pcie_grp_offset(const struct imx6_pcie *imx6_pcie) { WARN_ON(imx6_pcie->drvdata->variant != IMX8MQ && + imx6_pcie->drvdata->variant != IMX8MQ_EP && imx6_pcie->drvdata->variant != IMX8MM && imx6_pcie->drvdata->variant != IMX8MP); return imx6_pcie->controller_id == 1 ? IOMUXC_GPR16 : IOMUXC_GPR14; @@ -167,13 +169,22 @@ static void imx6_pcie_configure_type(struct imx6_pcie *imx6_pcie) else mode = PCI_EXP_TYPE_ROOT_PORT; - if (imx6_pcie->drvdata->variant == IMX8MQ && - imx6_pcie->controller_id == 1) { - mask = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE; - val = FIELD_PREP(IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE, mode); - } else { + switch (imx6_pcie->drvdata->variant) { + case IMX8MQ: + case IMX8MQ_EP: + if (imx6_pcie->controller_id == 1) { + mask = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE; + val = FIELD_PREP(IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE, + mode); + } else { + mask = IMX6Q_GPR12_DEVICE_TYPE; + val = FIELD_PREP(IMX6Q_GPR12_DEVICE_TYPE, mode); + } + break; + default: mask = IMX6Q_GPR12_DEVICE_TYPE; val = FIELD_PREP(IMX6Q_GPR12_DEVICE_TYPE, mode); + break; } regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, mask, val); @@ -315,6 +326,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie) */ break; case IMX8MQ: + case IMX8MQ_EP: /* * TODO: Currently this code assumes external * oscillator is being used @@ -566,6 +578,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) break; case IMX8MM: case IMX8MQ: + case IMX8MQ_EP: case IMX8MP: ret = clk_prepare_enable(imx6_pcie->pcie_aux); if (ret) { @@ -611,6 +624,7 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) break; case IMX8MM: case IMX8MQ: + case IMX8MQ_EP: case IMX8MP: clk_disable_unprepare(imx6_pcie->pcie_aux); break; @@ -676,6 +690,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) switch (imx6_pcie->drvdata->variant) { case IMX7D: case IMX8MQ: + case IMX8MQ_EP: reset_control_assert(imx6_pcie->pciephy_reset); fallthrough; case IMX8MM: @@ -717,6 +732,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) switch (imx6_pcie->drvdata->variant) { case IMX8MQ: + case IMX8MQ_EP: reset_control_deassert(imx6_pcie->pciephy_reset); break; case IMX7D: @@ -804,6 +820,7 @@ static void imx6_pcie_ltssm_enable(struct device *dev) break; case IMX7D: case IMX8MQ: + case IMX8MQ_EP: case IMX8MM: case IMX8MP: reset_control_deassert(imx6_pcie->apps_reset); @@ -824,6 +841,7 @@ static void imx6_pcie_ltssm_disable(struct device *dev) break; case IMX7D: case IMX8MQ: + case IMX8MQ_EP: case IMX8MM: case IMX8MP: reset_control_assert(imx6_pcie->apps_reset); @@ -1076,6 +1094,9 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, ep->ops = &pcie_ep_ops; switch (imx6_pcie->drvdata->variant) { + case IMX8MQ_EP: + pcie_dbi2_offset = SZ_1M; + break; default: pcie_dbi2_offset = SZ_4K; break; @@ -1261,6 +1282,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) "pcie_inbound_axi clock missing or invalid\n"); break; case IMX8MQ: + case IMX8MQ_EP: imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux"); if (IS_ERR(imx6_pcie->pcie_aux)) return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux), @@ -1445,6 +1467,11 @@ static const struct imx6_pcie_drvdata drvdata[] = { .flags = IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr = "fsl,imx8mp-iomuxc-gpr", }, + [IMX8MQ_EP] = { + .variant = IMX8MQ_EP, + .mode = DW_PCIE_EP_TYPE, + .gpr = "fsl,imx8mq-iomuxc-gpr", + }, }; static const struct of_device_id imx6_pcie_of_match[] = { @@ -1455,6 +1482,7 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx8mq-pcie", .data = &drvdata[IMX8MQ], }, { .compatible = "fsl,imx8mm-pcie", .data = &drvdata[IMX8MM], }, { .compatible = "fsl,imx8mp-pcie", .data = &drvdata[IMX8MP], }, + { .compatible = "fsl,imx8mq-pcie-ep", .data = &drvdata[IMX8MQ_EP], }, {}, }; From patchwork Mon Jan 16 05:41:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1042747wrn; Sun, 15 Jan 2023 22:13:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuueeWX1jvU+u6ZbxBsrXptKQR0gJ9SbHc1muqRNeiRh7RP3YMqZ0YJe6Crvg/cOv6jDuQL X-Received: by 2002:a17:907:d410:b0:7a7:9a38:d284 with SMTP id vi16-20020a170907d41000b007a79a38d284mr33968929ejc.19.1673849583584; Sun, 15 Jan 2023 22:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849583; cv=none; d=google.com; s=arc-20160816; b=Pgk/x8RqhJHzPVSPNzdbCEVb2zc5CSu4DPdwZYdSPLlP9kEJ2oAbhslHEO036olWwb 9RC8a7/csr4M8LdobNvdYmeF1WikO2f1baHHcqvSUmzR64w7oP+ZBVxP5O2WxWIabBtv l2OdUKWzTQV9tmKyflzEmtyZwapt04X9uV9ZPzUOpVg42Ol6CGaIOBm74jrr+o/PiBNt pQQsInoBvuNXgwrzwuD3zBfgKSKCK8E8NT4VQ8U2iytCaiijNzdBkXu+Gn+4InfBEWv6 1wua8i5X8t/LV9RWlZNvX2XxQWcqtQ0gf+zXoWqoDFZYjKTs/R97l40zYPXcCqnWP6X9 4Nwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=gjbzQdm947FLJ9ptyMcZHWxnh55QcHJN/YgvAVWNahQ=; b=OQCA7rMNrqRx2Tcu2U2firIYYL1hT10U8ue8s6GfnmNxifqnieqj5tG/+2Iua7R1Cs l8BsCdWvyVehZk14XeOkAaaUlgzeTpVSzpsit2IfAREEnFsP0IsASxrEg126j3k8t7Y6 gsUpkH1gL7ElxtEVU2hxUTlmqbdc03a/oj2A+07xPrAdAmc6RfUdMRHQAqGDiYN8NDux YTV0RbsCZ/7xWrcxgNSSHPy2UfCydxQTnd7FTtrSnb7TM63pCbxMPROS/cw6fLfkr8U8 eGYmvLGECz4wK4pshp/cip9OXimoomugIa9yhVFK5Piot9jf/SgTxi2N2xQGby1JMu20 g+Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq28-20020a1709073f1c00b0086e82fec6edsi6055518ejc.328.2023.01.15.22.12.40; Sun, 15 Jan 2023 22:13:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232099AbjAPGHN (ORCPT + 99 others); Mon, 16 Jan 2023 01:07:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231945AbjAPGGS (ORCPT ); Mon, 16 Jan 2023 01:06:18 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 285303AB3; Sun, 15 Jan 2023 22:06:13 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CB602200749; Mon, 16 Jan 2023 07:06:11 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 68E73200E53; Mon, 16 Jan 2023 07:06:11 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 9E3D7183ABF3; Mon, 16 Jan 2023 14:06:09 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 13/14] PCI: imx6: Add i.MX8MM PCIe EP support Date: Mon, 16 Jan 2023 13:41:23 +0800 Message-Id: <1673847684-31893-14-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158500484490402?= X-GMAIL-MSGID: =?utf-8?q?1755158500484490402?= Add i.MX8MM PCIe EP support. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 8190b1de67f9..eab332eb4c36 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -53,6 +53,7 @@ enum imx6_pcie_variants { IMX8MM, IMX8MP, IMX8MQ_EP, + IMX8MM_EP, }; #define IMX6_PCIE_FLAG_IMX6_PHY BIT(0) @@ -156,6 +157,7 @@ static unsigned int imx6_pcie_grp_offset(const struct imx6_pcie *imx6_pcie) WARN_ON(imx6_pcie->drvdata->variant != IMX8MQ && imx6_pcie->drvdata->variant != IMX8MQ_EP && imx6_pcie->drvdata->variant != IMX8MM && + imx6_pcie->drvdata->variant != IMX8MM_EP && imx6_pcie->drvdata->variant != IMX8MP); return imx6_pcie->controller_id == 1 ? IOMUXC_GPR16 : IOMUXC_GPR14; } @@ -319,6 +321,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie) { switch (imx6_pcie->drvdata->variant) { case IMX8MM: + case IMX8MM_EP: case IMX8MP: /* * The PHY initialization had been done in the PHY @@ -577,6 +580,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) case IMX7D: break; case IMX8MM: + case IMX8MM_EP: case IMX8MQ: case IMX8MQ_EP: case IMX8MP: @@ -623,6 +627,7 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) IMX7D_GPR12_PCIE_PHY_REFCLK_SEL); break; case IMX8MM: + case IMX8MM_EP: case IMX8MQ: case IMX8MQ_EP: case IMX8MP: @@ -694,6 +699,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) reset_control_assert(imx6_pcie->pciephy_reset); fallthrough; case IMX8MM: + case IMX8MM_EP: case IMX8MP: reset_control_assert(imx6_pcie->apps_reset); break; @@ -771,6 +777,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) break; case IMX6Q: /* Nothing to do */ case IMX8MM: + case IMX8MM_EP: case IMX8MP: break; } @@ -822,6 +829,7 @@ static void imx6_pcie_ltssm_enable(struct device *dev) case IMX8MQ: case IMX8MQ_EP: case IMX8MM: + case IMX8MM_EP: case IMX8MP: reset_control_deassert(imx6_pcie->apps_reset); break; @@ -843,6 +851,7 @@ static void imx6_pcie_ltssm_disable(struct device *dev) case IMX8MQ: case IMX8MQ_EP: case IMX8MM: + case IMX8MM_EP: case IMX8MP: reset_control_assert(imx6_pcie->apps_reset); break; @@ -1095,6 +1104,7 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, switch (imx6_pcie->drvdata->variant) { case IMX8MQ_EP: + case IMX8MM_EP: pcie_dbi2_offset = SZ_1M; break; default: @@ -1307,6 +1317,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) } break; case IMX8MM: + case IMX8MM_EP: case IMX8MP: imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux"); if (IS_ERR(imx6_pcie->pcie_aux)) @@ -1472,6 +1483,11 @@ static const struct imx6_pcie_drvdata drvdata[] = { .mode = DW_PCIE_EP_TYPE, .gpr = "fsl,imx8mq-iomuxc-gpr", }, + [IMX8MM_EP] = { + .variant = IMX8MM_EP, + .mode = DW_PCIE_EP_TYPE, + .gpr = "fsl,imx8mm-iomuxc-gpr", + }, }; static const struct of_device_id imx6_pcie_of_match[] = { @@ -1483,6 +1499,7 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx8mm-pcie", .data = &drvdata[IMX8MM], }, { .compatible = "fsl,imx8mp-pcie", .data = &drvdata[IMX8MP], }, { .compatible = "fsl,imx8mq-pcie-ep", .data = &drvdata[IMX8MQ_EP], }, + { .compatible = "fsl,imx8mm-pcie-ep", .data = &drvdata[IMX8MM_EP], }, {}, }; From patchwork Mon Jan 16 05:41:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 43981 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1042748wrn; Sun, 15 Jan 2023 22:13:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvkuaTgJNUmmoQ4kLhjbPkuaqAicy10P7HaAXK50kMRQHGDJdm/3Kkg/F8eGCDRGrLEI8M5 X-Received: by 2002:a17:902:f70c:b0:194:75d6:c95d with SMTP id h12-20020a170902f70c00b0019475d6c95dmr12469238plo.37.1673849583472; Sun, 15 Jan 2023 22:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673849583; cv=none; d=google.com; s=arc-20160816; b=026Xp/MlBs6CrSq1+sFe8nMXFI2SrizDpWzmJfX6k0lmcf9h6h3x2jA7RYG5tIA3QA myOKSScBbfiCMQe0oOHfPn9NFTFrB0ZE5czBhS3ue+JMXV7uqFelcNCEd/PpszTMJ831 8NKA1z3Ji7TP/xZjrxJ82jA4s4o03f2RcJ5f+MermCQlJzxMYcidL8vdSJ+7ICSs4Xac RCf7bRVA9v7Ehh4rz1uBqXBtizVHiRHyAPSpvxf4T55y4WQDXotMuH2EWvH7mN3SPbLA uE1WfYoYDbldW/4g44TucjKGJvBy0NHH40gA4+aIchrmkOJ/SZJyortAQxphMjJqnweq 1BEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=UDplECN2u+teK/cY52039sKUdW1Fl1MWuJcRBZSt0W8=; b=vQnMPHJEUHuf3g0AuUWVkGF6aQCpkURm+Ii5mVzluKpDdUCj8ICtiN/elJuDMTZcL7 m5Ee5kkoc3RZG7Y8py4CepXQi4x8+fRro0L7+2/0eCmIAJt+8ISmAm07eUKlGOSQMUfp 57kjGNLRgaHIVm5D5kyHizE+vYh5y1zIdN2bmiZ4UMr7/v/EHnUICLSDllPyFD3oyzmO Ynf4Mskt6YR8QGMLnewQxQuuPUv0/voqORZNGiINqmXCNxnitRirkj3bYHzH9CojCgcT yTU1YU9U4ei2CTUKVSNGPB2HzTY03nW/+Wf6vD8g7cQdaNg4zDy2sYtcgoWFO483tc8d fCyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020a170902d2cf00b00186b1459953si30914975plc.382.2023.01.15.22.12.51; Sun, 15 Jan 2023 22:13:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232020AbjAPGHU (ORCPT + 99 others); Mon, 16 Jan 2023 01:07:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbjAPGGS (ORCPT ); Mon, 16 Jan 2023 01:06:18 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2277ABBB8; Sun, 15 Jan 2023 22:06:14 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C2D3F1A06BD; Mon, 16 Jan 2023 07:06:12 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 61E991A06C5; Mon, 16 Jan 2023 07:06:12 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id EAE4D183AC07; Mon, 16 Jan 2023 14:06:10 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, shawnguo@kernel.org, kishon@ti.com, kw@linux.com, frank.li@nxp.com Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v5 14/14] PCI: imx6: Add i.MX8MP PCIe EP support Date: Mon, 16 Jan 2023 13:41:24 +0800 Message-Id: <1673847684-31893-15-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> References: <1673847684-31893-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755158500927585319?= X-GMAIL-MSGID: =?utf-8?q?1755158500927585319?= Add the i.MX8MP PCIe EP support. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index eab332eb4c36..55a0405b921d 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -54,6 +54,7 @@ enum imx6_pcie_variants { IMX8MP, IMX8MQ_EP, IMX8MM_EP, + IMX8MP_EP, }; #define IMX6_PCIE_FLAG_IMX6_PHY BIT(0) @@ -158,7 +159,8 @@ static unsigned int imx6_pcie_grp_offset(const struct imx6_pcie *imx6_pcie) imx6_pcie->drvdata->variant != IMX8MQ_EP && imx6_pcie->drvdata->variant != IMX8MM && imx6_pcie->drvdata->variant != IMX8MM_EP && - imx6_pcie->drvdata->variant != IMX8MP); + imx6_pcie->drvdata->variant != IMX8MP && + imx6_pcie->drvdata->variant != IMX8MP_EP); return imx6_pcie->controller_id == 1 ? IOMUXC_GPR16 : IOMUXC_GPR14; } @@ -323,6 +325,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: /* * The PHY initialization had been done in the PHY * driver, break here directly. @@ -584,6 +587,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) case IMX8MQ: case IMX8MQ_EP: case IMX8MP: + case IMX8MP_EP: ret = clk_prepare_enable(imx6_pcie->pcie_aux); if (ret) { dev_err(dev, "unable to enable pcie_aux clock\n"); @@ -631,6 +635,7 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) case IMX8MQ: case IMX8MQ_EP: case IMX8MP: + case IMX8MP_EP: clk_disable_unprepare(imx6_pcie->pcie_aux); break; default: @@ -701,6 +706,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: reset_control_assert(imx6_pcie->apps_reset); break; case IMX6SX: @@ -779,6 +785,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: break; } @@ -831,6 +838,7 @@ static void imx6_pcie_ltssm_enable(struct device *dev) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: reset_control_deassert(imx6_pcie->apps_reset); break; } @@ -853,6 +861,7 @@ static void imx6_pcie_ltssm_disable(struct device *dev) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: reset_control_assert(imx6_pcie->apps_reset); break; } @@ -1105,6 +1114,7 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, switch (imx6_pcie->drvdata->variant) { case IMX8MQ_EP: case IMX8MM_EP: + case IMX8MP_EP: pcie_dbi2_offset = SZ_1M; break; default: @@ -1319,6 +1329,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) case IMX8MM: case IMX8MM_EP: case IMX8MP: + case IMX8MP_EP: imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux"); if (IS_ERR(imx6_pcie->pcie_aux)) return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux), @@ -1488,6 +1499,11 @@ static const struct imx6_pcie_drvdata drvdata[] = { .mode = DW_PCIE_EP_TYPE, .gpr = "fsl,imx8mm-iomuxc-gpr", }, + [IMX8MP_EP] = { + .variant = IMX8MP_EP, + .mode = DW_PCIE_EP_TYPE, + .gpr = "fsl,imx8mp-iomuxc-gpr", + }, }; static const struct of_device_id imx6_pcie_of_match[] = { @@ -1500,6 +1516,7 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx8mp-pcie", .data = &drvdata[IMX8MP], }, { .compatible = "fsl,imx8mq-pcie-ep", .data = &drvdata[IMX8MQ_EP], }, { .compatible = "fsl,imx8mm-pcie-ep", .data = &drvdata[IMX8MM_EP], }, + { .compatible = "fsl,imx8mp-pcie-ep", .data = &drvdata[IMX8MP_EP], }, {}, };