{"id":1792,"date":"2026-04-09T17:32:25","date_gmt":"2026-04-10T00:32:25","guid":{"rendered":"https:\/\/nanzhou.cc\/?p=1792"},"modified":"2026-04-09T17:32:25","modified_gmt":"2026-04-10T00:32:25","slug":"sysfs-usb","status":"publish","type":"post","link":"https:\/\/nanzhou.cc\/index.php\/2026\/04\/09\/sysfs-usb\/","title":{"rendered":"sysfs-USB"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">USB Controller<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">fighternan# ls \/sys\/bus\/usb\/devices\/ -l\n\nlrwxrwxrwx 1 root root 0 Jan  1 00:28 usb1 -> ..\/..\/..\/devices\/platform\/0.soc\/878010000000.pci\/pci0001:00\/0001:00:0c.0\/usb1\nlrwxrwxrwx 1 root root 0 Jan  1 00:28 usb2 -> ..\/..\/..\/devices\/platform\/0.soc\/878010000000.pci\/pci0001:00\/0001:00:0c.0\/usb2\nlrwxrwxrwx 1 root root 0 Jan  1 00:28 usb3 -> ..\/..\/..\/devices\/platform\/0.soc\/878010000000.pci\/pci0001:00\/0001:00:0d.0\/usb3\nlrwxrwxrwx 1 root root 0 Jan  1 00:28 usb4 -> ..\/..\/..\/devices\/platform\/0.soc\/878010000000.pci\/pci0001:00\/0001:00:0d.0\/usb4\n\nnanzhou# lspci | grep USB\n0001:00:0c.0 USB controller: Cavium, Inc. THUNDERX xHCI USB Controller\n0001:00:0d.0 USB controller: Cavium, Inc. THUNDERX xHCI USB Controller\n<\/code><\/pre>\n\n\n\n<p>Two physical USB controller chips (or two controller blocks inside your CPU\/System-on-Chip). Each of those physical chips is responsible for generating <strong>two logical root hubs<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Physical Controller 1 (<code>0c.0<\/code>)<\/strong> generates both <strong><code>usb1<\/code><\/strong> (the 480 Mbps logical hub) and <strong><code>usb2<\/code><\/strong> (the 10 Gbps logical hub).<\/li>\n\n\n\n<li><strong>Physical Controller 2 (<code>0d.0<\/code>)<\/strong> generates <strong><code>usb3<\/code><\/strong> (the other 480 Mbps logical hub) and <strong><code>usb4<\/code><\/strong> (which is likely also a 10 Gbps hub, serving the remaining ports on the chassis)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Device Naming<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Breaking down <code>1-1.1.5<\/code><\/h3>\n\n\n\n<p>Let&#8217;s use one of the deeper entries from your previous log (<code>1-1.1.5<\/code>) to see exactly how the dots build the physical address:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>1-<\/code><\/strong> : <strong>The Bus.<\/strong> This is Bus 1 (the <code>usb1<\/code> controller).<\/li>\n\n\n\n<li><strong><code>1<\/code><\/strong> : <strong>The Root Port.<\/strong> This is Port 1 on your computer&#8217;s motherboard.<\/li>\n\n\n\n<li><strong><code>.1<\/code><\/strong> : <strong>Hub Depth 1.<\/strong> Attached to that root port is a hub. This <code>.1<\/code> means we are looking at Port 1 <em>on that first hub<\/em>.<\/li>\n\n\n\n<li><strong><code>.5<\/code><\/strong> : <strong>Hub Depth 2.<\/strong> Plugged into the first hub is <em>another<\/em> hub! The <code>.5<\/code> means we are looking at Port 5 on this second hub.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Think of it like power strips<\/h3>\n\n\n\n<p>Imagine plugging a power strip into your wall outlet. Then, you plug a second power strip into the first one.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>-<\/code> dash connects the wall outlet to the first power strip.<\/li>\n\n\n\n<li>Every <code>.<\/code> dot represents plugging into the next power strip down the line.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">&#8220;But I didn&#8217;t plug in any hubs!&#8221;<\/h3>\n\n\n\n<p>If you are looking at a laptop or a modern motherboard and see paths with dots (like <code>1-1.1<\/code>) even when nothing is plugged in, don&#8217;t worry. This is incredibly common.<\/p>\n\n\n\n<p>Motherboard manufacturers frequently use <strong>internal USB hubs<\/strong> to manage all the built-in peripherals. Your laptop&#8217;s webcam, fingerprint reader, Bluetooth module, and SD card reader are all typically wired to an internal, invisible USB hub inside the laptop chassis. The Linux kernel sees this internal wiring exactly the same way it sees an external plastic hub sitting on your desk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>USB Controller Two physical USB controller chips (or two controller blocks inside your CPU\/System-on-Chip). Each of those physical chips is responsible for generating two logical root hubs: Device Naming Breaking down 1-1.1.5 Let&#8217;s use one of the deeper entries from your previous log (1-1.1.5) to see exactly how the dots build the physical address: Think&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"0","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,22],"tags":[],"class_list":["post-1792","post","type-post","status-publish","format-standard","hentry","category-linux","category-operation-systems"],"_links":{"self":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/1792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/comments?post=1792"}],"version-history":[{"count":1,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/1792\/revisions"}],"predecessor-version":[{"id":1793,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/1792\/revisions\/1793"}],"wp:attachment":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/media?parent=1792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/categories?post=1792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/tags?post=1792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}