History log of /optee_os/core/drivers/stpmic1.c (Results 1 – 19 of 19)
Revision Date Author Comments
# 8c49825d 06-Sep-2023 Etienne Carriere <etienne.carriere@foss.st.com>

plat-stm32mp1: stm32mp1_pmic: regulators voltage list

Implements operator supported_voltages for stm32mp1 PMIC regulators
driver. A voltage list array is allocated during initialization and
freed up

plat-stm32mp1: stm32mp1_pmic: regulators voltage list

Implements operator supported_voltages for stm32mp1 PMIC regulators
driver. A voltage list array is allocated during initialization and
freed upon core initialization completion. This prevents wasting heap
when the list is queried only during boot time.

Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 9cb0d516 30-Jun-2021 Etienne Carriere <etienne.carriere@linaro.org>

drivers: stpmic1: export regulators API in a specific header file

Split stpmic1.h in 2 parts, one specifically for STPMIC1 regulator
interface.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

drivers: stpmic1: export regulators API in a specific header file

Split stpmic1.h in 2 parts, one specifically for STPMIC1 regulator
interface.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 8537f7eb 02-Mar-2021 Marouene Boubakri <marouene.boubakri@nxp.com>

core: driver: stpmic1: do not use TEE_Result as return type

stpmic1_regulator_levels_mv() uses TEE_Result as return type.
The caller on core/arch/arm/plat-stm32mp1/scmi_server.c does
not check the r

core: driver: stpmic1: do not use TEE_Result as return type

stpmic1_regulator_levels_mv() uses TEE_Result as return type.
The caller on core/arch/arm/plat-stm32mp1/scmi_server.c does
not check the return value, therefore, change it to void.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# e0f7e777 05-Oct-2020 Etienne Carriere <etienne.carriere@linaro.org>

drivers: stpmic1: add stpmic1_regulator_is_valid()

Add driver helper API function stpmic1_regulator_is_valid() to
check if a regulator name identifier references a STPMIC1 regulator.

Signed-off-by:

drivers: stpmic1: add stpmic1_regulator_is_valid()

Add driver helper API function stpmic1_regulator_is_valid() to
check if a regulator name identifier references a STPMIC1 regulator.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# c52a7c2e 06-Oct-2020 Etienne Carriere <etienne.carriere@linaro.org>

drivers: stpmic1: API functions to query regulators levels

Add API function in STPMIC1 driver to allow Core to query the
regulators supported voltage levels. This change is needed by
coming SCMI Vol

drivers: stpmic1: API functions to query regulators levels

Add API function in STPMIC1 driver to allow Core to query the
regulators supported voltage levels. This change is needed by
coming SCMI Voltage Domain for regulator resource discovery
services.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 6a63363b 06-Oct-2020 Etienne Carriere <etienne.carriere@linaro.org>

drivers: stpmic1: don't force panic on invalid regulator ID

Returns an explicit invalid reference rather than panicking straight
in local helper function get_regulator_data(). This change lets calle

drivers: stpmic1: don't force panic on invalid regulator ID

Returns an explicit invalid reference rather than panicking straight
in local helper function get_regulator_data(). This change lets caller
function decide whether to panic, propagate an error status or take
the applicable behavior when it occurs.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 187ba5c2 30-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: fix missing parentheses in boot-on config

Fix error reported by GCC [1]:

core/drivers/stpmic1.c: In function ‘stpmic1_bo_voltage_unpg’:
core/drivers/stpmic1.c:720:24: error: suggest parent

stpmic1: fix missing parentheses in boot-on config

Fix error reported by GCC [1]:

core/drivers/stpmic1.c: In function ‘stpmic1_bo_voltage_unpg’:
core/drivers/stpmic1.c:720:24: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
if (value & cfg->mask >= cfg->min_value)
~~~~~~~~~~^~~~~~~~~~~~~~~~~

[1] arm-buildroot-linux-uclibcgnueabihf-gcc.br_real (Buildroot
2019.11-git-01409-gab8f872d0e-dirty) 8.3.0

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
[jf: wrap compiler description line]
Signed-off-by: Jerome Forissier <jerome@forissier.org>

show more ...


# ef18a901 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: assert regulator support at API function entries

Assert the regulator as a register offset defined (non zero) for the
target support.

Low power modes mandate a non-zero low_power_reg offse

stpmic1: assert regulator support at API function entries

Assert the regulator as a register offset defined (non zero) for the
target support.

Low power modes mandate a non-zero low_power_reg offset value in
regulator description. Offset is stored in lp_reg for unpaged
accesses to regulator.

Pull down support mandates a non-zero pull_down_reg offset value
in regulator description. Offset in stored in pd_reg for unpaged
accessed to regulator.

Mask reset support mandates a non-zero mask_reset_reg offset value
in regulator description. Offset in stored in mrst_reg for unpaged
accessed to regulator.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 44219e70 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: fix boot-on minimal voltage

Change stpmic1_bo_voltage_cfg() to highlight voltage argument is
a minimal desired boot-on voltage requirement, not an absolute
voltage requested at boot-on, as

stpmic1: fix boot-on minimal voltage

Change stpmic1_bo_voltage_cfg() to highlight voltage argument is
a minimal desired boot-on voltage requirement, not an absolute
voltage requested at boot-on, as per DT binding property .

stpmic1_bo_voltage_unpg() that applies boot-on voltage is updated
to not lower current voltage if above min voltage constraint.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 1764a894 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: fix regulator identification for low power configuration

Fix name identification sequence in stpmic1_lp_voltage_cfg()
and stpmic1_lp_set_voltage(). Identify names starting with "buck"
using

stpmic1: fix regulator identification for low power configuration

Fix name identification sequence in stpmic1_lp_voltage_cfg()
and stpmic1_lp_set_voltage(). Identify names starting with "buck"
using strncmp(name, "buck", 4), not strcmp(name, "buck") that
tests also string null termination. Fix also tests on regulator
names starting with "ldo".

This change factorize all identification with helper functions
regu_is_buck() and regu_is_ldo_but_ldo4();

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 972b3d9a 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: relax PMIC control API functions

Return an error if requested to save Low Power regulator data
if there is no Low Power control defined. This changes
stpmic1_lp_cfg(), stpmic1_lp_reg_on_off

stpmic1: relax PMIC control API functions

Return an error if requested to save Low Power regulator data
if there is no Low Power control defined. This changes
stpmic1_lp_cfg(), stpmic1_lp_reg_on_off() and stpmic1_lp_copy_reg()
to return with a error if regulator does not support Low Power config.

Add helper function to stpmic1_regu_has_lp_cfg() to return if a
regulator defines Low Power configuration.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 6149e2d8 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: add stpmic1_bo_enable_cfg() to save boot-on config

Add a helper stpmic1_bo_enable_cfg() to save the minimal regulator
data needed to operate at least the boot-on constraint: control on
enab

stpmic1: add stpmic1_bo_enable_cfg() to save boot-on config

Add a helper stpmic1_bo_enable_cfg() to save the minimal regulator
data needed to operate at least the boot-on constraint: control on
enable/disable support: control register offset and bit position.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 3f692bdf 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: describe 5V fixed regulators

Describe regulators boost, pwr_sw1 and pwr_sw2 that are gated 5V fixed
regulators.

These regulators have not reset mask support hence change
stpmic1_regulator_

stpmic1: describe 5V fixed regulators

Describe regulators boost, pwr_sw1 and pwr_sw2 that are gated 5V fixed
regulators.

These regulators have not reset mask support hence change
stpmic1_regulator_mask_reset_set() to fail accordingly.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 42032ea0 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: refine resources helper macros

Define bit fields in position xxx_POS rather than in bit mask.
Use BIT() and GENMASK_32() rather than numerical values.

Signed-off-by: Etienne Carriere <etie

stpmic1: refine resources helper macros

Define bit fields in position xxx_POS rather than in bit mask.
Use BIT() and GENMASK_32() rather than numerical values.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 68cfb83d 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: save enable bit position in regulator control

Add enable bit position info in STPMIC1 regulators description
instead of assuming it is BIT(0). This allows to define other
regulators with en

stpmic1: save enable bit position in regulator control

Add enable bit position info in STPMIC1 regulators description
instead of assuming it is BIT(0). This allows to define other
regulators with enable bit not at position 0.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 2619b28c 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: stpmic1_is_regulator_enabled() returns a boolean

Change helper function stpmic1_is_regulator_enabled() to return
a boolean value.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.o

stpmic1: stpmic1_is_regulator_enabled() returns a boolean

Change helper function stpmic1_is_regulator_enabled() to return
a boolean value.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# f7e28951 28-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

stpmic1: Fix LDO3 voltage table

Add VOUT2/2 (sink/source mode) value in LDO3 voltage table.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Nicolas Le Bayon <nicolas.le

stpmic1: Fix LDO3 voltage table

Add VOUT2/2 (sink/source mode) value in LDO3 voltage table.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# eb5d5313 27-May-2019 Etienne Carriere <etienne.carriere@st.com>

drivers/stpmic1: unpaged low power sequence

STPMIC1 is used by the secure world to driver the system low power
sequences. Since these sequences are executed in unpaged context,
the driver gets the c

drivers/stpmic1: unpaged low power sequence

STPMIC1 is used by the secure world to driver the system low power
sequences. Since these sequences are executed in unpaged context,
the driver gets the configuration from the DTB during the initialization
and provides optimized functions to load target configuration at
runtime.

This change makes STPMIC1 driver to call the memory footprint optimized
function stm32_i2c_read_write_membyte() for I2C transfer instead of
generic stm32_i2c_mem_read()/stm32_i2c_mem_write(). This is more
suitable to OP-TEE pager constraints on the platform.

This changes removes now unused STPMIC1_I2C_TIMEOUT_US.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# c7cf2933 06-May-2019 Etienne Carriere <etienne.carriere@st.com>

core: introduce STPMIC1 driver

STPMIC1 is a power management chip for the stm32mp1 platform. It is
accessed through an I2C bus. STPMIC1 provides regulators and other
features as interrupt sources an

core: introduce STPMIC1 driver

STPMIC1 is a power management chip for the stm32mp1 platform. It is
accessed through an I2C bus. STPMIC1 provides regulators and other
features as interrupt sources and watchdogs.

STPMIC1 configuration is expected from a secure device tree blob, that
currently is the embedded DTB.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...