dm driver probe and dm question
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Feb 27 09:29:14 CET 2022
On 2/26/22 20:11, Tim Harvey wrote:
> On Fri, Feb 25, 2022 at 11:31 PM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>
>> On 2/26/22 02:51, Tim Harvey wrote:
>>> Greetings,
>>>
>>> I've got an octeontx board which uses driver model
>>> (CONFIG_DM/CONFIG_DM_I2C) but I find that the 'i2c_octeon' driver does
>>> not probe automatically on boot until I do something like an 'i2c dev
>>> 0 && i2c probe'.
>>>
>>> What would cause the i2c_octeon driver to not automatically probe?
>>
>> It is the general design of U-Boot's driver model to use late probing.
>> This reduces the boot time.
>>
>> Cf.
>> https://u-boot.readthedocs.io/en/latest/develop/driver-model/design.html#driver-lifecycle
>>
>
> Heinrich,
>
> Thanks for the explanation. Is there any way to make a dm driver force
> its probe in the case of being vital for board startup? How does this
> work for UCLASS_PMIC devices that are vital to board operation?
Many board files call pmic_get() and pmic_probe() which triggers probing
the PMIC driver, e.g.
board/freescale/common/mc34vr500.c:
p = pmic_get("MC34VR500");
...
ret = pmic_probe(p);
Drivers may set
.flags = DM_FLAG_PRE_RELOC
In the device-tree you could use u-boot,dm-pre-reloc.
See
https://u-boot.readthedocs.io/en/latest/develop/driver-model/fdt-fixup.html?highlight=Pre-Relocation%20Support
Best regards
Heinrich
More information about the U-Boot
mailing list