From patchwork Fri Aug 4 02:09:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp783618rwd; Thu, 3 Aug 2023 21:07:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlFXk8HwI9lqDgdmZFZSuAppOLyToGEZQMeIDjE5Co5UEpRqCjXbbhMXtvHPbaOewblFH3aE X-Received: by 2002:a05:6402:268b:b0:522:3f32:52f1 with SMTP id w11-20020a056402268b00b005223f3252f1mr17564214edd.3.1691122059697; Thu, 03 Aug 2023 21:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691122059; cv=none; d=google.com; s=arc-20160816; b=VmObvo6Q9FVkghfNtJwW/Pt2mNaugUNkuxTBYK8m1jXBjB8WnXxhjZSwlzOpvLSZ+c /FEcrpVoy3h6ZOqRcCv/O4nLIQhuj9BlhfQtxziM3VncuZFD7q+/UWVZv6rluS2wyZfC 0RtoH23fVfZ5z67YpcoJGCKWylRshgQ6SWLvSwwKFJdfrLcHmriUoMHCmJ0fM2OuWMl8 gkCk6FHhVofZxc7tcibBaaM+2SkqQcNPx/m2wzwscagX+L2m0fccqmX9vk/NqdAfBWrg +M7YI4jL4To/nybPaNaeZ7g5a9Dq5QQyJzTx0A5deGY3/rRRaCZlNDt0Rzz8NljfUdMl iPtg== 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=slTCvpE9Pw0KofZ8DcjL3n2hsTVFpAkeNWexmaY57n0=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=qlKwaglaNElK5ql8FSrRYf7YnPA+iFycopNYLLDqC9zvUhZeCJPwOHEy+tMIQWK//K gbwo3oeUp4VKyJSvrMER/eZeaGt4jJ4VJuvQ/GnUS3AvjQUwSy0RLN5S+TpNEPiDqPNK pUT5xUzW65zj1ZwgPs50+J44vqcEQNDnaXhYNN7oE7D4pACeK3JT8q35aOL7G1cO9gx5 xoDPV8ECXd8SY1q67Rb9ziEGmWW9wUOFovnpkQCpnPyflwChQ7XsLkFpfwVrRyYaiKyz u7lLTLGmOhgQrEWx4xpBceGEY6EfmuD3ATD5qN8/Cs8FBQ/mhRxxicuWzzlt7wcIRuSa bikA== 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 r9-20020aa7d149000000b005222c703a3bsi821005edo.690.2023.08.03.21.07.16; Thu, 03 Aug 2023 21:07:39 -0700 (PDT) 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 S233827AbjHDCoJ (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232060AbjHDCoD (ORCPT ); Thu, 3 Aug 2023 22:44:03 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E467619A7; Thu, 3 Aug 2023 19:44:01 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6752B2013B5; Fri, 4 Aug 2023 04:44:00 +0200 (CEST) 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 2DDBA2013AE; Fri, 4 Aug 2023 04:44:00 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 882B71820F56; Fri, 4 Aug 2023 10:43:58 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 1/9] dt-bindings: PCI: fsl,imx6q: Add i.MX6Q and i.MX6QP PCIe EP compatibles Date: Fri, 4 Aug 2023 10:09:27 +0800 Message-Id: <1691114975-4750-2-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773270004537905455 X-GMAIL-MSGID: 1773270004537905455 Add i.MX6Q and i.MX6QP PCIe EP compatibles. - Make the interrupts property optional, since i.MX6Q/i.MX6QP PCIe don't have DMA capability. - To pass the schema check, specify the clocks property refer to the different platforms. Signed-off-by: Richard Zhu Reviewed-by: Krzysztof Kozlowski --- .../bindings/pci/fsl,imx6q-pcie-ep.yaml | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml index ee155ed5f181..9b881777c801 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml @@ -19,6 +19,8 @@ description: |+ properties: compatible: enum: + - fsl,imx6q-pcie-ep + - fsl,imx6qp-pcie-ep - fsl,imx8mm-pcie-ep - fsl,imx8mq-pcie-ep - fsl,imx8mp-pcie-ep @@ -46,7 +48,7 @@ properties: interrupts: items: - - description: builtin eDMA interrupter. + - description: builtin eDMA interrupter (optional). interrupt-names: items: @@ -56,8 +58,6 @@ required: - compatible - reg - reg-names - - interrupts - - interrupt-names allOf: - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# @@ -77,7 +77,30 @@ allOf: - const: pcie_bus - const: pcie_phy - const: pcie_aux - else: + + - if: + properties: + compatible: + enum: + - fsl,imx6q-pcie-ep + - fsl,imx6qp-pcie-ep + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: pcie + - const: pcie_bus + - const: pcie_phy + + - if: + properties: + compatible: + enum: + - fsl,imx8mm-pcie-ep + - fsl,imx8mp-pcie-ep + then: properties: clocks: maxItems: 3 From patchwork Fri Aug 4 02:09:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130946 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp771435rwd; Thu, 3 Aug 2023 20:31:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGNcG22U1OS+bRhIERftfvsCX1ad5y+69VCAGgy0yEvusmR7IcFSQuhAu4ExDYEACp4tUzK X-Received: by 2002:a05:600c:1e11:b0:3f8:efad:31ee with SMTP id ay17-20020a05600c1e1100b003f8efad31eemr15179428wmb.2.1691119917932; Thu, 03 Aug 2023 20:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691119917; cv=none; d=google.com; s=arc-20160816; b=YZy+I0JM8loLn3WVZAnCQvXdvsvAlodDYCqya4Ely6A9qiAar5hNsVaaJHaBkqkhbJ Y/XkoeQo06wD//OFGLZUxGx1BD3Di1ExGPqjdrBEkqkmgj8F+jsw5JYU/LrFn4ltq07C Pe7IvcTTqaDntpVXqIU3TnmQqt6hP/uQxM//+IOyox7Xy6xcf6kVNvGpHmdfn6cIueix latcsZ93JZWM09G2PQYmGowean3MGU5h+O3DlfgiLtUgdAIQnfyYgkB/9N4tJFl0UWXt pRVM/qZORLZLa9tQyH6kLlZ6GxoTA+alRQ7/Z8/2xXjBkfCdUHNuryPjX/5mgZp7xCvD JExg== 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=JOEkjFVql61yKsGieEvBxfmbyQ9BUYJUd8xH6DysmeQ=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=Wat/6Vyr2uV+ZNzy2f8rOwZmKRod4YJveVRrZYbeqbnQ+EvsWZkUTQspkVQPOmS4qr pFde1UgBJ4UWnfKSUtrzjGEu7Iy00d4EwEwLmUH94as0FYBx3r3Z1WrPgbL12wAiAhIK FJGYc+YrNLU0pu/FzwlXg585L2kwGMBdkLb4dvVUzz+7DxSvtts4cHoh5rIo8bhGnnDy d8kC2dgPXuhFQxVjI3KvrKeRilYORPjpqSSQOlxijDueSzQAMkvbzJI9Qt96QpFRXkUP C70nZWD1UUJKosGXo6M+jRgpTjHu4yzoZysnN0TF7NhhLrzGMEpfMthToDZWrNQUGI0g rfOg== 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 o21-20020a170906601500b0099396547000si984427ejj.767.2023.08.03.20.31.34; Thu, 03 Aug 2023 20:31:57 -0700 (PDT) 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 S233866AbjHDCoL (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbjHDCoD (ORCPT ); Thu, 3 Aug 2023 22:44:03 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC505115; Thu, 3 Aug 2023 19:44:02 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8F9C4201F1B; Fri, 4 Aug 2023 04:44:01 +0200 (CEST) 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 565922013AE; Fri, 4 Aug 2023 04:44:01 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id A7072181D0E5; Fri, 4 Aug 2023 10:43:59 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 2/9] dt-bindings: PCI: fsl,imx6q: Add i.MX6SX PCIe EP compatibles Date: Fri, 4 Aug 2023 10:09:28 +0800 Message-Id: <1691114975-4750-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773267758973994600 X-GMAIL-MSGID: 1773267758973994600 Add i.MX6SX PCIe EP compatibles. Signed-off-by: Richard Zhu Reviewed-by: Krzysztof Kozlowski --- .../bindings/pci/fsl,imx6q-pcie-ep.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml index 9b881777c801..26448084340a 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml @@ -21,6 +21,7 @@ properties: enum: - fsl,imx6q-pcie-ep - fsl,imx6qp-pcie-ep + - fsl,imx6sx-pcie-ep - fsl,imx8mm-pcie-ep - fsl,imx8mq-pcie-ep - fsl,imx8mp-pcie-ep @@ -62,6 +63,22 @@ required: allOf: - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml# + - if: + properties: + compatible: + enum: + - fsl,imx6sx-pcie-ep + then: + properties: + clocks: + minItems: 4 + clock-names: + items: + - const: pcie + - const: pcie_bus + - const: pcie_phy + - const: pcie_inbound_axi + - if: properties: compatible: From patchwork Fri Aug 4 02:09:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp15323vqb; Thu, 3 Aug 2023 21:15:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBJ/keFjMDkHl9+pvLeSUaNjHzNl2Fq/OTqIRO6OPhLhwPg5nX5ANQByuxzAjsO4yEGnSD X-Received: by 2002:a05:6a20:8f13:b0:137:4fd0:e2e6 with SMTP id b19-20020a056a208f1300b001374fd0e2e6mr24286906pzk.6.1691122504464; Thu, 03 Aug 2023 21:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691122504; cv=none; d=google.com; s=arc-20160816; b=BuFIMVT+1+YOdUFnC1i7TXgVMwUf1Q6UVk8n3mpn4kAvp4+CdUk5EweFTJtKHI4Tn0 dVjF/5ZLm9aFnt3DoHfJQU6+CtaCO7zC0mL2RwiZoaJZe0wPhFd33JyFXKonKHYryq0Y 5THj4etKdC8fUar5w4c8tieao6JRlZi/MDoXtd2593pjyusdIoyJYCywTczfO2t8dA4d BYnzNbSAbwLeYvZ0coOJN8lQVhYsGh6AiDcTwFBGGZ9QRc6IWd+u5f1VUyf7IZ0odYEq YfMlLovWvsuW1/DEOb2+rZO6iCMHuAxxImKzM27v4aDEF0bG1pmMLUp55Fp+XP1tDHiw 14sg== 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=ZUBaDr/tH16SWG/yzfpv954hLrhkpnl4WQDm6upJDkg=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=UQVOHtMLryKw7M+oUYu8105Z2eqZGIPP5jX/Mau5u+xkWrqdxQ1jVv1WwgiK4cboZb jLPGEHzpTGInQjdUVqpu2xaOnIrOgg2KkVFulLtykiOzeYSESKafmXgFh3yGPBcwmMVO ZwFslNCpev/ZRlg5MvJtxvVP4Ug/4nLqWLxteRT/kQgoPiKpX33sSMFMlxStpUHU7ODt XWg9Yw1juWjIchNqmEF52EnctO88v4hfirKq8yZUz9OPVSfuKKm9zY1FMIQNlERWEjWp zxzroJUtzhDry4poc50JC9dBJfwH0vehSsN8/vVwdq0ula2G9M7+I9uH1tXYtLMmV9js k3QQ== 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 v15-20020a056a00148f00b0068716b885c1si1118794pfu.217.2023.08.03.21.14.43; Thu, 03 Aug 2023 21:15:04 -0700 (PDT) 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 S232655AbjHDCoP (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233658AbjHDCoF (ORCPT ); Thu, 3 Aug 2023 22:44:05 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 189EA2698; Thu, 3 Aug 2023 19:44:04 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BBFFD1A0AEA; Fri, 4 Aug 2023 04:44:02 +0200 (CEST) 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 821011A08C4; Fri, 4 Aug 2023 04:44:02 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id D05501802200; Fri, 4 Aug 2023 10:44:00 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 3/9] dt-bindings: PCI: fsl,imx6q: Add i.MX7D PCIe EP compatibles Date: Fri, 4 Aug 2023 10:09:29 +0800 Message-Id: <1691114975-4750-4-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773270471056595192 X-GMAIL-MSGID: 1773270471056595192 Add i.MX7D PCIe EP compatibles. Signed-off-by: Richard Zhu Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml index 26448084340a..e8518642ba9b 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml @@ -22,6 +22,7 @@ properties: - fsl,imx6q-pcie-ep - fsl,imx6qp-pcie-ep - fsl,imx6sx-pcie-ep + - fsl,imx7d-pcie-ep - fsl,imx8mm-pcie-ep - fsl,imx8mq-pcie-ep - fsl,imx8mp-pcie-ep @@ -101,6 +102,7 @@ allOf: enum: - fsl,imx6q-pcie-ep - fsl,imx6qp-pcie-ep + - fsl,imx7d-pcie-ep then: properties: clocks: From patchwork Fri Aug 4 02:09:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1544610vqx; Thu, 3 Aug 2023 20:03:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUCvg2sTvXS2gOp9NlpYYFvzcaQdfK46VXQ/DjPxBVkjhdrwK5cEqvxSFAXm1zd0Ylr9Lh X-Received: by 2002:aa7:8e4a:0:b0:687:7af2:bf88 with SMTP id d10-20020aa78e4a000000b006877af2bf88mr6414402pfr.0.1691118200702; Thu, 03 Aug 2023 20:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691118200; cv=none; d=google.com; s=arc-20160816; b=NDJBktpn014sTOSVdrihQYWBJHMEc2hg/58RCoD83Pcw+9dwZSmGGDh6WbMTivRk3x LFV60/i8SA4ZO5DipmtzqHE4JAbnZ8jk7AX4w//jTfPKqnX75QHJKB1NRn+Y4SoCHcxz vfQIEY98EVuVv2vDNm74Rat8kc7/1OWRNZomW4a9MgGZO0Hupa9KLkutgksTheoQql3a BA0LYZ3D4VWKBa1kJceBXNXNuAjKFrRSP+9OVjbnL9wKL10S3CbIqNTezyH48sGGK3qA 3ezWSDdVPVhtZSAAAnWCYRoqmkU2/BuATM9WKef0BpfYD8qsl7uhZ9iAo8FI2uC3MZ34 n9TA== 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=6ICIb26tiEgFvvQJpNaZQi/rLKKJXhjYX5Szfr1+IT4=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=hlP8rwJFc9V1Kf/6Vy1qcd8/H8gHaSaEGUSH6M9jTZYMWgxba0lV9JXxZLD/3+g6T0 Yl4SW4XJjf2DqF0Gv3sti/0bsx4l+NWCgL3pcrQm0NaH9LvsW5js8ys69/El5XCU4+Ze o0aTS2hQhLwogHz0wuzaktPeeBkT3qkg/msKrxiPhuyJOZQboxc4CTMDdk0fuUiAFyi4 rkw/rbUbNnsGFOceTjsWHcbv2rzB9+qVWy3ws25FVjamxxMhg0P0V9+Toq68rT+qJSos xD/thos9ufSRTt5SzXzNDsJ/2/3CuFqhJzl/i+LuDuAOiWgfrKKpRocNv3+PFhj4A7DB he4Q== 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 cq8-20020a056a00330800b00687346d94c4si917036pfb.334.2023.08.03.20.02.56; Thu, 03 Aug 2023 20:03:20 -0700 (PDT) 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 S233920AbjHDCoR (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233716AbjHDCoG (ORCPT ); Thu, 3 Aug 2023 22:44:06 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAF419A7; Thu, 3 Aug 2023 19:44:05 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DB2371A13C7; Fri, 4 Aug 2023 04:44:03 +0200 (CEST) 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 A10751A13C5; Fri, 4 Aug 2023 04:44:03 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 07D1C181D0E5; Fri, 4 Aug 2023 10:44:01 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 4/9] arm: dts: nxp: Add i.MX6QDL and i.MX6QP PCIe EP supports Date: Fri, 4 Aug 2023 10:09:30 +0800 Message-Id: <1691114975-4750-5-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773265958120114974 X-GMAIL-MSGID: 1773265958120114974 Add i.MX6QDL and i.MX6QP PCIe EP supports. Signed-off-by: Richard Zhu --- arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/nxp/imx/imx6qp.dtsi | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi index bda182edc589..be02f7882c68 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi @@ -289,6 +289,20 @@ pcie: pcie@1ffc000 { status = "disabled"; }; + pcie_ep: pcie-ep@1ffc000 { + compatible = "fsl,imx6q-pcie-ep"; + reg = <0x01ffc000 0x04000>, <0x01000000 0xf00000>; + reg-names = "dbi", "addr_space"; + num-lanes = <1>; + clocks = <&clks IMX6QDL_CLK_PCIE_AXI>, + <&clks IMX6QDL_CLK_LVDS1_GATE>, + <&clks IMX6QDL_CLK_PCIE_REF_125M>; + clock-names = "pcie", "pcie_bus", "pcie_phy"; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; + aips1: bus@2000000 { /* AIPS1 */ compatible = "fsl,aips-bus", "simple-bus"; #address-cells = <1>; diff --git a/arch/arm/boot/dts/nxp/imx/imx6qp.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qp.dtsi index fc164991d2ae..4ca53a4c254c 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qp.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qp.dtsi @@ -118,3 +118,7 @@ &mmdc0 { &pcie { compatible = "fsl,imx6qp-pcie"; }; + +&pcie_ep { + compatible = "fsl,imx6qp-pcie-ep"; +}; From patchwork Fri Aug 4 02:09:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp767739rwd; Thu, 3 Aug 2023 20:21:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeIqdxA7x0gS+gP2nRrf1G+/aD0ycF+RTvUuZqkm2iESU+NlRO4LGQl+UdSE2ixP5g/lPj X-Received: by 2002:a17:90a:2841:b0:267:f9a5:139a with SMTP id p1-20020a17090a284100b00267f9a5139amr16868348pjf.0.1691119279104; Thu, 03 Aug 2023 20:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691119279; cv=none; d=google.com; s=arc-20160816; b=isVsFjHn63CD0JE8cQ4ksBnXocapd88Hy7yhRPdOc/xzkT6hOkGSNcQcLkRzik46Wd YizWfH64xVnvxZho6ueWBVxu5HevYmgZIlEWdJ5+SGpU3OFZ+hK5O1U/8m40Aw6lBp+9 DFxAxctEzSRvvOGb4SykW8nagR+6BmaB1133QB4ke8y13WZtHciiWaAznLZynLakNzCQ 87Nlx0ZqxvEw9Sq3Zy5fNebnOadEawQgCHp0LGNhhKiqlBM11bCneA4a0pFH0i0tCcEO vbEDrojBxAy2qVTqKS9OOHQ/2vOF4gvg9zWNJE0LSjoEjHpPQRc1d3DK0o5hzEpSvA8v NdAg== 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=8mhNcA+qCXAkAoQ0PuYv+QVUlruayXMqEP6io11u+2k=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=ORXn2xTgRPF5EfUGqpo6+ZrqryCp5A/cu7wkfK6N7fcP/iF+wXUtYAyiKzY6NfJhTJ oAMFlhjcgdVG5VckNcgM90F+O9Ln/X/OAlKo5C1e2Moj05Hcx+Avzlmt/Nh9mjAJR6UF c+Op6LzyyngfRr0BMxzZ2tQT6bYV6WP+a3vz+jiqY5QftKXhiOoIZh4heueXilMOPmoc NxAxC+BjV/Z5H28nSENRRX2YVEygEosiGsxdCnYfx3D+UeqVRIosVacCQaeWkDZxjGz8 HCKibukRKyK9P22YQPRqDqMizQiCVIMXH9vbW80DVjF9+aGSh45eMwqqU7+Uc+6GF28C iJ3Q== 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 v5-20020a634645000000b00563eda6a8e6si952193pgk.613.2023.08.03.20.21.04; Thu, 03 Aug 2023 20:21:19 -0700 (PDT) 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 S233879AbjHDCoU (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjHDCoH (ORCPT ); Thu, 3 Aug 2023 22:44:07 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80E4C115; Thu, 3 Aug 2023 19:44:06 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 108D41A13D2; Fri, 4 Aug 2023 04:44:05 +0200 (CEST) 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 CA4CC1A13C5; Fri, 4 Aug 2023 04:44:04 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 26DEE1802200; Fri, 4 Aug 2023 10:44:03 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 5/9] arm: dts: nxp: Add i.MX6SX PCIe EP support Date: Fri, 4 Aug 2023 10:09:31 +0800 Message-Id: <1691114975-4750-6-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773267089132904872 X-GMAIL-MSGID: 1773267089132904872 Add i.MX6SX PCIe EP support. Signed-off-by: Richard Zhu --- arch/arm/boot/dts/nxp/imx/imx6sx.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi index f6b35923ad83..13411a843e07 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi @@ -1471,5 +1471,22 @@ pcie: pcie@8ffc000 { power-domain-names = "pcie", "pcie_phy"; status = "disabled"; }; + + pcie_ep: pcie-ep@8ffc000 { + compatible = "fsl,imx6sx-pcie-ep"; + reg = <0x08ffc000 0x04000>, <0x08000000 0xf00000>; + reg-names = "dbi", "addr_space"; + num-lanes = <1>; + clocks = <&clks IMX6SX_CLK_PCIE_AXI>, + <&clks IMX6SX_CLK_LVDS1_OUT>, + <&clks IMX6SX_CLK_PCIE_REF_125M>, + <&clks IMX6SX_CLK_DISPLAY_AXI>; + clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_inbound_axi"; + power-domains = <&pd_disp>, <&pd_pci>; + power-domain-names = "pcie", "pcie_phy"; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; }; }; From patchwork Fri Aug 4 02:09:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp770932rwd; Thu, 3 Aug 2023 20:30:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPmmeLBCxHKNpZhBIbbkM4q8xobpNFxYH2NWWaDIl/aOs+gIvndMrUydQQ/rffbpNosxZt X-Received: by 2002:a5d:524b:0:b0:317:3a23:4855 with SMTP id k11-20020a5d524b000000b003173a234855mr13435243wrc.2.1691119850752; Thu, 03 Aug 2023 20:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691119850; cv=none; d=google.com; s=arc-20160816; b=NLwbnBoGLjnL0/M+K2OnYeLT+IjSFT8Eu3h5k85unxq6WzF5JqkEhQUgeOGRbBzseg ZK6owQOVTf7EhjCvXzoTPHNzbBS3gL+QsI/JP4e1Z5SJSgVIWfsGNXthC5ztNiFtM1eE ba/FRRWLdjntJLW3D1S7j4V+wVU1wzbWOs+IHj3qYVz5QhpvUpqSzu/3Ikbv08tQyevO gtzmAgFCeieUaMn1Wm9MDPw6g1RMfISMeKtodeuag42hg1Jb1+zyqYN0oLaeELIV8r+F 518F3lJ34oGvnHcBck3PHlWoJCtfx802aUd6yyIMep4+rEph4FAF0arEE5vY8w/6pScZ 2BTw== 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=DJENxjldGDUgVyo0FXHaxSsxLZqzqT1DQN4h+EVoS9E=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=ikAn5M3wMa5AqlHKm8yrCQ9Y7fzpF5LXvrIFPLIuGMgNOsSybLvIv2BTuTkc8P/dLd 3avgum1z5/cxDPqLPMoYyReHnI9kjfE0kSJLV77Nm91v6XZIU9x/yKzvtjhCy6TPknu2 dv+TjRqXDQ2PGbUM/ZjXFp+62aArbplDeYrs6cYfs3C4XQm6Dm/lv9d+Nv57KSGdS4cg MkhV1cnZJrOogEZMu47/+ji+jMBIqCMNLNrf8oTtyle4vimr5Zrur8OTCg9iLgKbszI5 oIwnXjhXmN48DxLG7/CFyT3a8DxudjEwSRnAvTymURi+Zi1ZUpMlEVRUDfjD4YcBllf0 jeCQ== 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 bs15-20020a170906d1cf00b009935d9765fasi892221ejb.1013.2023.08.03.20.30.27; Thu, 03 Aug 2023 20:30:50 -0700 (PDT) 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 S233965AbjHDCoX (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233795AbjHDCoI (ORCPT ); Thu, 3 Aug 2023 22:44:08 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 304A4173C; Thu, 3 Aug 2023 19:44:07 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C9D761A1E55; Fri, 4 Aug 2023 04:44:05 +0200 (CEST) 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 8FDCC1A13C5; Fri, 4 Aug 2023 04:44:05 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 4EDA21820F59; Fri, 4 Aug 2023 10:44:04 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 6/9] arm: dts: nxp: Add i.MX7D PCIe EP support Date: Fri, 4 Aug 2023 10:09:32 +0800 Message-Id: <1691114975-4750-7-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773267688735493510 X-GMAIL-MSGID: 1773267688735493510 Add i.MX7D PCIe EP support. Signed-off-by: Richard Zhu --- arch/arm/boot/dts/nxp/imx/imx7d.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/nxp/imx/imx7d.dtsi b/arch/arm/boot/dts/nxp/imx/imx7d.dtsi index 4b94b8afb55d..135684f17a20 100644 --- a/arch/arm/boot/dts/nxp/imx/imx7d.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7d.dtsi @@ -156,6 +156,33 @@ pcie: pcie@33800000 { fsl,imx7d-pcie-phy = <&pcie_phy>; status = "disabled"; }; + + pcie_ep: pcie-ep@33800000 { + compatible = "fsl,imx7d-pcie-ep"; + reg = <0x33800000 0x4000>, + <0x40000000 0x10000000>; + reg-names = "dbi", "addr_space"; + num-lanes = <1>; + clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>, + <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>, + <&clks IMX7D_PCIE_PHY_ROOT_CLK>; + clock-names = "pcie", "pcie_bus", "pcie_phy"; + assigned-clocks = <&clks IMX7D_PCIE_CTRL_ROOT_SRC>, + <&clks IMX7D_PCIE_PHY_ROOT_SRC>; + assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_250M_CLK>, + <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; + + fsl,max-link-speed = <2>; + power-domains = <&pgc_pcie_phy>; + resets = <&src IMX7_RESET_PCIEPHY>, + <&src IMX7_RESET_PCIE_CTRL_APPS_EN>, + <&src IMX7_RESET_PCIE_CTRL_APPS_TURNOFF>; + reset-names = "pciephy", "apps", "turnoff"; + fsl,imx7d-pcie-phy = <&pcie_phy>; + num-ib-windows = <4>; + num-ob-windows = <4>; + status = "disabled"; + }; }; }; From patchwork Fri Aug 4 02:09:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1542979vqx; Thu, 3 Aug 2023 20:00:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHki0Wo3KOcZj0k5KZPXANvbFTXRhtFoJq8Qqo/QtsqvIVQPhhJ8leQhwq0Z71JqLN+0eJO X-Received: by 2002:a05:6a20:841f:b0:112:cf5:d5cc with SMTP id c31-20020a056a20841f00b001120cf5d5ccmr25516103pzd.1.1691118000018; Thu, 03 Aug 2023 20:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691118000; cv=none; d=google.com; s=arc-20160816; b=cZJ+b/Cim8h2TXxYW9Wcx422F0dCwc5KHW3XX92YV1U5OsewD4pzHnaMyVgUme9l81 zUufm64pZ+8H2sDcrsOGbbbYBhGE4w+9pzAQSvrq0izBYxeUVy5j/RCTUsFVBKrdoeCb fTLSpgdUKC3Qpzt1ozKsHHeKTwIdfbjysFHtyzedAj0TcmcB2MzEpwTjgwZMDZ6iAkph 6iVBjW8ZwN5EeFYqHJDQLYvaT87dwJ1gmqldSLGY+JoV1NLQhfBDFBBndkp/3chaX4M8 EBqNjmP4YDDM9YKx9eJYfe32hfw4GbUvLARECqo2KUYuvSNDWlUeW8N0QbkqNIsGJPBW DsYg== 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=3STXuXpUhNwX0SJzcAuyzEZX0zEf3nLlIG/Lbg7QSTs=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=FtGiDAU3XwWDgW0bv14dxMme7HmOV7A6BSYlKITMp2JpKq3i00xQQ9Q2xIZDrPRLUo 5NExm3uKkXPovpGbnBy4/t0H9kXRKVLAmn+N7JIuYpmdPKIhhEmXwa06BpNbYdSAZFWu B8bjdBhCBxnK6j8H5Tm7dyXX9EzasYG3TyoTslUmWOOrXrfHP248g0Bfx3jK9zklJJou X5odhpKmUhIBkuIb4DUWBfYrywLsiaOZtZOP5QR+spyay5yYjbd7pYKGW+MklOnrRV1Z IiQXpm9twp9F/KXil7xN4tmDuPK4prsluaCOcnM941FdBsXtOmQY44ynX7nI8dG7os2F dOOQ== 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 pi5-20020a17090b1e4500b00262f0035181si4578848pjb.26.2023.08.03.19.59.46; Thu, 03 Aug 2023 20:00:00 -0700 (PDT) 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 S233150AbjHDCoZ (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231428AbjHDCoL (ORCPT ); Thu, 3 Aug 2023 22:44:11 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCC6219A7; Thu, 3 Aug 2023 19:44:08 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 78A00201F17; Fri, 4 Aug 2023 04:44:07 +0200 (CEST) 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 134012013AE; Fri, 4 Aug 2023 04:44:07 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 6EABF1820F56; Fri, 4 Aug 2023 10:44:05 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 7/9] PCI: imx6: Add i.MX6Q and i.MX6QP PCIe EP supports Date: Fri, 4 Aug 2023 10:09:33 +0800 Message-Id: <1691114975-4750-8-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773265748015283213 X-GMAIL-MSGID: 1773265748015283213 Add i.MX6Q and i.MX6QP PCIe EP supports. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 27aaa2a6bf39..9a6531ddfef2 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -46,8 +46,10 @@ enum imx6_pcie_variants { IMX6Q, + IMX6Q_EP, IMX6SX, IMX6QP, + IMX6QP_EP, IMX7D, IMX8MQ, IMX8MM, @@ -67,6 +69,7 @@ struct imx6_pcie_drvdata { u32 flags; int dbi_length; const char *gpr; + const struct pci_epc_features *epc_features; }; struct imx6_pcie { @@ -567,7 +570,9 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) IMX6SX_GPR12_PCIE_TEST_POWERDOWN, 0); break; case IMX6QP: + case IMX6QP_EP: case IMX6Q: + case IMX6Q_EP: /* power up core phy and enable ref clock */ regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_TEST_PD, 0 << 18); @@ -619,7 +624,9 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) clk_disable_unprepare(imx6_pcie->pcie_inbound_axi); break; case IMX6QP: + case IMX6QP_EP: case IMX6Q: + case IMX6Q_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_REF_CLK_EN, 0); regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, @@ -720,11 +727,13 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) IMX6SX_GPR5_PCIE_BTNRST_RESET); break; case IMX6QP: + case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_SW_RST, IMX6Q_GPR1_PCIE_SW_RST); break; case IMX6Q: + case IMX6Q_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18); regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, @@ -777,12 +786,14 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) IMX6SX_GPR5_PCIE_BTNRST_RESET, 0); break; case IMX6QP: + case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_SW_RST, 0); usleep_range(200, 500); break; case IMX6Q: /* Nothing to do */ + case IMX6Q_EP: case IMX8MM: case IMX8MM_EP: case IMX8MP: @@ -827,8 +838,10 @@ static void imx6_pcie_ltssm_enable(struct device *dev) switch (imx6_pcie->drvdata->variant) { case IMX6Q: + case IMX6Q_EP: case IMX6SX: case IMX6QP: + case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6Q_GPR12_PCIE_CTL_2, IMX6Q_GPR12_PCIE_CTL_2); @@ -851,8 +864,10 @@ static void imx6_pcie_ltssm_disable(struct device *dev) switch (imx6_pcie->drvdata->variant) { case IMX6Q: + case IMX6Q_EP: case IMX6SX: case IMX6QP: + case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6Q_GPR12_PCIE_CTL_2, 0); break; @@ -1077,6 +1092,27 @@ static int imx6_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no, return 0; } +/* + * i.MX6Q and i.MX6QP PCIe EP BAR definitions. + * +-----------------------------------------------------------------+ + * | BAR0 | BAR1 | BAR2 | BAR3 | BAR4 | BAR5 | + * +----------|----------|----------|----------|----------|----------+ + * | 64-bit | Disabled | 32-bit | 32-bit | Disabled | Disabled | + * | | | | Fixed | | | + * | | | | 256Bytes | | | + * | Prefetch | | Prefetch | None- | | | + * | Memory | | Memory | Prefetch | | | + * | | | | IO | | | + * +-----------------------------------------------------------------+ + */ +static const struct pci_epc_features imx6q_pcie_epc_features = { + .linkup_notifier = false, + .msi_capable = true, + .msix_capable = false, + .reserved_bar = 1 << BAR_4 | 1 << BAR_5, + .align = SZ_64K, +}; + static const struct pci_epc_features imx8m_pcie_epc_features = { .linkup_notifier = false, .msi_capable = true, @@ -1088,6 +1124,12 @@ static const struct pci_epc_features imx8m_pcie_epc_features = { static const struct pci_epc_features* imx6_pcie_ep_get_features(struct dw_pcie_ep *ep) { + struct dw_pcie *pci = to_dw_pcie_from_ep(ep); + struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci); + + if (imx6_pcie->drvdata->epc_features) + return imx6_pcie->drvdata->epc_features; + return &imx8m_pcie_epc_features; } @@ -1157,6 +1199,7 @@ static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie) switch (imx6_pcie->drvdata->variant) { case IMX6SX: case IMX6QP: + case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_PM_TURN_OFF, IMX6SX_GPR12_PCIE_PM_TURN_OFF); @@ -1478,6 +1521,13 @@ static const struct imx6_pcie_drvdata drvdata[] = { .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", }, + [IMX6Q_EP] = { + .variant = IMX6Q_EP, + .mode = DW_PCIE_EP_TYPE, + .flags = IMX6_PCIE_FLAG_IMX6_PHY, + .gpr = "fsl,imx6q-iomuxc-gpr", + .epc_features = &imx6q_pcie_epc_features, + }, [IMX6SX] = { .variant = IMX6SX, .flags = IMX6_PCIE_FLAG_IMX6_PHY | @@ -1493,6 +1543,13 @@ static const struct imx6_pcie_drvdata drvdata[] = { .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", }, + [IMX6QP_EP] = { + .variant = IMX6QP_EP, + .mode = DW_PCIE_EP_TYPE, + .flags = IMX6_PCIE_FLAG_IMX6_PHY, + .gpr = "fsl,imx6q-iomuxc-gpr", + .epc_features = &imx6q_pcie_epc_features, + }, [IMX7D] = { .variant = IMX7D, .flags = IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, @@ -1531,8 +1588,10 @@ static const struct imx6_pcie_drvdata drvdata[] = { static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx6q-pcie", .data = &drvdata[IMX6Q], }, + { .compatible = "fsl,imx6q-pcie-ep", .data = &drvdata[IMX6Q_EP], }, { .compatible = "fsl,imx6sx-pcie", .data = &drvdata[IMX6SX], }, { .compatible = "fsl,imx6qp-pcie", .data = &drvdata[IMX6QP], }, + { .compatible = "fsl,imx6qp-pcie-ep", .data = &drvdata[IMX6QP_EP], }, { .compatible = "fsl,imx7d-pcie", .data = &drvdata[IMX7D], }, { .compatible = "fsl,imx8mq-pcie", .data = &drvdata[IMX8MQ], }, { .compatible = "fsl,imx8mm-pcie", .data = &drvdata[IMX8MM], }, From patchwork Fri Aug 4 02:09:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130936 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1544964vqx; Thu, 3 Aug 2023 20:04:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlFlb3yLpSKU1s+LioLkKrc3apls0Bq6lEqo/QWfTv3HzJv5jHx338wYMq+juZoD2iT7S7Ck X-Received: by 2002:a05:6a00:2814:b0:66f:3fc5:6167 with SMTP id bl20-20020a056a00281400b0066f3fc56167mr18536652pfb.1.1691118246468; Thu, 03 Aug 2023 20:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691118246; cv=none; d=google.com; s=arc-20160816; b=Q9GpY07310CXVX59Ccc67ECnlIGTdEgVHEHxibVQgHFtGAbRKXYMXVqn2LcMpP+lKl L45ubYEPOo9C02/cHnVM4AC7lgJpyatxPBJPaQYIcYtm5VWjeNiKvjVmtfXzLbutFWDG YbqAg3OtJBPSN/GzK2hDDRiwN1V9FiZEWlah2upPlflIOhc54xl8eE8/BvkaPfePhhCZ FHfcCioJE0xJG5M1tGOfpxZVbZyR+pYLiC9C7bvocNUjti57qQmBv1l7u83veb6TjHd/ dY0ABuqyTQIM3U+pR2N37XrDQyYS4D5hJ6aKBAAvcxz6tUhW8qTHesgnkjG51plJhjFe /vog== 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=cmwDSbltQ7BTRqbK4mfZS3e3461DYx9Yn3UKrJpR8D8=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=G4u6t20xQSxZpJAwCD1ot6Dp86Nc5MXIGUccbIvTRNfEuaBb9us5yUyM7Qyu5OeBFG IZvgJhsCm1VPkpHYsDuqRk6WDQI2rzMuVbPIT+LPOmQZCjmBi/31h7z9WwzMQDHF3tBv QQSxofX+p5kSL92NXiNMB/T3S7oiUHBSNmsfsUdRZwt4cr8t0siKt3loQbTCBYG2hDzu ffOsRzS4XBk77Pmisfrbh4ysKur3TkpCV3MHiAneWsTJ0MWIF1CIwqnyZDCt2uyknxPo 5fRGul/YmyIaqCWsU4qoE3P3L9D9PIR8BSO9b+OGlriCDkoZjK3PRNDlT+Oamtv3X7Lm DBgg== 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 cq8-20020a056a00330800b00687346d94c4si917036pfb.334.2023.08.03.20.03.40; Thu, 03 Aug 2023 20:04:06 -0700 (PDT) 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 S231432AbjHDCo1 (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbjHDCoM (ORCPT ); Thu, 3 Aug 2023 22:44:12 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 154D12D5F; Thu, 3 Aug 2023 19:44:10 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A21F42013AE; Fri, 4 Aug 2023 04:44:08 +0200 (CEST) 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 32724201F1D; Fri, 4 Aug 2023 04:44:08 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 8D7E9181D0E5; Fri, 4 Aug 2023 10:44:06 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 8/9] PCI: imx6: Add i.MX6SX PCIe EP support Date: Fri, 4 Aug 2023 10:09:34 +0800 Message-Id: <1691114975-4750-9-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773266006652829611 X-GMAIL-MSGID: 1773266006652829611 Add the i.MX6SX PCIe EP support. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 9a6531ddfef2..43c5251f5160 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -48,6 +48,7 @@ enum imx6_pcie_variants { IMX6Q, IMX6Q_EP, IMX6SX, + IMX6SX_EP, IMX6QP, IMX6QP_EP, IMX7D, @@ -362,6 +363,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie) IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, 0); break; case IMX6SX: + case IMX6SX_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_RX_EQ_MASK, IMX6SX_GPR12_PCIE_RX_EQ_2); @@ -560,6 +562,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) switch (imx6_pcie->drvdata->variant) { case IMX6SX: + case IMX6SX_EP: ret = clk_prepare_enable(imx6_pcie->pcie_inbound_axi); if (ret) { dev_err(dev, "unable to enable pcie_axi clock\n"); @@ -621,6 +624,7 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) { switch (imx6_pcie->drvdata->variant) { case IMX6SX: + case IMX6SX_EP: clk_disable_unprepare(imx6_pcie->pcie_inbound_axi); break; case IMX6QP: @@ -718,6 +722,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) reset_control_assert(imx6_pcie->apps_reset); break; case IMX6SX: + case IMX6SX_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_TEST_POWERDOWN, IMX6SX_GPR12_PCIE_TEST_POWERDOWN); @@ -782,6 +787,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) imx7d_pcie_wait_for_phy_pll_lock(imx6_pcie); break; case IMX6SX: + case IMX6SX_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR5, IMX6SX_GPR5_PCIE_BTNRST_RESET, 0); break; @@ -840,6 +846,7 @@ static void imx6_pcie_ltssm_enable(struct device *dev) case IMX6Q: case IMX6Q_EP: case IMX6SX: + case IMX6SX_EP: case IMX6QP: case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, @@ -866,6 +873,7 @@ static void imx6_pcie_ltssm_disable(struct device *dev) case IMX6Q: case IMX6Q_EP: case IMX6SX: + case IMX6SX_EP: case IMX6QP: case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, @@ -1198,6 +1206,7 @@ static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie) /* Others poke directly at IOMUXC registers */ switch (imx6_pcie->drvdata->variant) { case IMX6SX: + case IMX6SX_EP: case IMX6QP: case IMX6QP_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, @@ -1361,6 +1370,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) switch (imx6_pcie->drvdata->variant) { case IMX6SX: + case IMX6SX_EP: imx6_pcie->pcie_inbound_axi = devm_clk_get(dev, "pcie_inbound_axi"); if (IS_ERR(imx6_pcie->pcie_inbound_axi)) @@ -1535,6 +1545,13 @@ static const struct imx6_pcie_drvdata drvdata[] = { IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr = "fsl,imx6q-iomuxc-gpr", }, + [IMX6SX_EP] = { + .variant = IMX6SX_EP, + .mode = DW_PCIE_EP_TYPE, + .flags = IMX6_PCIE_FLAG_IMX6_PHY, + .gpr = "fsl,imx6q-iomuxc-gpr", + .epc_features = &imx6q_pcie_epc_features, + }, [IMX6QP] = { .variant = IMX6QP, .flags = IMX6_PCIE_FLAG_IMX6_PHY | @@ -1590,6 +1607,7 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx6q-pcie", .data = &drvdata[IMX6Q], }, { .compatible = "fsl,imx6q-pcie-ep", .data = &drvdata[IMX6Q_EP], }, { .compatible = "fsl,imx6sx-pcie", .data = &drvdata[IMX6SX], }, + { .compatible = "fsl,imx6sx-pcie-ep", .data = &drvdata[IMX6SX_EP], }, { .compatible = "fsl,imx6qp-pcie", .data = &drvdata[IMX6QP], }, { .compatible = "fsl,imx6qp-pcie-ep", .data = &drvdata[IMX6QP_EP], }, { .compatible = "fsl,imx7d-pcie", .data = &drvdata[IMX7D], }, From patchwork Fri Aug 4 02:09:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 130948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp773533rwd; Thu, 3 Aug 2023 20:38:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlGqv3erwUHQlBI6wUrKKeja6f3UzmIoodDrU4nUk8WjAS2CkNtdt7WO8x+pSGcUXpsPpsVW X-Received: by 2002:a05:6a20:8f13:b0:137:4fd0:e2e6 with SMTP id b19-20020a056a208f1300b001374fd0e2e6mr24187526pzk.6.1691120286594; Thu, 03 Aug 2023 20:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691120286; cv=none; d=google.com; s=arc-20160816; b=Ze16tA5nELO2udJGIu47sIvpzosZ3kJMIjz1u3fhvjYieASfIJ+PgvoJEAUpxummDE qIu2WHOwaJZsFE+MjBi1Ry4l9f2c5qTnMwt2TUn4+gMe1Dgzmo3dbP+8w8NaHDoiMf4x MYpbvkIlSCM2kMjc9eEmMOhcvUZ4relKDCzqqkWRt3WGeW2epqy6B1RnhTpmxJaMEb15 Q55VGFhCLe7fZbLvqa7vrZElszBtKVRQOwfFBYXE68vyHXk0Qvb4zMO8hngJoOSHfcIh tXGgtm8Xakj/M2lT1odqdZv9GT8TtgNk+Ed5/lY4ulUwJqfrljqFP0m7osfavXIavq1A D5FA== 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=XUeM3zdd7IXrSaN9UWnargbOt4hG6l9tQQOrmd5ca/8=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=t6u9GbyelCjt8Tyfd2X3tVTXS4URF6pD93dtHkrEUih6gUzU5B9wOVoVrxhNbSXQOK QvZCd86ZxymsRVDliU1NpnTG02PUOQ1ZySm5ZyE6iSyvK9PfyGEN34f3dgXrEMe/lx31 vHzbE8izJ0cAOjujrs1m5zmQk9yVkvcYF2Vzto9ggIJbH6b0tIwTQ7pXZs6rthIX1e+a bTjm0WiD5gNxv4FA7SrxZSD+5eCMwybCWq4WJ+WPVeGBn2yGdfo3bg7YCo+xk4InLe6R CyEPVW7cck9r1a2oIKJK0YWnAZQo0yMP2bLKoLXDcXC1mw4MHmDVyUQqPs24qkNiNZTI 3dqA== 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 o17-20020a635d51000000b00543c84bf588si1022228pgm.473.2023.08.03.20.37.52; Thu, 03 Aug 2023 20:38:06 -0700 (PDT) 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 S233979AbjHDCoa (ORCPT + 99 others); Thu, 3 Aug 2023 22:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233884AbjHDCoN (ORCPT ); Thu, 3 Aug 2023 22:44:13 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B19D173C; Thu, 3 Aug 2023 19:44:11 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B7977201F22; Fri, 4 Aug 2023 04:44:09 +0200 (CEST) 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 51E5B201F1D; Fri, 4 Aug 2023 04:44:09 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id ACFB31802200; Fri, 4 Aug 2023 10:44:07 +0800 (+08) From: Richard Zhu To: frank.li@nxp.com, l.stach@pengutronix.de, shawnguo@kernel.org, lpieralisi@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org 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 v2 9/9] PCI: imx6: Add i.MX7D PCIe EP support Date: Fri, 4 Aug 2023 10:09:35 +0800 Message-Id: <1691114975-4750-10-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> References: <1691114975-4750-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773268145404657652 X-GMAIL-MSGID: 1773268145404657652 Add the i.MX7D PCIe EP mode support. Signed-off-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 43c5251f5160..af7659712537 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 { IMX6QP, IMX6QP_EP, IMX7D, + IMX7D_EP, IMX8MQ, IMX8MM, IMX8MP, @@ -359,6 +360,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie) 0); break; case IMX7D: + case IMX7D_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, 0); break; @@ -590,6 +592,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie) IMX6Q_GPR1_PCIE_REF_CLK_EN, 1 << 16); break; case IMX7D: + case IMX7D_EP: break; case IMX8MM: case IMX8MM_EP: @@ -638,6 +641,7 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) IMX6Q_GPR1_PCIE_TEST_PD); break; case IMX7D: + case IMX7D_EP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, IMX7D_GPR12_PCIE_PHY_REFCLK_SEL); @@ -711,6 +715,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) { switch (imx6_pcie->drvdata->variant) { case IMX7D: + case IMX7D_EP: case IMX8MQ: case IMX8MQ_EP: reset_control_assert(imx6_pcie->pciephy_reset); @@ -763,6 +768,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) reset_control_deassert(imx6_pcie->pciephy_reset); break; case IMX7D: + case IMX7D_EP: reset_control_deassert(imx6_pcie->pciephy_reset); /* Workaround for ERR010728, failure of PCI-e PLL VCO to @@ -854,6 +860,7 @@ static void imx6_pcie_ltssm_enable(struct device *dev) IMX6Q_GPR12_PCIE_CTL_2); break; case IMX7D: + case IMX7D_EP: case IMX8MQ: case IMX8MQ_EP: case IMX8MM: @@ -880,6 +887,7 @@ static void imx6_pcie_ltssm_disable(struct device *dev) IMX6Q_GPR12_PCIE_CTL_2, 0); break; case IMX7D: + case IMX7D_EP: case IMX8MQ: case IMX8MQ_EP: case IMX8MM: @@ -1385,6 +1393,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) "pcie_aux clock source missing or invalid\n"); fallthrough; case IMX7D: + case IMX7D_EP: if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) imx6_pcie->controller_id = 1; @@ -1572,6 +1581,12 @@ static const struct imx6_pcie_drvdata drvdata[] = { .flags = IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr = "fsl,imx7d-iomuxc-gpr", }, + [IMX7D_EP] = { + .variant = IMX7D_EP, + .mode = DW_PCIE_EP_TYPE, + .gpr = "fsl,imx7d-iomuxc-gpr", + .epc_features = &imx6q_pcie_epc_features, + }, [IMX8MQ] = { .variant = IMX8MQ, .gpr = "fsl,imx8mq-iomuxc-gpr", @@ -1611,6 +1626,7 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx6qp-pcie", .data = &drvdata[IMX6QP], }, { .compatible = "fsl,imx6qp-pcie-ep", .data = &drvdata[IMX6QP_EP], }, { .compatible = "fsl,imx7d-pcie", .data = &drvdata[IMX7D], }, + { .compatible = "fsl,imx7d-pcie-ep", .data = &drvdata[IMX7D_EP], }, { .compatible = "fsl,imx8mq-pcie", .data = &drvdata[IMX8MQ], }, { .compatible = "fsl,imx8mm-pcie", .data = &drvdata[IMX8MM], }, { .compatible = "fsl,imx8mp-pcie", .data = &drvdata[IMX8MP], },