From patchwork Thu Jun 17 15:22:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 462198 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp554444jae; Thu, 17 Jun 2021 08:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfrJxxfKg2vRG8wFkP6FtKoL5R0n3UFaO8+C+RBgJgTu2U6OAH66+tzQlW5kXCq59D9WJ1 X-Received: by 2002:a17:906:ca4c:: with SMTP id jx12mr5801873ejb.155.1623943352599; Thu, 17 Jun 2021 08:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623943352; cv=none; d=google.com; s=arc-20160816; b=XOB+gI6gdBAwmJJUfwxR9vyGvHd7cywbVGO+LnHyZEWF+Ao52rOoNMKJXXAoIb8d3w ZF4DNLbVHKCQMXGW8GcpG8+VbblcKwwgZL55VGJsDQ+Jlozd6az7I3tlJTt4sY+I2UiI jZ/1jBCYCO1X0u9o7AF08YqnquxBe1/xQMkIeECeKM+Dw7gX2cgy+L2+LfkD6U8jIxlM HxbYKqvCElrGl0OoK7EKSKh9PDNCG3d3TpUPZWB5gx/KtK2pn4AprU0zHV1mziNpYMA8 LGCnoOrCwgOJa+lf54GHBflw5FBo0jGaDPsbwVho9RzbjRuawrZFJN83xiCFXAMFFirB 0KBg== 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=lk4v2x/QqDg9VeTcKEZY8wInplQhrFZZd/r+aGJnAFE=; b=MaFyl+3zO7s881qI0tHPkf0lZrGVR6W1gSEt0Cqibg0ekI6PM2cz5ppWVASTHIukxd SfXymSc2fW6LbP91u5T2HbzaznVdtLq+ts1/HvapIIDGHPCLn8J5BYjcV/nH3RW9yCc7 7ydYmERRDHPixoWl837pEywVv/WjSzdGsXvKtqVwYayElrrouMwtWwI4b5pttfTdct9q Y9IwtVxa1XFWD+uZcOoyG09kkdVbsvAeXjJrhf8Y27lufEl0tPQgff1/9A/eP+U3/R+i KQmu0rLw+UMg8yPJEzOK0IdYXxkfwQdEWxUcWaOXnG/2UQfp8EHuZq6sYhkbkZ29HhzF cFiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sWU1LUR+; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 1si5769985ejm.594.2021.06.17.08.22.32; Thu, 17 Jun 2021 08:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=sWU1LUR+; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S233251AbhFQPYj (ORCPT + 7 others); Thu, 17 Jun 2021 11:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233245AbhFQPYi (ORCPT ); Thu, 17 Jun 2021 11:24:38 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A3B0C061767 for ; Thu, 17 Jun 2021 08:22:31 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id e33so5258345pgm.3 for ; Thu, 17 Jun 2021 08:22:31 -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=lk4v2x/QqDg9VeTcKEZY8wInplQhrFZZd/r+aGJnAFE=; b=sWU1LUR+ZLIKX+bQR6DnFpMvgL/8litfx+v/6C1104lWDzlqyqoNsoTrom7jyLYL8u 2+hJok9jiTdDPBJ5ta/GbPGC1qLLULcAdlf7+xVrkoglVPS7KYZumK5FjWk83J1fZCVG 9kptYzDtQ3nBFQDMJ8afrjvChaGfyi+H1NJm+P9gNJ5Mm/NXGtMj9ucYGDT/Z97k1vNi pYBZGL5Jtv/jfNxseMwj666eKWVgWgsar6qF0uP2SDj99+YVrVzgGr1fg5fZKYoqqocJ 4V8sMF7/mujQ28Y/8R3ODU5KOn9fFcsf3+NUw60PJKi1nSJ5Rh4EoJHzn6b1WtQX8fWw g1IA== 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=lk4v2x/QqDg9VeTcKEZY8wInplQhrFZZd/r+aGJnAFE=; b=mYUAXbFwJL5EHOwm9iKgpfaYQTGm+BTikkrsnCz7yJkXW4dPXCJnOv5vJYmjdvPgJg kdB9HoMa2sJRqgAH9MVOZwN5BFT0wms2TT5IIkvAEBlygLWNYpTdCW/5S3y8a2c/NlVl OLGSXhd3XzdTCZ6cnXSqvgu0VHhRnxzEXO8iYDoP3w0ugtm6e+YT/o5uJLC0oKc+7od0 Kn3QCSxuJKs+8kvcS2ZJ3CNdplHWfvcFiQgJ4KtbH3JxPZlvgXNB43JfVLF5mZtZb4gq AltIpGUfrN4t5a4cG+wfZoiiBEd5mcERsYCVWf1fk3jzb331fszZSzVuv9XXb6ghvxmi d0SQ== X-Gm-Message-State: AOAM530MuTF8pqMJ40aBHCanpLNOfr8sfgWu6PFlo3Okcu3Cxbw3XK4j K5VjyCB8ZuBH6QVBm1iD19Wo2o12vol/ X-Received: by 2002:a63:485a:: with SMTP id x26mr5512697pgk.159.1623943350521; Thu, 17 Jun 2021 08:22:30 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:601:a552:f5:b632:aa12:8667]) by smtp.gmail.com with ESMTPSA id n69sm5639857pfd.132.2021.06.17.08.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 08:22:30 -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, svarbanov@mm-sol.com, Manivannan Sadhasivam Subject: [PATCH v3 1/3] dt-bindings: pci: Add devicetree binding for Qualcomm PCIe EP controller Date: Thu, 17 Jun 2021 20:52:00 +0530 Message-Id: <20210617152202.83361-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210617152202.83361-1-manivannan.sadhasivam@linaro.org> References: <20210617152202.83361-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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. Signed-off-by: Manivannan Sadhasivam --- .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 160 ++++++++++++++++++ 1 file changed, 160 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..9110d33809cd --- /dev/null +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml @@ -0,0 +1,160 @@ +# 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_HIGH>; + 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>; + + status = "disabled"; + };