1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/nvmem/imx-ocotp.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings
8
9maintainers:
10  - Anson Huang <Anson.Huang@nxp.com>
11
12description: |
13  This binding represents the on-chip eFuse OTP controller found on
14  i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL,
15  i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN and i.MX8MP SoCs.
16
17allOf:
18  - $ref: "nvmem.yaml#"
19
20properties:
21  compatible:
22    items:
23      - enum:
24        - fsl,imx6q-ocotp
25        - fsl,imx6sl-ocotp
26        - fsl,imx6sx-ocotp
27        - fsl,imx6ul-ocotp
28        - fsl,imx6ull-ocotp
29        - fsl,imx7d-ocotp
30        - fsl,imx6sll-ocotp
31        - fsl,imx7ulp-ocotp
32        - fsl,imx8mq-ocotp
33        - fsl,imx8mm-ocotp
34        - fsl,imx8mn-ocotp
35        - fsl,imx8mp-ocotp
36      - const: syscon
37
38  reg:
39    maxItems: 1
40
41  "#address-cells":
42    const: 1
43
44  "#size-cells":
45    const: 1
46
47  clocks:
48    maxItems: 1
49
50required:
51  - "#address-cells"
52  - "#size-cells"
53  - compatible
54  - reg
55
56patternProperties:
57  "^.*@[0-9a-f]+$":
58    type: object
59
60    properties:
61      reg:
62        maxItems: 1
63        description:
64          Offset and size in bytes within the storage device.
65
66    required:
67      - reg
68
69    additionalProperties: false
70
71examples:
72  - |
73    #include <dt-bindings/clock/imx6sx-clock.h>
74
75    ocotp: efuse@21bc000 {
76        #address-cells = <1>;
77        #size-cells = <1>;
78        compatible = "fsl,imx6sx-ocotp", "syscon";
79        reg = <0x021bc000 0x4000>;
80        clocks = <&clks IMX6SX_CLK_OCOTP>;
81
82        cpu_speed_grade: speed-grade@10 {
83            reg = <0x10 4>;
84        };
85
86        tempmon_calib: calib@38 {
87            reg = <0x38 4>;
88        };
89
90        tempmon_temp_grade: temp-grade@20 {
91            reg = <0x20 4>;
92        };
93    };
94
95...
96