Skip to contentSkip to conversation

dt-bindings: power: reset: cortina,gemini-power-controller: convert to DT schema

PATCH Superseded Khushal Chitturi 5 participants 9 messages Mar 28 – Mar 30

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: power: reset: cortina,gemini-power-controller: convert to DT schema

Convert the Cortina Systems Gemini Poweroff Controller bindings to DT schema.

---
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings

 .../cortina,gemini-power-controller.yaml      | 42 +++++++++++++++++++
 .../bindings/power/reset/gemini-poweroff.txt  | 17 --------
 2 files changed, 42 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/power/reset/gemini-poweroff.txt
Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.yaml new file +42 -0
new file mode 100644
index 000000000000..1f9af7f34004
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/cortina,gemini-power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cortina Systems Gemini Poweroff Controller
+
+maintainers:
+  - Linus Walleij <[email protected]>
+
+description: |
+  The Gemini power controller is a dedicated IP block in the Cortina Gemini SoC that
+  controls system power-down operations.
+
+properties:
+  compatible:
+    const: cortina,gemini-power-controller
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    power-controller@4b000000 {
+      compatible = "cortina,gemini-power-controller";
+      reg = <0x4b000000 0x100>;
+      interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+    };
+...
Documentation/devicetree/bindings/power/reset/gemini-poweroff.txt deleted +0 -17
deleted file mode 100644
index 7fec3e100214..000000000000
@@ -1,17 +0,0 @@
-* Device-Tree bindings for Cortina Systems Gemini Poweroff
-
-This is a special IP block in the Cortina Gemini SoC that only
-deals with different ways to power the system down.
-
-Required properties:
-- compatible: should be "cortina,gemini-power-controller"
-- reg: should contain the physical memory base and size
-- interrupts: should contain the power management interrupt
-
-Example:
-
-power-controller@4b000000 {
-	compatible = "cortina,gemini-power-controller";
-	reg = <0x4b000000 0x100>;
-	interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
-};
Signature · 1 line
2.53.0
#1 lore raw
Quoted 9 lines · Khushal Chitturi

Convert the Cortina Systems Gemini Poweroff Controller bindings to DT schema.

---
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings

Quoted 6 lines
 .../cortina,gemini-power-controller.yaml      | 42 +++++++++++++++++++
 .../bindings/power/reset/gemini-poweroff.txt  | 17 --------
 2 files changed, 42 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/power/reset/gemini-poweroff.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/power/reset/cortina,gemini-power-controller.example.dtb: power-controller@4b000000 (cortina,gemini-power-controller): '#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/power/power-domain.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

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.

#2 lore raw
Quoted 3 lines · Rob Herring (Arm)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.example.dtb: power-controller@4b000000 (cortina,gemini-power-controller): '#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/power/power-domain.yaml

Weird, this power controller does not handle power domains whatsoever, it handles the mains power. So it should not have any power domain cells.

Is this the result of some regexp gone stray?

Yours,
Linus Walleij

#3 lore raw
Quoted 11 lines · Linus Walleij
Quoted 3 lines · Rob Herring (Arm)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.example.dtb: power-controller@4b000000 (cortina,gemini-power-controller): '#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/power/power-domain.yaml

Weird, this power controller does not handle power domains whatsoever, it handles the mains power. So it should not have any power domain cells.

Is this the result of some regexp gone stray?

The name "power controller" is used for power domain controller, so that's why this name must not be used for other use cases. Usual replacement is power-management, reboot, restart or poweroff, depending on what is the purpose of this device.

Best regards,
Krzysztof

Acked-by Rob Herring
#4 lore raw
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Linus Walleij
Quoted 3 lines · Rob Herring (Arm)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.example.dtb: power-controller@4b000000 (cortina,gemini-power-controller): '#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/power/power-domain.yaml

Weird, this power controller does not handle power domains whatsoever, it handles the mains power. So it should not have any power domain cells.

Quoted 6 lines
Quoted 1 line

Is this the result of some regexp gone stray?

The name "power controller" is used for power domain controller, so that's why this name must not be used for other use cases. Usual replacement is power-management, reboot, restart or poweroff, depending on what is the purpose of this device.

So in this case this is just a conversion of the 9 years old text document which is an as valid binding as any:

commit ba443b5ab454a9b5f49229a94b2dadf06ac8b79e

Author: Linus Walleij <[email protected]>
Date:   Sun Mar 12 23:36:01 2017 +0100

power: reset: Add Gemini poweroff DT bindings

This adds device tree bindings to the power management controller in the Gemini SoC.

The text document was conspiciously named "gemini-poweroff.txt" while the compatible is ""cortina,gemini-power-controller".

I don't know what came first, this binding or the convention of *-power-controller,
but it's solidly there for a while so we need to accomodate this, I guess worst case simply special-casing it?

Yours,
Linus Walleij

#5 lore raw

Hi,

Quoted 40 lines · Linus Walleij
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Linus Walleij
Quoted 3 lines · Rob Herring (Arm)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/power/reset/cortina,gemini-power-controller.example.dtb: power-controller@4b000000 (cortina,gemini-power-controller): '#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/power/power-domain.yaml

Weird, this power controller does not handle power domains whatsoever, it handles the mains power. So it should not have any power domain cells.

Quoted 6 lines
Quoted 1 line

Is this the result of some regexp gone stray?

The name "power controller" is used for power domain controller, so that's why this name must not be used for other use cases. Usual replacement is power-management, reboot, restart or poweroff, depending on what is the purpose of this device.

So in this case this is just a conversion of the 9 years old text document which is an as valid binding as any:

commit ba443b5ab454a9b5f49229a94b2dadf06ac8b79e

Author: Linus Walleij <[email protected]>
Date:   Sun Mar 12 23:36:01 2017 +0100

power: reset: Add Gemini poweroff DT bindings

This adds device tree bindings to the power management controller in the Gemini SoC.

Quoted 6 lines

The text document was conspiciously named "gemini-poweroff.txt" while the compatible is ""cortina,gemini-power-controller".

I don't know what came first, this binding or the convention of *-power-controller, but it's solidly there for a while so we need to accomodate this, I guess worst case simply special-casing it?

The problem is the node name (power-controller@4b000000), which is reserved for power domains. You can keep the compatible.

Greetings,

-- Sebastian

#6 lore raw
Quoted 2 lines · Sebastian Reichel

The problem is the node name (power-controller@4b000000), which is reserved for power domains. You can keep the compatible.

Ah, sweet, Khushal can you change this?

I think you can use gemini-poweroff@4b000000 because this is pretty much a poweroff thingie.

Yours,
Linus Walleij

#7 lore raw
Quoted 9 lines · Linus Walleij
Quoted 2 lines · Sebastian Reichel

The problem is the node name (power-controller@4b000000), which is reserved for power domains. You can keep the compatible.

Ah, sweet, Khushal can you change this?

I think you can use gemini-poweroff@4b000000 because this is pretty much a poweroff thingie.

So as I said - poweroff.

Best regards,
Krzysztof