1 .. SPDX-License-Identifier: GPL-2.0+
2 .. sectionauthor:: Patrice Chotard <patrice.chotard@foss.st.com>
4 Binding/unbinding a driver
5 ==========================
7 This document aims to describe the bind and unbind commands.
9 For debugging purpose, it should be useful to bind or unbind a driver from
10 the U-boot command line.
12 The unbind command calls the remove device driver callback and unbind the
13 device from its driver.
15 The bind command binds a device to its driver.
17 In some cases it can be useful to be able to bind a device to a driver from
19 The obvious example is for versatile devices such as USB gadget.
20 Another use case is when the devices are not yet ready at startup and
21 require some setup before the drivers are bound (ex: FPGA which bitsream is
22 fetched from a mass storage or ethernet)
26 bind <node path> <driver>
27 bind <class> <index> <driver>
30 unbind <class> <index>
31 unbind <class> <index> <driver>
34 - <node path> is the node's device tree path
35 - <class> is one of the class available in the list given by the "dm uclass"
36 command or first column of "dm tree" command.
37 - <index> is the index of the parent's node (second column of "dm tree" output).
38 - <driver> is the driver name to bind given by the "dm drivers" command or the by
39 the fourth column of "dm tree" output.
43 bind usb_dev_generic 0 usb_ether
44 unbind usb_dev_generic 0 usb_ether
48 bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
49 unbind /ocp/omap_dwc3@48380000/usb@48390000