[PATCH 2/4] dt-bindings: clock: ti: Convert to yaml

Sukrut Bellary posted 4 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Sukrut Bellary 10 months, 1 week ago
This binding doesn't define a new clock binding type,
it is used to group the existing clock nodes under the hardware hierarchy.

As this is not a provider clock, remove #clock-cells and
clock-output-names properties.
Though few clockdomain nodes in the dts use these properties,
we are not fixing dts here.
Clean up the example to meet the current standards.

Add the creator of the original binding as a maintainer.

Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
---
 .../bindings/clock/ti/clockdomain.txt         | 25 ------------
 .../bindings/clock/ti/ti,clockdomain.yaml     | 38 +++++++++++++++++++
 2 files changed, 38 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/ti/clockdomain.txt
 create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml

diff --git a/Documentation/devicetree/bindings/clock/ti/clockdomain.txt b/Documentation/devicetree/bindings/clock/ti/clockdomain.txt
deleted file mode 100644
index edf0b5d42768..000000000000
--- a/Documentation/devicetree/bindings/clock/ti/clockdomain.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Binding for Texas Instruments clockdomain.
-
-This binding uses the common clock binding[1] in consumer role.
-Every clock on TI SoC belongs to one clockdomain, but software
-only needs this information for specific clocks which require
-their parent clockdomain to be controlled when the clock is
-enabled/disabled. This binding doesn't define a new clock
-binding type, it is used to group existing clock nodes under
-hardware hierarchy.
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be "ti,clockdomain"
-- #clock-cells : from common clock binding; shall be set to 0.
-- clocks : link phandles of clocks within this domain
-
-Optional properties:
-- clock-output-names : from common clock binding.
-
-Examples:
-	dss_clkdm: dss_clkdm {
-		compatible = "ti,clockdomain";
-		clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml b/Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
new file mode 100644
index 000000000000..2bae2a0f6318
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ti/ti,clockdomain.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI clock domain
+
+maintainers:
+  - Tero Kristo <kristo@kernel.org>
+  - Sukrut Bellary <sbellary@baylibre.com>
+
+description: |
+  Every clock on TI SoC belongs to one clockdomain. For specific clocks, the
+  parent clockdomain has to be controlled when the clock is enabled/disabled.
+  This binding doesn't define a new clock binding type, it is used to group
+  the existing clock nodes under hardware hierarchy.
+
+properties:
+  compatible:
+    const: ti,clockdomain
+
+  clocks:
+    description:
+      Clocks within this domain
+
+required:
+  - compatible
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    l3init_clkdm: l3init_clkdm {
+        compatible = "ti,clockdomain";
+        clocks = <&dpll_usb_ck>;
+    };
-- 
2.34.1
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Andreas Kemnade 10 months ago
Am Thu,  3 Apr 2025 18:44:58 -0700
schrieb Sukrut Bellary <sbellary@baylibre.com>:

> This binding doesn't define a new clock binding type,
> it is used to group the existing clock nodes under the hardware hierarchy.
> 
> As this is not a provider clock, remove #clock-cells and
> clock-output-names properties.
> Though few clockdomain nodes in the dts use these properties,
> we are not fixing dts here.
> Clean up the example to meet the current standards.
> 
> Add the creator of the original binding as a maintainer.
> 
> Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> ---
>  .../bindings/clock/ti/clockdomain.txt         | 25 ------------
>  .../bindings/clock/ti/ti,clockdomain.yaml     | 38 +++++++++++++++++++

I am wondering whether this should just be part of a converted version
of Documentation/devicetree/bindings/arm/omap/prcm.txt. I doubt there
is any other usage for this compatible.

Regards,
Andreas
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Sukrut Bellary 10 months ago
On Wed, Apr 09, 2025 at 11:10:02AM +0200, Andreas Kemnade wrote:
> Am Thu,  3 Apr 2025 18:44:58 -0700
> schrieb Sukrut Bellary <sbellary@baylibre.com>:
> 
> > This binding doesn't define a new clock binding type,
> > it is used to group the existing clock nodes under the hardware hierarchy.
> > 
> > As this is not a provider clock, remove #clock-cells and
> > clock-output-names properties.
> > Though few clockdomain nodes in the dts use these properties,
> > we are not fixing dts here.
> > Clean up the example to meet the current standards.
> > 
> > Add the creator of the original binding as a maintainer.
> > 
> > Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> > ---
> >  .../bindings/clock/ti/clockdomain.txt         | 25 ------------
> >  .../bindings/clock/ti/ti,clockdomain.yaml     | 38 +++++++++++++++++++
> 
> I am wondering whether this should just be part of a converted version
> of Documentation/devicetree/bindings/arm/omap/prcm.txt. I doubt there
> is any other usage for this compatible.
> 

Yes, OK. So, do you want to take this with prcm conversion? If so, I will
drop this from v2

> Regards,
> Andreas
>
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Rob Herring (Arm) 10 months, 1 week ago
On Thu, 03 Apr 2025 18:44:58 -0700, Sukrut Bellary wrote:
> This binding doesn't define a new clock binding type,
> it is used to group the existing clock nodes under the hardware hierarchy.
> 
> As this is not a provider clock, remove #clock-cells and
> clock-output-names properties.
> Though few clockdomain nodes in the dts use these properties,
> we are not fixing dts here.
> Clean up the example to meet the current standards.
> 
> Add the creator of the original binding as a maintainer.
> 
> Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> ---
>  .../bindings/clock/ti/clockdomain.txt         | 25 ------------
>  .../bindings/clock/ti/ti,clockdomain.yaml     | 38 +++++++++++++++++++
>  2 files changed, 38 insertions(+), 25 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/clock/ti/clockdomain.txt
>  create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:


doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/clock/ti/fixed-factor-clock.txt references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
Warning: Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
Warning: Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/clockdomain.txt
Warning: Documentation/translations/ja_JP/process/submit-checklist.rst references a file that doesn't exist: Documentation/translations/ja_JP/SubmitChecklist
Documentation/devicetree/bindings/clock/ti/fixed-factor-clock.txt: Documentation/devicetree/bindings/clock/ti/autoidle.txt
Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml: Documentation/devicetree/bindings/clock/ti/autoidle.txt
Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml: Documentation/devicetree/bindings/clock/ti/clockdomain.txt
Documentation/translations/ja_JP/process/submit-checklist.rst: Documentation/translations/ja_JP/SubmitChecklist

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250404014500.2789830-3-sbellary@baylibre.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Sukrut Bellary 10 months ago
On Fri, Apr 04, 2025 at 09:56:01AM -0500, Rob Herring (Arm) wrote:
> 
> On Thu, 03 Apr 2025 18:44:58 -0700, Sukrut Bellary wrote:
> > This binding doesn't define a new clock binding type,
> > it is used to group the existing clock nodes under the hardware hierarchy.
> > 
> > As this is not a provider clock, remove #clock-cells and
> > clock-output-names properties.
> > Though few clockdomain nodes in the dts use these properties,
> > we are not fixing dts here.
> > Clean up the example to meet the current standards.
> > 
> > Add the creator of the original binding as a maintainer.
> > 
> > Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> > ---
> >  .../bindings/clock/ti/clockdomain.txt         | 25 ------------
> >  .../bindings/clock/ti/ti,clockdomain.yaml     | 38 +++++++++++++++++++
> >  2 files changed, 38 insertions(+), 25 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/clock/ti/clockdomain.txt
> >  create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
> > 
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> 
> 
> doc reference errors (make refcheckdocs):
> Warning: Documentation/devicetree/bindings/clock/ti/fixed-factor-clock.txt references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
> Warning: Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
> Warning: Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/clockdomain.txt
> Warning: Documentation/translations/ja_JP/process/submit-checklist.rst references a file that doesn't exist: Documentation/translations/ja_JP/SubmitChecklist
> Documentation/devicetree/bindings/clock/ti/fixed-factor-clock.txt: Documentation/devicetree/bindings/clock/ti/autoidle.txt
> Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml: Documentation/devicetree/bindings/clock/ti/autoidle.txt
> Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml: Documentation/devicetree/bindings/clock/ti/clockdomain.txt
> Documentation/translations/ja_JP/process/submit-checklist.rst: Documentation/translations/ja_JP/SubmitChecklist
> 
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250404014500.2789830-3-sbellary@baylibre.com
> 
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.

OK, thanks.
I will check and re-submit.
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Krzysztof Kozlowski 10 months, 1 week ago
On Thu, Apr 03, 2025 at 06:44:58PM GMT, Sukrut Bellary wrote:
> +maintainers:
> +  - Tero Kristo <kristo@kernel.org>
> +  - Sukrut Bellary <sbellary@baylibre.com>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  Every clock on TI SoC belongs to one clockdomain. For specific clocks, the
> +  parent clockdomain has to be controlled when the clock is enabled/disabled.
> +  This binding doesn't define a new clock binding type, it is used to group
> +  the existing clock nodes under hardware hierarchy.
> +
> +properties:
> +  compatible:
> +    const: ti,clockdomain
> +
> +  clocks:
> +    description:
> +      Clocks within this domain

Missing constraints.

> +
> +required:
> +  - compatible
> +  - clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    l3init_clkdm: l3init_clkdm {

Follow DTS coding style. Also drop unused label.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +        compatible = "ti,clockdomain";
> +        clocks = <&dpll_usb_ck>;
> +    };
> -- 
> 2.34.1
>
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by Sukrut Bellary 10 months ago
On Fri, Apr 04, 2025 at 12:46:28PM +0200, Krzysztof Kozlowski wrote:
> On Thu, Apr 03, 2025 at 06:44:58PM GMT, Sukrut Bellary wrote:
> > +maintainers:
> > +  - Tero Kristo <kristo@kernel.org>
> > +  - Sukrut Bellary <sbellary@baylibre.com>
> > +
> > +description: |
> 
> Do not need '|' unless you need to preserve formatting.

Thanks for the review.
I will fix this.

> > +  Every clock on TI SoC belongs to one clockdomain. For specific clocks, the
> > +  parent clockdomain has to be controlled when the clock is enabled/disabled.
> > +  This binding doesn't define a new clock binding type, it is used to group
> > +  the existing clock nodes under hardware hierarchy.
> > +
> > +properties:
> > +  compatible:
> > +    const: ti,clockdomain
> > +
> > +  clocks:
> > +    description:
> > +      Clocks within this domain
> 
> Missing constraints.

I will add it.

> > +
> > +required:
> > +  - compatible
> > +  - clocks
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    l3init_clkdm: l3init_clkdm {
> 
> Follow DTS coding style. Also drop unused label.
> 
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Sure, will fix this.

> > +        compatible = "ti,clockdomain";
> > +        clocks = <&dpll_usb_ck>;
> > +    };
> > -- 
> > 2.34.1
> >
Re: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
Posted by kernel test robot 10 months, 1 week ago
Hi Sukrut,

kernel test robot noticed the following build warnings:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next linus/master v6.14 next-20250403]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sukrut-Bellary/dt-bindings-clock-ti-Convert-to-yaml/20250404-094647
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20250404014500.2789830-3-sbellary%40baylibre.com
patch subject: [PATCH 2/4] dt-bindings: clock: ti: Convert to yaml
reproduce: (https://download.01.org/0day-ci/archive/20250404/202504041306.Dxlb0inM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504041306.Dxlb0inM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   Warning: Documentation/arch/powerpc/cxl.rst references a file that doesn't exist: Documentation/ABI/testing/sysfs-class-cxl
   Warning: Documentation/devicetree/bindings/clock/ti/fixed-factor-clock.txt references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
   Warning: Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/autoidle.txt
>> Warning: Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml references a file that doesn't exist: Documentation/devicetree/bindings/clock/ti/clockdomain.txt
   Warning: Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
   Warning: Documentation/hwmon/g762.rst references a file that doesn't exist: Documentation/devicetree/bindings/hwmon/g762.txt
   Warning: Documentation/translations/ja_JP/SubmittingPatches references a file that doesn't exist: linux-2.6.12-vanilla/Documentation/dontdiff
   Warning: Documentation/translations/zh_CN/admin-guide/README.rst references a file that doesn't exist: Documentation/dev-tools/kgdb.rst
   Warning: Documentation/translations/zh_CN/dev-tools/gdb-kernel-debugging.rst references a file that doesn't exist: Documentation/dev-tools/gdb-kernel-debugging.rst

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki