From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58BE1C3DA49 for ; Tue, 30 Jul 2024 05:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZXjlho4wBSwHFyzK9bIW7sXp0tOlujxkpVLREffcH/4=; b=F07K7OQC/Reyj/18XzDDkLajz2 nRQkQ+3VlvAvL16lnP/Z1oQa00zpCbii25DG0wk+RYQq0fNY6pONXrS7wT5ZJqKdP7K44ajs5dFlU 2Fgu1WMPmSZILAnlQat5ftv0jNPoGwITC6SC0EXMynuabmCwswEEHV/3ADWQZbEPynO7WtVSEiKPz eCa2aq6IE5rFIz9+ult2+mmC5oTTOj4QPtwD+AgJxyF2arIvRzE3qMbU81wNMzk6Phma/8gSLW+1J aXRercZconc5KLme4Pxd+oG57BvvrvBN0cqc4tyop5pGOonfZpugyV7YnwdlkYX+uxiEoJkT0jQIE 71KyBuCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYfVp-0000000DjM6-1rFz; Tue, 30 Jul 2024 05:35:05 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYfVN-0000000DjHy-25zf for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 05:34:39 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-70d316f0060so2544455b3a.1 for ; Mon, 29 Jul 2024 22:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722317676; x=1722922476; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ZXjlho4wBSwHFyzK9bIW7sXp0tOlujxkpVLREffcH/4=; b=GTdAYTnhwF0Ta/9xz1zyUREApKxOlARYsa+OnRNbfAb1hg02Wo02cgrmmbCl56XZDF Ox+Kl/l6k+Qq8Lk0HQGJYAUP3XsEpOH9wUsfZyhdtLBuNrgFlUs3S6k1OlORel5LBUtg B1TWZASu8PVcbQ0oQOQou/Wqb26m8d5IX3MmPGCRYbusUGI+e/3Cl988s8gx/iKqjZrz dqDz/xLmAhJCxCda51PWIOg9WnukY+g+5ujUkHqXKKFk+rUegcgSZWIjOgfceEDxB4YC ObN8CUVV9PAXu0z1DFVks7TQpvucfcNkMpBrgEsw4vaW5vmpHvuByiLHhwNf1ucUfjJD Uszw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722317676; x=1722922476; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZXjlho4wBSwHFyzK9bIW7sXp0tOlujxkpVLREffcH/4=; b=QejgT75qFocjADbRGO9LCbpuVIf+a/vB7xURUapB5Sfm5mGG7KSLgWLoy9vt7e+C7P miWLNUeZUGjx57N27zdKHcuHPj0OtTPDiv/oLLL6FWXsYlxTJ4UA50fBW87AJBlTKvbA 2UUqZg3Sd/sQaZWeuNLHPqZA7EKByVqTHPRIPXdAiehqoGr4C2s7DAgt0nFm91JBWI0o 8vGhqbQD2QzEcAX/4OLtWFA7Dkfh2pb5EUiNnk+5YCFeG9BjsafOFJseIEWwVWqOJoZR IpMtFkh3nK0iK5PT9ppn8u+S/UD4VRccdDBQvJXm90QH6vyNwDRPefAee7g1myzOCou9 UsnA== X-Forwarded-Encrypted: i=1; AJvYcCV/6ycJfI9iG25FNx//mcB8Lpnj0HZHDN/tIvm08gnWAaRa3ZTmRgvbXhtDzrF0JgBIeTWCNehp51M2n8LEiqbJCgZBgkkz8VGp3Sr2xZewur5Ihzc= X-Gm-Message-State: AOJu0Yy7vho9OD683e5VhHMtkadsGqySxQQyDnOSUesqluMzBNgjEn7V a9Da6PuU1KLT/EG7QB8twAUfOjva4hr3ArSTQWZBSbh63R1BxnxYOVH9whnSGA== X-Google-Smtp-Source: AGHT+IHjznNzzK5ouDVuu0+4tUv3yUuB+KegUke9hWBS111nZpI7c/Fz88EMH6/f6lI3nkpFPLtS5w== X-Received: by 2002:a05:6a20:244c:b0:1c4:6b0d:e992 with SMTP id adf61e73a8af0-1c4e47fcc13mr1618470637.22.1722317676457; Mon, 29 Jul 2024 22:34:36 -0700 (PDT) Received: from thinkpad ([220.158.156.247]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7a9f7b7af58sm8169459a12.5.2024.07.29.22.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 22:34:36 -0700 (PDT) Date: Tue, 30 Jul 2024 11:04:25 +0530 From: Manivannan Sadhasivam To: Mayank Rana Cc: will@kernel.org, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, jingoohan1@gmail.com, cassel@kernel.org, yoshihiro.shimoda.uh@renesas.com, s-vadapalli@ti.com, u.kleine-koenig@pengutronix.de, dlemoal@kernel.org, amishin@t-argos.ru, thierry.reding@gmail.com, jonathanh@nvidia.com, Frank.Li@nxp.com, ilpo.jarvinen@linux.intel.com, vidyas@nvidia.com, marek.vasut+renesas@gmail.com, krzk+dt@kernel.org, conor+dt@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, quic_ramkri@quicinc.com, quic_nkela@quicinc.com, quic_shazhuss@quicinc.com, quic_msarkar@quicinc.com, quic_nitegupt@quicinc.com Subject: Re: [PATCH V2 0/7] Add power domain and MSI functionality with PCIe host generic ECAM driver Message-ID: <20240730053425.GB3122@thinkpad> References: <1721067215-5832-1-git-send-email-quic_mrana@quicinc.com> <925d1eca-975f-4eec-bdf8-ca07a892361a@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <925d1eca-975f-4eec-bdf8-ca07a892361a@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_223437_582124_9A2169A7 X-CRM114-Status: GOOD ( 21.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 29, 2024 at 10:19:45AM -0700, Mayank Rana wrote: > Hi Bjorn / Mani > > Gentle ping for your review/feedback on this series. > Thank you. > I was waiting for your reply for my comment [1]. Because that will have influence on this series. - Mani [1] https://lore.kernel.org/linux-pci/20240724095407.GA2347@thinkpad/ > Regards, > Mayank > > On 7/15/2024 11:13 AM, Mayank Rana wrote: > > Based on previously received feedback, this patch series adds functionalities > > with existing PCIe host generic ECAM driver (pci-host-generic.c) to get PCIe > > host root complex functionality on Qualcomm SA8775P auto platform. > > > > Previously sent RFC patchset to have separate Qualcomm PCIe ECAM platform driver: > > https://lore.kernel.org/all/d10199df-5fb3-407b-b404-a0a4d067341f@quicinc.com/T/ > > > > 1. Interface to allow requesting firmware to manage system resources and performing > > PCIe Link up (devicetree binding in terms of power domain and runtime PM APIs is used in driver) > > 2. Performing D3 cold with system suspend and D0 with system resume (usage of GenPD > > framework based power domain controls these operations) > > 3. SA8775P is using Synopsys Designware PCIe controller which supports MSI controller. > > This MSI functionality is used with PCIe host generic driver after splitting existing MSI > > functionality from pcie-designware-host.c file into pcie-designware-msi.c file. > > > > Below architecture is used on Qualcomm SA8775P auto platform to get ECAM compliant PCIe > > controller based functionality. Here firmware VM based PCIe driver takes care of resource > > management and performing PCIe link related handling (D0 and D3cold). Linux VM based PCIe > > host generic driver uses power domain to request firmware VM to perform these operations > > using SCMI interface. > > ---------------- > > > > > > ┌────────────────────────┐ > > │ │ > > ┌──────────────────────┐ │ SHARED MEMORY │ ┌──────────────────────────┐ > > │ Firmware VM │ │ │ │ Linux VM │ > > │ ┌─────────┐ │ │ │ │ ┌────────────────┐ │ > > │ │ Drivers │ ┌──────┐ │ │ │ │ │ PCIE host │ │ > > │ │ PCIE PHY◄─┤ │ │ │ ┌────────────────┐ │ │ │ generic driver│ │ > > │ │ │ │ SCMI │ │ │ │ │ │ │ │ │ │ > > │ │PCIE CTL │ │ │ ├─────────┼───► PCIE ◄───┼─────┐ │ └──┬──────────▲──┘ │ > > │ │ ├─►Server│ │ │ │ SHMEM │ │ │ │ │ │ │ > > │ │Clk, Vreg│ │ │ │ │ │ │ │ │ │ ┌──▼──────────┴──┐ │ > > │ │GPIO,GDSC│ └─▲──┬─┘ │ │ └────────────────┘ │ └──────┼────┤PCIE SCMI Inst │ │ > > │ └─────────┘ │ │ │ │ │ │ └──▲──────────┬──┘ │ > > │ │ │ │ │ │ │ │ │ │ > > └───────────────┼──┼───┘ │ │ └───────┼──────────┼───────┘ > > │ │ │ │ │ │ > > │ │ └────────────────────────┘ │ │ > > │ │ │ │ > > │ │ │ │ > > │ │ │ │ > > │ │ │IRQ │HVC > > IRQ │ │HVC │ │ > > │ │ │ │ > > │ │ │ │ > > │ │ │ │ > > ┌─────────────────┴──▼───────────────────────────────────────────────────────────┴──────────▼──────────────┐ > > │ │ > > │ │ > > │ HYPERVISOR │ > > │ │ > > │ │ > > │ │ > > └──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ > > ┌─────────────┐ ┌─────────────┐ ┌──────────┐ ┌───────────┐ ┌─────────────┐ ┌────────────┐ > > │ │ │ │ │ │ │ │ │ PCIE │ │ PCIE │ > > │ CLOCK │ │ REGULATOR │ │ GPIO │ │ GDSC │ │ PHY │ │ controller │ > > └─────────────┘ └─────────────┘ └──────────┘ └───────────┘ └─────────────┘ └────────────┘ > > ---------- > > Changes in V2: > > - Drop new PCIe Qcom ECAM driver, and use existing PCIe designware based MSI functionality > > - Add power domain based functionality within existing ECAM driver > > > > Tested: > > - Validated NVME functionality with PCIe0 and PCIe1 on SA8775P-RIDE platform > > > > Mayank Rana (7): > > PCI: dwc: Move MSI related code to separate file > > PCI: dwc: Add msi_ops to allow DBI based MSI register access > > PCI: dwc: Add pcie-designware-msi driver kconfig option > > dt-bindings: PCI: host-generic-pci: Add power-domains binding > > PCI: host-generic: Add power domain based handling for PCIe controller > > dt-bindings: PCI: host-generic-pci: Add snps,dw-pcie-ecam-msi binding > > PCI: host-generic: Add dwc MSI based MSI functionality > > > > .../devicetree/bindings/pci/host-generic-pci.yaml | 64 +++ > > drivers/pci/controller/dwc/Kconfig | 8 + > > drivers/pci/controller/dwc/Makefile | 1 + > > drivers/pci/controller/dwc/pci-keystone.c | 12 +- > > drivers/pci/controller/dwc/pcie-designware-host.c | 438 ++------------------- > > drivers/pci/controller/dwc/pcie-designware-msi.c | 413 +++++++++++++++++++ > > drivers/pci/controller/dwc/pcie-designware-msi.h | 63 +++ > > drivers/pci/controller/dwc/pcie-designware.c | 1 + > > drivers/pci/controller/dwc/pcie-designware.h | 26 +- > > drivers/pci/controller/dwc/pcie-rcar-gen4.c | 1 + > > drivers/pci/controller/dwc/pcie-tegra194.c | 5 +- > > drivers/pci/controller/pci-host-generic.c | 127 +++++- > > 12 files changed, 723 insertions(+), 436 deletions(-) > > create mode 100644 drivers/pci/controller/dwc/pcie-designware-msi.c > > create mode 100644 drivers/pci/controller/dwc/pcie-designware-msi.h > > -- மணிவண்ணன் சதாசிவம்