From 1fa42c98bdde4660db4491163d25534302afa75f Mon Sep 17 00:00:00 2001 From: Yuanfang Zhang Date: Thu, 10 Aug 2023 20:20:47 -0700 Subject: [PATCH] dt-bindings: soc: qcom: Add documentation for dcc and memory-dump Add documentation for dcc and memory-dump driver. Change-Id: Iadca5ac385af2f79c8f8449cd5a538f24815b436 Signed-off-by: Yuanfang Zhang --- bindings/soc/qcom/qcom,dcc.yaml | 46 ++++++++++++++++ bindings/soc/qcom/qcom,memory-dump.yaml | 71 +++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 bindings/soc/qcom/qcom,dcc.yaml create mode 100644 bindings/soc/qcom/qcom,memory-dump.yaml diff --git a/bindings/soc/qcom/qcom,dcc.yaml b/bindings/soc/qcom/qcom,dcc.yaml new file mode 100644 index 00000000..04312383 --- /dev/null +++ b/bindings/soc/qcom/qcom,dcc.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,dcc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: The document describes the device tree binding for qcom dcc. + +maintainers: + - Yuanfang Zhang + +description: + DCC driver provides interface to configure DCC block and read back captured + data from DCC's internal SRAM. + +properties: + compatible: + items: + - const: qcom,dcc-v2 + + reg: + maxItems: 2 + description: + physical base address and length of the register set(s), SRAM of the component. + + reg-names: + minItems: 2 + items: + - const: dcc-base + - const: dcc-ram-base + +required: + - compatible + - reg + - reg-manes + +additionalProperties: false + +examples: + - | + dcc@4b3000 { + compatible = "qcom,dcc-v2"; + reg = <0x4b3000 0x1000>, + <0x4b4000 0x2000>; + reg-names = "dcc-base", "dcc-ram-base"; + }; diff --git a/bindings/soc/qcom/qcom,memory-dump.yaml b/bindings/soc/qcom/qcom,memory-dump.yaml new file mode 100644 index 00000000..7b4723b5 --- /dev/null +++ b/bindings/soc/qcom/qcom,memory-dump.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,memory-dump.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: The document describes the device tree binding for qcom memory dump. + +maintainers: + - Yuanfang Zhang + +description: + QTI memory dump driver allows various client subsystems to register and + allocate respective dump regions. At the time of deadlocks or cpu hangs + these dump regions are captured to give a snapshot of the system at the + time of the crash. + +properties: + compatible: + items: + - const: qcom,mem-dump + + memory-region: + $ref: '/schemas/types.yaml#/definitions/phandle' + maxItems: 1 + description: | + CMA region which is owned by this device. + +required: + - compatible + - memory-region + +additionalProperties: false + +patternProperties: + "[A-Za-z0-9_]+": + type: object + description: + dump entry for subsystem client. + + properties: + qcom,dump-size: + maxItems: 1 + description: + The size of memory that needs to be allocated for the + particular node. + + qcom,dump-id: + maxItems: 1 + description: + The ID within the data dump table where this entry needs + to be added. + + required: + - qcom,dump-size + - qcom,dump-id + + additionalProperties: false + +examples: + - | + mem_dump { + compatible = "qcom,mem-dump"; + memory-region = <&dump_mem>; + + rpmh_dump { + qcom,dump-size = <0x2000000>; + qcom,dump-id = <0xEC>; + }; + }; +