Skip to content

Commit d7181a2

Browse files
martijndegouwbroonie
authored andcommitted
dt-bindings: regulator: add pca9450: Add regulator-allowed-modes
Make the PWM mode on the buck controllers configurable from devicetree. Some boards require forced PWM mode to keep the supply ripple within acceptable limits under light load conditions. Signed-off-by: Martijn de Gouw <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://patch.msgid.link/20250525071823.819342-1-martijn.de.gouw@prodrive-technologies.com Signed-off-by: Mark Brown <[email protected]>
1 parent 9bb3c7d commit d7181a2

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ properties:
100100
PMIC default "STANDBY" state voltage in uV. Only Buck1~3 have such
101101
dvs(dynamic voltage scaling) property.
102102

103+
regulator-allowed-modes:
104+
description: |
105+
Buck regulator operating modes allowed. Valid values below.
106+
Users should use the macros from dt-bindings/regulator/nxp,pca9450-regulator.h
107+
0 (PCA9450_BUCK_MODE_AUTO): Auto PFM/PWM mode
108+
1 (PCA9450_BUCK_MODE_FORCE_PWM): Forced PWM mode
109+
items:
110+
enum: [ 0, 1 ]
111+
103112
unevaluatedProperties: false
104113

105114
additionalProperties: false
@@ -143,6 +152,7 @@ allOf:
143152
examples:
144153
- |
145154
#include <dt-bindings/interrupt-controller/irq.h>
155+
#include <dt-bindings/regulator/nxp,pca9450-regulator.h>
146156
147157
i2c {
148158
#address-cells = <1>;
@@ -179,13 +189,17 @@ examples:
179189
regulator-max-microvolt = <3400000>;
180190
regulator-boot-on;
181191
regulator-always-on;
192+
regulator-initial-mode = <PCA9450_BUCK_MODE_FORCE_PWM>;
193+
regulator-allowed-modes = <PCA9450_BUCK_MODE_FORCE_PWM>;
182194
};
183195
buck5: BUCK5 {
184196
regulator-name = "BUCK5";
185197
regulator-min-microvolt = <600000>;
186198
regulator-max-microvolt = <3400000>;
187199
regulator-boot-on;
188200
regulator-always-on;
201+
regulator-allowed-modes = <PCA9450_BUCK_MODE_AUTO
202+
PCA9450_BUCK_MODE_FORCE_PWM>;
189203
};
190204
buck6: BUCK6 {
191205
regulator-name = "BUCK6";
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Device Tree binding constants for the NXP PCA9450A/B/C PMIC regulators
4+
*/
5+
6+
#ifndef _DT_BINDINGS_REGULATORS_NXP_PCA9450_H
7+
#define _DT_BINDINGS_REGULATORS_NXP_PCA9450_H
8+
9+
/*
10+
* Buck mode constants which may be used in devicetree properties (eg.
11+
* regulator-initial-mode, regulator-allowed-modes).
12+
* See the manufacturer's datasheet for more information on these modes.
13+
*/
14+
15+
#define PCA9450_BUCK_MODE_AUTO 0
16+
#define PCA9450_BUCK_MODE_FORCE_PWM 1
17+
18+
#endif

0 commit comments

Comments
 (0)