From b240562170c34ad647284623f0cb39deae4e9d3b Mon Sep 17 00:00:00 2001 From: Mohammed Aakib Patel Date: Tue, 13 May 2025 11:59:01 +0530 Subject: [PATCH] dt-bindings: add "qcom,no-nvmem-cell-support" for reboot reason Add "qcom,no-nvmem-cell-support" property for reboot-reason. Change-Id: I060546389c88be59bf3810e75b60c674b6e9d2a3 Signed-off-by: Mohammed Aakib Patel --- bindings/power/reset/qcom,reboot-reason.yaml | 37 ++++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/bindings/power/reset/qcom,reboot-reason.yaml b/bindings/power/reset/qcom,reboot-reason.yaml index 1f871355..588cf763 100644 --- a/bindings/power/reset/qcom,reboot-reason.yaml +++ b/bindings/power/reset/qcom,reboot-reason.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- -$id: "http://devicetree.org/schemas/power/reset/qcom-reboot-reason.yaml#" +$id: "http://devicetree.org/schemas/power/reset/qcom,reboot-reason.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" title: Qualcomm Technologies, Inc. Reboot Reason @@ -15,26 +15,35 @@ description: | restarting into a ramdump collection mode (CrashDump), or restarting into "emergency download mode". +allOf: + - $ref: /schemas/nvmem/nvmem-consumer.yaml# + properties: compatible: items: - const: qcom,reboot-mode - allOf: - - $ref: /schemas/nvmem/nvmem-consumer.yaml#/properties - - items: - nvmem-cell-names: - items: - - const: restart_reason + nvmem-cells: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: Phandle to the nvmem cell providing the reboot reason. + + nvmem-cell-names: + items: + - const: restart_reason + + qcom,no-nvmem-cell-support: + type: boolean + description: "bool property for device not having nvmem cell support." + required: - compatible - - nvmem-cells-names -dependencies: - allOf: - - $ref: /schemas/nvmem/nvmem-consumer.yaml#/dependencies +oneOf: + - required: [nvmem-cell-names] + - required: [qcom,no-nvmem-cell-support] +additionalProperties: false examples: - | @@ -43,3 +52,9 @@ examples: nvmem-cells = <&restart_reason>; nvmem-cell-names = "restart_reason"; }; + + - | + reboot-reason { + compatible = "qcom,reboot-reason"; + qcom,no-nvmem-cell-support; + }; \ No newline at end of file