* dm driver probe and dm question
@ 2022-02-26 1:51 Tim Harvey
2022-02-26 7:31 ` Heinrich Schuchardt
0 siblings, 1 reply; 4+ messages in thread
From: Tim Harvey @ 2022-02-26 1:51 UTC (permalink / raw)
To: u-boot
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?
Here is a dm tree of the board:
Marvell> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
rsa_mod_ex 0 [ ] mod_exp_sw |-- mod_exp_sw
firmware 0 [ ] psci |-- psci
regulator 0 [ + ] regulator_fixed |-- mmc_supply_3v3
simple_bus 0 [ + ] simple_bus `-- soc@0
clk 0 [ + ] fixed_clock |-- refclkuaa
clk 1 [ + ] fixed_clock |-- sclk
clk 2 [ ] fixed_clock |-- can20m
serial 0 [ + ] serial_pl01x |-- serial@87e028000000
serial 1 [ ] serial_pl01x |-- serial@87e029000000
serial 2 [ ] serial_pl01x |-- serial@87e02a000000
serial 3 [ ] serial_pl01x |-- serial@87e02b000000
watchdog 0 [ + ] sbsa_gwdt |-- watch-dog@8440000a0000
pci 0 [ + ] pci_octeontx `-- pci@848000000000
pci 1 [ + ] pci_bridge_drv |-- mrml-bridge0@1,0
misc 0 [ + ] octeontx_smi | |-- mdio-nexus@1,3
misc 1 [ + ] octeontx_hsmmc_host | |-- mmc@1,4
mmc 0 [ + ] octeontx_hsmmc_slot | | `--
octeontx-mmc0
blk 0 [ + ] mmc_blk | |
`-- octeontx-mmc0.blk
i2c 0 [ ] i2c_octeon | |-- i2c@9,0
misc 2 [ ] gsc | | `-- gsc@20
i2c 1 [ ] i2c_octeon | |-- i2c@9,1
pci_generi 5 [ ] pci_generic_drv | |-- pci_1:0.0
pci_generi 6 [ ] pci_generic_drv | |-- pci_1:0.1
pci_generi 7 [ ] pci_generic_drv | |-- pci_1:1.7
pci_generi 8 [ ] pci_generic_drv | |-- pci_1:2.0
pci_generi 9 [ ] pci_generic_drv | |-- pci_1:6.0
pci_generi 10 [ ] pci_generic_drv | |-- pci_1:7.0
pci_generi 11 [ ] pci_generic_drv | |-- pci_1:7.4
pci_generi 12 [ ] pci_generic_drv | |-- pci_1:a.0
pci_generi 13 [ ] pci_generic_drv | |-- pci_1:c.0
pci_generi 14 [ ] pci_generic_drv | |-- pci_1:c.1
pci_generi 15 [ ] pci_generic_drv | |-- pci_1:d.0
misc 3 [ + ] octeontx_bgx | |-- octeontx_bgx
misc 4 [ + ] octeontx_bgx | `-- octeontx_bgx
gpio 0 [ + ] octeon_gpio |-- gpio0@6,0
pci_generi 0 [ ] pci_generic_drv |-- pci_0:7.0
pci_generi 1 [ ] pci_generic_drv |-- pci_0:8.0
pci 2 [ + ] pci_bridge_drv |-- pci_0:9.0
pci_generi 16 [ ] pci_generic_drv | `-- pci_2:0.0
pci 3 [ + ] pci_bridge_drv |-- pci_0:a.0
pci_generi 17 [ ] pci_generic_drv | `-- pci_3:0.0
pci_generi 2 [ ] pci_generic_drv |-- pci_0:b.0
pci 4 [ + ] pci_bridge_drv |-- pci_0:c.0
pci_generi 18 [ ] pci_generic_drv | `-- pci_4:0.0
pci_generi 3 [ ] pci_generic_drv |-- pci_0:d.0
pci_generi 4 [ ] pci_generic_drv |-- pci_0:e.0
pci 5 [ + ] pci_bridge_drv |-- pci_0:f.0
misc 5 [ + ] octeontx_nic | |-- octeontx_nic
ethernet 0 [ + ] vnic | |-- vnic0
ethernet 1 [ + ] vnic | `-- vnic1
usb 0 [ ] xhci_pci |-- xhci_pci
usb 1 [ ] xhci_pci `-- xhci_pci
Best regards,
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dm driver probe and dm question
2022-02-26 1:51 dm driver probe and dm question Tim Harvey
@ 2022-02-26 7:31 ` Heinrich Schuchardt
2022-02-26 19:11 ` Tim Harvey
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2022-02-26 7:31 UTC (permalink / raw)
To: Tim Harvey; +Cc: u-boot
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
Best regards
Heinrich
>
> Here is a dm tree of the board:
> Marvell> dm tree
> Class Index Probed Driver Name
> -----------------------------------------------------------
> root 0 [ + ] root_driver root_driver
> rsa_mod_ex 0 [ ] mod_exp_sw |-- mod_exp_sw
> firmware 0 [ ] psci |-- psci
> regulator 0 [ + ] regulator_fixed |-- mmc_supply_3v3
> simple_bus 0 [ + ] simple_bus `-- soc@0
> clk 0 [ + ] fixed_clock |-- refclkuaa
> clk 1 [ + ] fixed_clock |-- sclk
> clk 2 [ ] fixed_clock |-- can20m
> serial 0 [ + ] serial_pl01x |-- serial@87e028000000
> serial 1 [ ] serial_pl01x |-- serial@87e029000000
> serial 2 [ ] serial_pl01x |-- serial@87e02a000000
> serial 3 [ ] serial_pl01x |-- serial@87e02b000000
> watchdog 0 [ + ] sbsa_gwdt |-- watch-dog@8440000a0000
> pci 0 [ + ] pci_octeontx `-- pci@848000000000
> pci 1 [ + ] pci_bridge_drv |-- mrml-bridge0@1,0
> misc 0 [ + ] octeontx_smi | |-- mdio-nexus@1,3
> misc 1 [ + ] octeontx_hsmmc_host | |-- mmc@1,4
> mmc 0 [ + ] octeontx_hsmmc_slot | | `--
> octeontx-mmc0
> blk 0 [ + ] mmc_blk | |
> `-- octeontx-mmc0.blk
> i2c 0 [ ] i2c_octeon | |-- i2c@9,0
> misc 2 [ ] gsc | | `-- gsc@20
> i2c 1 [ ] i2c_octeon | |-- i2c@9,1
> pci_generi 5 [ ] pci_generic_drv | |-- pci_1:0.0
> pci_generi 6 [ ] pci_generic_drv | |-- pci_1:0.1
> pci_generi 7 [ ] pci_generic_drv | |-- pci_1:1.7
> pci_generi 8 [ ] pci_generic_drv | |-- pci_1:2.0
> pci_generi 9 [ ] pci_generic_drv | |-- pci_1:6.0
> pci_generi 10 [ ] pci_generic_drv | |-- pci_1:7.0
> pci_generi 11 [ ] pci_generic_drv | |-- pci_1:7.4
> pci_generi 12 [ ] pci_generic_drv | |-- pci_1:a.0
> pci_generi 13 [ ] pci_generic_drv | |-- pci_1:c.0
> pci_generi 14 [ ] pci_generic_drv | |-- pci_1:c.1
> pci_generi 15 [ ] pci_generic_drv | |-- pci_1:d.0
> misc 3 [ + ] octeontx_bgx | |-- octeontx_bgx
> misc 4 [ + ] octeontx_bgx | `-- octeontx_bgx
> gpio 0 [ + ] octeon_gpio |-- gpio0@6,0
> pci_generi 0 [ ] pci_generic_drv |-- pci_0:7.0
> pci_generi 1 [ ] pci_generic_drv |-- pci_0:8.0
> pci 2 [ + ] pci_bridge_drv |-- pci_0:9.0
> pci_generi 16 [ ] pci_generic_drv | `-- pci_2:0.0
> pci 3 [ + ] pci_bridge_drv |-- pci_0:a.0
> pci_generi 17 [ ] pci_generic_drv | `-- pci_3:0.0
> pci_generi 2 [ ] pci_generic_drv |-- pci_0:b.0
> pci 4 [ + ] pci_bridge_drv |-- pci_0:c.0
> pci_generi 18 [ ] pci_generic_drv | `-- pci_4:0.0
> pci_generi 3 [ ] pci_generic_drv |-- pci_0:d.0
> pci_generi 4 [ ] pci_generic_drv |-- pci_0:e.0
> pci 5 [ + ] pci_bridge_drv |-- pci_0:f.0
> misc 5 [ + ] octeontx_nic | |-- octeontx_nic
> ethernet 0 [ + ] vnic | |-- vnic0
> ethernet 1 [ + ] vnic | `-- vnic1
> usb 0 [ ] xhci_pci |-- xhci_pci
> usb 1 [ ] xhci_pci `-- xhci_pci
>
> Best regards,
>
> Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dm driver probe and dm question
2022-02-26 7:31 ` Heinrich Schuchardt
@ 2022-02-26 19:11 ` Tim Harvey
2022-02-27 8:29 ` Heinrich Schuchardt
0 siblings, 1 reply; 4+ messages in thread
From: Tim Harvey @ 2022-02-26 19:11 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: u-boot
On Fri, Feb 25, 2022 at 11:31 PM Heinrich Schuchardt <xypron.glpk@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?
Best regards,
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dm driver probe and dm question
2022-02-26 19:11 ` Tim Harvey
@ 2022-02-27 8:29 ` Heinrich Schuchardt
0 siblings, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2022-02-27 8:29 UTC (permalink / raw)
To: Tim Harvey; +Cc: u-boot
On 2/26/22 20:11, Tim Harvey wrote:
> On Fri, Feb 25, 2022 at 11:31 PM Heinrich Schuchardt <xypron.glpk@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-27 8:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 1:51 dm driver probe and dm question Tim Harvey
2022-02-26 7:31 ` Heinrich Schuchardt
2022-02-26 19:11 ` Tim Harvey
2022-02-27 8:29 ` Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.