1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/nvmem/qcom,qfprom.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Technologies Inc, QFPROM Efuse bindings
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12allOf:
13  - $ref: "nvmem.yaml#"
14
15properties:
16  compatible:
17    items:
18      - enum:
19          - qcom,apq8064-qfprom
20          - qcom,apq8084-qfprom
21          - qcom,ipq8064-qfprom
22          - qcom,msm8974-qfprom
23          - qcom,msm8916-qfprom
24          - qcom,msm8996-qfprom
25          - qcom,msm8998-qfprom
26          - qcom,qcs404-qfprom
27          - qcom,sc7180-qfprom
28          - qcom,sc7280-qfprom
29          - qcom,sdm630-qfprom
30          - qcom,sdm845-qfprom
31          - qcom,sm6115-qfprom
32      - const: qcom,qfprom
33
34  reg:
35    # If the QFPROM is read-only OS image then only the corrected region
36    # needs to be provided.  If the QFPROM is writable then all 4 regions
37    # must be provided.
38    oneOf:
39      - items:
40          - description: The corrected region.
41      - items:
42          - description: The corrected region.
43          - description: The raw region.
44          - description: The config region.
45          - description: The security control region.
46
47  # Clock must be provided if QFPROM is writable from the OS image.
48  clocks:
49    maxItems: 1
50  clock-names:
51    const: core
52
53  # Supply reference must be provided if QFPROM is writable from the OS image.
54  vcc-supply:
55    description: Our power supply.
56
57  power-domains:
58    maxItems: 1
59
60  # Needed if any child nodes are present.
61  "#address-cells":
62    const: 1
63  "#size-cells":
64    const: 1
65
66required:
67  - compatible
68  - reg
69
70unevaluatedProperties: false
71
72examples:
73  - |
74    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
75
76    soc {
77      #address-cells = <2>;
78      #size-cells = <2>;
79
80      efuse@784000 {
81        compatible = "qcom,sc7180-qfprom", "qcom,qfprom";
82        reg = <0 0x00784000 0 0x8ff>,
83              <0 0x00780000 0 0x7a0>,
84              <0 0x00782000 0 0x100>,
85              <0 0x00786000 0 0x1fff>;
86        clocks = <&gcc GCC_SEC_CTRL_CLK_SRC>;
87        clock-names = "core";
88        #address-cells = <1>;
89        #size-cells = <1>;
90
91        vcc-supply = <&vreg_l11a_1p8>;
92
93        hstx-trim-primary@25b {
94          reg = <0x25b 0x1>;
95          bits = <1 3>;
96        };
97      };
98    };
99
100  - |
101    soc {
102      #address-cells = <2>;
103      #size-cells = <2>;
104
105      efuse@784000 {
106        compatible = "qcom,sdm845-qfprom", "qcom,qfprom";
107        reg = <0 0x00784000 0 0x8ff>;
108        #address-cells = <1>;
109        #size-cells = <1>;
110
111        hstx-trim-primary@1eb {
112          reg = <0x1eb 0x1>;
113          bits = <1 4>;
114        };
115      };
116    };
117