xref: /linux/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml (revision c771600c6af14749609b49565ffb4cac2959710d)
1465c7756SSebastian Reichel# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2465c7756SSebastian Reichel%YAML 1.2
3465c7756SSebastian Reichel---
4465c7756SSebastian Reichel$id: http://devicetree.org/schemas/soc/imx/fsl,imx-anatop.yaml#
5465c7756SSebastian Reichel$schema: http://devicetree.org/meta-schemas/core.yaml#
6465c7756SSebastian Reichel
7465c7756SSebastian Reicheltitle: ANATOP register
8465c7756SSebastian Reichel
9465c7756SSebastian Reichelmaintainers:
10465c7756SSebastian Reichel  - Shawn Guo <shawnguo@kernel.org>
11465c7756SSebastian Reichel  - Sascha Hauer <s.hauer@pengutronix.de>
12465c7756SSebastian Reichel
13465c7756SSebastian Reichelproperties:
14465c7756SSebastian Reichel  compatible:
15465c7756SSebastian Reichel    oneOf:
16465c7756SSebastian Reichel      - items:
17465c7756SSebastian Reichel          - enum:
18465c7756SSebastian Reichel              - fsl,imx6sl-anatop
19465c7756SSebastian Reichel              - fsl,imx6sll-anatop
20465c7756SSebastian Reichel              - fsl,imx6sx-anatop
21465c7756SSebastian Reichel              - fsl,imx6ul-anatop
22465c7756SSebastian Reichel              - fsl,imx7d-anatop
23465c7756SSebastian Reichel          - const: fsl,imx6q-anatop
24465c7756SSebastian Reichel          - const: syscon
25465c7756SSebastian Reichel          - const: simple-mfd
26465c7756SSebastian Reichel      - items:
27465c7756SSebastian Reichel          - const: fsl,imx6q-anatop
28465c7756SSebastian Reichel          - const: syscon
29465c7756SSebastian Reichel          - const: simple-mfd
30465c7756SSebastian Reichel
31465c7756SSebastian Reichel  reg:
32465c7756SSebastian Reichel    maxItems: 1
33465c7756SSebastian Reichel
34465c7756SSebastian Reichel  interrupts:
35465c7756SSebastian Reichel    items:
36465c7756SSebastian Reichel      - description: Temperature sensor event
37465c7756SSebastian Reichel      - description: Brown-out event on either of the support regulators
38465c7756SSebastian Reichel      - description: Brown-out event on either the core, gpu or soc regulators
39644cb51eSFabio Estevam    minItems: 2
40465c7756SSebastian Reichel
41465c7756SSebastian Reichel  tempmon:
42465c7756SSebastian Reichel    type: object
43465c7756SSebastian Reichel    unevaluatedProperties: false
44465c7756SSebastian Reichel    $ref: /schemas/thermal/imx-thermal.yaml
45465c7756SSebastian Reichel
46465c7756SSebastian ReichelpatternProperties:
47*4cfa8c7eSFabio Estevam  "regulator-((1p1)|(2p5)|(3p0)|(vdd1p0d)|(vdd1p2)|(vddcore)|(vddpcie)|(vddpu)|(vddsoc))$":
48465c7756SSebastian Reichel    type: object
49465c7756SSebastian Reichel    unevaluatedProperties: false
50465c7756SSebastian Reichel    $ref: /schemas/regulator/anatop-regulator.yaml
51465c7756SSebastian Reichel
52465c7756SSebastian Reichelrequired:
53465c7756SSebastian Reichel  - compatible
54465c7756SSebastian Reichel  - reg
55465c7756SSebastian Reichel
56644cb51eSFabio EstevamallOf:
57644cb51eSFabio Estevam  - if:
58644cb51eSFabio Estevam      properties:
59644cb51eSFabio Estevam        compatible:
60644cb51eSFabio Estevam          contains:
61644cb51eSFabio Estevam            enum:
62644cb51eSFabio Estevam              - fsl,imx7d-anatop
63644cb51eSFabio Estevam    then:
64644cb51eSFabio Estevam      properties:
65644cb51eSFabio Estevam        interrupts:
66644cb51eSFabio Estevam          maxItems: 2
67644cb51eSFabio Estevam    else:
68644cb51eSFabio Estevam      properties:
69644cb51eSFabio Estevam        interrupts:
70644cb51eSFabio Estevam          minItems: 3
71644cb51eSFabio Estevam          maxItems: 3
72644cb51eSFabio Estevam
73465c7756SSebastian ReicheladditionalProperties: false
74465c7756SSebastian Reichel
75465c7756SSebastian Reichelexamples:
76465c7756SSebastian Reichel  - |
77465c7756SSebastian Reichel    #include <dt-bindings/clock/imx6ul-clock.h>
78465c7756SSebastian Reichel    #include <dt-bindings/interrupt-controller/arm-gic.h>
79465c7756SSebastian Reichel
80465c7756SSebastian Reichel    anatop: anatop@20c8000 {
81465c7756SSebastian Reichel        compatible = "fsl,imx6ul-anatop", "fsl,imx6q-anatop",
82465c7756SSebastian Reichel                     "syscon", "simple-mfd";
83465c7756SSebastian Reichel        reg = <0x020c8000 0x1000>;
84465c7756SSebastian Reichel        interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
85465c7756SSebastian Reichel                     <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
86465c7756SSebastian Reichel                     <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
87465c7756SSebastian Reichel
88465c7756SSebastian Reichel        reg_3p0: regulator-3p0 {
89465c7756SSebastian Reichel            compatible = "fsl,anatop-regulator";
90465c7756SSebastian Reichel            regulator-name = "vdd3p0";
91465c7756SSebastian Reichel            regulator-min-microvolt = <2625000>;
92465c7756SSebastian Reichel            regulator-max-microvolt = <3400000>;
93465c7756SSebastian Reichel            anatop-reg-offset = <0x120>;
94465c7756SSebastian Reichel            anatop-vol-bit-shift = <8>;
95465c7756SSebastian Reichel            anatop-vol-bit-width = <5>;
96465c7756SSebastian Reichel            anatop-min-bit-val = <0>;
97465c7756SSebastian Reichel            anatop-min-voltage = <2625000>;
98465c7756SSebastian Reichel            anatop-max-voltage = <3400000>;
99465c7756SSebastian Reichel            anatop-enable-bit = <0>;
100465c7756SSebastian Reichel        };
101465c7756SSebastian Reichel
102465c7756SSebastian Reichel        reg_arm: regulator-vddcore {
103465c7756SSebastian Reichel            compatible = "fsl,anatop-regulator";
104465c7756SSebastian Reichel            regulator-name = "cpu";
105465c7756SSebastian Reichel            regulator-min-microvolt = <725000>;
106465c7756SSebastian Reichel            regulator-max-microvolt = <1450000>;
107465c7756SSebastian Reichel            regulator-always-on;
108465c7756SSebastian Reichel            anatop-reg-offset = <0x140>;
109465c7756SSebastian Reichel            anatop-vol-bit-shift = <0>;
110465c7756SSebastian Reichel            anatop-vol-bit-width = <5>;
111465c7756SSebastian Reichel            anatop-delay-reg-offset = <0x170>;
112465c7756SSebastian Reichel            anatop-delay-bit-shift = <24>;
113465c7756SSebastian Reichel            anatop-delay-bit-width = <2>;
114465c7756SSebastian Reichel            anatop-min-bit-val = <1>;
115465c7756SSebastian Reichel            anatop-min-voltage = <725000>;
116465c7756SSebastian Reichel            anatop-max-voltage = <1450000>;
117465c7756SSebastian Reichel        };
118465c7756SSebastian Reichel
119465c7756SSebastian Reichel        reg_soc: regulator-vddsoc {
120465c7756SSebastian Reichel            compatible = "fsl,anatop-regulator";
121465c7756SSebastian Reichel            regulator-name = "vddsoc";
122465c7756SSebastian Reichel            regulator-min-microvolt = <725000>;
123465c7756SSebastian Reichel            regulator-max-microvolt = <1450000>;
124465c7756SSebastian Reichel            regulator-always-on;
125465c7756SSebastian Reichel            anatop-reg-offset = <0x140>;
126465c7756SSebastian Reichel            anatop-vol-bit-shift = <18>;
127465c7756SSebastian Reichel            anatop-vol-bit-width = <5>;
128465c7756SSebastian Reichel            anatop-delay-reg-offset = <0x170>;
129465c7756SSebastian Reichel            anatop-delay-bit-shift = <28>;
130465c7756SSebastian Reichel            anatop-delay-bit-width = <2>;
131465c7756SSebastian Reichel            anatop-min-bit-val = <1>;
132465c7756SSebastian Reichel            anatop-min-voltage = <725000>;
133465c7756SSebastian Reichel            anatop-max-voltage = <1450000>;
134465c7756SSebastian Reichel        };
135465c7756SSebastian Reichel
136465c7756SSebastian Reichel        tempmon: tempmon {
137465c7756SSebastian Reichel            compatible = "fsl,imx6ul-tempmon", "fsl,imx6sx-tempmon";
138465c7756SSebastian Reichel            interrupt-parent = <&gpc>;
139465c7756SSebastian Reichel            interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
140465c7756SSebastian Reichel            fsl,tempmon = <&anatop>;
141465c7756SSebastian Reichel            nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
142465c7756SSebastian Reichel            nvmem-cell-names = "calib", "temp_grade";
143465c7756SSebastian Reichel            clocks = <&clks IMX6UL_CLK_PLL3_USB_OTG>;
144465c7756SSebastian Reichel            #thermal-sensor-cells = <0>;
145465c7756SSebastian Reichel        };
146465c7756SSebastian Reichel    };
147