[PATCH 1/4] power: regulator: Trigger probe of regulators which are always-on or boot-on

Svyatoslav Ryhel clamor95 at gmail.com
Mon Jul 29 07:38:16 CEST 2024


нд, 28 лип. 2024 р. о 23:08 Marek Vasut <marex at denx.de> пише:
>
> On 7/28/24 9:02 PM, Svyatoslav wrote:
>
> Hi,
>
> I'm trimming the CC because I keep getting ML blockage due to large CC
> list. If someone has been removed too hastily, sorry.
>
> > 28 липня 2024 р. 21:35:27 GMT+03:00, Marek Vasut <marex at denx.de> написав(-ла):
> >> On 7/28/24 7:55 PM, Svyatoslav Ryhel wrote:
> >>> нд, 28 лип. 2024 р. о 19:38 Marek Vasut <marex at denx.de> пише:
> >>>>
> >>>> On 6/27/24 1:55 AM, Marek Vasut wrote:
> >>>>> In case a regulator DT node contains regulator-always-on or regulator-boot-on
> >>>>> property, make sure the regulator gets correctly configured by U-Boot on start
> >>>>> up. Unconditionally probe such regulator drivers. This is a preparatory patch
> >>>>> for introduction of .regulator_post_probe() which would trigger the regulator
> >>>>> configuration.
> >>>>>
> >>>>> Parsing of regulator-always-on and regulator-boot-on DT property has been
> >>>>> moved to regulator_post_bind() as the information is required early, the
> >>>>> rest of the DT parsing has been kept in regulator_pre_probe() to avoid
> >>>>> slowing down the boot process.
> >>>>
> >>>> Is there anything blocking this series from being applied ?
> >>>
> >>> This patchset causes PMIC regulators probe too early which results in
> >>> i2c line setup failure. These patches MUST NOT be applied in this form
> >>> since they will break at least 15 Tegra 3 devices which use DM PMIC,
> >>> maybe more.
> >>
> >> Thank you for testing. I do not have any tegra 3 devices, but this patchset does not do anything with pinmuxing. If a regulator is probed, all of its dependencies (i2c bus, pinmux configuration, etc.) should be probed as well. Can you have a look at what the problem with pinmuxing is on tegra 3? It seems it might be unrelated to this patchset and would eventually show up elsewhere?
> >
> > Pinmux? Wdym, I wrote about a PMIC which is usually located on i2c line.
> >
> > <https://patchwork.ozlabs.org/project/uboot/patch/20231003062126.42026-4-clamor95@gmail.com/>
> >
> > This is a similar patch.
> >
> > You may be able to reproduce the issue I face if you have a device which uses SPL and has DM PMIC with regulators that need always-on/boot-on properties.
>
> I actually do use:
>
> configs/imx8mp_dhcom_pdk3_defconfig:CONFIG_DM_PMIC=y
> configs/imx8mp_dhcom_pdk3_defconfig:CONFIG_DM_PMIC_PCA9450=y
> configs/imx8mp_dhcom_pdk3_defconfig:CONFIG_SPL_DM_PMIC_PCA9450=y
>
> which is one of the devices I test this on.
>
> The PMIC is on I2C, DM_PMIC enabled in SPL, both buck4 and buck5
> regulators are enabled in SPL, have regulator-always-on and
> regulator-boot-on and bootph-pre-ram properties.
>
> This seems similar enough, right ?
>
Yes, though SPL must remain as small as possible and you propose add
there i2c driver,  PMIC driver, PMIC regulator drivers, PMIC GPIO
drivers along with relocation of all this stuff. It is not optimal at
all.

> What is the problem you observe on tegra 3 ?
i2c line fails since it probes in spl with your patch, but it does not
relocate and then probes once more after relocation. Probe fails along
with all devices on same line.

Even with
CONFIG_SPL_I2C=y
CONFIG_SPL_PMIC_PALMAS=y
CONFIG_SPL_DM_REGULATOR_PALMAS=y
CONFIG_SPL_PALMAS_GPIO=y
and all bootph-pre-ram; set I still get i2c failure

Here is log
(bootloader) read error from device: bd26f8e0 register: 0x37!
(bootloader) read error from device: bd26f8e0 register: 0x3b!
(bootloader) read error from device: bd26f8e0 register: 0x61!
(bootloader) read error from device: bd26f8e0 register: 0x65!
(bootloader) Core:  177 devices, 27 uclasses, devicetree: separate
(bootloader) MMC:   sdhci at 78000400: 1, sdhci at 78000600: 0
(bootloader) Loading Environment from MMC... Reading from MMC(0)... ***
(bootloader) Warning - bad CRC, using default environment
(bootloader)
(bootloader) read error from device: bd26f8e0 register: 0x53!
(bootloader) read error from device: bd26f8e0 register: 0x2f!
(bootloader) tegra_dsi_bridge_probe: Cannot get panel: error -5
(bootloader) tegra_dsi_bridge_probe: Cannot get panel: error -114
(bootloader) In:    serial,usbkbd,button-kbd
(bootloader) Out:   serial,vidconsole
(bootloader) Err:   serial,vidconsole
(bootloader) Net:   No ethernet found.


More information about the U-Boot mailing list