Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <martijn.de.gouw@prodrive-technologies.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20250525071823.819342-1-martijn.de.gouw@prodrive-technologies.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Martijn de Gouw and committed by
Mark Brown
d7181a2d 9bb3c7df

+32
+14
Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
··· 100 100 PMIC default "STANDBY" state voltage in uV. Only Buck1~3 have such 101 101 dvs(dynamic voltage scaling) property. 102 102 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 + 103 112 unevaluatedProperties: false 104 113 105 114 additionalProperties: false ··· 152 143 examples: 153 144 - | 154 145 #include <dt-bindings/interrupt-controller/irq.h> 146 + #include <dt-bindings/regulator/nxp,pca9450-regulator.h> 155 147 156 148 i2c { 157 149 #address-cells = <1>; ··· 189 179 regulator-max-microvolt = <3400000>; 190 180 regulator-boot-on; 191 181 regulator-always-on; 182 + regulator-initial-mode = <PCA9450_BUCK_MODE_FORCE_PWM>; 183 + regulator-allowed-modes = <PCA9450_BUCK_MODE_FORCE_PWM>; 192 184 }; 193 185 buck5: BUCK5 { 194 186 regulator-name = "BUCK5"; ··· 198 186 regulator-max-microvolt = <3400000>; 199 187 regulator-boot-on; 200 188 regulator-always-on; 189 + regulator-allowed-modes = <PCA9450_BUCK_MODE_AUTO 190 + PCA9450_BUCK_MODE_FORCE_PWM>; 201 191 }; 202 192 buck6: BUCK6 { 203 193 regulator-name = "BUCK6";
+18
include/dt-bindings/regulator/nxp,pca9450-regulator.h
··· 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