From 789f4b0eb316e0264d74e4b0f66326acfe8c2f32 Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 2 Aug 2023 16:14:50 -0700 Subject: [PATCH] dt-bindings: regulator: add QTI OCP notifier bindings documentation Add a bindings documentation file for QTI regulator over-current (OCP) notifier devices. These devices can be used to monitor and notifier consumers of regulator OCP and alarm events on certain Qualcomm Technologies, Inc. PMICs. A regulator alarm event occurs when the output voltage droops due to excessive current consumption which is lower than the over- current protection threshold. Change-Id: Id86cf62144c6e9f970cd09b7fe7a93ab40ef6cd8 Signed-off-by: David Collins --- bindings/regulator/qcom,ocp-notifier.yaml | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 bindings/regulator/qcom,ocp-notifier.yaml diff --git a/bindings/regulator/qcom,ocp-notifier.yaml b/bindings/regulator/qcom,ocp-notifier.yaml new file mode 100644 index 00000000..4ec3de88 --- /dev/null +++ b/bindings/regulator/qcom,ocp-notifier.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/regulator/qcom,ocp-notifier.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Technologies, Inc. Regulator Over-Current Notifier + +maintainers: + - David Collins + +description: | + This device provides support for logging and notifying consumers about + regulator over-current (OCP) and alarm (voltage droop) events on certain + Qualcomm Technologies, Inc. PMIC devices. This is useful for debugging as + well as for providing a more graceful recovery mechanism than resetting the + entire system. + +properties: + compatible: + const: qcom,regulator-ocp-notifier + + interrupts: + minItems: 1 + items: + - description: PMIC regulator OCP notification summary interrupt + - description: PMIC regulator alarm notification summary interrupt + + nvmem-cells: + minItems: 1 + items: + - description: PMIC regulator OCP log nvmem cell phandle + - description: PMIC regulator alarm log nvmem cell phandle + + nvmem-cell-names: + items: + - const: ocp_log + - const: alarm_log + +patternProperties: + "^periph-[0-9a-f]{3}-supply$": + description: | + phandle of the regulator device corresponding to the PMIC peripheral with + PPID equal to the hex value listed in the supply property name. + +required: + - compatible + - interrupts + - nvmem-cells + - nvmem-cell-names + +additionalProperties: false + +examples: + - | + #include + + regulator-ocp-notifier { + compatible = "qcom,regulator-ocp-notifier"; + interrupt-parent = <&spmi_bus>; + interrupts = <0x0 0x71 0x1 IRQ_TYPE_EDGE_RISING>, + <0x0 0x85 0x1 IRQ_TYPE_EDGE_RISING>; + nvmem-cells = <&ocp_log>, <&alarm_log>; + nvmem-cell-names = "ocp_log", "alarm_log"; + + periph-1c1-supply = <&L1B>; + periph-1c2-supply = <&L2B>; + periph-1c5-supply = <&L5B>; + };