* [PATCH] dt-bindings: clock: convert BCM53573 ILP clock to the json-schema
@ 2023-07-07 13:03 Rafał Miłecki
2023-07-07 22:27 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2023-07-07 13:03 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-clk, devicetree, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This helps validating DTS files.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
.../bindings/clock/brcm,bcm53573-ilp.txt | 36 -------------
.../bindings/clock/brcm,bcm53573-ilp.yaml | 51 +++++++++++++++++++
2 files changed, 51 insertions(+), 36 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
deleted file mode 100644
index 2ebb107331dd..000000000000
--- a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Broadcom BCM53573 ILP clock
-===========================
-
-This binding uses the common clock binding:
- Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-This binding is used for ILP clock (sometimes referred as "slow clock")
-on Broadcom BCM53573 devices using Cortex-A7 CPU.
-
-ILP's rate has to be calculated on runtime and it depends on ALP clock
-which has to be referenced.
-
-This clock is part of PMU (Power Management Unit), a Broadcom's device
-handing power-related aspects. Its node must be sub-node of the PMU
-device.
-
-Required properties:
-- compatible: "brcm,bcm53573-ilp"
-- clocks: has to reference an ALP clock
-- #clock-cells: should be <0>
-- clock-output-names: from common clock bindings, should contain clock
- name
-
-Example:
-
-pmu@18012000 {
- compatible = "simple-mfd", "syscon";
- reg = <0x18012000 0x00001000>;
-
- ilp {
- compatible = "brcm,bcm53573-ilp";
- clocks = <&alp>;
- #clock-cells = <0>;
- clock-output-names = "ilp";
- };
-};
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
new file mode 100644
index 000000000000..648f68a53119
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/brcm,bcm53573-ilp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM53573 ILP clock
+
+maintainers:
+ - Rafał Miłecki <rafal@milecki.pl>
+
+description: |
+ This binding is used for ILP clock (sometimes referred as "slow clock")
+ on Broadcom BCM53573 devices using Cortex-A7 CPU.
+
+ ILP's rate has to be calculated on runtime and it depends on ALP clock
+ which has to be referenced.
+
+ This clock is part of PMU (Power Management Unit), a Broadcom's device
+ handing power-related aspects. Its node must be sub-node of the PMU
+ device.
+
+properties:
+ compatible:
+ const: brcm,bcm53573-ilp
+
+ clocks:
+ description: ALP clock
+ maxItems: 1
+
+ "#clock-cells":
+ const: 0
+
+ clock-output-names:
+ const: ilp
+
+required:
+ - clocks
+ - "#clock-cells"
+ - clock-output-names
+
+additionalProperties: false
+
+examples:
+ - |
+ ilp {
+ compatible = "brcm,bcm53573-ilp";
+ clocks = <&alp>;
+ #clock-cells = <0>;
+ clock-output-names = "ilp";
+ };
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: clock: convert BCM53573 ILP clock to the json-schema
2023-07-07 13:03 [PATCH] dt-bindings: clock: convert BCM53573 ILP clock to the json-schema Rafał Miłecki
@ 2023-07-07 22:27 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2023-07-07 22:27 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
Conor Dooley, linux-clk, devicetree, Rafał Miłecki
On Fri, Jul 07, 2023 at 03:03:22PM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> .../bindings/clock/brcm,bcm53573-ilp.txt | 36 -------------
> .../bindings/clock/brcm,bcm53573-ilp.yaml | 51 +++++++++++++++++++
> 2 files changed, 51 insertions(+), 36 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
> create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
> deleted file mode 100644
> index 2ebb107331dd..000000000000
> --- a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -Broadcom BCM53573 ILP clock
> -===========================
> -
> -This binding uses the common clock binding:
> - Documentation/devicetree/bindings/clock/clock-bindings.txt
> -
> -This binding is used for ILP clock (sometimes referred as "slow clock")
> -on Broadcom BCM53573 devices using Cortex-A7 CPU.
> -
> -ILP's rate has to be calculated on runtime and it depends on ALP clock
> -which has to be referenced.
> -
> -This clock is part of PMU (Power Management Unit), a Broadcom's device
> -handing power-related aspects. Its node must be sub-node of the PMU
> -device.
> -
> -Required properties:
> -- compatible: "brcm,bcm53573-ilp"
> -- clocks: has to reference an ALP clock
> -- #clock-cells: should be <0>
> -- clock-output-names: from common clock bindings, should contain clock
> - name
> -
> -Example:
> -
> -pmu@18012000 {
> - compatible = "simple-mfd", "syscon";
Really, the binding for this block needs to be converted or added first.
That means adding a specific compatible for the "pmu".
> - reg = <0x18012000 0x00001000>;
> -
> - ilp {
> - compatible = "brcm,bcm53573-ilp";
> - clocks = <&alp>;
> - #clock-cells = <0>;
> - clock-output-names = "ilp";
And this binding is simple enough it could be part of the parent
binding, but either way is fine.
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
> new file mode 100644
> index 000000000000..648f68a53119
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/brcm,bcm53573-ilp.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/brcm,bcm53573-ilp.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom BCM53573 ILP clock
> +
> +maintainers:
> + - Rafał Miłecki <rafal@milecki.pl>
> +
> +description: |
> + This binding is used for ILP clock (sometimes referred as "slow clock")
> + on Broadcom BCM53573 devices using Cortex-A7 CPU.
> +
> + ILP's rate has to be calculated on runtime and it depends on ALP clock
> + which has to be referenced.
> +
> + This clock is part of PMU (Power Management Unit), a Broadcom's device
> + handing power-related aspects. Its node must be sub-node of the PMU
> + device.
> +
> +properties:
> + compatible:
> + const: brcm,bcm53573-ilp
> +
> + clocks:
> + description: ALP clock
> + maxItems: 1
> +
> + "#clock-cells":
> + const: 0
> +
> + clock-output-names:
> + const: ilp
> +
> +required:
> + - clocks
> + - "#clock-cells"
> + - clock-output-names
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + ilp {
clock-controller {
> + compatible = "brcm,bcm53573-ilp";
> + clocks = <&alp>;
> + #clock-cells = <0>;
> + clock-output-names = "ilp";
> + };
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-07 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-07 13:03 [PATCH] dt-bindings: clock: convert BCM53573 ILP clock to the json-schema Rafał Miłecki
2023-07-07 22:27 ` Rob Herring
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).