From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org
Subject: Re: [PATCH 5/6] dt-bindings: soc: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
Date: Mon, 13 Feb 2023 12:05:54 +0100 [thread overview]
Message-ID: <3dfe44a1-2a80-7344-e6a5-31ea59438dec@linaro.org> (raw)
In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-5-c4fe9049def9@linaro.org>
On 09/02/2023 14:41, Neil Armstrong wrote:
> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
Subject prefix: clock, not soc
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> .../bindings/clock/amlogic,gxbb-aoclkc.txt | 64 -----------
> .../bindings/clock/amlogic,gxbb-aoclkc.yaml | 120 +++++++++++++++++++++
> 2 files changed, 120 insertions(+), 64 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> deleted file mode 100644
> index c41f0be5d438..000000000000
> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -* Amlogic GXBB AO Clock and Reset Unit
> -
> -The Amlogic GXBB AO clock controller generates and supplies clock to various
> -controllers within the Always-On part of the SoC.
> -
> -Required Properties:
> -
> -- compatible: value should be different for each SoC family as :
> - - GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
> - - GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
> - - GXM (S912) : "amlogic,meson-gxm-aoclkc"
> - - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
> - - G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
> - followed by the common "amlogic,meson-gx-aoclkc"
> -- clocks: list of clock phandle, one for each entry clock-names.
> -- clock-names: should contain the following:
> - * "xtal" : the platform xtal
> - * "mpeg-clk" : the main clock controller mother clock (aka clk81)
> - * "ext-32k-0" : external 32kHz reference #0 if any (optional)
> - * "ext-32k-1" : external 32kHz reference #1 if any (optional - gx only)
> - * "ext-32k-2" : external 32kHz reference #2 if any (optional - gx only)
> -
> -- #clock-cells: should be 1.
> -
> -Each clock is assigned an identifier and client nodes can use this identifier
> -to specify the clock which they consume. All available clocks are defined as
> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -- #reset-cells: should be 1.
> -
> -Each reset is assigned an identifier and client nodes can use this identifier
> -to specify the reset which they consume. All available resets are defined as
> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -Parent node should have the following properties :
> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
> -- reg: base address and size of the AO system control register space.
> -
> -Example: AO Clock controller node:
> -
> -ao_sysctrl: sys-ctrl@0 {
> - compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
> - reg = <0x0 0x0 0x0 0x100>;
> -
> - clkc_AO: clock-controller {
> - compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
> - #clock-cells = <1>;
> - #reset-cells = <1>;
> - clocks = <&xtal>, <&clkc CLKID_CLK81>;
> - clock-names = "xtal", "mpeg-clk";
> - };
> -
> -Example: UART controller node that consumes the clock and reset generated
> - by the clock controller:
> -
> - uart_AO: serial@4c0 {
> - compatible = "amlogic,meson-uart";
> - reg = <0x4c0 0x14>;
> - interrupts = <0 90 1>;
> - clocks = <&clkc_AO CLKID_AO_UART1>;
> - resets = <&clkc_AO RESET_AO_UART1>;
> - };
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> new file mode 100644
> index 000000000000..3ac432a112ca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> @@ -0,0 +1,120 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Always-On Clock Controller
> +
> +maintainers:
> + - Neil Armstrong <neil.armstrong@linaro.org>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - amlogic,meson-gxbb-aoclkc
> + - amlogic,meson-gxl-aoclkc
> + - amlogic,meson-gxm-aoclkc
> + - amlogic,meson-axg-aoclkc
> + - const: amlogic,meson-gx-aoclkc
> + - items:
Drop this "items"
> + - enum:
> + - amlogic,meson-axg-aoclkc
This does not look correct. Either this is standalone compatible or
followed with a fallback.
> + - amlogic,meson-g12a-aoclkc
> +
> + clocks:
> + minItems: 2
maxItems instead... or you wanted to define constraints? Then you need
min and maxItems.
> +
> + clock-names:
> + minItems: 2
ditto
> +
> + '#clock-cells':
> + const: 1
> +
> + '#reset-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - clocks
> + - clock-names
> + - '#clock-cells'
> + - '#reset-cells'
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + enum:
> + - amlogic,meson-gxbb-clkc
This won't work. Test it... It's not even documented.
> +
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 5
> +
> + clock-names:
> + minItems: 2
> + items:
> + - const: xtal
> + - const: mpeg-clk
> + - const: ext-32k-0
> + - const: ext-32k-1
> + - const: ext-32k-2
> +
> + - if:
> + properties:
> + compatible:
> + enum:
> + - amlogic,meson-g12a-aoclkc
> +
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 3
> +
> + clock-names:
> + minItems: 2
> + items:
> + - const: xtal
> + - const: mpeg-clk
> + - const: ext-32k-0
> +
> + - if:
> + properties:
> + compatible:
> + enum:
> + - amlogic,meson-gxl-clkc
Another set of undocumented compatibles. There is no way this binding is
doing what it is supposed to do.
> + - amlogic,meson-gxm-clkc
> + - amlogic,meson-axg-clkc
> +
> + then:
> + properties:
> + clocks:
> + maxItems: 2
> +
> + clock-names:
> + items:
> + - const: xtal
> + - const: mpeg-clk
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + sysctrl: system-controller@0 {
> + compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
> + reg = <0 0x100>;
Drop parent node.
> +
> + clkc: clock-controller {
> + compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + clocks = <&xtal>, <&clk81>;
> + clock-names = "xtal", "mpeg-clk";
> + };
> + };
>
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-02-13 11:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 13:41 [PATCH 0/6] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings Neil Armstrong
2023-02-09 13:41 ` [PATCH 1/6] dt-bindings: rtc: convert rtc-meson-vrtc.txt to dt-schema Neil Armstrong
2023-02-11 20:10 ` Martin Blumenstingl
2023-02-13 10:49 ` Krzysztof Kozlowski
2023-02-09 13:41 ` [PATCH 2/6] dt-bindings: soc: amlogic: convert clk-measure.txt " Neil Armstrong
2023-02-11 20:13 ` Martin Blumenstingl
2023-02-13 10:54 ` Krzysztof Kozlowski
2023-02-09 13:41 ` [PATCH 3/6] dt-bindings: soc: amlogic: document System Control registers Neil Armstrong
2023-02-11 20:25 ` Martin Blumenstingl
2023-02-13 10:59 ` Krzysztof Kozlowski
2023-02-09 13:41 ` [PATCH 4/6] dt-bindings: soc: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema Neil Armstrong
2023-02-13 11:01 ` Krzysztof Kozlowski
2023-02-09 13:41 ` [PATCH 5/6] dt-bindings: soc: amlogic: convert amlogic,gxbb-aoclkc.txt " Neil Armstrong
2023-02-13 11:05 ` Krzysztof Kozlowski [this message]
2023-02-09 13:41 ` [PATCH 6/6] dt-bindings: soc: amlogic: update sysctrl clock-controller subnode type Neil Armstrong
2023-02-13 11:00 ` Krzysztof Kozlowski
2023-02-13 11:03 ` Neil Armstrong
2023-02-13 11:06 ` Krzysztof Kozlowski
2023-03-06 8:39 ` (subset) [PATCH 0/6] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings Neil Armstrong
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=3dfe44a1-2a80-7344-e6a5-31ea59438dec@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@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