From: Rob Herring <robh@kernel.org>
To: Sameer Pujar <spujar@nvidia.com>
Cc: devicetree@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>,
Jon Hunter <jonathanh@nvidia.com>, Vinod <vkoul@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <maz@kernel.org>,
linux-tegra <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM"
<dmaengine@vger.kernel.org>
Subject: Re: [PATCH 4/4] dt-bindings: bus: Convert ACONNECT doc to json-schema
Date: Fri, 6 Nov 2020 08:37:12 -0600 [thread overview]
Message-ID: <CAL_JsqKkB03L=jFXTTecpbjS8FqtO72V9EJAWszR12CM4EQChg@mail.gmail.com> (raw)
In-Reply-To: <8c8c7cc0-881f-5542-f23f-238e5d8608d3@nvidia.com>
On Fri, Nov 6, 2020 at 12:44 AM Sameer Pujar <spujar@nvidia.com> wrote:
>
>
> >> Move ACONNECT documentation to YAML format.
> >>
> >> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> >> ---
> >> .../bindings/bus/nvidia,tegra210-aconnect.txt | 44 -----------
> >> .../bindings/bus/nvidia,tegra210-aconnect.yaml | 86 ++++++++++++++++++++++
> >> 2 files changed, 86 insertions(+), 44 deletions(-)
> >> delete mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
> >> create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml
> >>
>
> ...
>
> >> diff --git a/Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml b/Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml
> >> new file mode 100644
> >> index 0000000..f0161bc
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml
> >> @@ -0,0 +1,86 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/bus/nvidia,tegra210-aconnect.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: NVIDIA Tegra ACONNECT Bus
> >> +
> >> +description: |
> >> + The Tegra ACONNECT bus is an AXI switch which is used to connnect various
> >> + components inside the Audio Processing Engine (APE). All CPU accesses to
> >> + the APE subsystem go through the ACONNECT via an APB to AXI wrapper. All
> >> + devices accessed via the ACONNNECT are described by child-nodes.
> >> +
>
> ...
>
> >> +
> >> +patternProperties:
> >> + "^dma-controller(@[0-9a-f]+)?$":
> >> + $ref: /schemas/dma/nvidia,tegra210-adma.yaml#
> >> + "^interrupt-controller(@[0-9a-f]+)?$":
> >> + $ref: /schemas/interrupt-controller/arm,gic.yaml#
> >> + "^ahub(@[0-9a-f]+)?$":
> >> + $ref: /schemas/sound/nvidia,tegra210-ahub.yaml#
> > These all get applied already since they match on compatible strings. So
> > having them here means the schema is applied twice. There's maybe some
> > value to this if it's always going to be these 3 nodes.
>
> 1) May be this could be dropped with "additionalProperties = true", but
> that allows any arbitary property to be added for the device. Without
> this 'make dtbs_check' complains about not matching properties in DT files.
Not if you do what I suggested below. Then only arbitrary nodes can be added.
>
> 2) These may not be the final list of nodes this device can have. In
> future if any new device support gets added under this, above needs to
> be updated. But it will be limited number of devices.
>
> So is [2] fine or you would suggest [1] would be good enough?
>
> >
> > Also, the unit-addresses shouldn't be optional.
> >
> > I'd just do:
> >
> > "@[0-9a-f]+$":
> > type: object
> >
> >> +
> >> +required:
> >> + - compatible
> >> + - clocks
> >> + - clock-names
> >> + - power-domains
> >> + - "#address-cells"
> >> + - "#size-cells"
> >> + - ranges
> >> +
> >> +additionalProperties: false
> >> +
> >> +examples:
> >> + - |
> >> + #include<dt-bindings/clock/tegra210-car.h>
> >> +
> >> + aconnect@702c0000 {
> >> + compatible = "nvidia,tegra210-aconnect";
> >> + clocks = <&tegra_car TEGRA210_CLK_APE>,
> >> + <&tegra_car TEGRA210_CLK_APB2APE>;
> >> + clock-names = "ape", "apb2ape";
> >> + power-domains = <&pd_audio>;
> >> +
> >> + #address-cells = <1>;
> >> + #size-cells = <1>;
> >> + ranges = <0x702c0000 0x702c0000 0x00040000>;
> >> +
> >> + // Child device nodes follow ...
> >> + };
> >> +
> >> +...
> >> --
> >> 2.7.4
> >>
>
prev parent reply other threads:[~2020-11-06 14:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 10:24 [PATCH 0/4] Convert few Tegra docs to json-schema Sameer Pujar
2020-11-05 10:24 ` [PATCH 1/4] arm64: tegra: Rename ADMA device nodes for Tegra210 Sameer Pujar
2020-11-05 10:24 ` [PATCH 2/4] dt-bindings: dma: Convert ADMA doc to json-schema Sameer Pujar
2020-11-05 18:50 ` Rob Herring
2020-11-05 18:56 ` Rob Herring
2020-11-05 10:24 ` [PATCH 3/4] dt-bindings: interrupt-controller: arm,gic: Update Tegra compatibles Sameer Pujar
2020-11-05 18:57 ` Rob Herring
2020-11-05 18:58 ` Rob Herring
2020-11-05 10:24 ` [PATCH 4/4] dt-bindings: bus: Convert ACONNECT doc to json-schema Sameer Pujar
2020-11-05 19:05 ` Rob Herring
2020-11-06 6:44 ` Sameer Pujar
2020-11-06 14:37 ` Rob Herring [this message]
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='CAL_JsqKkB03L=jFXTTecpbjS8FqtO72V9EJAWszR12CM4EQChg@mail.gmail.com' \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jason@lakedaemon.net \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maz@kernel.org \
--cc=spujar@nvidia.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).