diff mbox series

[v3,01/10] dt-bindings: mfd: common ROHM PMIC properties

Message ID dd3dce1f7dcc53aa3b8c3537f02e28957f5f8a11.1788346553.git.mazziesaccount@gmail.com
State New
Headers show
Series Support ROHM BD73800 | expand

Commit Message

Matti Vaittinen Sept. 2, 2026, 11:03 a.m. UTC
From: Matti Vaittinen <mazziesaccount@gmail.com>

ROHM PMICs keep having similar functionalities from one generation to the
next. Keeping the device-trees describing these functionalities similar
helps users because:
  1. They can re-use existing device-tree properties when switching from
     one project, using a ROHM PMIC, to next project using newer
     variant.
  2. The users can find and re-use examples from old projects - even if
     they never worked with ROHM PMICs before.
Similarly, introducing new and different properties for same
functionality previous variant had, will be adding confusion.

Sometimes the existing properties aren't 100% what reviewers would
prefer. When issues are minor or just cosmetic, changing the existing
properties is not feasible. Reviewers can't be expected to know which
properties are new, and which are existing - and this can lead to
unnecessary review discussion wasting time and energy from everyone.

Adding a common file for re-used ROHM PMIC properties should make it
clearly visible that a property is re-used, when a new PMIC binding
refers to this file instead of (re-)describing all the existing
bindings. This will also help keeping the common properties identical
across the variants.

Add new file listing commonly used ROHM PMIC properties.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>

---
Revision history:
 v3:
  - No changes
 v2:
  - New patch
---
 .../bindings/mfd/rohm,pmic-pins.yaml          | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/rohm,pmic-pins.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/rohm,pmic-pins.yaml b/Documentation/devicetree/bindings/mfd/rohm,pmic-pins.yaml
new file mode 100644
index 000000000000..0d1082804f5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/rohm,pmic-pins.yaml
@@ -0,0 +1,72 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/rohm,pmic-pins.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ROHM PMICs' OTP configured pin descriptions
+
+maintainers:
+  - Matti Vaittinen <mazziesaccount@gmail.com>
+
+description:
+  Collection of properties which are commonly used to describe various
+  ROHM PMIC's pins.
+
+properties:
+  rohm,clkout-open-drain:
+    description: clk32kout mode. Set to 1 for "open-drain" or 0 for "cmos"
+      a.k.a "push-pull".
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 1
+
+  rohm,pin-clkout:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      The IC has different OTP options to use clkout-pin for different
+      purposes. Set this property to indicate the OTP variant.
+
+      Many of the ROHM ICs have pins, which function can be defined in
+      OTP. Some of them provide no means to detect the pin configuration
+      at run-time, leaving software unaware of which features the IC
+      really has. These properties can be used to inform which pins
+      provide which functionality. IOW, these properties aren't used to
+      configure pin, they are used to tell what functionality pins on
+      this specific IC have.
+
+    # Supported functionalities depend on the exact IC model. Following
+    # values are already defined: gpi, gpo.
+    # Please, re-use them when adding new ICs.
+
+  rohm,pin-fault_b:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      The IC has different OTP options to use fault_b-pin for different
+      purposes. Set this property to indicate the OTP variant.
+
+    # Supported functionalities depend on the exact IC model. Following
+    # values are already defined: gpi, gpo, faultb, readyind, pwrseq.
+    # Please, re-use them when adding new ICs.
+
+patternProperties:
+  "^rohm,pin-dvs[0-1]$":
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      The IC has different OTP options to use dvs<X>-pins for different
+      purposes. Set this property to indicate the OTP variant.
+    # Supported functionalities depend on the exact IC model. Following
+    # values are already defined: dvs-input, gpi, gpo, pwrseq.
+    # Please, re-use them when adding new ICs.
+
+  "^rohm,pin-exten([0-1])?$":
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      The IC has an OTP option to use exten -pin(s) for different purposes.
+      Set this property to indicate the OTP variant.
+    # Supported functionalities depend on the exact IC model. Following
+    # values are already defined: gpi, gpo, pwrseq.
+    # Please, re-use them when adding new ICs.
+
+# The schema is expected to be reference by IC schemas, which may introduce
+# other properties that must be allowed.
+additionalProperties: true