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
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,ipq5332-qfprom
22          - qcom,ipq6018-qfprom
23          - qcom,ipq8064-qfprom
24          - qcom,ipq8074-qfprom
25          - qcom,ipq9574-qfprom
26          - qcom,msm8226-qfprom
27          - qcom,msm8916-qfprom
28          - qcom,msm8974-qfprom
29          - qcom,msm8976-qfprom
30          - qcom,msm8996-qfprom
31          - qcom,msm8998-qfprom
32          - qcom,qcm2290-qfprom
33          - qcom,qcs404-qfprom
34          - qcom,sc7180-qfprom
35          - qcom,sc7280-qfprom
36          - qcom,sdm630-qfprom
37          - qcom,sdm670-qfprom
38          - qcom,sdm845-qfprom
39          - qcom,sm6115-qfprom
40          - qcom,sm6350-qfprom
41          - qcom,sm6375-qfprom
42          - qcom,sm8150-qfprom
43          - qcom,sm8250-qfprom
44      - const: qcom,qfprom
45
46  reg:
47    # If the QFPROM is read-only OS image then only the corrected region
48    # needs to be provided.  If the QFPROM is writable then all 4 regions
49    # must be provided.
50    oneOf:
51      - items:
52          - description: The corrected region.
53      - items:
54          - description: The corrected region.
55          - description: The raw region.
56          - description: The config region.
57          - description: The security control region.
58
59  # Clock must be provided if QFPROM is writable from the OS image.
60  clocks:
61    maxItems: 1
62  clock-names:
63    const: core
64
65  # Supply reference must be provided if QFPROM is writable from the OS image.
66  vcc-supply:
67    description: Our power supply.
68
69  power-domains:
70    maxItems: 1
71
72required:
73  - compatible
74  - reg
75
76unevaluatedProperties: false
77
78examples:
79  - |
80    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
81
82    soc {
83      #address-cells = <2>;
84      #size-cells = <2>;
85
86      efuse@784000 {
87        compatible = "qcom,sc7180-qfprom", "qcom,qfprom";
88        reg = <0 0x00784000 0 0x8ff>,
89              <0 0x00780000 0 0x7a0>,
90              <0 0x00782000 0 0x100>,
91              <0 0x00786000 0 0x1fff>;
92        clocks = <&gcc GCC_SEC_CTRL_CLK_SRC>;
93        clock-names = "core";
94        #address-cells = <1>;
95        #size-cells = <1>;
96
97        vcc-supply = <&vreg_l11a_1p8>;
98
99        hstx-trim-primary@25b {
100          reg = <0x25b 0x1>;
101          bits = <1 3>;
102        };
103      };
104    };
105
106  - |
107    soc {
108      #address-cells = <2>;
109      #size-cells = <2>;
110
111      efuse@784000 {
112        compatible = "qcom,sdm845-qfprom", "qcom,qfprom";
113        reg = <0 0x00784000 0 0x8ff>;
114        #address-cells = <1>;
115        #size-cells = <1>;
116
117        hstx-trim-primary@1eb {
118          reg = <0x1eb 0x1>;
119          bits = <1 4>;
120        };
121      };
122    };
123