[PATCH v3 0/4] General regulator and pmic uclass improvements
Svyatoslav Ryhel
clamor95 at gmail.com
Sat Aug 12 19:35:01 CEST 2023
Mailing list reduction.
This issue is not directly related to pmic apart from the fact that pmics in my
case is an i2c device so writing on the top.
Sorry for this format but you are one of the most keen and in the
context of this
regulator rework. As you know I have an issue with probing the PMIC i2c device.
I have made some logs and tests and found next stuff.
If I use purely setup from this patchset v3 I get error in i2c xfer
(bootloader) tegra_i2c_probe
(bootloader) max77663_probe
(bootloader) max77663_sd_probe
(bootloader) Core: 99 devices, 25 uclasses, devicetree: separate
(bootloader) MMC: sdhci at 78000600: 0
(bootloader) Loading Environment from MMC... max77663_sd_probe
(bootloader) Error enabling VMMC supply : -121
If I use probing regulators on pmic post_probe I get no error and
different calls
(bootloader) Core: 99 devices, 25 uclasses, devicetree: separate
(bootloader) MMC: sdhci at 78000600: 0
(bootloader) Loading Environment from MMC... tegra_i2c_probe
(bootloader) max77663_probe
(bootloader) max77663_sd_probe
(bootloader) *** Warning - bad CRC, using default environment
Maybe you have any ideas what is causing this inconsistency?
нд, 6 серп. 2023 р. о 20:52 Svyatoslav Ryhel <clamor95 at gmail.com> пише:
>
> This patchset derives from discussion of TPS65913 bringup and aims to
> cycle all regulator management inside uclass removing need of any board
> calls for regulators.
>
> My hw setup is Tegra 3 LG Optimus Vu P895 (PMIC is MAX77663) with native
> spl u-boot build.
>
> power: regulator: expand basic reference counter onto all uclass
> Commit is basically expansion of 4fcba5d ("regulator: implement basic
> reference counter") onto all regulators. My testing on hw has shown no
> issues so far with both pmic regulators and fixed regulators. Counting
> works as expected, dm test is set in test of regulator_set_enable_if_allowed.
>
> power: regulator-uclass: perform regulator setup inside uclass
> All regulators with always-on or boot-on are set to probe after bind
> which ensures that essential regulators are set. In the post probe
> regulator autoset is called so that correct regulator state according to
> device tree is reached. DM test is set by checking regulators data without
> pre-configuring them manually.
>
> ---
> Changes from v2:
> - dropped changes related to pmic (pmic regulator probing on pmic post bind)
> - regulator uclass changes are dropped to minimum to remain compatibility:
> - always-on and boot-on check is moved to post bind
> - regulator_autoset is called on post_probe
> - adjusted dm tests to pass with this changes
>
> Changes from v1:
> - adapted description of regulator_set_enable
> - remove uc_pdata->enable_count from post_probe
> - added tests from counter and regulators post_probe
> ---
>
> Svyatoslav Ryhel (4):
> power: regulator: expand basic reference counter onto all uclass
> test: dm: regulator: test counter in set_enable_if_allowed test
> power: regulator: Perform regulator setup inside uclass
> test: dm: regulator: provide test of auto setup
>
> drivers/power/regulator/regulator-uclass.c | 71 ++++++++++++++++++++--
> drivers/power/regulator/regulator_common.c | 22 -------
> drivers/power/regulator/regulator_common.h | 21 -------
> include/power/regulator.h | 2 +
> test/dm/regulator.c | 27 +++++++-
> 5 files changed, 92 insertions(+), 51 deletions(-)
>
> --
> 2.39.2
>
More information about the U-Boot
mailing list