From patchwork Mon Aug 14 05:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 13583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2579770vqi; Mon, 14 Aug 2023 00:37:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/Kw2BkvwCYlyl9PIxBHLIdfG7Q5rnosqTLdzK1CjM2eKNWJTOU/edWMfyK5+pe2VS/4L1 X-Received: by 2002:a05:6a00:a0c:b0:64c:4f2f:a235 with SMTP id p12-20020a056a000a0c00b0064c4f2fa235mr12184395pfh.30.1691998648213; Mon, 14 Aug 2023 00:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691998648; cv=none; d=google.com; s=arc-20160816; b=sQ1GA/ZZmIpYwQHnf6gf2CqKbTEFAkiQPhshzRZRGJgj/CFB+LZwY973BELVAAPIt0 d9CvJhjjA/b/94YqvweejSOMvY+gdr0SyOmOx3oUcAoTDp7wF0xZO71rxZw8Z6HEWzeV cuTWbMClhV/l17+/Yg9h/7WbYEqBwQ58k8eu8EBM47dX1vQaHdIyj2IScSOMNtl6GB64 l6PpJ1ExfLhXxzVv7mVmursW4JE9cj7GF7avWH77T3luQ9j1s7f7Q9n0p9XdjThkf7Mx iVSlQmRAfapNdSNMlLFF4VGRmWY7Lk+gIja10fhOPoEGHFQXJrQjMVgBfG0x8EUGCFJk 6D/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=pb5Xe41zZKSBgJutxuP3ADcvUVkj7tnFB15BfqTIr4s=; fh=cRb0aB90SbQyVFNPpVcxERgDOlz7nc5zFh0bRYzMTlo=; b=C6Dw4HNYRWwBQB2eM45xJbgp27/GiCFxVEJQx5qaadwb6fwUCcCSNn7JbB13U8Ed/F 9XuA+agyetxGCicosyE11BNnC+Bqe7e8duwlVooNNdEkTtd2ToVS9ZP2fCPjr3ZtSBj3 xBqkdxpoN1p5jQb+siGeVJFDXh48ZAbvPdgxiW5mEDtBCvPVU/8hdXZFKCh+gKtHogNd xiz8ylydcim0ibxCY9YlI2ntbLR+o1Pn88Nst6eunep9rusD4avg9kxy7LllmifXZGtX KfCIhz6+i15H5TymK8EWoISFdJluYMhaHjfrczqjcwO0bYGWVsQSBtAy3/U8/nklTzNc cAug== 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 g5-20020a056a001a0500b0067f4fd59b00si7994262pfv.260.2023.08.14.00.37.12; Mon, 14 Aug 2023 00:37:28 -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 S233741AbjHNGSg (ORCPT + 99 others); Mon, 14 Aug 2023 02:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232329AbjHNGRx (ORCPT ); Mon, 14 Aug 2023 02:17:53 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6540D10EB; Sun, 13 Aug 2023 23:17:42 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DACF41A1C11; Mon, 14 Aug 2023 08:17:40 +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 A9DF61A1C08; Mon, 14 Aug 2023 08:17:40 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 0B8FA1800319; Mon, 14 Aug 2023 14:17:38 +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 v4 0/9] Add legacy i.MX PCIe EP mode supports Date: Mon, 14 Aug 2023 13:42:38 +0800 Message-Id: <1691991767-15809-1-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 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 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: 1774189174273844478 X-GMAIL-MSGID: 1774189174273844478 Add legacy 32bit i.MX PCIe EP mode support The PCI controller contained in i.MX6/7 legacy SOCs is one dual mode PCIe controller, and can work either as RC or EP. This series add i.MX6/7 PCIe EP mode supports. And had been verified on i.MX6 sabresd and i.MX7 SDB boards. In the verification, one board PCIe is used as RC, the other one is used as EP. Use the cross TX/RX differential cable connect the two PCIe ports of these two boards. +-----------+ +------------+ | PCIe TX |<-------------->|PCIe RX | | | | | | Board | | Board | | | | | | PCIe RX |<-------------->|PCIe TX | +-----------+ +------------+ Changes from v3 to v4: Add Acked-by: Manivannan Sadhasivam into number 8 and 9 patches. Thanks. Changes from v2 to v3: Add Reviewed-by: Krzysztof Kozlowski into dt-binding patches. Thanks. Changes from v1 to v2: Refer to Frank's comments: To simple .get_features codes, add "const struct pci_epc_features" *epc_features in drvdata. Thanks. Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 50 +++++++++++++++++++++++++++++++++++++++++---- arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi | 14 +++++++++++++ arch/arm/boot/dts/nxp/imx/imx6qp.dtsi | 4 ++++ arch/arm/boot/dts/nxp/imx/imx6sx.dtsi | 17 +++++++++++++++ arch/arm/boot/dts/nxp/imx/imx7d.dtsi | 27 ++++++++++++++++++++++++ drivers/pci/controller/dwc/pci-imx6.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 201 insertions(+), 4 deletions(-) [PATCH v4 1/9] dt-bindings: PCI: fsl,imx6q: Add i.MX6Q and i.MX6QP [PATCH v4 2/9] dt-bindings: PCI: fsl,imx6q: Add i.MX6SX PCIe EP [PATCH v4 3/9] dt-bindings: PCI: fsl,imx6q: Add i.MX7D PCIe EP [PATCH v4 4/9] arm: dts: nxp: Add i.MX6QDL and i.MX6QP PCIe EP [PATCH v4 5/9] arm: dts: nxp: Add i.MX6SX PCIe EP support [PATCH v4 6/9] arm: dts: nxp: Add i.MX7D PCIe EP support [PATCH v4 7/9] PCI: imx6: Add i.MX6Q and i.MX6QP PCIe EP supports [PATCH v4 8/9] PCI: imx6: Add i.MX6SX PCIe EP support [PATCH v4 9/9] PCI: imx6: Add i.MX7D PCIe EP support