From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kousik Sanagavarapu <five231003@gmail.com>, linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-spi@vger.kernel.org,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Mark Brown <broonie@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: Re: [PATCH] dt-bindings: spi: convert spi-jcore to dtschema
Date: Thu, 21 Mar 2024 15:00:41 +0100 [thread overview]
Message-ID: <1009fc1b-59f4-408e-9c2d-486e1886ce48@linaro.org> (raw)
In-Reply-To: <20240321134956.7731-1-five231003@gmail.com>
On 21/03/2024 14:47, Kousik Sanagavarapu wrote:
> Convert existing bindings of J-Core spi2 to dtschema. No new properties
> are added.
Subject:
spi: dt-bindings: jcore,spi:
>
> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
> ---
> .../devicetree/bindings/spi/jcore,spi.txt | 34 -----------
> .../devicetree/bindings/spi/jcore,spi.yaml | 60 +++++++++++++++++++
> 2 files changed, 60 insertions(+), 34 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/spi/jcore,spi.txt
> create mode 100644 Documentation/devicetree/bindings/spi/jcore,spi.yaml
>
> diff --git a/Documentation/devicetree/bindings/spi/jcore,spi.yaml b/Documentation/devicetree/bindings/spi/jcore,spi.yaml
> new file mode 100644
> index 000000000000..e76775bb68d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/jcore,spi.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/spi/jcore,spi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: J-Core SPI controller
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The J-Core "spi2" device is a PIO-based SPI controller which used to
> + perform byte-at-a-time transfers between the CPU and itself.
> +
> +maintainers:
> + - Kousik Sanagavarapu <five231003@gmail.com>
> +
> +allOf:
> + - $ref: spi-controller.yaml#
> +
> +properties:
> + compatible:
> + const: jcore,spi2
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description:
> + If a phandle named "ref_clk" is present, SPI clock speed
> + programming is relative to the frequency of the indicated clock.
> + Necessary only if the input clock rate is something other than a
> + fixed 50 MHz.
> +
> + clock-names:
> + description:
> + Clock names, one for each phandle in clocks.
Drop description, but instead provide a name. See existing code.
> +
> + "#address-cells":
> + const: 1
Drop
> +
> + "#size-cells":
> + const: 0
Drop
Please do not write bindings in entirely different way than existing
ones are written. Open existing recent bindings and look there.
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: true
This cannot be true. From which existing code did you take it? What you
need here is unevaluatedProperties: false.
> +
> +examples:
> + - |
> + spi@40 {
> + compatible = "jcore,spi2";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x40 0x8>;
Keep reg the second property.
> + spi-max-frequency = <25000000>;
> + clocks = <&bus_clk>;
> + clock-names = "ref_clk";
> + };
Best regards,
Krzysztof
prev parent reply other threads:[~2024-03-21 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 13:47 Kousik Sanagavarapu
2024-03-21 14:00 ` Krzysztof Kozlowski [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=1009fc1b-59f4-408e-9c2d-486e1886ce48@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=five231003@gmail.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®