Files
linux/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
André Draszik 030158c052 regulator: dt-bindings: add s2mpg11-pmic regulators
The S2MPG11 PMIC is a Power Management IC for mobile applications with
buck converters, various LDOs, power meters, NTC thermistor inputs, and
additional GPIO interfaces. It typically complements an S2MPG10 PMIC in
a main/sub configuration as the sub-PMIC.

S2MPG11 has 12 buck, 1 buck-boost, and 15 LDO rails. Several of these
can either be controlled via software (register writes) or via external
signals, in particular by:
    * one out of several input pins connected to a main processor's:
        *  GPIO pins
        * other pins that are e.g. firmware- or power-domain-controlled
          without explicit driver intervention
    * a combination of input pins and register writes.

Control via input pins allows PMIC rails to be controlled by firmware,
e.g. during standby/suspend, or as part of power domain handling where
otherwise that would not be possible. Additionally toggling a pin is
faster than register writes, and it also allows the PMIC to ensure that
any necessary timing requirements between rails are respected
automatically if multiple rails are to be enabled or disabled quasi
simultaneously.

While external control via input pins appears to exist on other
versions of this PMIC, there is more flexibility in this version, in
particular there is a selection of input pins to choose from for each
rail (which must therefore be configured accordingly if in use),
whereas other versions don't have this flexibility.

Add documentation related to the regulator (buck & ldo) parts like
devicetree definitions, regulator naming patterns, and additional
properties.

Since S2MPG11 is typically used as the sub-PMIC together with an
S2MPG10 as the main-PMIC, the datasheet and the binding both suffix the
rails with an 's'.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-3-3b1f9831fffd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-04 13:35:31 +00:00

54 lines
2.2 KiB
C

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/*
* Copyright 2021 Google LLC
* Copyright 2025 Linaro Ltd.
*
* Device Tree binding constants for the Samsung S2MPG1x PMIC regulators
*/
#ifndef _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H
#define _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H
/*
* Several regulators may be controlled via external signals instead of via
* software. These constants describe the possible signals for such regulators
* and generally correspond to the respecitve on-chip pins.
*
* S2MPG10 regulators supporting these are:
* - buck1m .. buck7m buck10m
* - ldo3m .. ldo19m
*
* ldo20m supports external control, but using a different set of control
* signals.
*
* S2MPG11 regulators supporting these are:
* - buck1s .. buck3s buck5s buck8s buck9s bucka buckd
* - ldo1s ldo2s ldo8s ldo13s
*/
#define S2MPG10_EXTCTRL_PWREN 0 /* PWREN pin */
#define S2MPG10_EXTCTRL_PWREN_MIF 1 /* PWREN_MIF pin */
#define S2MPG10_EXTCTRL_AP_ACTIVE_N 2 /* ~AP_ACTIVE_N pin */
#define S2MPG10_EXTCTRL_CPUCL1_EN 3 /* CPUCL1_EN pin */
#define S2MPG10_EXTCTRL_CPUCL1_EN2 4 /* CPUCL1_EN & PWREN pins */
#define S2MPG10_EXTCTRL_CPUCL2_EN 5 /* CPUCL2_EN pin */
#define S2MPG10_EXTCTRL_CPUCL2_EN2 6 /* CPUCL2_E2 & PWREN pins */
#define S2MPG10_EXTCTRL_TPU_EN 7 /* TPU_EN pin */
#define S2MPG10_EXTCTRL_TPU_EN2 8 /* TPU_EN & ~AP_ACTIVE_N pins */
#define S2MPG10_EXTCTRL_TCXO_ON 9 /* TCXO_ON pin */
#define S2MPG10_EXTCTRL_TCXO_ON2 10 /* TCXO_ON & ~AP_ACTIVE_N pins */
#define S2MPG10_EXTCTRL_LDO20M_EN2 11 /* VLDO20M_EN & LDO20M_SFR */
#define S2MPG10_EXTCTRL_LDO20M_EN 12 /* VLDO20M_EN pin */
#define S2MPG11_EXTCTRL_PWREN 0 /* PWREN pin */
#define S2MPG11_EXTCTRL_PWREN_MIF 1 /* PWREN_MIF pin */
#define S2MPG11_EXTCTRL_AP_ACTIVE_N 2 /* ~AP_ACTIVE_N pin */
#define S2MPG11_EXTCTRL_G3D_EN 3 /* G3D_EN pin */
#define S2MPG11_EXTCTRL_G3D_EN2 4 /* G3D_EN & ~AP_ACTIVE_N pins */
#define S2MPG11_EXTCTRL_AOC_VDD 5 /* AOC_VDD pin */
#define S2MPG11_EXTCTRL_AOC_RET 6 /* AOC_RET pin */
#define S2MPG11_EXTCTRL_UFS_EN 7 /* UFS_EN pin */
#define S2MPG11_EXTCTRL_LDO13S_EN 8 /* VLDO13S_EN pin */
#endif /* _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H */