USB Controller ===================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`Architecure ` * :ref:`HW ` * :ref:`SW ` * :ref:`Applications & Libraries ` * :ref:`Kernel & Driver modules ` * :ref:`List of driver modules ` * :ref:`Use case ` * :ref:`Driver Development ` * :ref:`Custom build of driver modules ` * :ref:`Load custom built driver modules ` * :ref:`Init path ` * :ref:`Control path ` * :ref:`Data path ` * :ref:`Contexts ` * :ref:`Threads ` * :ref:`Timers ` * :ref:`Interrupts ` * :ref:`Data Structures ` * :ref:`FAQs ` * :ref:`Reference links ` .. _FreebsdDeviceDriver_usb_controller_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * USB Controller .. _FreebsdDeviceDriver_usb_controller_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _FreebsdDeviceDriver_usb_controller_step3: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Freebsd 14.1.0 =============================== ======================================= .. _FreebsdDeviceDriver_usb_controller_step4: .. tab-set:: .. tab-item:: Architecture * Architecture .. _FreebsdDeviceDriver_usb_controller_step5: .. tab-set:: .. tab-item:: HW .. code-block:: c test:~$ pciconf | grep USB test:~$ usbconfig .. _FreebsdDeviceDriver_usb_controller_step6: .. tab-set:: .. tab-item:: SW .. _FreebsdDeviceDriver_usb_controller_step7: .. tab-set:: .. tab-item:: Applications & Libraries .. code-block:: c test:~$ usbconfig .. _FreebsdDeviceDriver_usb_controller_step8: .. tab-set:: .. tab-item:: Kernel & Driver modules .. _FreebsdDeviceDriver_usb_controller_step9: .. tab-set:: .. tab-item:: List of driver modules .. tab-set:: .. tab-item:: 1. usb.ko .. csv-table:: :file: ./usb_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 2. ohci.ko .. csv-table:: :file: ./ohci_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 3. xhci.ko .. csv-table:: :file: ./xhci_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 4. uhci.ko .. csv-table:: :file: ./uhci_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 5. ehci.ko .. csv-table:: :file: ./ehci_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 6. umass.ko .. csv-table:: :file: ./umass_ko.csv :widths: 50, 50 .. _FreebsdDeviceDriver_usb_controller_step10: .. tab-set:: .. tab-item:: Use case .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step11: .. tab-set:: .. tab-item:: Driver Development .. _FreebsdDeviceDriver_usb_controller_step12: .. tab-set:: .. tab-item:: Custom build of driver modules * Source path : /usr/src/sys/dev/usb/ --> add the source code changes in this directory * Compile path : /usr/src/sys/modules/usb * Binary file: /usr/obj/usr/src/amd64.amd64/sys/modules/usb/ .. code-block:: c test:~$ cd /usr/src/sys/modules/usb test:~$ make .. _FreebsdDeviceDriver_usb_controller_step13: .. tab-set:: .. tab-item:: Load custom built driver modules * Run the make install command , it will copy the compiled module into /boot/modules directory .. code-block:: c test:~$ cd /usr/src/sys/modules/usb test:~$ make install test:~$ kldload usb.ko test:~$ kldload ohci.ko test:~$ kldload ehci.ko test:~$ kldload xhci.ko test:~$ kldload ukbd.ko test:~$ kldload umass.ko * Check the loaded modules .. code-block:: c test:~$ kldstat Id Refs Address Size Name 1 29 0xffffffff80200000 1f6c698 kernel 2 1 0xffffffff8216d000 7850 cryptodev.ko 3 1 0xffffffff82176000 772c70 zfs.ko 4 1 0xffffffff83218000 3220 intpm.ko 5 1 0xffffffff8321c000 2178 smbus.ko 6 1 0xffffffff8321f000 3360 uhid.ko 7 1 0xffffffff83223000 3360 wmt.ko 8 1 0xffffffff8323d000 2578 usb.ko 9 1 0xffffffff83241000 3567 ohci.ko 10 1 0xffffffff8324f000 3441 ehci.ko 11 1 0xffffffff83252000 3418 xhci.ko 12 1 0xffffffff8325c000 2467 ukbd.ko 13 1 0xffffffff83260000 3218 umass.ko .. _FreebsdDeviceDriver_usb_controller_step14: .. tab-set:: .. tab-item:: Init path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step15: .. tab-set:: .. tab-item:: Control path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step16: .. tab-set:: .. tab-item:: Data path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step17: .. tab-set:: .. tab-item:: Contexts .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step18: .. tab-set:: .. tab-item:: Threads .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step19: .. tab-set:: .. tab-item:: Timers .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step20: .. tab-set:: .. tab-item:: Interrupts .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step21: .. tab-set:: .. tab-item:: Data Structures .. code-block:: c test:~$ .. _FreebsdDeviceDriver_usb_controller_step22: .. tab-set:: .. tab-item:: FAQs * FAQs .. _FreebsdDeviceDriver_usb_controller_step23: .. tab-set:: .. tab-item:: Reference links * `USB Devices `_