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 BD9B1C3DA49 for ; Sat, 20 Jul 2024 18:31:21 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QO4MzK1hf6pV4w0vDj1v/BmXrVluNIoY7w1ZgdNdfAI=; b=cPbDR+Stt0OMDh+WD9jPLZOI4C SjhkHR6R4fIaJDvoPgYtLUYA/m8ntHlQjBJCfVlmPZLS1fS/PGdTvrpWRNEMXzBAm82MCtIWZC5Jr x3TUajczyYEwx7obVzmnVKqIpoUr8G/n5XElMTQGDmmo8yMS4fpslDwyPZ/3K5yY8xWjp4S/D1yPa Rru3cfi5NcOFp+I91/wA3CWPysQhsUgGjtGjvYD+afombCbRzvN8Tr4FTOAP8Oo/2I8IyhLc65uZF M2I3w8tqRiz8vty7F4FAHD5pt2QY3+NO50ZEjqxNDqSA/zWenafmt6zCiT0bg9qAqr6+TZXIOCgvg i+jpuiNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVErL-00000005VUk-0Fwg; Sat, 20 Jul 2024 18:31:07 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVEqy-00000005VSZ-0un6 for linux-arm-kernel@lists.infradead.org; Sat, 20 Jul 2024 18:30:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 7251BCE01C0; Sat, 20 Jul 2024 18:30:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59D5FC2BD10; Sat, 20 Jul 2024 18:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721500241; bh=N0thndlb9Rc77vx54WY3aUNoYfyGWgbYGRzNclFlqZY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I29YE8YRAm9zGA5TQZHMSFZqt87/BaRjiJ+i7d4OAdPq6jWdlYrJ7Y3T0AOF5zDYO DL65OGlJGpcB1DPYlkJ/jYHK4ZpG44oHXw9Gq0Nz0A/tNCaqTMrxMmQq6Js+G4szKu +9B9VOahOP/LvDjE77Wf/I6SB3DeYW/jUAb/yf94goaN+vyyD6mWwyZSq62GtVTvEo TZZ9TYR5kYC9ax0FCLh7KnZYrQXWaHb/264z7jxn1Xkd+4Gt9kwjfdC41qi4bsYgdd Z/W1aataRLkCS70MgIOZ30Vnw5FWkAhhZeDABHZs3yF+ihy3Y5Fjx8M7s5Ejvqm7w6 ZcS293U3O7tNw== Message-ID: <24aee2d7-927b-4ea0-bb34-e8f63d8e7856@kernel.org> Date: Sat, 20 Jul 2024 20:30:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V226/7] dt-bindings: PCI: host-generic-pci: Add snps,dw-pcie-ecam-msi binding To: Mayank Rana , will@kernel.org, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, jingoohan1@gmail.com, manivannan.sadhasivam@linaro.org, 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 Cc: quic_ramkri@quicinc.com, quic_nkela@quicinc.com, quic_shazhuss@quicinc.com, quic_msarkar@quicinc.com, quic_nitegupt@quicinc.com References: <1721067215-5832-1-git-send-email-quic_mrana@quicinc.com> <1721067215-5832-7-git-send-email-quic_mrana@quicinc.com> <5f029f16-2030-4e86-929b-0b2832958912@kernel.org> <083e1e6f-714d-4a3e-a864-59e06bba0559@quicinc.com> <3221423a-d5b3-47e3-8b98-623d9b26363d@kernel.org> <609c2420-4bf9-4d1b-b998-2dea825139b2@kernel.org> <1a6f5cdf-9256-4d8d-b8c7-92bd6e7d3813@quicinc.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1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uI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <1a6f5cdf-9256-4d8d-b8c7-92bd6e7d3813@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240720_113044_647783_BDADC8C3 X-CRM114-Status: GOOD ( 25.00 ) 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 19/07/2024 01:19, Mayank Rana wrote: > Hi Krzysztof > > On 7/17/2024 11:05 PM, Krzysztof Kozlowski wrote: >> On 17/07/2024 19:20, Mayank Rana wrote: >>> Hi Krzysztof >>> >>> On 7/16/2024 11:47 PM, Krzysztof Kozlowski wrote: >>>> On 17/07/2024 00:09, Mayank Rana wrote: >>>>> Hi Krzysztof >>>>> >>>>> On 7/16/2024 12:28 AM, Krzysztof Kozlowski wrote: >>>>>> On 15/07/2024 20:13, Mayank Rana wrote: >>>>>>> To support MSI functionality using Synopsys DesignWare PCIe controller >>>>>>> based MSI controller with ECAM driver, add "snps,dw-pcie-ecam-msi >>>>>>> compatible binding which uses provided SPIs to support MSI functionality. >>>>>> >>>>>> To support MSI, you add MSI support... That's a tautology. Describe >>>>>> hardware instead. >>>>> Ok. let me repharse it to provide more useful information. >>>>>>> >>>>>>> Signed-off-by: Mayank Rana >>>>>>> --- >>>>>>> .../devicetree/bindings/pci/host-generic-pci.yaml | 57 ++++++++++++++++++++++ >>>>>>> 1 file changed, 57 insertions(+) >>>>>>> >>>>>>> diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml >>>>>>> index 9c714fa..9e860d5 100644 >>>>>>> --- a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml >>>>>>> @@ -81,6 +81,12 @@ properties: >>>>>>> - marvell,armada8k-pcie-ecam >>>>>>> - socionext,synquacer-pcie-ecam >>>>>>> - const: snps,dw-pcie-ecam >>>>>>> + - description: | >>>>>>> + Firmware is configuring Synopsys DesignWare PCIe controller in RC mode with >>>>>>> + ECAM compatible fashion. To use MSI controller of Synopsys DesignWare PCIe >>>>>>> + controller for MSI functionality, this compatible is used. >>>>>>> + items: >>>>>>> + - const: snps,dw-pcie-ecam-msi >>>>>> >>>>>> MSI is already present in the binding, isn't it? >>>>> It is mentioning as msi-parent usage which could be different MSI >>>>> controller (GIC or vendor specific one) not related to designware PCIe >>>>> controller based MSI controller. >>>>> >>>>>> Anyway, aren't you >>>>>> forgetting specific compatible? Please open your internal (quite >>>>>> comprehensive) guideline on bindings and DTS. >>>>> Here I am trying to define Designware based PCIe ECAM controller >>>>> supporting MSIcontroller based device. Hence I am not mentioning vendor >>>>> specific compatible usage >>>>> and keeping generic compatible binding for such device. >>>> >>>> I know what you try, yet it feels simply wrong. Read your guideline. >>>> Are you sure you work on Designware core itself, not on one used in >>>> Qualcomm? I would expect people from Designware to design Designware >>>> cores and people from Qualcomm only to design licensed cores. >>> Ok. let me not make generic comment here. I refereed how it is done with >>> other >>> snps based IP usage for example USB, and would follow same. >> >> Well, it is not. If you read their bindings or any reviews related to >> such cores, you would see that single Designware compatible is always >> never appropriate. Such cores always have customization per user. >> >> You can also look at the binding you are changing. Do you see Designware >> alone? No. > I found reference in this binding as below: > 79 items: > 80 - enum: > 81 - marvell,armada8k-pcie-ecam > 82 - socionext,synquacer-pcie-ecam > 83 - const: snps,dw-pcie-ecam > > And as you mentioned in previous emails about how to add such usage, I > ACKed it but let me put reason why I tried to add differently to start > with it. > > This specific driver under-discussion is really not vendor specific > driver. It can work with any PCIe controller which is already configured > in ECAM mode by firmware (i.e. PCIe controller from SNPS or any other > vendor). There are few quirks only added to get specific vendor based > SOC configuration for SNPS PCIe controller by different SOC vendors. > > 90 - description: > 91 CAM or ECAM compliant PCI host controllers without any quirks > 92 enum: > 93 - pci-host-cam-generic > 94 - pci-host-ecam-generic > > Above enum based usage works for SA8775P platform which is having SNPS > PCIe controller which doesn't need any quirks, and firmware is able to > configure PCIe controller into ECAM mode. Here I tried adding PCIe SNPS > controller based MSI support as SA8775P doesn't support LPI/ITS for MSI. > I need to differentiate it hence added generic enum as MSI controller is > part of SNPS PCIe controller, and not separate MSI IP here. Although how > many MSI can be supported it depends on how many SPIs are available/used > with MSI controller depend on particular SOC. Hence put as > snps,dw-pcie-ecam-msi as usage and variable number of MSI. hopefully I > am able to convey why this driver binding modified differently. Your binding already defines some specifics for specific device, but you still claim all of them are identical. Sorry, I am confused. Read carefully writing bindings, consult internal guideline (go/upstream - it is really detailed!) and then come with a solution. Best regards, Krzysztof