diff mbox series

[1/2] regulator: dt-bindings: pf9453: add new PMIC PF9453 support

Message ID 20241206-pf9453-v1-1-1e4685114271@nxp.com
State Changes Requested
Headers show
Series regulator: add new PMIC PF9453 support | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Frank Li Dec. 6, 2024, 8:32 p.m. UTC
From: Joy Zou <joy.zou@nxp.com>

Support new bindings PMIC PF9453, which is totally difference with existed
PCA9450, so create new file for it.

Signed-off-by: Joy Zou <joy.zou@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../bindings/regulator/nxp,pf9453-regulator.yaml   | 158 +++++++++++++++++++++
 1 file changed, 158 insertions(+)

Comments

Rob Herring Dec. 11, 2024, 4:35 p.m. UTC | #1
On Fri, Dec 06, 2024 at 03:32:40PM -0500, Frank Li wrote:
> From: Joy Zou <joy.zou@nxp.com>
> 
> Support new bindings PMIC PF9453, which is totally difference with existed
> PCA9450, so create new file for it.

You say that, but it is all the same custom properties as 
nxp,pca9450-regulator.yaml. It's only differring numbers of LDO and 
BUCK regulators AFAICT. It should be one schema.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf9453-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf9453-regulator.yaml
new file mode 100644
index 0000000000000..07e9c3d3efdff
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/nxp,pf9453-regulator.yaml
@@ -0,0 +1,158 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/nxp,pf9453-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PF9453 Power Management Integrated Circuit regulators
+
+maintainers:
+  - Joy Zou <joy.zou@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - nxp,pf9453
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    type: object
+    description: list of regulators provided by this controller
+
+    patternProperties:
+      "^LDO(1|2|_SNVS)$":
+        type: object
+        $ref: regulator.yaml#
+        description:
+          Properties for single LDO regulator.
+        unevaluatedProperties: false
+
+      "^BUCK[1-4]$":
+        type: object
+        $ref: regulator.yaml#
+        description:
+          Properties for single BUCK regulator.
+        unevaluatedProperties: false
+
+        properties:
+          nxp,dvs-run-voltage:
+            $ref: /schemas/types.yaml#/definitions/uint32
+            minimum: 600000
+            maximum: 2187500
+            description:
+              PMIC default "RUN" state voltage in uV. Only Buck2 have such
+              dvs(dynamic voltage scaling) property.
+
+          nxp,dvs-standby-voltage:
+            $ref: /schemas/types.yaml#/definitions/uint32
+            minimum: 600000
+            maximum: 2187500
+            description:
+              PMIC default "STANDBY" state voltage in uV. Only Buck2 have such
+              dvs(dynamic voltage scaling) property.
+
+    additionalProperties: false
+
+  sd-vsel-gpios:
+    description:
+      GPIO that is used to switch LDO5 between being configured by LDO5CTRL_L
+      or LDO5CTRL_H register. Use this if the SD_VSEL signal is connected to
+      a host GPIO.
+
+  nxp,i2c-lt-enable:
+    type: boolean
+    description:
+      Indicates that the I2C Level Translator is used.
+
+  nxp,wdog_b-warm-reset:
+    type: boolean
+    description:
+      When WDOG_B signal is asserted a warm reset will be done instead of cold
+      reset.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        pmic@32 {
+            compatible = "nxp,pf9453";
+            reg = <0x32>;
+            interrupt-parent = <&pcal6524>;
+            interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+
+            regulators {
+                BUCK1 {
+                    regulator-name = "BUCK1";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <3775000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                BUCK2 {
+                    regulator-name = "BUCK2";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <2187500>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                    regulator-ramp-delay = <12500>;
+                };
+
+                BUCK3 {
+                    regulator-name = "BUCK3";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <3775000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                BUCK4{
+                    regulator-name = "BUCK4";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <3775000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                LDO1 {
+                    regulator-name = "LDO1";
+                    regulator-min-microvolt = <800000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                LDO2 {
+                    regulator-name = "LDO2";
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <1950000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                LDO_SNVS {
+                    regulator-name = "LDO_SNVS";
+                    regulator-min-microvolt = <800000>;
+                    regulator-max-microvolt = <3000000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+            };
+        };
+    };