devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml
@ 2024-06-11  3:53 Kanak Shilledar
  2024-06-11  5:30 ` Rob Herring (Arm)
  2024-06-11  6:58 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 5+ messages in thread
From: Kanak Shilledar @ 2024-06-11  3:53 UTC (permalink / raw)
  Cc: Kanak Shilledar, Philipp Zabel, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, William Zhang, Anand Gore, Kursad Oney,
	Florian Fainelli, Rafał Miłecki,
	Broadcom internal kernel review list, Kanak Shilledar, devicetree,
	linux-arm-kernel, linux-kernel

Convert the Broadcom BCM63138 Processor Monitor Bus to newer DT
schema. Created DT schema based on the .txt file which had `compatible`,
`reg` and `"#reset-cells" as required properties.
Added one line description which was missing in the original .txt file.
Added Philipp Zabel as the maintainer (took from MAINTAINERS file).

Signed-off-by: Kanak Shilledar <kanakshilledar@gmail.com>
---
 .../bindings/reset/brcm,bcm63138-pmb.txt      | 19 --------
 .../bindings/reset/brcm,bcm63138-pmb.yaml     | 43 +++++++++++++++++++
 2 files changed, 43 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
 create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.yaml

diff --git a/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt b/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
deleted file mode 100644
index a98872d27872..000000000000
--- a/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Broadcom BCM63138 Processor Monitor Bus binding
-===============================================
-
-Please also refer to reset.txt in this directory for common reset
-controller binding usage.
-
-Require properties:
-
-- compatible: must be "brcm,bcm63138-pmb"
-- reg: base register address and size for this bus controller
-- #reset-cells: must be 2 first cell is the address within the bus instance designated
-  by the phandle, and the second is the number of zones for this peripheral
-
-Example:
-	pmb0: reset-controller@4800c0 {
-		compatible = "brcm,bcm63138-pmb";
-		reg = <0x4800c0 0x10>;
-		#reset-cells = <2>;
-	};
diff --git a/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.yaml b/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.yaml
new file mode 100644
index 000000000000..162b4c472c18
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/brcm,bcm63138-pmb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM63138 Processor Monitor Bus
+
+description: This document describes the BCM63138 processor monitor bus.
+
+maintainers:
+  - Philipp Zabel <p.zabel@pengutronix.de>
+  - Kanak Shilledar <kanakshilledar111@protonmail.com>
+
+properties:
+  compatible:
+    const: brcm,bcm63138-pmb
+
+  reg:
+    description: base register address and size for this bus controller
+    maxItems: 1
+
+  "#reset-cells":
+    description: |
+      must be 2 first cell is the address within the bus instance
+      designated by the phandle, and the second is the number of zones
+      for this peripheral.
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    pmb0: reset-controller@4800c0 {
+        compatible = "brcm,bcm63138-pmb";
+        reg = <0x4800c0 0x10>;
+        #reset-cells = <2>;
+    };
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml
  2024-06-11  3:53 [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml Kanak Shilledar
@ 2024-06-11  5:30 ` Rob Herring (Arm)
  2024-06-11  6:58 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2024-06-11  5:30 UTC (permalink / raw)
  To: Kanak Shilledar
  Cc: Philipp Zabel, Rafał Miłecki,
	Broadcom internal kernel review list, William Zhang,
	Kanak Shilledar, Florian Fainelli, Krzysztof Kozlowski,
	linux-arm-kernel, Kursad Oney, devicetree, Conor Dooley,
	linux-kernel, Anand Gore


On Tue, 11 Jun 2024 09:23:23 +0530, Kanak Shilledar wrote:
> Convert the Broadcom BCM63138 Processor Monitor Bus to newer DT
> schema. Created DT schema based on the .txt file which had `compatible`,
> `reg` and `"#reset-cells" as required properties.
> Added one line description which was missing in the original .txt file.
> Added Philipp Zabel as the maintainer (took from MAINTAINERS file).
> 
> Signed-off-by: Kanak Shilledar <kanakshilledar@gmail.com>
> ---
>  .../bindings/reset/brcm,bcm63138-pmb.txt      | 19 --------
>  .../bindings/reset/brcm,bcm63138-pmb.yaml     | 43 +++++++++++++++++++
>  2 files changed, 43 insertions(+), 19 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
>  create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.yaml
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.example.dtb: reset-controller@4800c0: '#power-domain-cells' is a required property
	from schema $id: http://devicetree.org/schemas/power/brcm,bcm-pmb.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.example.dtb: reset-controller@4800c0: '#reset-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/power/brcm,bcm-pmb.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240611035329.33648-2-kanakshilledar@gmail.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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml
  2024-06-11  3:53 [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml Kanak Shilledar
  2024-06-11  5:30 ` Rob Herring (Arm)
@ 2024-06-11  6:58 ` Krzysztof Kozlowski
  2024-06-11  7:23   ` Kanak Shilledar
  1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-11  6:58 UTC (permalink / raw)
  To: Kanak Shilledar
  Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	William Zhang, Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list,
	Kanak Shilledar, devicetree, linux-arm-kernel, linux-kernel

On 11/06/2024 05:53, Kanak Shilledar wrote:
> Convert the Broadcom BCM63138 Processor Monitor Bus to newer DT
> schema. Created DT schema based on the .txt file which had `compatible`,
> `reg` and `"#reset-cells" as required properties.
> Added one line description which was missing in the original .txt file.
> Added Philipp Zabel as the maintainer (took from MAINTAINERS file).

One of the necessary steps EVERYTIME you make conversion of some random
binding is to grep. git grep. You grep for stale paths and usage of
compatible in DTS. Sometimes you find nothing, sometimes you would find
something.

`git grep bcm63138-pmb` gives you:
1. stale path which you did not fix,
2. duplicated schema...

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml
  2024-06-11  6:58 ` Krzysztof Kozlowski
@ 2024-06-11  7:23   ` Kanak Shilledar
  2024-06-11  8:14     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Kanak Shilledar @ 2024-06-11  7:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	William Zhang, Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list,
	Kanak Shilledar, devicetree, linux-arm-kernel, linux-kernel

On Tue, Jun 11, 2024 at 12:28 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 11/06/2024 05:53, Kanak Shilledar wrote:
> > Convert the Broadcom BCM63138 Processor Monitor Bus to newer DT
> > schema. Created DT schema based on the .txt file which had `compatible`,
> > `reg` and `"#reset-cells" as required properties.
> > Added one line description which was missing in the original .txt file.
> > Added Philipp Zabel as the maintainer (took from MAINTAINERS file).
>
> One of the necessary steps EVERYTIME you make conversion of some random
> binding is to grep. git grep. You grep for stale paths and usage of
> compatible in DTS. Sometimes you find nothing, sometimes you would find
> something.
>
> `git grep bcm63138-pmb` gives you:
> 1. stale path which you did not fix,
> 2. duplicated schema...

There is `brcm,bcm63138-pmb` defined in "/power/brcm,bcm-pmb.yaml" and
"/reset/brcm,bcm63138-pmb.txt" but they both are for different purposes.
By stale path are you referring that I will need to convert
"/arm/bcm/brcm,bcm63138.txt"
to DT Schema as well?

> Best regards,
> Krzysztof
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml
  2024-06-11  7:23   ` Kanak Shilledar
@ 2024-06-11  8:14     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-11  8:14 UTC (permalink / raw)
  To: Kanak Shilledar
  Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	William Zhang, Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list,
	Kanak Shilledar, devicetree, linux-arm-kernel, linux-kernel

On 11/06/2024 09:23, Kanak Shilledar wrote:
> On Tue, Jun 11, 2024 at 12:28 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 11/06/2024 05:53, Kanak Shilledar wrote:
>>> Convert the Broadcom BCM63138 Processor Monitor Bus to newer DT
>>> schema. Created DT schema based on the .txt file which had `compatible`,
>>> `reg` and `"#reset-cells" as required properties.
>>> Added one line description which was missing in the original .txt file.
>>> Added Philipp Zabel as the maintainer (took from MAINTAINERS file).
>>
>> One of the necessary steps EVERYTIME you make conversion of some random
>> binding is to grep. git grep. You grep for stale paths and usage of
>> compatible in DTS. Sometimes you find nothing, sometimes you would find
>> something.
>>
>> `git grep bcm63138-pmb` gives you:
>> 1. stale path which you did not fix,
>> 2. duplicated schema...
> 
> There is `brcm,bcm63138-pmb` defined in "/power/brcm,bcm-pmb.yaml" and
> "/reset/brcm,bcm63138-pmb.txt" but they both are for different purposes.

What do you mean by "different purposes"? It is the same device. You
cannot have same device with same compatible and two different bindings.
Testing also told you that: warnings.

> By stale path are you referring that I will need to convert
> "/arm/bcm/brcm,bcm63138.txt"
> to DT Schema as well?

No, I mean each wrong/stale path needs to be fixed. E.g. dropped or
updated, depending on the case.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-11  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  3:53 [PATCH] dt-bindings: reset: brcm,bcm63138-pmb: convert to yaml Kanak Shilledar
2024-06-11  5:30 ` Rob Herring (Arm)
2024-06-11  6:58 ` Krzysztof Kozlowski
2024-06-11  7:23   ` Kanak Shilledar
2024-06-11  8:14     ` Krzysztof Kozlowski

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).