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 64A47CD4F59 for ; Thu, 5 Sep 2024 07:57:53 +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:References:Cc:To:From: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=KQYO8bBkxBEcPIQvpgNt2UpFTTDW43SUXqVf8Xl4Cvw=; b=vishlBeNRO7nANw+aNs83BVT4R wvrdsjt/w67Vagh10LgVXUlvvxPAi+LxK5r9WQUcx3Jfyd/m6dUzGLT6DnRpjuFdfNCj+rHS/7y0Z DaepPuKZi+5sHFxbYXbRqaWbTmrPc6OYteQClY4+7BSJysf+6wLdkyMe/cAo80hn5dNgq/i9Oc/ZW HaVoasvshWWg9rvYazhZdSBnKP6RHhBo+WTBWZRcZgc8Z4yoGySJ59YTQcleeSk6dtAjoTeeU9hT3 EKZohO9+Rzhh2Bh+r81JzKkfeAuh1Wt5g7yn69i2b1TuhqPqEWhJRmOMdRjrwvz6tl0E6UP3BITZ6 pwsyXF8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm7NB-00000007S8X-0Sy9; Thu, 05 Sep 2024 07:57:45 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm7MB-00000007RnG-2pD0 for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 07:56:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id ACFFD5C5619; Thu, 5 Sep 2024 07:56:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECCA7C4CEC3; Thu, 5 Sep 2024 07:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725523003; bh=XdCyyOL8iDZXvD/RVTFRp9L/TCArX9gu66Scjgx3IWo=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=ULws7HY3oCwT77UEb6pX7KkT3hdCNZ7H2GBkN5eSIAtxA1erHGA7pEM9HHH4OxA7w ijGKbS5Eu952BZPmzerqAvdLcE6UISFyQRw6gFUVryTBczu+aDckoqFGbQkJSbrleT hNknebvDMQmoA0EwmQjuaXtaSBNeeowVbjnxhANQ7i+nXA+uqTRpq/UoMlPCLFBFba 4xJYei/eAC5NCoTTVlCgf1RIqtmlQpznaRfu76D9/C80VhOyhOXFI0+tPQDwuW8tpX DFCeopqlTc+XUJMrGM2rE2mj/RnAzjIhuCf3Kb3Xv6YWLegTjbI5wAzqiLSd9UhYVd f0Hz47tn7DphQ== Message-ID: Date: Thu, 5 Sep 2024 09:56:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/7] dt-bindings: PCI: ti,am65: Extend for use with PVU From: Krzysztof Kozlowski To: Jan Kiszka Cc: Nishanth Menon , Santosh Shilimkar , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Siddharth Vadapalli , Bao Cheng Su , Hua Qian Li , Diogo Ivo , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas References: <28d31a14fe9cc1867f023ebaddd6074459d15e40.1725444016.git.jan.kiszka@siemens.com> <4fd1d6e8-8a66-4eff-a995-5f947a4b707d@siemens.com> <669fa971-05f2-43f2-8c7b-d9de68d8910f@kernel.org> <50ee7c83-7dd2-44b7-ad80-649db9a76077@siemens.com> <69f16e78-218f-4e03-aeca-05be5844d656@kernel.org> 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/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMB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L6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <69f16e78-218f-4e03-aeca-05be5844d656@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_005643_825177_988E6BD4 X-CRM114-Status: GOOD ( 21.39 ) 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 05/09/2024 09:50, Krzysztof Kozlowski wrote: > On 05/09/2024 09:15, Jan Kiszka wrote: >> On 05.09.24 08:53, Krzysztof Kozlowski wrote: >>> On 05/09/2024 08:40, Jan Kiszka wrote: >>>> On 05.09.24 08:32, Krzysztof Kozlowski wrote: >>>>> On Wed, Sep 04, 2024 at 12:00:11PM +0200, Jan Kiszka wrote: >>>>>> From: Jan Kiszka >>>>>> >>>>>> The PVU on the AM65 SoC is capable of restricting DMA from PCIe devices >>>>>> to specific regions of host memory. Add the optional property >>>>>> "memory-regions" to point to such regions of memory when PVU is used. >>>>>> >>>>>> Since the PVU deals with system physical addresses, utilizing the PVU >>>>>> with PCIe devices also requires setting up the VMAP registers to map the >>>>>> Requester ID of the PCIe device to the CBA Virtual ID, which in turn is >>>>>> mapped to the system physical address. Hence, describe the VMAP >>>>>> registers which are optionally unless the PVU shall used for PCIe. >>>>>> >>>>>> Signed-off-by: Jan Kiszka >>>>>> --- >>>>>> CC: Lorenzo Pieralisi >>>>>> CC: "Krzysztof WilczyƄski" >>>>>> CC: Bjorn Helgaas >>>>>> CC: linux-pci@vger.kernel.org >>>>>> --- >>>>>> .../bindings/pci/ti,am65-pci-host.yaml | 52 ++++++++++++++----- >>>>>> 1 file changed, 40 insertions(+), 12 deletions(-) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >>>>>> index 0a9d10532cc8..d8182bad92de 100644 >>>>>> --- a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >>>>>> +++ b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >>>>>> @@ -19,16 +19,6 @@ properties: >>>>>> - ti,am654-pcie-rc >>>>>> - ti,keystone-pcie >>>>>> >>>>>> - reg: >>>>>> - maxItems: 4 >>>>>> - >>>>>> - reg-names: >>>>>> - items: >>>>>> - - const: app >>>>>> - - const: dbics >>>>>> - - const: config >>>>>> - - const: atu >>>>> >>>>> >>>>> Nothing improved here. >>>> >>>> Yes, explained the background to you. Sorry, if you do not address my >>>> replies, I'm lost with your feedback. >>> >>> My magic ball could not figure out the problem, so did not provide the >>> answer. >>> >>> I gave you the exact code which illustrates how to do it. If you do it >>> that way: it works. If you do it other way: it might not work. However >> >> The link you provided was unfortunately not self-explanatory because if >> I - apparently - do it like that example, I'm getting the errors below. >> >>> without seeing anything, magic ball was silent, so I am not >>> participating in game: would you be so kind to give more information so >>> I won't waste my day in asking what is wrong. >> >> With my patch: >> >> # make ... dtbs_check >> DTC [C] arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-m2.dtb >> OVL [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtb >> OVL [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-sm.dtb >> DTC [C] arch/arm64/boot/dts/ti/k3-am654-base-board.dtb >> >> With this revert on top: >> >> diff --git a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >> index d8182bad92de..dd753dae24c6 100644 >> --- a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >> +++ b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml >> @@ -19,6 +19,16 @@ properties: >> - ti,am654-pcie-rc >> - ti,keystone-pcie >> >> + reg: >> + maxItems: 4 >> + >> + reg-names: >> + items: >> + - const: app >> + - const: dbics >> + - const: config >> + - const: atu > > There is nothing like that in that example. > https://elixir.bootlin.com/linux/v6.8/source/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml#L44 > >> + >> interrupts: >> maxItems: 1 >> >> @@ -104,18 +114,6 @@ then: >> - msi-map >> - num-viewport >> >> -else: >> - properties: >> - reg: >> - maxItems: 4 >> - >> - reg-names: >> - items: >> - - const: app >> - - const: dbics >> - - const: config >> - - const: atu > > Neither this. > > Each case MUST be covered, look: > https://elixir.bootlin.com/linux/v6.8/source/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml#L191 Actually your case fits better another example from UFS, so take that one: https://elixir.bootlin.com/linux/v6.11-rc6/source/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml#L39 Best regards, Krzysztof