From patchwork Thu Jul 22 12:12:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 483892 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp303317jao; Thu, 22 Jul 2021 05:13:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1JHqIsY/f3Zeqqut3/FMHeEYvPhlM0D4x5Il/Ayq14UQ4hYdAADlgIYlAc9jjG9X7hIX4 X-Received: by 2002:a05:6402:1c10:: with SMTP id ck16mr53603066edb.339.1626955993169; Thu, 22 Jul 2021 05:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626955993; cv=none; d=google.com; s=arc-20160816; b=Qc20NI9WZTVb2Kg4guWe/Bc+tQSNV01pBiqNn0vm1kUluhm2Lvq6KHQ/hLbYnnEjiW E6RsM2updd1xrfH2cquQPBbdlwkYSZy3XMdgzbTNZIvV3GFgEsntWvmbxQPN0d+EluAB ZmjIiaxj/YRS+zkM9oi70bBag+hMH9Hg6BXnWbIHKjVT3ZRvN1po9ykdbpxG+OwnjzYD I+Ya9ex/8aZ1+0zc4gdEtBJ51N+Eowr55jwQUoMeURUt0VNUhHRsSlIn16i0pMTDsaUa Mu63NS75VAan+lY2+0yxmrFj+IBT4AsTEl5eRojFeCpmCKz4Xb0Fl/ajOa6yqHMRBFIf 85RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=89MYR2GbpP7RSf1Uoz2RwOf98cs9Vdc1/9C+MIGzrAw=; b=Wpko+LxazGP+k4A5pxsOc07gFcJ7nhEFTueVvkhr6QETd+iekZ2dvKRZQ4joD4xc3d XC0oTW3UV8PFDOe8dDsY9f9kzeTBNKWed6iluI+6hrWvqKE6/SVMXgyM0gPZu0FQXP3b ixqd5xSsiBgoYzl4LYpoEgdQ3OdiI3/ZfZ+s5ztzZozQSwQ90l46pl4XxaQ0REe5jrsC DAG4gLiPaII5Ntoj5WCs99KusU45BLWQJ2Gw5DlRYyJoQzmZHqp8vGsB+Be+c/vLNAkA zqqC9dGDHQZPlr3rurCcWY4Aj7uEdM+oZh+7VySLOQBtjYepSJYlR0tTzqDhFBxWBK4d 3gaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Be+8Exob; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp17si8962546ejc.449.2021.07.22.05.13.12; Thu, 22 Jul 2021 05:13:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Be+8Exob; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231809AbhGVLce (ORCPT + 17 others); Thu, 22 Jul 2021 07:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbhGVLcc (ORCPT ); Thu, 22 Jul 2021 07:32:32 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E26BC0613C1 for ; Thu, 22 Jul 2021 05:13:06 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id i16-20020a17090acf90b02901736d9d2218so5210322pju.1 for ; Thu, 22 Jul 2021 05:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=89MYR2GbpP7RSf1Uoz2RwOf98cs9Vdc1/9C+MIGzrAw=; b=Be+8ExobKhAmvk4cR8KzCeZZXYhNd2EUsa8KBNUyThuXbvHCDblKmvkqKQYrEdC/Uz oDxssZdiIKDof1ra6gIUfvOXLxSm31nKSGVscjHaH3xnOXvxJSAdsso6SJjClDcybdRR bznS6bVkGpupm3G7CAGuVFMR7/MU41W5wxlOdG8BP389+HGTwvVPyuClyzUBve+8dMRh Djq2JsXWgI2B3HkD55u+Bn/tl69S8B04w+/akgxE6GD2WgIuU+Gz3DGy1hCs1TPcMWJT 3iRYXRIHJaPo3+3wHzCNwSblzPCYlQUihw3Jar3QsH2F27kGpYJN6JSB9eJx2yqYBIFS vgWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=89MYR2GbpP7RSf1Uoz2RwOf98cs9Vdc1/9C+MIGzrAw=; b=HqljuQo8HXQWfO3jCAoTeXKFu0SMnFobF0kcj4jDIRSFnYAc5WT8Y+ApFd0EDeRDVe HrMOAYTdcFNyvbHgtWv+wvAE4Rxy7AIx8dcH/lX2c/gxTMIn5wSUOXcbtTimBLJAJvxf 0BhVcN4tuc2ugqXzxGuHe0Rpm1QzRtDVrdWKMZbykvKemcvhUFUe9zpblJzhn9lfkPCG +daezCBBXAwpiY19Fm06XXONWvQl3SEzxTjePv01VH8PnBUT+esj33bl8BCTk9WKIaks gO7VxU1RKiMyuv1yBlbH3sMvjjhGGDwbibheGip9/WLOSZw1cnvxH9PmmmffAPkfS+2t LSFA== X-Gm-Message-State: AOAM533wTo1dOvRLQ8A06YFfa3Hwq0GwZcy8xrh4VmH/cE2AWlubbAau cU08MHcK0RB04LRubNiF/wqfFW3Jghu0eE4= X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr8720281pjv.38.1626955986070; Thu, 22 Jul 2021 05:13:06 -0700 (PDT) Received: from localhost.localdomain ([120.138.13.30]) by smtp.gmail.com with ESMTPSA id cp6sm2913846pjb.17.2021.07.22.05.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 05:13:05 -0700 (PDT) From: Manivannan Sadhasivam To: kishon@ti.com, lorenzo.pieralisi@arm.com, bhelgaas@google.com, robh@kernel.org Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, smohanad@codeaurora.org, bjorn.andersson@linaro.org, sallenki@codeaurora.org, skananth@codeaurora.org, vpernami@codeaurora.org, vbadigan@codeaurora.org, Manivannan Sadhasivam Subject: [PATCH v7 1/3] dt-bindings: pci: Add devicetree binding for Qualcomm PCIe EP controller Date: Thu, 22 Jul 2021 17:42:40 +0530 Message-Id: <20210722121242.47838-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210722121242.47838-1-manivannan.sadhasivam@linaro.org> References: <20210722121242.47838-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add devicetree binding for Qualcomm PCIe EP controller used in platforms like SDX55. The EP controller is based on the Designware core with Qualcomm specific wrappers. Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam --- .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml -- 2.25.1 diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml new file mode 100644 index 000000000000..9fe6d1cef767 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml @@ -0,0 +1,158 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PCIe Endpoint Controller binding + +maintainers: + - Manivannan Sadhasivam + +allOf: + - $ref: "pci-ep.yaml#" + +properties: + compatible: + const: qcom,sdx55-pcie-ep + + reg: + items: + - description: Qualcomm specific PARF configuration registers + - description: Designware PCIe registers + - description: External local bus interface registers + - description: Address Translation Unit (ATU) registers + - description: Memory region used to map remote RC address space + - description: BAR memory region + + reg-names: + items: + - const: parf + - const: dbi + - const: elbi + - const: atu + - const: addr_space + - const: mmio + + clocks: + items: + - description: PCIe Auxiliary clock + - description: PCIe CFG AHB clock + - description: PCIe Master AXI clock + - description: PCIe Slave AXI clock + - description: PCIe Slave Q2A AXI clock + - description: PCIe Sleep clock + - description: PCIe Reference clock + + clock-names: + items: + - const: aux + - const: cfg + - const: bus_master + - const: bus_slave + - const: slave_q2a + - const: sleep + - const: ref + + qcom,perst-regs: + description: Reference to a syscon representing TCSR followed by the two + offsets within syscon for Perst enable and Perst separation + enable registers + $ref: "/schemas/types.yaml#/definitions/phandle-array" + items: + minItems: 3 + maxItems: 3 + + interrupts: + items: + - description: PCIe Global interrupt + - description: PCIe Doorbell interrupt + + interrupt-names: + items: + - const: global + - const: doorbell + + reset-gpios: + description: GPIO that is being used as PERST# input signal + maxItems: 1 + + wake-gpios: + description: GPIO that is being used as WAKE# output signal + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + const: core + + power-domains: + maxItems: 1 + + phys: + maxItems: 1 + + phy-names: + const: pciephy + + num-lanes: + default: 2 + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - qcom,perst-regs + - interrupts + - interrupt-names + - reset-gpios + - resets + - reset-names + - power-domains + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + pcie_ep: pcie-ep@40000000 { + compatible = "qcom,sdx55-pcie-ep"; + reg = <0x01c00000 0x3000>, + <0x40000000 0xf1d>, + <0x40000f20 0xc8>, + <0x40001000 0x1000>, + <0x40002000 0x1000>, + <0x01c03000 0x3000>; + reg-names = "parf", "dbi", "elbi", "atu", "addr_space", + "mmio"; + + clocks = <&gcc GCC_PCIE_AUX_CLK>, + <&gcc GCC_PCIE_CFG_AHB_CLK>, + <&gcc GCC_PCIE_MSTR_AXI_CLK>, + <&gcc GCC_PCIE_SLV_AXI_CLK>, + <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>, + <&gcc GCC_PCIE_SLEEP_CLK>, + <&gcc GCC_PCIE_0_CLKREF_CLK>; + clock-names = "aux", "cfg", "bus_master", "bus_slave", + "slave_q2a", "sleep", "ref"; + + qcom,perst-regs = <&tcsr 0xb258 0xb270>; + + interrupts = , + ; + interrupt-names = "global", "doorbell"; + reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>; + resets = <&gcc GCC_PCIE_BCR>; + reset-names = "core"; + power-domains = <&gcc PCIE_GDSC>; + phys = <&pcie0_lane>; + phy-names = "pciephy"; + max-link-speed = <3>; + num-lanes = <2>; + };