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