This page includes a few notes on the status of the conversion of U-Boot to driver model.
Purpose
U-Boot originally had a pretty ad-hoc device driver system. While some subsystems have their own framework (e.g. mmc, block devices, stdio), others are implemented as bare function calls to be provided by whichever driver shows up. This limits us to one driver of a particular type (e.g. you cannot have USB2 and USB3 ports at the same time as they use different drivers).
Driver model aims to provide a consistent model for drivers and the platform data / device tree information needed by drivers to instantiate devices. In particular:
Hierarchical, allowing a device to have children and parents
Replaces #define CONFIGs with board-supplied platform data or device tree
Devices organized by class, e.g. I2C, SPI, LCD
Efficient implementation, suitable in principle for pre-relocation and SPL
Devices are known very early but are only activated ('probed') when used
About 90 uclasses available, covering most subsystems and many new ones
Support is provided for driver model in both U-Boot proper (before and after relocation), SPL and TPL
Sandbox, Tegra, Exynos, Sunxi/Allwinner, i.MX, Freescale, all ARMv8, OMAP3, Zynq, Raspberry Pi, Rockchip, x86, Atmel and many others are using driver model
Patches posted (in brackets is the branch at u-boot-dm.git):
None
Other things in the works
None
Suggestions for uclasses that people could do:
Ethernet PHY
See here for the original documentation discussing each subsystem.
-- SimonGlass - 9th March 2020