From patchwork Mon Sep 20 06:59:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 514299 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1790802jao; Mon, 20 Sep 2021 00:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsNeOxan6gevQbUvOV0TZpzg4qbxXoXKLHG8OBdDkSFb51FChb3I2T6qYSsTDs2NOySN1W X-Received: by 2002:a05:6e02:1c84:: with SMTP id w4mr14933274ill.195.1632121201798; Mon, 20 Sep 2021 00:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632121201; cv=none; d=google.com; s=arc-20160816; b=LW+0IDa/VYo37CJVHVBFfNIkfrNRjd9M/52jX0tjVe5QjbzEGYpL0OVl/dahG7tNW2 H4xdY2/mZ8tYxhpdmArUdjfcLF3rI/dvkr/fxo7Ytp30st0cD8wo5jfzuQ8yRdV6gMw0 LIcor6em68nXcCjfx4TWNi5cP+IUckOMpy76z92ucsUJy0hShMKqRAAJ0VEEbXftbuL8 8mExEDRzP2O5GMICHZ8vC9xRA94EYUlRST/IlA2Z1mSvrYtxqBfwIx1HuNXWQJaNSLde 5MsDQTGaGJ7kCgaJmIKzhlkKzqluv4Ux4ByYSo9vWfPetBWIi2dKQQQyFamb6A+kK3w7 ZGEA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=9f/uoH0k3kcTrJoBN4xkFEVn3LDPuL95GvB2FHHsCJY=; b=K1kkRYL80m4kggTNMe8g4TM4gwP5jvurqIkSDP1k0+Dk8QWr9XcWHagGqAk5NtGy2E Vlsa6C1dsdLWXNb62y4bhbY2eb3WYpFndB+wkKxNF4bK5oe5wVx8tLNNdjDBNadWFFFc Zy86/t/eQ5n4XRmtzQV/tH2dvdPivrbImvB/pa5mYkVdK/bT39xw1c2EqyAEAiaAEyiT QDe6lo6qLwkYIadFOe7yb5HRYwjwNreBOVwwISwy/nXL8O15zOTnidci9z3kAjqI4qHc pT90Khn2wYbHuqekPkikWxOv2WxF5KQgriRXAhEjaJ88IR7eDDjzwVxIrgXklg9ZJ+Rb wQGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nQh65a8m; 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 67si6619181ioc.91.2021.09.20.00.00.00; Mon, 20 Sep 2021 00:00:01 -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=nQh65a8m; 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 S232807AbhITHBZ (ORCPT + 7 others); Mon, 20 Sep 2021 03:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbhITHBZ (ORCPT ); Mon, 20 Sep 2021 03:01:25 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E7CC061574 for ; Sun, 19 Sep 2021 23:59:58 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id y8so15320708pfa.7 for ; Sun, 19 Sep 2021 23:59:58 -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:mime-version :content-transfer-encoding; bh=9f/uoH0k3kcTrJoBN4xkFEVn3LDPuL95GvB2FHHsCJY=; b=nQh65a8mRcM96mOvKTtKO1GHdqpqYYHSImR7TUz+hO51elCwJPtoPE49ey40V++j4e aD6Fedx+KRVpN9tWVWDID+dSoLEaetnh1EvRN/EPtownN/QN36JjkPcxmxCZIZgEiowu KxUL90WiD2kvhEVM6dPEHYNZZ+H+U0hEiPZNGFANjaAym4WO7OvH+M5R+pYZKgktnNHV xplrA8/u/fctvqjTuo0jOHjRLiKm6FENyWGqCF/wZIaKTApT9GYi9PpLa8eoBlPptHVa iqlwPODsPUmiXmiStJ+ogWm2phq5vb2Glkkz9/oKfTLgphNBnfDMzIYkkNs409xOjW0x QQnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9f/uoH0k3kcTrJoBN4xkFEVn3LDPuL95GvB2FHHsCJY=; b=gPH+fPsD7sjpVQCtYz+5/A4TNLO4LpurvRVifyzwwyoCLBZIEwsOOmcUJ49Va6qps9 AZW6LmQ631ZCMZprzMS5ed7HI6dooB9l5sD0FummvlgzKzHgJANYEbff4p57/q6vSXJO Gsyh7BQETDn00s4dk5ko2EYLdObL+DoapD2GXiRUdtip1JOH+8+Nan4I67gHB9+ka2en 1MJU4xHELpUf/aB6Ty5tqU+yniPo9dzs4L4Yem+9GgEtT6+9fJCxX56ZmqY/bggbIJEk 88CKJft8E2V+gHdZQ300nPKx43TVZWB8GopOxmL/tiFD2Z2j4vl2/a0XDJ98m/aBid1S 30lg== X-Gm-Message-State: AOAM530B6AF6UHgNx/2DGo35gGjVMHkbE/jcnXV8QCErjRPCsHbfGLBL gJ9AJFakdjqt7axuOtdVA+/I X-Received: by 2002:a65:6398:: with SMTP id h24mr21590975pgv.367.1632121198220; Sun, 19 Sep 2021 23:59:58 -0700 (PDT) Received: from localhost.localdomain ([59.92.98.104]) by smtp.gmail.com with ESMTPSA id p15sm12768349pff.194.2021.09.19.23.59.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 23:59:57 -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, bjorn.andersson@linaro.org, sallenki@codeaurora.org, skananth@codeaurora.org, vpernami@codeaurora.org, vbadigan@codeaurora.org, Manivannan Sadhasivam Subject: [PATCH v8 0/3] Add Qualcomm PCIe Endpoint driver support Date: Mon, 20 Sep 2021 12:29:43 +0530 Message-Id: <20210920065946.15090-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hello, This series adds support for Qualcomm PCIe Endpoint controller found in platforms like SDX55. The Endpoint controller is based on the designware core with additional Qualcomm wrappers around the core. The driver is added separately unlike other Designware based drivers that combine RC and EP in a single driver. This is done to avoid complexity and to maintain this driver autonomously. The driver has been validated with an out of tree MHI function driver on SDX55 based Telit FN980 EVB connected to x86 host machine over PCIe. Thanks, Mani Changes in v8: * Added Reviewed-by tag from Rob for the driver patch * Rebased on top of v5.15-rc1 Changes in v7: * Used existing naming convention for callback functions * Used active low state for PERST# gpio Changes in v6: * Removed status property in DT and added reviewed tag from Rob * Switched to _relaxed variants as suggested by Rob Changes in v5: * Removed the DBI register settings that are not needed * Used the standard definitions available in pci_regs.h * Added defines for all the register fields * Removed the left over code from previous iteration Changes in v4: * Removed the active_config settings needed for IPA integration * Switched to writel for couple of relaxed versions that sneaked in Changes in v3: * Lot of minor cleanups to the driver patch based on review from Bjorn and Stan. * Noticeable changes are: - Got rid of _relaxed calls and used readl/writel - Got rid of separate TCSR memory region and used syscon for getting the register offsets for Perst registers - Changed the wake gpio handling logic - Added remove() callback and removed "suppress_bind_attrs" - stop_link() callback now just disables PERST IRQ * Added MMIO region and doorbell interrupt to the binding * Added logic to write MMIO physicall address to MHI base address as it is for the function driver to work Changes in v2: * Addressed the comments from Rob on bindings patch * Modified the driver as per binding change * Fixed the warnings reported by Kbuild bot * Removed the PERST# "enable_irq" call from probe() Manivannan Sadhasivam (3): dt-bindings: pci: Add devicetree binding for Qualcomm PCIe EP controller PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver MAINTAINERS: Add entry for Qualcomm PCIe Endpoint driver and binding .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 158 ++++ MAINTAINERS | 10 +- drivers/pci/controller/dwc/Kconfig | 10 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pcie-qcom-ep.c | 710 ++++++++++++++++++ 5 files changed, 888 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml create mode 100644 drivers/pci/controller/dwc/pcie-qcom-ep.c -- 2.25.1