From: Jon Hunter <jonathanh@nvidia.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, vidyas@nvidia.com,
mmaddireddy@nvidia.com
Subject: Re: [PATCH V2 1/2] dt-bindings: PCI: tegra234: Add ECAM support
Date: Mon, 14 Nov 2022 15:36:26 +0000 [thread overview]
Message-ID: <049113cc-1031-2576-0fcc-92f391841a7b@nvidia.com> (raw)
In-Reply-To: <d8edc185-52cd-ffa1-7b46-2ec84d0d712c@linaro.org>
On 14/11/2022 14:23, Krzysztof Kozlowski wrote:
> On 14/11/2022 15:09, Jon Hunter wrote:
>> From: Vidya Sagar <vidyas@nvidia.com>
>>
>> Add support for ECAM aperture that is only supported for Tegra234
>> devices.
>>
>> Co-developed-by: Vidya Sagar <vidyas@nvidia.com>
>> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
>> Co-developed-by: Jon Hunter <jonathanh@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> Changes since V1:
>> - Restricted the ECAM aperture to only Tegra234 devices that support it.
>>
>> .../bindings/pci/nvidia,tegra194-pcie.yaml | 76 +++++++++++++++----
>> .../devicetree/bindings/pci/snps,dw-pcie.yaml | 2 +-
>> 2 files changed, 62 insertions(+), 16 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml b/Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml
>> index 75da3e8eecb9..7ae0f37f5364 100644
>> --- a/Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml
>> +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml
>> @@ -27,21 +27,12 @@ properties:
>> - nvidia,tegra234-pcie
>>
>> reg:
>> - items:
>> - - description: controller's application logic registers
>> - - description: configuration registers
>> - - description: iATU and DMA registers. This is where the iATU (internal
>> - Address Translation Unit) registers of the PCIe core are made
>> - available for software access.
>> - - description: aperture where the Root Port's own configuration
>> - registers are available.
>> + minItems: 4
>> + maxItems: 5
>>
>> reg-names:
>> - items:
>> - - const: appl
>> - - const: config
>> - - const: atu_dma
>> - - const: dbi
>> + minItems: 4
>> + maxItems: 5
>>
>> interrupts:
>> items:
>> @@ -202,6 +193,60 @@ properties:
>>
>> allOf:
>> - $ref: /schemas/pci/snps,dw-pcie.yaml#
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - nvidia,tegra194-pcie
>> + then:
>> + properties:
>> + reg:
>> + minItems: 4
>> + maxItems: 4
>
> How you wrote it, you do not need min/maxItems here, because you have
> items below. However see further comment.
>
>> + items:
>> + - description: controller's application logic registers
>> + - description: configuration registers
>> + - description: iATU and DMA registers. This is where the iATU (internal
>> + Address Translation Unit) registers of the PCIe core are made
>> + available for software access.
>> + - description: aperture where the Root Port's own configuration
>> + registers are available.
>> + reg-names:
>> + items:
>> + - const: appl
>> + - const: config
>> + - const: atu_dma
>> + - const: dbi
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - nvidia,tegra234-pcie
>> + then:
>> + properties:
>> + reg:
>> + minItems: 5
>> + maxItems: 5
>
> Similar issue.
>
>> + items:
>> + - description: controller's application logic registers
>> + - description: configuration registers
>> + - description: iATU and DMA registers. This is where the iATU (internal
>> + Address Translation Unit) registers of the PCIe core are made
>> + available for software access.
>> + - description: aperture where the Root Port's own configuration
>> + registers are available.
>> + - description: aperture to access the configuration space through ECAM.
>
> This is unnecessarily duplicated. You can keep the descriptions of items
> and reg-names items in top level (with min 4 and max 5) and restrict
> maxItems for 194 and minItems for 234 here.
Yes I wondered if there was a good way to avoid duplication. It looks
like I cannot have 'maxItems' and 'items' at the top-level, but
obviously I can set 'maxItems' appropriately for each device.
Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml: properties:reg: {'minItems': 4, 'maxItems': 5, 'items': [{'description': "controller's application logic registers"}, {'description': 'configuration registers'}, {'description': 'iATU and DMA registers. This is where the iATU (internal Address Translation Unit) registers of the PCIe core are made available for software access.'}, {'description': "aperture where the Root Port's own configuration registers are available."}, {'description': 'aperture to access the configuration space through ECAM.'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
Thanks
Jon
--
nvpublic
next prev parent reply other threads:[~2022-11-14 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 14:09 [PATCH V2 0/2] Add ECAM aperture for Tegra234 Jon Hunter
2022-11-14 14:09 ` [PATCH V2 1/2] dt-bindings: PCI: tegra234: Add ECAM support Jon Hunter
2022-11-14 14:23 ` Krzysztof Kozlowski
2022-11-14 15:36 ` Jon Hunter [this message]
2022-11-14 15:57 ` Jon Hunter
2022-11-14 14:09 ` [PATCH V2 2/2] arm64: tegra: Add ECAM aperture info for all the PCIe controllers Jon Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=049113cc-1031-2576-0fcc-92f391841a7b@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mmaddireddy@nvidia.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vidyas@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox