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