public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema
@ 2026-04-22 20:02 Shaunak Datar
  2026-04-22 21:22 ` Rob Herring (Arm)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Shaunak Datar @ 2026-04-22 20:02 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt
  Cc: devicetree, puck.chen, daniel.lezcano, Shaunak Datar

Convert the Hisilicon Hi655x PMIC binding from the text format to DT schema
to enable dtbs_check validation
Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
---
 .../bindings/mfd/hisilicon,hi655x-pmic.yaml   | 89 +++++++++++++++++++
 .../bindings/mfd/hisilicon,hi655x.txt         | 33 -------
 2 files changed, 89 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt

diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
new file mode 100644
index 000000000000..1bed57003bd2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/hisilicon,hi655x-pmic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Hi655x Power Management Integrated Circuit
+
+maintainers:
+  - Chen Feng <puck.chen@hisilicon.com>
+  - Daniel Lezcano <daniel.lezcano@kernel.org>
+
+description:
+  The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
+  Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
+  We can use memory-mapped I/O to communicate.
+
+properties:
+  $nodename:
+    pattern: "pmic@[0-9a-f]"
+
+  compatible:
+    const: hisilicon,hi655x-pmic
+
+  reg:
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+
+  pmic-gpios:
+    maxItems: 1
+    description: The GPIO used by PMIC IRQ
+
+  '#clock-cells':
+    const: 0
+
+  clock-output-names:
+    maxItems: 1
+
+  regulators:
+    type: object
+    additionalProperties: false
+
+    patternProperties:
+      '^LDO[0-9]+$':
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - '#interrupt-cells'
+  - pmic-gpios
+  - '#clock-cells'
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    / {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        pmic: pmic@f8000000 {
+            compatible = "hisilicon,hi655x-pmic";
+            reg = <0x0 0xf8000000 0x0 0x1000>;
+            #clock-cells = <0>;
+            interrupt-controller;
+            #interrupt-cells = <2>;
+            pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+
+            regulators {
+                ldo2: LDO2 {
+                    regulator-name = "LDO2_2V8";
+                    regulator-min-microvolt = <2500000>;
+                    regulator-max-microvolt = <3200000>;
+                    regulator-enable-ramp-delay = <120>;
+                };
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
deleted file mode 100644
index 9630ac0e4b56..000000000000
--- a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Hisilicon Hi655x Power Management Integrated Circuit (PMIC)
-
-The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
-Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
-We can use memory-mapped I/O to communicate.
-
-+----------------+             +-------------+
-|                |             |             |
-|    Hi6220      |   SSI bus   |   Hi655x    |
-|                |-------------|             |
-|                |(REGMAP_MMIO)|             |
-+----------------+             +-------------+
-
-Required properties:
-- compatible:           Should be "hisilicon,hi655x-pmic".
-- reg:                  Base address of PMIC on Hi6220 SoC.
-- interrupt-controller: Hi655x has internal IRQs (has own IRQ domain).
-- pmic-gpios:           The GPIO used by PMIC IRQ.
-- #clock-cells:		From common clock binding; shall be set to 0
-
-Optional properties:
-- clock-output-names: From common clock binding to override the
-  default output clock name
-
-Example:
-	pmic: pmic@f8000000 {
-		compatible = "hisilicon,hi655x-pmic";
-		reg = <0x0 0xf8000000 0x0 0x1000>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-		#clock-cells = <0>;
-	}
-- 
2.53.0


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

* Re: [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema
  2026-04-22 20:02 [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema Shaunak Datar
@ 2026-04-22 21:22 ` Rob Herring (Arm)
  2026-04-23  9:05 ` Krzysztof Kozlowski
  2026-04-23 11:32 ` [PATCH v2] " Shaunak Datar
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2026-04-22 21:22 UTC (permalink / raw)
  To: Shaunak Datar
  Cc: krzk+dt, puck.chen, devicetree, conor+dt, lee, daniel.lezcano


On Thu, 23 Apr 2026 01:32:00 +0530, Shaunak Datar wrote:
> Convert the Hisilicon Hi655x PMIC binding from the text format to DT schema
> to enable dtbs_check validation
> Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
> ---
>  .../bindings/mfd/hisilicon,hi655x-pmic.yaml   | 89 +++++++++++++++++++
>  .../bindings/mfd/hisilicon,hi655x.txt         | 33 -------
>  2 files changed, 89 insertions(+), 33 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
> 

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/mfd/hisilicon,hi655x-pmic.example.dtb: /: 'compatible' is a required property
	from schema $id: http://devicetree.org/schemas/root-node.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.example.dtb: /: 'model' is a required property
	from schema $id: http://devicetree.org/schemas/root-node.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/20260422200200.126728-1-shaunakkdatar@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: mfd: hisilicon,hi655x-pmic: Convert to DT schema
  2026-04-22 20:02 [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema Shaunak Datar
  2026-04-22 21:22 ` Rob Herring (Arm)
@ 2026-04-23  9:05 ` Krzysztof Kozlowski
  2026-04-23 11:32 ` [PATCH v2] " Shaunak Datar
  2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-23  9:05 UTC (permalink / raw)
  To: Shaunak Datar
  Cc: lee, robh, krzk+dt, conor+dt, devicetree, puck.chen,
	daniel.lezcano

On Thu, Apr 23, 2026 at 01:32:00AM +0530, Shaunak Datar wrote:
> Convert the Hisilicon Hi655x PMIC binding from the text format to DT schema
> to enable dtbs_check validation

Missing blank line

> Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
> ---
>  .../bindings/mfd/hisilicon,hi655x-pmic.yaml   | 89 +++++++++++++++++++
>  .../bindings/mfd/hisilicon,hi655x.txt         | 33 -------
>  2 files changed, 89 insertions(+), 33 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
> new file mode 100644
> index 000000000000..1bed57003bd2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/hisilicon,hi655x-pmic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Hisilicon Hi655x Power Management Integrated Circuit
> +
> +maintainers:
> +  - Chen Feng <puck.chen@hisilicon.com>
> +  - Daniel Lezcano <daniel.lezcano@kernel.org>
> +
> +description:
> +  The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
> +  Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
> +  We can use memory-mapped I/O to communicate.
> +
> +properties:
> +  $nodename:
> +    pattern: "pmic@[0-9a-f]"

Drop

> +
> +  compatible:
> +    const: hisilicon,hi655x-pmic
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  '#interrupt-cells':
> +    const: 2
> +
> +  pmic-gpios:
> +    maxItems: 1
> +    description: The GPIO used by PMIC IRQ
> +
> +  '#clock-cells':
> +    const: 0
> +
> +  clock-output-names:
> +    maxItems: 1
> +
> +  regulators:

There was no such property/child before, so this must be explained in
the commit msg.

> +    type: object
> +    additionalProperties: false
> +
> +    patternProperties:
> +      '^LDO[0-9]+$':

Why 9999 regulators is valid? This is usually constrained, because
device has a very specific number of regulators.

Also, name should be 'ldo' if this is a new binding. If this is not new,
you must explain WHY you are doing these changes to the binding.

> +        type: object
> +        $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupt-controller
> +  - '#interrupt-cells'
> +  - pmic-gpios
> +  - '#clock-cells'
> +  - regulators

And why is this required?

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    / {

Drop and use 1 as address/size-cells. Or 'soc' like in other bindings.


> +        #address-cells = <2>;
> +        #size-cells = <2>;
> +

Best regards,
Krzysztof


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

* [PATCH v2] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema
  2026-04-22 20:02 [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema Shaunak Datar
  2026-04-22 21:22 ` Rob Herring (Arm)
  2026-04-23  9:05 ` Krzysztof Kozlowski
@ 2026-04-23 11:32 ` Shaunak Datar
  2026-04-25  9:51   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 5+ messages in thread
From: Shaunak Datar @ 2026-04-23 11:32 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt; +Cc: devicetree, daniel.lezcano, Shaunak Datar

Convert the Hisilicon Hi655x PMIC binding from the text format to DT schema
to enable dtbs_check validation.

The 'regulators' child node is added based on existing usage in
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts, which defines child
regulator nodes not documented in the original .txt binding.

The uppercase LDO names are retained to match existing DTS usage.

Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
---
Changes in v2:
- Drop the $nodename property
- Constrain LDO according to actual hardware regulators
- Drop 'regulators' from required list
- Drop example root node wrapper and use 1 address/size cell.
- Elaborate about 'regulators' addition and uppercase LDO naming in the
  commit message

 .../bindings/mfd/hisilicon,hi655x-pmic.yaml   | 80 +++++++++++++++++++
 .../bindings/mfd/hisilicon,hi655x.txt         | 33 --------
 2 files changed, 80 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt

diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
new file mode 100644
index 000000000000..6f28f472e0f5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x-pmic.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/hisilicon,hi655x-pmic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Hi655x Power Management Integrated Circuit
+
+maintainers:
+  - Chen Feng <puck.chen@hisilicon.com>
+  - Daniel Lezcano <daniel.lezcano@kernel.org>
+
+description:
+  The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
+  Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
+  We can use memory-mapped I/O to communicate.
+
+properties:
+  compatible:
+    const: hisilicon,hi655x-pmic
+
+  reg:
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+
+  pmic-gpios:
+    maxItems: 1
+    description: The GPIO used by PMIC IRQ
+
+  '#clock-cells':
+    const: 0
+
+  clock-output-names:
+    maxItems: 1
+
+  regulators:
+    type: object
+    additionalProperties: false
+
+    patternProperties:
+      '^LDO(2|7|10|13|14|15|17|19|21|22)$':
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - '#interrupt-cells'
+  - pmic-gpios
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    pmic: pmic@f8000000 {
+        compatible = "hisilicon,hi655x-pmic";
+        reg = <0xf8000000 0x1000>;
+        #clock-cells = <0>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+
+        regulators {
+            ldo2: LDO2 {
+                regulator-name = "LDO2_2V8";
+                regulator-min-microvolt = <2500000>;
+                regulator-max-microvolt = <3200000>;
+                regulator-enable-ramp-delay = <120>;
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt b/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
deleted file mode 100644
index 9630ac0e4b56..000000000000
--- a/Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Hisilicon Hi655x Power Management Integrated Circuit (PMIC)
-
-The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
-Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
-We can use memory-mapped I/O to communicate.
-
-+----------------+             +-------------+
-|                |             |             |
-|    Hi6220      |   SSI bus   |   Hi655x    |
-|                |-------------|             |
-|                |(REGMAP_MMIO)|             |
-+----------------+             +-------------+
-
-Required properties:
-- compatible:           Should be "hisilicon,hi655x-pmic".
-- reg:                  Base address of PMIC on Hi6220 SoC.
-- interrupt-controller: Hi655x has internal IRQs (has own IRQ domain).
-- pmic-gpios:           The GPIO used by PMIC IRQ.
-- #clock-cells:		From common clock binding; shall be set to 0
-
-Optional properties:
-- clock-output-names: From common clock binding to override the
-  default output clock name
-
-Example:
-	pmic: pmic@f8000000 {
-		compatible = "hisilicon,hi655x-pmic";
-		reg = <0x0 0xf8000000 0x0 0x1000>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-		#clock-cells = <0>;
-	}
-- 
2.53.0


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

* Re: [PATCH v2] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema
  2026-04-23 11:32 ` [PATCH v2] " Shaunak Datar
@ 2026-04-25  9:51   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-25  9:51 UTC (permalink / raw)
  To: Shaunak Datar; +Cc: lee, robh, krzk+dt, conor+dt, devicetree, daniel.lezcano

On Thu, Apr 23, 2026 at 05:02:37PM +0530, Shaunak Datar wrote:
> Convert the Hisilicon Hi655x PMIC binding from the text format to DT schema
> to enable dtbs_check validation.
> 
> The 'regulators' child node is added based on existing usage in
> arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts, which defines child
> regulator nodes not documented in the original .txt binding.
> 
> The uppercase LDO names are retained to match existing DTS usage.
> 
> Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
> ---
> Changes in v2:
> - Drop the $nodename property
> - Constrain LDO according to actual hardware regulators
> - Drop 'regulators' from required list
> - Drop example root node wrapper and use 1 address/size cell.
> - Elaborate about 'regulators' addition and uppercase LDO naming in the
>   commit message

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>


In the future (no need to resend):
Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof


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

end of thread, other threads:[~2026-04-25  9:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 20:02 [PATCH] dt-bindings: mfd: hisilicon,hi655x-pmic: Convert to DT schema Shaunak Datar
2026-04-22 21:22 ` Rob Herring (Arm)
2026-04-23  9:05 ` Krzysztof Kozlowski
2026-04-23 11:32 ` [PATCH v2] " Shaunak Datar
2026-04-25  9:51   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox