[PATCH v6 3/8] dt-bindings: mfd: pm8008: Add mode constants for PM8010 regulators

From: Jishnu Prakash

Date: Fri Dec 04 2026 - 00:51:10 EST


Add macros for the raw mode values to be used by the PM8010
regulator-allowed-modes and regulator-initial-mode device tree
properties.

Also constrain the regulator-allowed-modes and regulator-initial-mode
properties in the qcom,pm8008 binding to the values of these new macros.
Mode voting is supported in HW only for LDO1 and LDO2 of PM8010, so add
constraints to reflect this too.

Signed-off-by: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/mfd/qcom,pm8008.yaml | 33 +++++++++++++++++++++-
.../dt-bindings/regulator/qcom,pm8008-regulator.h | 19 +++++++++++++
2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
index 2701aa755f31..64d4e26d16fa 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
@@ -82,11 +82,42 @@ properties:
type: object
additionalProperties: false
patternProperties:
- "^ldo[1-7]$":
+ "^ldo[1-2]$":
type: object
$ref: /schemas/regulator/regulator.yaml#
+
+ properties:
+ regulator-allowed-modes:
+ items:
+ enum: [ 0, 1 ]
+ regulator-initial-mode:
+ enum: [ 0, 1 ]
+ unevaluatedProperties: false
+
+ "^ldo[3-7]$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+
+ properties:
+ regulator-allowed-modes: false
+ regulator-initial-mode: false
unevaluatedProperties: false

+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,pm8008
+ then:
+ properties:
+ regulators:
+ patternProperties:
+ "^ldo[1-2]$":
+ properties:
+ regulator-allowed-modes: false
+ regulator-initial-mode: false
+
required:
- compatible
- reg
diff --git a/include/dt-bindings/regulator/qcom,pm8008-regulator.h b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
new file mode 100644
index 000000000000..26d5d5c427c9
--- /dev/null
+++ b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
+
+#ifndef __QCOM_PM8008_REGULATOR_H
+#define __QCOM_PM8008_REGULATOR_H
+
+/*
+ * These constants may be used to specify modes for PM8010 regulator device
+ * tree properties.
+ *
+ * PM8010_REGULATOR_MODE_LPM: Low power mode in which a small load current
+ * is allowed.
+ * PM8010_REGULATOR_MODE_NPM: Normal power mode in which the full rated
+ * current of the LDO is allowed.
+ */
+#define PM8010_REGULATOR_MODE_LPM 0
+#define PM8010_REGULATOR_MODE_NPM 1
+
+#endif

--
2.43.0