diff mbox series

[2/3] dt-bindings: msm: Add QTI download mode support binding

Message ID 217c22d40e0a9db713e2a55623408eca88166897.1628757036.git.saiprakash.ranjan@codeaurora.org
State New
Headers show
Series soc: qcom: Add download mode support for QTI platforms | expand

Commit Message

Sai Prakash Ranjan Aug. 12, 2021, 9:17 a.m. UTC
Add device tree binding for QTI download mode cookies
region found in IMEM.

Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
---
 .../bindings/arm/msm/qcom,dload-mode.yaml     | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml

Comments

Rob Herring Aug. 17, 2021, 9:28 p.m. UTC | #1
On Thu, Aug 12, 2021 at 02:47:41PM +0530, Sai Prakash Ranjan wrote:
> Add device tree binding for QTI download mode cookies
> region found in IMEM.
> 
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> ---
>  .../bindings/arm/msm/qcom,dload-mode.yaml     | 53 +++++++++++++++++++
>  1 file changed, 53 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml
> new file mode 100644
> index 000000000000..90b9b6a9b75e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/msm/qcom,dload-mode.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Download Mode binding
> +
> +maintainers:
> +  - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> +
> +description:
> +  Qualcomm download mode cookies memory region in IMEM is used by SDI
> +  (System Debug Image) firmware to determine whether to enter download
> +  mode or not to collect ramdump for post mortem debug.
> +
> +properties:
> +  compatible:
> +    const: qcom,dload-mode
> +
> +  reg:
> +    maxItems: 1
> +
> +  qcom,sdi-disable-regs:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +    description:
> +      Phandle reference to a syscon representing TCSR followed by the
> +      offset and length for SDI disable register.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    imem@146aa000 {
> +      compatible = "simple-mfd";

If this is just internal RAM, then we already have a binding for it and 
'simple-mfd' is not it.

> +      reg = <0x146aa000 0x2000>;
> +
> +      #address-cells = <1>;
> +      #size-cells = <1>;
> +
> +      ranges = <0 0x146aa000 0x2000>;
> +
> +      dload-mode@1c00 {
> +        compatible = "qcom,dload-mode";
> +        reg = <0x1c00 0x1000>;

0x1c00 + 0x1000 > 0x2000


> +        qcom,sdi-disable-regs = <&tcsr_regs 0x3a000 0x4>;
> +      };
> +    };
> +...
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
> 
>
Sai Prakash Ranjan Aug. 18, 2021, 3:36 a.m. UTC | #2
On 2021-08-18 02:58, Rob Herring wrote:
> On Thu, Aug 12, 2021 at 02:47:41PM +0530, Sai Prakash Ranjan wrote:

>> Add device tree binding for QTI download mode cookies

>> region found in IMEM.

>> 

>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

>> ---

>>  .../bindings/arm/msm/qcom,dload-mode.yaml     | 53 

>> +++++++++++++++++++

>>  1 file changed, 53 insertions(+)

>>  create mode 100644 

>> Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml

>> 

>> diff --git 

>> a/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml 

>> b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml

>> new file mode 100644

>> index 000000000000..90b9b6a9b75e

>> --- /dev/null

>> +++ b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml

>> @@ -0,0 +1,53 @@

>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

>> +%YAML 1.2

>> +---

>> +$id: http://devicetree.org/schemas/arm/msm/qcom,dload-mode.yaml#

>> +$schema: http://devicetree.org/meta-schemas/core.yaml#

>> +

>> +title: Qualcomm Download Mode binding

>> +

>> +maintainers:

>> +  - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

>> +

>> +description:

>> +  Qualcomm download mode cookies memory region in IMEM is used by SDI

>> +  (System Debug Image) firmware to determine whether to enter 

>> download

>> +  mode or not to collect ramdump for post mortem debug.

>> +

>> +properties:

>> +  compatible:

>> +    const: qcom,dload-mode

>> +

>> +  reg:

>> +    maxItems: 1

>> +

>> +  qcom,sdi-disable-regs:

>> +    $ref: /schemas/types.yaml#/definitions/phandle-array

>> +    description:

>> +      Phandle reference to a syscon representing TCSR followed by the

>> +      offset and length for SDI disable register.

>> +

>> +required:

>> +  - compatible

>> +  - reg

>> +

>> +additionalProperties: false

>> +

>> +examples:

>> +  - |

>> +    imem@146aa000 {

>> +      compatible = "simple-mfd";

> 

> If this is just internal RAM, then we already have a binding for it and

> 'simple-mfd' is not it.

> 


Hmm, I followed qcom,pil-info.yaml as a reference but maybe that's old.

>> +      reg = <0x146aa000 0x2000>;

>> +

>> +      #address-cells = <1>;

>> +      #size-cells = <1>;

>> +

>> +      ranges = <0 0x146aa000 0x2000>;

>> +

>> +      dload-mode@1c00 {

>> +        compatible = "qcom,dload-mode";

>> +        reg = <0x1c00 0x1000>;

> 

> 0x1c00 + 0x1000 > 0x2000

> 


Sorry my mistake. I am dropping this series as we will move
to using PSCI_SYSTEM_RESET2 as detailed in cover letter.

Thanks,
Sai

> 

>> +        qcom,sdi-disable-regs = <&tcsr_regs 0x3a000 0x4>;

>> +      };

>> +    };

>> +...

>> --

>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a 

>> member

>> of Code Aurora Forum, hosted by The Linux Foundation

>> 

>> 


-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a 
member
of Code Aurora Forum, hosted by The Linux Foundation
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml
new file mode 100644
index 000000000000..90b9b6a9b75e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml
@@ -0,0 +1,53 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/msm/qcom,dload-mode.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Download Mode binding
+
+maintainers:
+  - Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
+
+description:
+  Qualcomm download mode cookies memory region in IMEM is used by SDI
+  (System Debug Image) firmware to determine whether to enter download
+  mode or not to collect ramdump for post mortem debug.
+
+properties:
+  compatible:
+    const: qcom,dload-mode
+
+  reg:
+    maxItems: 1
+
+  qcom,sdi-disable-regs:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      Phandle reference to a syscon representing TCSR followed by the
+      offset and length for SDI disable register.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    imem@146aa000 {
+      compatible = "simple-mfd";
+      reg = <0x146aa000 0x2000>;
+
+      #address-cells = <1>;
+      #size-cells = <1>;
+
+      ranges = <0 0x146aa000 0x2000>;
+
+      dload-mode@1c00 {
+        compatible = "qcom,dload-mode";
+        reg = <0x1c00 0x1000>;
+        qcom,sdi-disable-regs = <&tcsr_regs 0x3a000 0x4>;
+      };
+    };
+...