xref: /linux/Documentation/driver-api/usb/dwc3.rst (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
18b4cfe0bSFelipe Balbi===============================================================
28b4cfe0bSFelipe BalbiSynopsys DesignWare Core SuperSpeed USB 3.0 Controller
38b4cfe0bSFelipe Balbi===============================================================
48b4cfe0bSFelipe Balbi
58b4cfe0bSFelipe Balbi:Author: Felipe Balbi <felipe.balbi@linux.intel.com>
68b4cfe0bSFelipe Balbi:Date: April 2017
78b4cfe0bSFelipe Balbi
88b4cfe0bSFelipe BalbiIntroduction
98b4cfe0bSFelipe Balbi============
108b4cfe0bSFelipe Balbi
118b4cfe0bSFelipe BalbiThe *Synopsys DesignWare Core SuperSpeed USB 3.0 Controller*
128b4cfe0bSFelipe Balbi(hereinafter referred to as *DWC3*) is a USB SuperSpeed compliant
138b4cfe0bSFelipe Balbicontroller which can be configured in one of 4 ways:
148b4cfe0bSFelipe Balbi
158b4cfe0bSFelipe Balbi	1. Peripheral-only configuration
168b4cfe0bSFelipe Balbi	2. Host-only configuration
178b4cfe0bSFelipe Balbi	3. Dual-Role configuration
188b4cfe0bSFelipe Balbi	4. Hub configuration
198b4cfe0bSFelipe Balbi
208b4cfe0bSFelipe BalbiLinux currently supports several versions of this controller. In all
21*7852fe3aSRandy Dunlaplikelihood, the version in your SoC is already supported. At the time
228b4cfe0bSFelipe Balbiof this writing, known tested versions range from 2.02a to 3.10a. As a
238b4cfe0bSFelipe Balbirule of thumb, anything above 2.02a should work reliably well.
248b4cfe0bSFelipe Balbi
258b4cfe0bSFelipe BalbiCurrently, we have many known users for this driver. In alphabetical
268b4cfe0bSFelipe Balbiorder:
278b4cfe0bSFelipe Balbi
288b4cfe0bSFelipe Balbi	1. Cavium
298b4cfe0bSFelipe Balbi	2. Intel Corporation
308b4cfe0bSFelipe Balbi	3. Qualcomm
318b4cfe0bSFelipe Balbi	4. Rockchip
328b4cfe0bSFelipe Balbi	5. ST
338b4cfe0bSFelipe Balbi	6. Samsung
348b4cfe0bSFelipe Balbi	7. Texas Instruments
358b4cfe0bSFelipe Balbi	8. Xilinx
368b4cfe0bSFelipe Balbi
378b4cfe0bSFelipe BalbiSummary of Features
388b4cfe0bSFelipe Balbi======================
398b4cfe0bSFelipe Balbi
408b4cfe0bSFelipe BalbiFor details about features supported by your version of DWC3, consult
418b4cfe0bSFelipe Balbiyour IP team and/or *Synopsys DesignWare Core SuperSpeed USB 3.0
428b4cfe0bSFelipe BalbiController Databook*. Following is a list of features supported by the
438b4cfe0bSFelipe Balbidriver at the time of this writing:
448b4cfe0bSFelipe Balbi
458b4cfe0bSFelipe Balbi	1. Up to 16 bidirectional endpoints (including the control
468b4cfe0bSFelipe Balbi	   pipe - ep0)
478b4cfe0bSFelipe Balbi	2. Flexible endpoint configuration
488b4cfe0bSFelipe Balbi	3. Simultaneous IN and OUT transfer support
498b4cfe0bSFelipe Balbi	4. Scatter-list support
508b4cfe0bSFelipe Balbi	5. Up to 256 TRBs [#trb]_ per endpoint
518b4cfe0bSFelipe Balbi	6. Support for all transfer types (*Control*, *Bulk*,
528b4cfe0bSFelipe Balbi	   *Interrupt*, and *Isochronous*)
538b4cfe0bSFelipe Balbi	7. SuperSpeed Bulk Streams
548b4cfe0bSFelipe Balbi	8. Link Power Management
558b4cfe0bSFelipe Balbi	9. Trace Events for debugging
568b4cfe0bSFelipe Balbi	10. DebugFS [#debugfs]_ interface
578b4cfe0bSFelipe Balbi
588b4cfe0bSFelipe BalbiThese features have all been exercised with many of the **in-tree**
598b4cfe0bSFelipe Balbigadget drivers. We have verified both *ConfigFS* [#configfs]_ and
608b4cfe0bSFelipe Balbilegacy gadget drivers.
618b4cfe0bSFelipe Balbi
628b4cfe0bSFelipe BalbiDriver Design
638b4cfe0bSFelipe Balbi==============
648b4cfe0bSFelipe Balbi
658b4cfe0bSFelipe BalbiThe DWC3 driver sits on the *drivers/usb/dwc3/* directory. All files
668b4cfe0bSFelipe Balbirelated to this driver are in this one directory. This makes it easy
678b4cfe0bSFelipe Balbifor new-comers to read the code and understand how it behaves.
688b4cfe0bSFelipe Balbi
698b4cfe0bSFelipe BalbiBecause of DWC3's configuration flexibility, the driver is a little
708b4cfe0bSFelipe Balbicomplex in some places but it should be rather straightforward to
718b4cfe0bSFelipe Balbiunderstand.
728b4cfe0bSFelipe Balbi
738b4cfe0bSFelipe BalbiThe biggest part of the driver refers to the Gadget API.
748b4cfe0bSFelipe Balbi
758b4cfe0bSFelipe BalbiKnown Limitations
768b4cfe0bSFelipe Balbi===================
778b4cfe0bSFelipe Balbi
788b4cfe0bSFelipe BalbiLike any other HW, DWC3 has its own set of limitations. To avoid
798b4cfe0bSFelipe Balbiconstant questions about such problems, we decided to document them
808b4cfe0bSFelipe Balbihere and have a single location to where we could point users.
818b4cfe0bSFelipe Balbi
828b4cfe0bSFelipe BalbiOUT Transfer Size Requirements
838b4cfe0bSFelipe Balbi---------------------------------
848b4cfe0bSFelipe Balbi
858b4cfe0bSFelipe BalbiAccording to Synopsys Databook, all OUT transfer TRBs [#trb]_ must
868b4cfe0bSFelipe Balbihave their *size* field set to a value which is integer divisible by
878b4cfe0bSFelipe Balbithe endpoint's *wMaxPacketSize*. This means that *e.g.* in order to
888b4cfe0bSFelipe Balbireceive a Mass Storage *CBW* [#cbw]_, req->length must either be set
898b4cfe0bSFelipe Balbito a value that's divisible by *wMaxPacketSize* (1024 on SuperSpeed,
908b4cfe0bSFelipe Balbi512 on HighSpeed, etc), or DWC3 driver must add a Chained TRB pointing
918b4cfe0bSFelipe Balbito a throw-away buffer for the remaining length. Without this, OUT
928b4cfe0bSFelipe Balbitransfers will **NOT** start.
938b4cfe0bSFelipe Balbi
948b4cfe0bSFelipe BalbiNote that as of this writing, this won't be a problem because DWC3 is
958b4cfe0bSFelipe Balbifully capable of appending a chained TRB for the remaining length and
968b4cfe0bSFelipe Balbicompletely hide this detail from the gadget driver. It's still worth
978b4cfe0bSFelipe Balbimentioning because this seems to be the largest source of queries
988b4cfe0bSFelipe Balbiabout DWC3 and *non-working transfers*.
998b4cfe0bSFelipe Balbi
1008b4cfe0bSFelipe BalbiTRB Ring Size Limitation
1018b4cfe0bSFelipe Balbi-------------------------
1028b4cfe0bSFelipe Balbi
1038b4cfe0bSFelipe BalbiWe, currently, have a hard limit of 256 TRBs [#trb]_ per endpoint,
1048b4cfe0bSFelipe Balbiwith the last TRB being a Link TRB [#link_trb]_ pointing back to the
1058b4cfe0bSFelipe Balbifirst. This limit is arbitrary but it has the benefit of adding up to
1068b4cfe0bSFelipe Balbiexactly 4096 bytes, or 1 Page.
1078b4cfe0bSFelipe Balbi
1088b4cfe0bSFelipe BalbiDWC3 driver will try its best to cope with more than 255 requests and,
1098b4cfe0bSFelipe Balbifor the most part, it should work normally. However this is not
1108b4cfe0bSFelipe Balbisomething that has been exercised very frequently. If you experience
1118b4cfe0bSFelipe Balbiany problems, see section **Reporting Bugs** below.
1128b4cfe0bSFelipe Balbi
1138b4cfe0bSFelipe BalbiReporting Bugs
1148b4cfe0bSFelipe Balbi================
1158b4cfe0bSFelipe Balbi
1168b4cfe0bSFelipe BalbiWhenever you encounter a problem with DWC3, first and foremost you
1178b4cfe0bSFelipe Balbishould make sure that:
1188b4cfe0bSFelipe Balbi
1198b4cfe0bSFelipe Balbi	1. You're running latest tag from `Linus' tree`_
1208b4cfe0bSFelipe Balbi	2. You can reproduce the error without any out-of-tree changes
1218b4cfe0bSFelipe Balbi	   to DWC3
1228b4cfe0bSFelipe Balbi	3. You have checked that it's not a fault on the host machine
1238b4cfe0bSFelipe Balbi
1248b4cfe0bSFelipe BalbiAfter all these are verified, then here's how to capture enough
1258b4cfe0bSFelipe Balbiinformation so we can be of any help to you.
1268b4cfe0bSFelipe Balbi
1278b4cfe0bSFelipe BalbiRequired Information
1288b4cfe0bSFelipe Balbi---------------------
1298b4cfe0bSFelipe Balbi
1308b4cfe0bSFelipe BalbiDWC3 relies exclusively on Trace Events for debugging. Everything is
1318b4cfe0bSFelipe Balbiexposed there, with some extra bits being exposed to DebugFS
1328b4cfe0bSFelipe Balbi[#debugfs]_.
1338b4cfe0bSFelipe Balbi
1348b4cfe0bSFelipe BalbiIn order to capture DWC3's Trace Events you should run the following
1358b4cfe0bSFelipe Balbicommands **before** plugging the USB cable to a host machine:
1368b4cfe0bSFelipe Balbi
1378b4cfe0bSFelipe Balbi.. code-block:: sh
1388b4cfe0bSFelipe Balbi
1398b4cfe0bSFelipe Balbi		 # mkdir -p /d
1408b4cfe0bSFelipe Balbi		 # mkdir -p /t
1418b4cfe0bSFelipe Balbi		 # mount -t debugfs none /d
1428b4cfe0bSFelipe Balbi		 # mount -t tracefs none /t
1438b4cfe0bSFelipe Balbi		 # echo 81920 > /t/buffer_size_kb
1448b4cfe0bSFelipe Balbi		 # echo 1 > /t/events/dwc3/enable
1458b4cfe0bSFelipe Balbi
1468b4cfe0bSFelipe BalbiAfter this is done, you can connect your USB cable and reproduce the
1478b4cfe0bSFelipe Balbiproblem. As soon as the fault is reproduced, make a copy of files
1488b4cfe0bSFelipe Balbi``trace`` and ``regdump``, like so:
1498b4cfe0bSFelipe Balbi
1508b4cfe0bSFelipe Balbi.. code-block:: sh
1518b4cfe0bSFelipe Balbi
1528b4cfe0bSFelipe Balbi		# cp /t/trace /root/trace.txt
1538b4cfe0bSFelipe Balbi		# cat /d/*dwc3*/regdump > /root/regdump.txt
1548b4cfe0bSFelipe Balbi
1558b4cfe0bSFelipe BalbiMake sure to compress ``trace.txt`` and ``regdump.txt`` in a tarball
1568b4cfe0bSFelipe Balbiand email it to `me`_ with `linux-usb`_ in Cc. If you want to be extra
1578b4cfe0bSFelipe Balbisure that I'll help you, write your subject line in the following
1588b4cfe0bSFelipe Balbiformat:
1598b4cfe0bSFelipe Balbi
1608b4cfe0bSFelipe Balbi	**[BUG REPORT] usb: dwc3: Bug while doing XYZ**
1618b4cfe0bSFelipe Balbi
1628b4cfe0bSFelipe BalbiOn the email body, make sure to detail what you doing, which gadget
1638b4cfe0bSFelipe Balbidriver you were using, how to reproduce the problem, what SoC you're
1648b4cfe0bSFelipe Balbiusing, which OS (and its version) was running on the Host machine.
1658b4cfe0bSFelipe Balbi
1668b4cfe0bSFelipe BalbiWith all this information, we should be able to understand what's
1678b4cfe0bSFelipe Balbigoing on and be helpful to you.
1688b4cfe0bSFelipe Balbi
1698b4cfe0bSFelipe BalbiDebugging
1708b4cfe0bSFelipe Balbi===========
1718b4cfe0bSFelipe Balbi
1728b4cfe0bSFelipe BalbiFirst and foremost a disclaimer::
1738b4cfe0bSFelipe Balbi
1748b4cfe0bSFelipe Balbi  DISCLAIMER: The information available on DebugFS and/or TraceFS can
1758b4cfe0bSFelipe Balbi  change at any time at any Major Linux Kernel Release. If writing
1768b4cfe0bSFelipe Balbi  scripts, do **NOT** assume information to be available in the
1778b4cfe0bSFelipe Balbi  current format.
1788b4cfe0bSFelipe Balbi
1798b4cfe0bSFelipe BalbiWith that out of the way, let's carry on.
1808b4cfe0bSFelipe Balbi
1818b4cfe0bSFelipe BalbiIf you're willing to debug your own problem, you deserve a round of
1828b4cfe0bSFelipe Balbiapplause :-)
1838b4cfe0bSFelipe Balbi
1848b4cfe0bSFelipe BalbiAnyway, there isn't much to say here other than Trace Events will be
1858b4cfe0bSFelipe Balbireally helpful in figuring out issues with DWC3. Also, access to
1868b4cfe0bSFelipe BalbiSynopsys Databook will be **really** valuable in this case.
1878b4cfe0bSFelipe Balbi
1888b4cfe0bSFelipe BalbiA USB Sniffer can be helpful at times but it's not entirely required,
1898b4cfe0bSFelipe Balbithere's a lot that can be understood without looking at the wire.
1908b4cfe0bSFelipe Balbi
1918b4cfe0bSFelipe BalbiFeel free to email `me`_ and Cc `linux-usb`_ if you need any help.
1928b4cfe0bSFelipe Balbi
1938b4cfe0bSFelipe Balbi``DebugFS``
1948b4cfe0bSFelipe Balbi-------------
1958b4cfe0bSFelipe Balbi
1968b4cfe0bSFelipe Balbi``DebugFS`` is very good for gathering snapshots of what's going on
1978b4cfe0bSFelipe Balbiwith DWC3 and/or any endpoint.
1988b4cfe0bSFelipe Balbi
1998b4cfe0bSFelipe BalbiOn DWC3's ``DebugFS`` directory, you will find the following files and
2008b4cfe0bSFelipe Balbidirectories:
2018b4cfe0bSFelipe Balbi
2028b4cfe0bSFelipe Balbi``ep[0..15]{in,out}/``
2038b4cfe0bSFelipe Balbi``link_state``
2048b4cfe0bSFelipe Balbi``regdump``
2058b4cfe0bSFelipe Balbi``testmode``
2068b4cfe0bSFelipe Balbi
2078b4cfe0bSFelipe Balbi``link_state``
2088b4cfe0bSFelipe Balbi``````````````
2098b4cfe0bSFelipe Balbi
2108b4cfe0bSFelipe BalbiWhen read, ``link_state`` will print out one of ``U0``, ``U1``,
2118b4cfe0bSFelipe Balbi``U2``, ``U3``, ``SS.Disabled``, ``RX.Detect``, ``SS.Inactive``,
2128b4cfe0bSFelipe Balbi``Polling``, ``Recovery``, ``Hot Reset``, ``Compliance``,
2138b4cfe0bSFelipe Balbi``Loopback``, ``Reset``, ``Resume`` or ``UNKNOWN link state``.
2148b4cfe0bSFelipe Balbi
2158b4cfe0bSFelipe BalbiThis file can also be written to in order to force link to one of the
2168b4cfe0bSFelipe Balbistates above.
2178b4cfe0bSFelipe Balbi
2188b4cfe0bSFelipe Balbi``regdump``
2198b4cfe0bSFelipe Balbi`````````````
2208b4cfe0bSFelipe Balbi
2218b4cfe0bSFelipe BalbiFile name is self-explanatory. When read, ``regdump`` will print out a
2228b4cfe0bSFelipe Balbiregister dump of DWC3. Note that this file can be grepped to find the
2238b4cfe0bSFelipe Balbiinformation you want.
2248b4cfe0bSFelipe Balbi
2258b4cfe0bSFelipe Balbi``testmode``
2268b4cfe0bSFelipe Balbi``````````````
2278b4cfe0bSFelipe Balbi
2288b4cfe0bSFelipe BalbiWhen read, ``testmode`` will print out a name of one of the specified
2298b4cfe0bSFelipe BalbiUSB 2.0 Testmodes (``test_j``, ``test_k``, ``test_se0_nak``,
2308b4cfe0bSFelipe Balbi``test_packet``, ``test_force_enable``) or the string ``no test`` in
2318b4cfe0bSFelipe Balbicase no tests are currently being executed.
2328b4cfe0bSFelipe Balbi
2338b4cfe0bSFelipe BalbiIn order to start any of these test modes, the same strings can be
2348b4cfe0bSFelipe Balbiwritten to the file and DWC3 will enter the requested test mode.
2358b4cfe0bSFelipe Balbi
2368b4cfe0bSFelipe Balbi
2378b4cfe0bSFelipe Balbi``ep[0..15]{in,out}``
2388b4cfe0bSFelipe Balbi``````````````````````
2398b4cfe0bSFelipe Balbi
2408b4cfe0bSFelipe BalbiFor each endpoint we expose one directory following the naming
2418b4cfe0bSFelipe Balbiconvention ``ep$num$dir`` *(ep0in, ep0out, ep1in, ...)*. Inside each
2428b4cfe0bSFelipe Balbiof these directories you will find the following files:
2438b4cfe0bSFelipe Balbi
2448b4cfe0bSFelipe Balbi``descriptor_fetch_queue``
2458b4cfe0bSFelipe Balbi``event_queue``
2468b4cfe0bSFelipe Balbi``rx_fifo_queue``
2478b4cfe0bSFelipe Balbi``rx_info_queue``
2488b4cfe0bSFelipe Balbi``rx_request_queue``
2498b4cfe0bSFelipe Balbi``transfer_type``
2508b4cfe0bSFelipe Balbi``trb_ring``
2518b4cfe0bSFelipe Balbi``tx_fifo_queue``
2528b4cfe0bSFelipe Balbi``tx_request_queue``
2538b4cfe0bSFelipe Balbi
2548b4cfe0bSFelipe BalbiWith access to Synopsys Databook, you can decode the information on
2558b4cfe0bSFelipe Balbithem.
2568b4cfe0bSFelipe Balbi
2578b4cfe0bSFelipe Balbi``transfer_type``
2588b4cfe0bSFelipe Balbi~~~~~~~~~~~~~~~~~~
2598b4cfe0bSFelipe Balbi
2608b4cfe0bSFelipe BalbiWhen read, ``transfer_type`` will print out one of ``control``,
2618b4cfe0bSFelipe Balbi``bulk``, ``interrupt`` or ``isochronous`` depending on what the
2628b4cfe0bSFelipe Balbiendpoint descriptor says. If the endpoint hasn't been enabled yet, it
2638b4cfe0bSFelipe Balbiwill print ``--``.
2648b4cfe0bSFelipe Balbi
2658b4cfe0bSFelipe Balbi``trb_ring``
2668b4cfe0bSFelipe Balbi~~~~~~~~~~~~~
2678b4cfe0bSFelipe Balbi
2688b4cfe0bSFelipe BalbiWhen read, ``trb_ring`` will print out details about all TRBs on the
2698b4cfe0bSFelipe Balbiring. It will also tell you where our enqueue and dequeue pointers are
2708b4cfe0bSFelipe Balbilocated in the ring:
2718b4cfe0bSFelipe Balbi
2728b4cfe0bSFelipe Balbi.. code-block:: sh
2738b4cfe0bSFelipe Balbi
2748b4cfe0bSFelipe Balbi		buffer_addr,size,type,ioc,isp_imi,csp,chn,lst,hwo
2758b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
2768b4cfe0bSFelipe Balbi		000000002c75c000,481,normal,1,0,1,0,0,0
2778b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
2788b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
2798b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
2808b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
2818b4cfe0bSFelipe Balbi		000000002c75c000,481,normal,1,0,1,0,0,0
2828b4cfe0bSFelipe Balbi		000000002c784000,481,normal,1,0,1,0,0,0
2838b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
2848b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
2858b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
2868b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
2878b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
2888b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
2898b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
2908b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
2918b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
2928b4cfe0bSFelipe Balbi		000000002c784000,481,normal,1,0,1,0,0,0
2938b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
2948b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
2958b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
2968b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
2978b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
2988b4cfe0bSFelipe Balbi		000000002c784000,481,normal,1,0,1,0,0,0
2998b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3008b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3018b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3028b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3038b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3048b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3058b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3068b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3078b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3088b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3098b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3108b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3118b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3128b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3138b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3148b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3158b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3168b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3178b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3188b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3198b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3208b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3218b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3228b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3238b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3248b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3258b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3268b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3278b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3288b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3298b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3308b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3318b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3328b4cfe0bSFelipe Balbi		000000002c784000,481,normal,1,0,1,0,0,0
3338b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3348b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3358b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
3368b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3378b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3388b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3398b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3408b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3418b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3428b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3438b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3448b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3458b4cfe0bSFelipe Balbi		000000002c75c000,481,normal,1,0,1,0,0,0
3468b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3478b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3488b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
3498b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3508b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
3518b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3528b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3538b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3548b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3558b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
3568b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3578b4cfe0bSFelipe Balbi		000000002c75c000,481,normal,1,0,1,0,0,0
3588b4cfe0bSFelipe Balbi		000000002c780000,481,normal,1,0,1,0,0,0
3598b4cfe0bSFelipe Balbi		000000002c784000,481,normal,1,0,1,0,0,0
3608b4cfe0bSFelipe Balbi		000000002c788000,481,normal,1,0,1,0,0,0
3618b4cfe0bSFelipe Balbi		000000002c78c000,481,normal,1,0,1,0,0,0
3628b4cfe0bSFelipe Balbi		000000002c790000,481,normal,1,0,1,0,0,0
3638b4cfe0bSFelipe Balbi		000000002c754000,481,normal,1,0,1,0,0,0
3648b4cfe0bSFelipe Balbi		000000002c758000,481,normal,1,0,1,0,0,0
3658b4cfe0bSFelipe Balbi		000000002c75c000,512,normal,1,0,1,0,0,1        D
3668b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0       E
3678b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3688b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3698b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3708b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3718b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3728b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3738b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3748b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3758b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3768b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3778b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3788b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3798b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3808b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3818b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3828b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3838b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3848b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3858b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3868b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3878b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3888b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3898b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3908b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3918b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3928b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3938b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3948b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3958b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3968b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3978b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3988b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
3998b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4008b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4018b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4028b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4038b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4048b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4058b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4068b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4078b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4088b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4098b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4108b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4118b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4128b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4138b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4148b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4158b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4168b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4178b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4188b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4198b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4208b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4218b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4228b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4238b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4248b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4258b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4268b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4278b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4288b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4298b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4308b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4318b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4328b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4338b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4348b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4358b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4368b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4378b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4388b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4398b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4408b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4418b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4428b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4438b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4448b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4458b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4468b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4478b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4488b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4498b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4508b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4518b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4528b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4538b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4548b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4558b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4568b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4578b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4588b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4598b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4608b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4618b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4628b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4638b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4648b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4658b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4668b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4678b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4688b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4698b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4708b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4718b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4728b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4738b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4748b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4758b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4768b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4778b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4788b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4798b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4808b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4818b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4828b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4838b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4848b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4858b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4868b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4878b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4888b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4898b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4908b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4918b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4928b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4938b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4948b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4958b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4968b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4978b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4988b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
4998b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5008b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5018b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5028b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5038b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5048b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5058b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5068b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5078b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5088b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5098b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5108b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5118b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5128b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5138b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5148b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5158b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5168b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5178b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5188b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5198b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5208b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5218b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5228b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5238b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5248b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5258b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5268b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5278b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5288b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5298b4cfe0bSFelipe Balbi		0000000000000000,0,UNKNOWN,0,0,0,0,0,0
5308b4cfe0bSFelipe Balbi		00000000381ab000,0,link,0,0,0,0,0,1
5318b4cfe0bSFelipe Balbi
5328b4cfe0bSFelipe Balbi
5338b4cfe0bSFelipe BalbiTrace Events
5348b4cfe0bSFelipe Balbi-------------
5358b4cfe0bSFelipe Balbi
5368b4cfe0bSFelipe BalbiDWC3 also provides several trace events which help us gathering
5378b4cfe0bSFelipe Balbiinformation about the behavior of the driver during runtime.
5388b4cfe0bSFelipe Balbi
5398b4cfe0bSFelipe BalbiIn order to use these events, you must enable ``CONFIG_FTRACE`` in
5408b4cfe0bSFelipe Balbiyour kernel config.
5418b4cfe0bSFelipe Balbi
5428b4cfe0bSFelipe BalbiFor details about how enable DWC3 events, see section **Reporting
5438b4cfe0bSFelipe BalbiBugs**.
5448b4cfe0bSFelipe Balbi
5458b4cfe0bSFelipe BalbiThe following subsections will give details about each Event Class and
5468b4cfe0bSFelipe Balbieach Event defined by DWC3.
5478b4cfe0bSFelipe Balbi
5488b4cfe0bSFelipe BalbiMMIO
5498b4cfe0bSFelipe Balbi```````
5508b4cfe0bSFelipe Balbi
5518b4cfe0bSFelipe BalbiIt is sometimes useful to look at every MMIO access when looking for
5528b4cfe0bSFelipe Balbibugs. Because of that, DWC3 offers two Trace Events (one for
5538b4cfe0bSFelipe Balbidwc3_readl() and one for dwc3_writel()). ``TP_printk`` follows::
5548b4cfe0bSFelipe Balbi
5558b4cfe0bSFelipe Balbi  TP_printk("addr %p value %08x", __entry->base + __entry->offset,
5568b4cfe0bSFelipe Balbi  		__entry->value)
5578b4cfe0bSFelipe Balbi
5588b4cfe0bSFelipe BalbiInterrupt Events
5598b4cfe0bSFelipe Balbi````````````````
5608b4cfe0bSFelipe Balbi
5618b4cfe0bSFelipe BalbiEvery IRQ event can be logged and decoded into a human readable
5628b4cfe0bSFelipe Balbistring. Because every event will be different, we don't give an
5638b4cfe0bSFelipe Balbiexample other than the ``TP_printk`` format used::
5648b4cfe0bSFelipe Balbi
5658b4cfe0bSFelipe Balbi  TP_printk("event (%08x): %s", __entry->event,
5668b4cfe0bSFelipe Balbi  		dwc3_decode_event(__entry->event, __entry->ep0state))
5678b4cfe0bSFelipe Balbi
5688b4cfe0bSFelipe BalbiControl Request
5698b4cfe0bSFelipe Balbi`````````````````
5708b4cfe0bSFelipe Balbi
5718b4cfe0bSFelipe BalbiEvery USB Control Request can be logged to the trace buffer. The
5728b4cfe0bSFelipe Balbioutput format is::
5738b4cfe0bSFelipe Balbi
5748b4cfe0bSFelipe Balbi  TP_printk("%s", dwc3_decode_ctrl(__entry->bRequestType,
5758b4cfe0bSFelipe Balbi  				__entry->bRequest, __entry->wValue,
5768b4cfe0bSFelipe Balbi  				__entry->wIndex, __entry->wLength)
5778b4cfe0bSFelipe Balbi  )
5788b4cfe0bSFelipe Balbi
5798b4cfe0bSFelipe BalbiNote that Standard Control Requests will be decoded into
5808b4cfe0bSFelipe Balbihuman-readable strings with their respective arguments. Class and
5818b4cfe0bSFelipe BalbiVendor requests will be printed out a sequence of 8 bytes in hex
5828b4cfe0bSFelipe Balbiformat.
5838b4cfe0bSFelipe Balbi
5848b4cfe0bSFelipe BalbiLifetime of a ``struct usb_request``
5858b4cfe0bSFelipe Balbi```````````````````````````````````````
5868b4cfe0bSFelipe Balbi
5878b4cfe0bSFelipe BalbiThe entire lifetime of a ``struct usb_request`` can be tracked on the
5888b4cfe0bSFelipe Balbitrace buffer. We have one event for each of allocation, free,
5898b4cfe0bSFelipe Balbiqueueing, dequeueing, and giveback. Output format is::
5908b4cfe0bSFelipe Balbi
5918b4cfe0bSFelipe Balbi  TP_printk("%s: req %p length %u/%u %s%s%s ==> %d",
5928b4cfe0bSFelipe Balbi  	__get_str(name), __entry->req, __entry->actual, __entry->length,
5938b4cfe0bSFelipe Balbi  	__entry->zero ? "Z" : "z",
5948b4cfe0bSFelipe Balbi  	__entry->short_not_ok ? "S" : "s",
5958b4cfe0bSFelipe Balbi  	__entry->no_interrupt ? "i" : "I",
5968b4cfe0bSFelipe Balbi  	__entry->status
5978b4cfe0bSFelipe Balbi  )
5988b4cfe0bSFelipe Balbi
5998b4cfe0bSFelipe BalbiGeneric Commands
6008b4cfe0bSFelipe Balbi````````````````````
6018b4cfe0bSFelipe Balbi
6028b4cfe0bSFelipe BalbiWe can log and decode every Generic Command with its completion
6038b4cfe0bSFelipe Balbicode. Format is::
6048b4cfe0bSFelipe Balbi
6058b4cfe0bSFelipe Balbi  TP_printk("cmd '%s' [%x] param %08x --> status: %s",
6068b4cfe0bSFelipe Balbi  	dwc3_gadget_generic_cmd_string(__entry->cmd),
6078b4cfe0bSFelipe Balbi  	__entry->cmd, __entry->param,
6088b4cfe0bSFelipe Balbi  	dwc3_gadget_generic_cmd_status_string(__entry->status)
6098b4cfe0bSFelipe Balbi  )
6108b4cfe0bSFelipe Balbi
6118b4cfe0bSFelipe BalbiEndpoint Commands
6128b4cfe0bSFelipe Balbi````````````````````
6138b4cfe0bSFelipe Balbi
6148b4cfe0bSFelipe BalbiEndpoints commands can also be logged together with completion
6158b4cfe0bSFelipe Balbicode. Format is::
6168b4cfe0bSFelipe Balbi
6178b4cfe0bSFelipe Balbi  TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status: %s",
6188b4cfe0bSFelipe Balbi  	__get_str(name), dwc3_gadget_ep_cmd_string(__entry->cmd),
6198b4cfe0bSFelipe Balbi  	__entry->cmd, __entry->param0,
6208b4cfe0bSFelipe Balbi  	__entry->param1, __entry->param2,
6218b4cfe0bSFelipe Balbi  	dwc3_ep_cmd_status_string(__entry->cmd_status)
6228b4cfe0bSFelipe Balbi  )
6238b4cfe0bSFelipe Balbi
6248b4cfe0bSFelipe BalbiLifetime of a ``TRB``
6258b4cfe0bSFelipe Balbi``````````````````````
6268b4cfe0bSFelipe Balbi
6278b4cfe0bSFelipe BalbiA ``TRB`` Lifetime is simple. We are either preparing a ``TRB`` or
6288b4cfe0bSFelipe Balbicompleting it. With these two events, we can see how a ``TRB`` changes
6298b4cfe0bSFelipe Balbiover time. Format is::
6308b4cfe0bSFelipe Balbi
6318b4cfe0bSFelipe Balbi  TP_printk("%s: %d/%d trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
6328b4cfe0bSFelipe Balbi  	__get_str(name), __entry->queued, __entry->allocated,
6338b4cfe0bSFelipe Balbi  	__entry->trb, __entry->bph, __entry->bpl,
6348b4cfe0bSFelipe Balbi  	({char *s;
6358b4cfe0bSFelipe Balbi  	int pcm = ((__entry->size >> 24) & 3) + 1;
6368b4cfe0bSFelipe Balbi  	switch (__entry->type) {
6378b4cfe0bSFelipe Balbi  	case USB_ENDPOINT_XFER_INT:
6388b4cfe0bSFelipe Balbi  	case USB_ENDPOINT_XFER_ISOC:
6398b4cfe0bSFelipe Balbi  		switch (pcm) {
6408b4cfe0bSFelipe Balbi  		case 1:
6418b4cfe0bSFelipe Balbi  			s = "1x ";
6428b4cfe0bSFelipe Balbi  			break;
6438b4cfe0bSFelipe Balbi  		case 2:
6448b4cfe0bSFelipe Balbi  			s = "2x ";
6458b4cfe0bSFelipe Balbi  			break;
6468b4cfe0bSFelipe Balbi  		case 3:
6478b4cfe0bSFelipe Balbi  			s = "3x ";
6488b4cfe0bSFelipe Balbi  			break;
6498b4cfe0bSFelipe Balbi  		}
6508b4cfe0bSFelipe Balbi  	default:
6518b4cfe0bSFelipe Balbi  		s = "";
6528b4cfe0bSFelipe Balbi  	} s; }),
6538b4cfe0bSFelipe Balbi  	DWC3_TRB_SIZE_LENGTH(__entry->size), __entry->ctrl,
6548b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_HWO ? 'H' : 'h',
6558b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_LST ? 'L' : 'l',
6568b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_CHN ? 'C' : 'c',
6578b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_CSP ? 'S' : 's',
6588b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_ISP_IMI ? 'S' : 's',
6598b4cfe0bSFelipe Balbi  	__entry->ctrl & DWC3_TRB_CTRL_IOC ? 'C' : 'c',
6608b4cfe0bSFelipe Balbi      dwc3_trb_type_string(DWC3_TRBCTL_TYPE(__entry->ctrl))
6618b4cfe0bSFelipe Balbi  )
6628b4cfe0bSFelipe Balbi
6638b4cfe0bSFelipe BalbiLifetime of an Endpoint
6648b4cfe0bSFelipe Balbi```````````````````````
6658b4cfe0bSFelipe Balbi
6668b4cfe0bSFelipe BalbiAnd endpoint's lifetime is summarized with enable and disable
6678b4cfe0bSFelipe Balbioperations, both of which can be traced. Format is::
6688b4cfe0bSFelipe Balbi
6698b4cfe0bSFelipe Balbi  TP_printk("%s: mps %d/%d streams %d burst %d ring %d/%d flags %c:%c%c%c%c%c:%c:%c",
6708b4cfe0bSFelipe Balbi  	__get_str(name), __entry->maxpacket,
6718b4cfe0bSFelipe Balbi  	__entry->maxpacket_limit, __entry->max_streams,
6728b4cfe0bSFelipe Balbi  	__entry->maxburst, __entry->trb_enqueue,
6738b4cfe0bSFelipe Balbi  	__entry->trb_dequeue,
6748b4cfe0bSFelipe Balbi  	__entry->flags & DWC3_EP_ENABLED ? 'E' : 'e',
6758b4cfe0bSFelipe Balbi  	__entry->flags & DWC3_EP_STALL ? 'S' : 's',
6768b4cfe0bSFelipe Balbi  	__entry->flags & DWC3_EP_WEDGE ? 'W' : 'w',
6775f2e7975SFelipe Balbi  	__entry->flags & DWC3_EP_TRANSFER_STARTED ? 'B' : 'b',
6788b4cfe0bSFelipe Balbi  	__entry->flags & DWC3_EP_PENDING_REQUEST ? 'P' : 'p',
6798b4cfe0bSFelipe Balbi  	__entry->flags & DWC3_EP_END_TRANSFER_PENDING ? 'E' : 'e',
6808b4cfe0bSFelipe Balbi  	__entry->direction ? '<' : '>'
6818b4cfe0bSFelipe Balbi  )
6828b4cfe0bSFelipe Balbi
6838b4cfe0bSFelipe Balbi
6848b4cfe0bSFelipe BalbiStructures, Methods and Definitions
6858b4cfe0bSFelipe Balbi====================================
6868b4cfe0bSFelipe Balbi
6878b4cfe0bSFelipe Balbi.. kernel-doc:: drivers/usb/dwc3/core.h
6888b4cfe0bSFelipe Balbi   :doc: main data structures
6898b4cfe0bSFelipe Balbi   :internal:
6908b4cfe0bSFelipe Balbi
6918b4cfe0bSFelipe Balbi.. kernel-doc:: drivers/usb/dwc3/gadget.h
6928b4cfe0bSFelipe Balbi   :doc: gadget-only helpers
6938b4cfe0bSFelipe Balbi   :internal:
6948b4cfe0bSFelipe Balbi
6958b4cfe0bSFelipe Balbi.. kernel-doc:: drivers/usb/dwc3/gadget.c
6968b4cfe0bSFelipe Balbi   :doc: gadget-side implementation
6978b4cfe0bSFelipe Balbi   :internal:
6988b4cfe0bSFelipe Balbi
6998b4cfe0bSFelipe Balbi.. kernel-doc:: drivers/usb/dwc3/core.c
7008b4cfe0bSFelipe Balbi   :doc: core driver (probe, PM, etc)
7018b4cfe0bSFelipe Balbi   :internal:
7028b4cfe0bSFelipe Balbi
7038b4cfe0bSFelipe Balbi.. [#trb] Transfer Request Block
7048b4cfe0bSFelipe Balbi.. [#link_trb] Transfer Request Block pointing to another Transfer
7058b4cfe0bSFelipe Balbi	       Request Block.
7068b4cfe0bSFelipe Balbi.. [#debugfs] The Debug File System
7078b4cfe0bSFelipe Balbi.. [#configfs] The Config File System
7088b4cfe0bSFelipe Balbi.. [#cbw] Command Block Wrapper
7098b4cfe0bSFelipe Balbi.. _Linus' tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
7108b4cfe0bSFelipe Balbi.. _me: felipe.balbi@linux.intel.com
7118b4cfe0bSFelipe Balbi.. _linux-usb: linux-usb@vger.kernel.org
712