summaryrefslogtreecommitdiff
path: root/doc/develop/driver-model/bind.rst
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-03-26 12:15:26 -0400
committerTom Rini <[email protected]>2021-03-26 12:15:26 -0400
commit9c7335e4e68355a96bd5a411b2a5f85866823c58 (patch)
treecbe17eb256a5e8078a1bd7793592ebd2de1470a5 /doc/develop/driver-model/bind.rst
parent4be994b0e1f006c271e0791a60b6363137542090 (diff)
parentfcae6682a7929abf88d9f0b756f9d5f9725e4d14 (diff)
Merge tag 'dm-pull-26mar21-take2' of git://git.denx.de/u-boot-dm into next
dtoc support for of-platdata-inst driver model support for of-platdata-inst support of-platdata-inst on x86 / coral binman support for exapanded entries binman convert docs to reST ti-sysc fix for duplicate uclass driver patman minor improvements pylibfdt build only if needed correct obscure CI error with OF_PLATDATA_INST
Diffstat (limited to 'doc/develop/driver-model/bind.rst')
-rw-r--r--doc/develop/driver-model/bind.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/develop/driver-model/bind.rst b/doc/develop/driver-model/bind.rst
new file mode 100644
index 00000000000..b19661b5fe2
--- /dev/null
+++ b/doc/develop/driver-model/bind.rst
@@ -0,0 +1,49 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. sectionauthor:: Patrice Chotard <[email protected]>
+
+Binding/unbinding a driver
+==========================
+
+This document aims to describe the bind and unbind commands.
+
+For debugging purpose, it should be useful to bind or unbind a driver from
+the U-boot command line.
+
+The unbind command calls the remove device driver callback and unbind the
+device from its driver.
+
+The bind command binds a device to its driver.
+
+In some cases it can be useful to be able to bind a device to a driver from
+the command line.
+The obvious example is for versatile devices such as USB gadget.
+Another use case is when the devices are not yet ready at startup and
+require some setup before the drivers are bound (ex: FPGA which bitsream is
+fetched from a mass storage or ethernet)
+
+usage:
+
+bind <node path> <driver>
+bind <class> <index> <driver>
+
+unbind <node path>
+unbind <class> <index>
+unbind <class> <index> <driver>
+
+Where:
+ - <node path> is the node's device tree path
+ - <class> is one of the class available in the list given by the "dm uclass"
+ command or first column of "dm tree" command.
+ - <index> is the index of the parent's node (second column of "dm tree" output).
+ - <driver> is the driver name to bind given by the "dm drivers" command or the by
+ the fourth column of "dm tree" output.
+
+example:
+
+bind usb_dev_generic 0 usb_ether
+unbind usb_dev_generic 0 usb_ether
+or
+unbind eth 1
+
+bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
+unbind /ocp/omap_dwc3@48380000/usb@48390000