Skip to content

Commit 19cd2b1

Browse files
krzkbroonie
authored andcommitted
regulator: dt-bindings: maxim,max8973: convert to dtschema
Convert the Maxim MAX8973 regulator to DT schema format. Extend the examples with more advanced one for MAX77621 copied from kernel's nvidia/tegra210-smaug.dts, licensed under GPL-2.0. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Message-Id: <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 1d2104f commit 19cd2b1

File tree

2 files changed

+139
-52
lines changed

2 files changed

+139
-52
lines changed

Documentation/devicetree/bindings/regulator/max8973-regulator.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/maxim,max8973.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Maxim MAX8973/MAX77621 voltage regulator
8+
9+
maintainers:
10+
- Krzysztof Kozlowski <[email protected]>
11+
12+
allOf:
13+
- $ref: regulator.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- maxim,max8973
19+
- maxim,max77621
20+
21+
junction-warn-millicelsius:
22+
description: |
23+
Junction warning temperature threshold in millicelsius. If die
24+
temperature crosses this level then device generates the warning
25+
interrupts.
26+
Please note that thermal functionality is only supported on MAX77621. The
27+
supported threshold warning temperature for MAX77621 are 120 degC and 140
28+
degC.
29+
30+
maxim,dvs-gpio:
31+
maxItems: 1
32+
description: |
33+
GPIO which is connected to DVS pin of device.
34+
35+
maxim,dvs-default-state:
36+
$ref: /schemas/types.yaml#/definitions/uint32
37+
enum: [0, 1]
38+
description: |
39+
Default state of GPIO during initialisation.
40+
1 for HIGH and 0 for LOW.
41+
42+
maxim,externally-enable:
43+
type: boolean
44+
description: |
45+
Externally control the regulator output enable/disable.
46+
47+
maxim,enable-gpio:
48+
maxItems: 1
49+
description: |
50+
GPIO for enable control. If the valid GPIO is provided then externally
51+
enable control will be considered.
52+
53+
maxim,enable-remote-sense:
54+
type: boolean
55+
description: Enable remote sense.
56+
57+
maxim,enable-falling-slew-rate:
58+
type: boolean
59+
description: Enable falling slew rate.
60+
61+
maxim,enable-active-discharge:
62+
type: boolean
63+
description: Eable active discharge.
64+
65+
maxim,enable-frequency-shift:
66+
type: boolean
67+
description: Enable 9% frequency shift.
68+
69+
maxim,enable-bias-control:
70+
type: boolean
71+
description: |
72+
Enable bias control which can reduce the startup delay to 20us from 220us.
73+
74+
maxim,enable-etr:
75+
type: boolean
76+
description: Enable Enhanced Transient Response.
77+
78+
maxim,enable-high-etr-sensitivity:
79+
type: boolean
80+
description: |
81+
Enhanced transient response circuit is enabled and set for high
82+
sensitivity. If this property is available then etr will be enable
83+
default.
84+
Enhanced transient response (ETR) will affect the configuration of CKADV.
85+
86+
reg:
87+
maxItems: 1
88+
89+
required:
90+
- compatible
91+
- reg
92+
93+
unevaluatedProperties: false
94+
95+
examples:
96+
- |
97+
i2c {
98+
#address-cells = <1>;
99+
#size-cells = <0>;
100+
101+
regulator@1b {
102+
compatible = "maxim,max8973";
103+
reg = <0x1b>;
104+
105+
regulator-min-microvolt = <935000>;
106+
regulator-max-microvolt = <1200000>;
107+
regulator-boot-on;
108+
regulator-always-on;
109+
};
110+
};
111+
112+
- |
113+
#include <dt-bindings/gpio/tegra-gpio.h>
114+
#include <dt-bindings/interrupt-controller/irq.h>
115+
116+
i2c {
117+
#address-cells = <1>;
118+
#size-cells = <0>;
119+
120+
regulator@1b {
121+
compatible = "maxim,max77621";
122+
reg = <0x1b>;
123+
interrupt-parent = <&gpio>;
124+
interrupts = <TEGRA_GPIO(Y, 1) IRQ_TYPE_LEVEL_LOW>;
125+
126+
regulator-always-on;
127+
regulator-boot-on;
128+
regulator-min-microvolt = <800000>;
129+
regulator-max-microvolt = <1231250>;
130+
regulator-name = "PPVAR_CPU";
131+
regulator-ramp-delay = <12500>;
132+
maxim,dvs-default-state = <1>;
133+
maxim,enable-active-discharge;
134+
maxim,enable-bias-control;
135+
maxim,enable-etr;
136+
maxim,enable-gpio = <&pmic 5 GPIO_ACTIVE_HIGH>;
137+
maxim,externally-enable;
138+
};
139+
};

0 commit comments

Comments
 (0)