]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regulator: dt-bindings: dlg,da9121: Add dlg,no-gpio-control
authorAndré Svensson <andre.svensson@axis.com>
Fri, 20 Mar 2026 07:33:24 +0000 (08:33 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 24 Mar 2026 19:37:44 +0000 (19:37 +0000)
Add the optional boolean property dlg,no-gpio-control. When present, it
indicates that no DA91xx GPIO pins are configured/used with functions
RELOAD/DVC/EN, which can affect the output voltage control, regulator
mode control and enable signal control.

The absence of relevant GPIO DT properties does not imply that the
RELOAD/DVC/EN GPIO functions are unused. These functions are provided by
DA91xx GPIO pins and may be controlled by external hardware without
corresponding GPIO DT properties. The dlg,no-gpio-control property
explicitly indicates that none of these GPIO functions are used.

It is mutually exclusive with enable-gpios, regardless of whether the
referenced GPIO is connected to a GPIO pin or the IC_EN pin, since
enable-gpios allows the regulator to be controlled via an external
hardware signal.

Co-developed-by: Waqar Hameed <waqar.hameed@axis.com>
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Signed-off-by: André Svensson <andre.svensson@axis.com>
Link: https://patch.msgid.link/20260320-no-gpio-control-v2-1-dbc938e462cb@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/dlg,da9121.yaml

index 13b3f75f8e5e3fde70e2509a19f36ad960881241..ce76eb5b85bd4528f10daea016276e6b6ecc883c 100644 (file)
@@ -81,6 +81,14 @@ properties:
       Specify the polling period, measured in milliseconds, between interrupt status
       update checks. Range 1000-10000 ms.
 
+  dlg,no-gpio-control:
+    type: boolean
+    description: |
+      Available GPIO input pins of the regulator are strapped to fixed levels, therefore
+      GPIO configurable input functions, DVC/RELOAD/EN, cannot dynamically update BUCK
+      registers. GPIO pins connected as output pins are not required to be strapped to a
+      fixed level. Not allowed together with enable-gpios.
+
   regulators:
     type: object
     additionalProperties: false
@@ -134,6 +142,17 @@ allOf:
           properties:
             buck2: false
 
+  - if:
+      required:
+        - dlg,no-gpio-control
+    then:
+      properties:
+        regulators:
+          patternProperties:
+            "^buck([1-2])$":
+              properties:
+                enable-gpios: false
+
 additionalProperties: false
 
 examples:
@@ -168,6 +187,36 @@ examples:
       };
     };
 
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      pmic@68 {
+        compatible = "dlg,da9121";
+        reg = <0x68>;
+
+        interrupt-parent = <&gpio6>;
+        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+
+        dlg,irq-polling-delay-passive-ms = <2000>;
+        dlg,no-gpio-control;
+
+        regulators {
+          DA9121_BUCK: buck1 {
+            regulator-name = "BUCK1";
+            regulator-min-microvolt = <300000>;
+            regulator-max-microvolt = <1900000>;
+            regulator-min-microamp = <7000000>;
+            regulator-max-microamp = <20000000>;
+            regulator-boot-on;
+            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
+          };
+        };
+      };
+    };
+
   - |
     #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/interrupt-controller/irq.h>