A Tour of USB Device Controller (UDC) in Linux - Hervé Codina, Bootlin

A Tour of USB Device Controller (UDC) in Linux - Hervé Codina, Bootlin This talk is a presentation of the USB Device Controller (UDC) subsystem in Linux. It will focus on USB 2.0 devices but the topics presented will also be relevant for USB3. A USB Device Controller (UDC) is one component of a USB Gadget. A USB gadget is made of one or more USB functions exposed through one UDC. The USB functions are in charge of the functionalities and the UDC handles the transfers on the USB Endpoints involved in the USB gadget and drives the hardware to perform such transfers. In this talk, we will first give an introduction to the USB 2.0 standard. We will highlight the different types of transfers, the available standard control requests and the standard device states. Then, based on the USB 2.0 standard introduction, we will describe the goal of the UDCs and how they are implemented in the Linux kernel with a particular focus on the USB EP0 control handling involved in the USB enumeration process. The last part will present a tool available and several pre-composed USB gadgets that can be used to test a UDC.