Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp50031pxb; Thu, 12 Aug 2021 10:31:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS1vkMmbTfi1i7hpKbA38fBB08htyT+Xe1Si9Dj1DZWytGfIVqOgP2GuG6g9gUoj0DcNFf X-Received: by 2002:a50:d6db:: with SMTP id l27mr6788564edj.309.1628789464202; Thu, 12 Aug 2021 10:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628789464; cv=none; d=google.com; s=arc-20160816; b=NVSnKWpZVmQmYuXWj5XqcPwBKmV6/moO9Fm1sn8LsyffmjACLuz8aVQBWyNZxdCFx5 ZEPosVC7ZkDExYCFzm6GzPoGFLmigtTgqVAnXKV4k9+pWDmbJ9fNRmS0YCBm4zSuNDAb vFevktMCS+xmdii532vs+x0NeyYAomnVJhdWXKniJjkVYvMmeF46JZM78tzmw5CpGad0 kMR3vWzc0CUB6RXU3hREx7QK4xEeuc2qLBRlOx8iQyDYI0Ddi0h52iF++OxMQxi9w+M0 PmpS7pjLYThGOdagwPgEQBluomWubE0sbsCXxqAZO48x2m4mJMsKZzGV69JCq75kWUi7 o78w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BYIEVqAwtUQet5A0SgR3uxf9S0vFKIdFocOOg6UEHvc=; b=SpVaXlaogD0yOms5361PmHmTsSiUML6U8CrewHxYrXbp9zVA1gBQX5cPaqSAQIkauo cVfG9O7PjrG+h0SBi37A5zg3Ac0MVaY0/lmofVFGKa+E3lXim5MNW6RWoHh4ElSqw1S9 u5m9P/YKfeOV9fBqWZsqb3FcQ//X0y7wPdDsvrGgLMbg36/VPaaC8wW5d9NDsvMO3a8a yBn8hwvmH3glzQ357k6W1ScD/HJ0mWNpMC1GGFb7f0WHvZsj9Yw9E9gMuJw7G+2OZLhK ujSGkTXkHZeLkp+DYl7E+eZYDP5vYGbwMeZY9ZZDiNv/PpEUFZFTQ0XzH+rl9f0APtY+ N+Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sZjJmMgs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 ga37si2742698ejc.742.2021.08.12.10.30.29; Thu, 12 Aug 2021 10:31:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=sZjJmMgs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S231311AbhHLOTN (ORCPT + 99 others); Thu, 12 Aug 2021 10:19:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230369AbhHLOTM (ORCPT ); Thu, 12 Aug 2021 10:19:12 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33BF6C061756 for ; Thu, 12 Aug 2021 07:18:47 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id hv22-20020a17090ae416b0290178c579e424so10975415pjb.3 for ; Thu, 12 Aug 2021 07:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BYIEVqAwtUQet5A0SgR3uxf9S0vFKIdFocOOg6UEHvc=; b=sZjJmMgs/qL5hh52BRvV7+VDIbNIvxy75sTex2lp1gz7Dy6zjw7u/ZJcYjFeGEqr3j EO4clORky0VgE26w1ua1vEagYaQB7OuahuAGnDfN+yPsrPf2iDnrsflisqTEeSk+ZiTO qgq8LmRLs2MtXn4KWqKmwgZ5SL8bUytKCv9KE6vN+TweSx4G7QCuiF6sXUX3zt3FzwPy bK2AXNWvgfZ01jLRXUD11ONVMnRNsCskQSnn5yphCxvjfbOn+THOmF8KraziQohUn5hQ 1AAJaB0DNuqbI0Fdj5vwbGf4PkMktVAPr57SPkP9b6V64uFMqzdyCMJ4RKNhe/MF7fz5 dlnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BYIEVqAwtUQet5A0SgR3uxf9S0vFKIdFocOOg6UEHvc=; b=uBL8BhMoCHpV+LmBlVpWNcjANwLDiAtvmn6tKdIIMzpT7gT7wQCCJfm3V82d6WpabB aosG10mKUDC2fTeAFoZ7B2t+0hpnOb6AfYnmfcQbSqdHTv7TUrZrQYAwuLILt6+E6dYS N9zXelqE9o0d21kRTPaatUsp4LypGxNNudz8Ioly4jxKuDbDK6q/XtDMXKwFnxr26/lf j2RA93u/OJrQoFFlJbpIih8dA3/wVpb41HGz7zE+4IQOlJ0O8rzlVKXnziQ4l9bXaW7S Bdp1bqYGAFqKbpWCosoADiZNKNZ7Ohv+obbohlGa62FNuPU1XyW28zmGnEgItBPSLcns cjFQ== X-Gm-Message-State: AOAM530fglS02IRMbCqNM/t+Bb70oevCKI61i89y4ZVgLYVfuX5Uwz+a iKrVi5rZmdZN9ZEsJEHH4N5N X-Received: by 2002:a63:88c7:: with SMTP id l190mr4036320pgd.438.1628777926652; Thu, 12 Aug 2021 07:18:46 -0700 (PDT) Received: from workstation ([120.138.12.52]) by smtp.gmail.com with ESMTPSA id b9sm2836554pfo.175.2021.08.12.07.18.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Aug 2021 07:18:46 -0700 (PDT) Date: Thu, 12 Aug 2021 19:48:41 +0530 From: Manivannan Sadhasivam To: Kishon Vijay Abraham I Cc: lorenzo.pieralisi@arm.com, bhelgaas@google.com, robh@kernel.org, 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 Subject: Re: [PATCH v7 0/3] Add Qualcomm PCIe Endpoint driver support Message-ID: <20210812141841.GD7897@workstation> References: <20210722121242.47838-1-manivannan.sadhasivam@linaro.org> <2a0b7f85-dcd7-fc87-8e02-37725f66b9cf@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a0b7f85-dcd7-fc87-8e02-37725f66b9cf@ti.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kishon, On Tue, Aug 03, 2021 at 10:57:00AM +0530, Kishon Vijay Abraham I wrote: > Hi Manivannan, > > On 22/07/21 5:42 pm, Manivannan Sadhasivam wrote: > > 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. > > Can you also validate it with in-kernel pci-endpoint-test? > The Qcom EP driver or the DWC IP is designed to work only for MHI bus that has the fixed BAR address and register layout etc... So we can't use the pci-endpoint-test driver to validate the EP driver. But I do have an out of tree MHI EPF driver and validated using that. > It would also help if you can test your patches after > https://lore.kernel.org/r/20210803050310.27122-1-kishon@ti.com > I added below patches (v7) on top and verified that the EP driver works fine. PCI: endpoint: Add virtual function number in pci_epc ops PCI: endpoint: Add support to link a physical function to a virtual function PCI: endpoint: Add support to add virtual function in endpoint core Thanks, Mani > Not expecting any dependencies but just to cross check. > > Thanks > Kishon > > > > > Thanks, > > Mani > > > > 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 > >