summaryrefslogtreecommitdiff
path: root/doc/driver-model
AgeCommit message (Collapse)AuthorFilesLines
2020-08-22doc: add bind/unbind command documentationPatrice Chotard2-0/+50
Add documentation in doc/drivel-model for the bind/unbind command. Part of this documentation is extracted from original patch commit message: commit 49c752c93a78 ("cmd: Add bind/unbind commands to bind a device to a driver from the command line") Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-25doc: Add new doc for soc ID driver modelDave Gerlach2-0/+69
Add a new documentation file for UCLASS_SOC and its usage to describe the SoC Device ID framework that allows SoC identification and device data matching. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini2-69/+0
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20doc: Add new doc for soc ID driver modelDave Gerlach2-0/+69
Add a new documentation file for UCLASS_SOC and its usage to describe the SoC Device ID framework that allows SoC identification and device data matching. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-17treewide: convert bd_t to struct bd_info manuallyMasahiro Yamada1-1/+1
Some code was not converted by coccinelle, somehow. I manually fixed up the remaining, and comments, README docs. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> [trini: Add arch/arm/mach-davinci/include/mach/sdmmc_defs.h and include/fdt_support.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-12Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-spiTom Rini1-14/+1
- Enable DM_SPI on siemens omap boards (Jagan) - Dropped some non-dm supported omap3 boards (Jagan) - Dropped non-dm code in omap3 spi driver (Jagan) - Dropped non-dm code in kirkwood spi driver (Bhargav)
2020-07-10doc: driver-model: Update SPI migration statusJagan Teki1-14/+1
All SPI drivers are converted to DM_SPI but 3 drivers still operate in nondm mode for SPL due to footprint constraints. Update the migration status for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-07-10dm: doc: update of-plat with new phandle supportWalter Lozano1-8/+16
Update documentation to reflect the new phandle support when OF_PLATDATA is used. Now phandles are implemented as pointers to U_BOOT_DEVICE, which makes it possible to get a pointer to the actual device. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-10dm: doc: update of-plat with the support for driver aliasesWalter Lozano1-1/+13
Update the documentation with the support for driver aliases using U_BOOT_DRIVER_ALIAS. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-06-12doc: driver-model: fix typo in design.rstDario Binacchi1-1/+1
Fix the 'memeber' typo in doc/driver-model/design.rst. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-06-12doc: driver-model: there is no UCLASS_SATAHeinrich Schuchardt1-1/+1
%s/UCLASS_SATA/UCLASS_AHCI/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-06-01doc: driver-model: Update SPI migration statusJagan Teki1-2/+0
DM_SPI migration status fror v2020.07 removed: lpc32xx_ssp.c sh_spi.c Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-04-16dm: core: Read parent ofdata before childrenSimon Glass1-24/+70
At present a device can read its ofdata before its parent has done the same. This can cause problems in the case where the parent has a 'ranges' property, thus affecting the operation of dev_read_addr(), for example. We already probe parent devices before children so it does not seem to be a large step to do the same with ofdata. Make the change and update the documentation in this area. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ley Foon Tan <ley.foon.tan@intel.com>
2020-04-16doc: driver-model: there is no UCLASS_ETHERNETHeinrich Schuchardt1-1/+1
%s/UCLASS_ETHERNET/UCLASS_ETH/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-16sandbox: Update PCI nodes in dts filesTom Rini1-5/+5
The way the PCI nodes are written today causes a number of warnings if we stop disabling some of the warnings we pass to DTC. As these warnings aren't disabled in current Linux Kernel builds, we should aim to not disable them here either, so rewrite these slightly. Update the driver model doc as well. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-10doc: net: Rewrite network driver documentationAndre Przywara2-0/+322
doc/README.drivers.eth seems like a good source for understanding U-Boot's network subsystem, but is only talking about legacy network drivers. This is particularly sad as proper documentation would help in porting drivers over to the driver model. Rewrite the document to describe network drivers in the new driver model world. Most driver callbacks/methods are almost identical in their semantic, but recv() differs in some important details. Also keep some parts of the original text at the end, to help understanding old drivers. Add some hints on how to port drivers over. This also uses the opportunity to reformat the document in reST, on the way moving it into doc/driver-model and adding it into the structure there. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-02-11Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini1-2/+2
sandbox conversion to SDL2 TPM TEE driver Various minor sandbox video enhancements New driver model core utility functions
2020-02-11dm: fix design.rst documentDario Binacchi1-4/+4
The patch fixes some errors. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-06doc: dm: debugging: Fix the steps for activating debugFabio Estevam1-2/+2
Following the recommendation of adding '#define DEBUG' at the top of drivers/core/lists.c does not cause the debug messages to be shown. Change it to '#define LOG_DEBUG' instead, which actually makes it work as per doc/README.log. While at it, provide the full path to lists.c to in order to make the instructions clearer. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-15dm: doc: Add a note about of-platdata and header filesSimon Glass1-0/+6
We don't want to include dt-structs.h in header files, so add a note about that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-03dm: doc: Correct of-platdata driver nameSimon Glass1-1/+1
Add a note about the driver name in the of-platdata documentation since the naming must follow the compatible string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-24dm: spi: Change cs_info op to return -EINVAL for invalid cs numBin Meng1-2/+2
We need distinguish the following two situations in various SPI APIs: - given chip select num is invalid - given chip select num is valid, but no device is attached Currently -ENODEV is returned for both cases. For the first case, it's more reasonable to return -EINVAL instead of -ENODEV for invalid chip select numbers. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # SoPine Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-10-24dm: spi: Return 0 if driver does not implement ops->cs_infoBin Meng1-2/+2
If an SPI controller driver does not implement ops->cs_info, that probably means any chip select number could be valid, hence let's return 0 for spi_cs_info(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # SoPine Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-10-15doc: add full path to patman READMERalph Siemsen1-1/+1
Make it a little easier to find the documentation. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-08pci: Correct 'specifified' and 'Plese' typosSimon Glass1-1/+1
Fix these spelling errors the header file and documentation. Fix a small typo in the PCI documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08pci: sandbox: Move the emulators into their own nodeSimon Glass1-11/+12
Sandbox pci works using emulation drivers which are currently children of the pci device: pci-controller { pci@1f,0 { compatible = "pci-generic"; reg = <0xf800 0 0 0 0>; emul@1f,0 { compatible = "sandbox,swap-case"; }; }; }; In this case the emulation device is attached to pci device on address f800 (device 1f, function 0) and provides the swap-case functionality. However this is not ideal, since every device on a PCI bus has a child device. This is only really the case for sandbox, but we want to avoid special-case code for sandbox. Worse, child devices cannot be probed before their parents. This forces us to use 'find' rather than 'get' to obtain the emulator device. In fact the emulator devices are never probed. There is code in sandbox_pci_emul_post_probe() which tries to track when emulators are active, but at present this does not work. A better approach seems to be to add a separate node elsewhere in the device tree, an 'emulation parent'. This could be given a bogus address (such as -1) to hide the emulators away from the 'pci' command, but it seems better to keep it at the root node to avoid such hacks. Then we can use a phandle to point from the device to the correct emulator, and only on sandbox. The code to find an emulator does not interfere with normal pci operation. Add a new UCLASS_PCI_EMUL_PARENT uclass which allows finding an emulator given a bus, and finding a bus given an emulator. Update the existing device trees and the code for finding an emulator. This brings PCI emulators more into line with I2C. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fix 3 typos in the commit message; encode bus number in the labels of swap_case_emul nodes; mention commit 4345998ae9df in sandbox_pci_get_emul()] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08dm: core: Add documentation on how to debug driver modelSimon Glass2-0/+63
Sometimes devices don't appear and it can be confusing. Add a few notes to help with this situation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fix 2 issues in the doc and include the doc in the index.rst] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-09-19dm: MIGRATION: Add migration plan for CONFIG_DMHeinrich Schuchardt1-0/+10
For many sub-systems we already require the driver model to be used. Yet there is still a handful of boards that do not have CONFIG_DM enabled. We should make CONFIG_DM compulsory with release v2020.01 Conversion dates for CONFIG_DM_SPL and CONFIG_DM_TPL are yet to be defined. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-09-19doc: fix: Replace SPL_OF_PLATDATA with OF_PLATDATA in examplesLukasz Majewski1-4/+4
The of-plat.rst file till this change has been using This is at best misleading as SPL_OF_PLATDATA is always defined when we want to use this SPL tinification feature (also in U-Boot proper). As a result the OF_PLATDATA SPL specific code is also compiled in when U-Boot proper is build. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-09-16doc: driver-model: Update SPI migration statusJagan Teki1-2/+1
Update SPI drivers, driver model conversion status for v2019.10 release. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-09-04network: set timeline for CONFIG_DM_ETH conversionHeinrich Schuchardt1-0/+8
The driver model has been supported for network drivers since 2015. It is time to convert the remaining boards. Set July 2020 as a timeline. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-24doc: driver-model: Convert usb-info.txt to reSTBin Meng2-88/+97
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert spi-howto.txt to reSTBin Meng3-623/+693
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert serial-howto.txt to reSTBin Meng2-5/+8
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert remoteproc-framework.txt to reSTBin Meng2-90/+92
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert pmic-framework.txt to reSTBin Meng2-64/+68
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert pci-info.txt to reSTBin Meng2-9/+13
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert of-plat.txt to reSTBin Meng2-88/+106
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert livetree.txt to reSTBin Meng2-40/+55
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert i2c-howto.txt to reSTBin Meng2-17/+20
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert fs_firmware_loader.txt to reSTBin Meng3-148/+155
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert fdt-fixup.txt to reSTBin Meng2-28/+29
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-24doc: driver-model: Convert MIGRATION.txt to reSTBin Meng2-23/+22
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-07-24doc: driver-model: Convert README.txt to reSTBin Meng2-282/+309
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-07-24doc: Add driver-model to Sphinx TOC treeBin Meng1-0/+7
Add index.rst for driver model. More docs will be added later. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glkpk@gmx.de>
2019-07-11dm: doc: add documentation for pre-reloc properties in SPL and TPLPatrick Delaunay1-0/+4
Add documentation for the pre-reloc property in SPL and TPL device-tree: - u-boot,dm-pre-proper - u-boot,dm-pre-reloc - u-boot,dm-spl - u-boot,dm-tpl Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-06-10dm: MIGRATION: Update migration status for SPIJagan Teki1-5/+1
Now, we have few driver are fully converted into dm and few are partially converted. So, update the migration status accordingly. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-04-23misc: fs_loader: Replace label with DT phandleTien Fong Chee1-13/+49
In previously label which will be expanded to the node's full path was used, and now replacing label with most commonly used DT phandle. The codes were changed accordingly to the use of DT phandle and supporting multiple instances. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-04-17spi: ti_qspi: Drop non DM codeVignesh Raghavendra1-1/+0
Now that all boards using TI QSPI have moved to DM and DT, drop non DM code completely. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [jagan: update MIGRATION.txt, rebase config_whitelist.txt] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-02-09of-platdata: improve documentationSimon Goldschmidt1-11/+20
Improve some things in the documentation of OF_PLATDATA that I found while porting socfgpa_gen5 to it. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>