[PATCH 5/6] dt-bindings: mfd: mc13xxx: add pwrbutton dt support

Alexander Kurz posted 6 patches 1 month, 2 weeks ago
[PATCH 5/6] dt-bindings: mfd: mc13xxx: add pwrbutton dt support
Posted by Alexander Kurz 1 month, 2 weeks ago
The mc13xxx series features two or three power buttons that may be used
as input device. OF support will be added in a different commit.
Add a short documentation for it according to the reference- and User-
manuals of the mc13xxx series.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 .../devicetree/bindings/mfd/mc13xxx.txt       | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
index 8261ea73278a..3c7bad07858f 100644
--- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt
+++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
@@ -24,6 +24,15 @@ Sub-nodes:
   Documentation/devicetree/bindings/leds/common.txt.
 - regulators : Contain the regulator nodes. The regulators are bound using
   their names as listed below with their registers and bits for enabling.
+- pwrbuttons : Contains the onoff input button nodes.
+  - #address-cells: Must be 1.
+  - #size-cells: Must be 0.
+  - reg: Contains the BUTTON ID (see below)
+  - linux,code
+  - debounce-delay-value: debouncing selection of 0 (0ms), 1 (default 30ms),
+    2(150ms) or 3 (750ms).
+  - active-low
+  - enable-reset
 
 MC13783 LED IDs:
     0  : Main display
@@ -110,6 +119,20 @@ MC13892 regulators:
   The bindings details of individual regulator device can be found in:
   Documentation/devicetree/bindings/regulator/regulator.txt
 
+MC13783 BUTTON IDs:
+    0  : ONOFD1
+    1  : ONOFD2
+    2  : ONOFD3
+
+MC13892 BUTTON IDs:
+    0  : PWRON1
+    1  : PWRON2
+    2  : <not supported>
+
+MC34708 BUTTON IDs:
+    0  : PWRON1
+    1  : PWRON2
+
 Examples:
 
 ecspi@70010000 { /* ECSPI1 */
@@ -152,5 +175,17 @@ ecspi@70010000 { /* ECSPI1 */
 				regulator-always-on;
 			};
 		};
+
+		pwrbuttons {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			pwrbutton@0 {
+				reg = <0>;
+				linux,code = <KEY_POWER>;
+				debounce-delay-value = <2>;
+				active-low;
+				enable-reset;
+			};
+		};
 	};
 };
-- 
2.39.5
Re: [PATCH 5/6] dt-bindings: mfd: mc13xxx: add pwrbutton dt support
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 17/08/2025 12:27, Alexander Kurz wrote:
> diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
> index 8261ea73278a..3c7bad07858f 100644
> --- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt
> +++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
> @@ -24,6 +24,15 @@ Sub-nodes:
>    Documentation/devicetree/bindings/leds/common.txt.
>  - regulators : Contain the regulator nodes. The regulators are bound using
>    their names as listed below with their registers and bits for enabling.
> +- pwrbuttons : Contains the onoff input button nodes.
> +  - #address-cells: Must be 1.
> +  - #size-cells: Must be 0.
> +  - reg: Contains the BUTTON ID (see below)
> +  - linux,code
> +  - debounce-delay-value: debouncing selection of 0 (0ms), 1 (default 30ms),
> +    2(150ms) or 3 (750ms).
> +  - active-low
> +  - enable-reset

We do not take new properties in TXT format, especially entire device nodes.

Please convert the binding to DT schema first and then extend it.


Best regards,
Krzysztof