• Home
  • Raw
  • Download

Lines Matching +full:on +full:- +full:device

1 .. SPDX-License-Identifier: GPL-2.0
6 USB4 is the public specification based on Thunderbolt 3 protocol with
8 manager is an entity running on the host router (host controller)
12 and early USB4 capable systems. Apple systems on the other hand use
17 connection manager implementation is to be used. To be on the safe side the
25 -----------------------------------
27 should be a userspace tool that handles all the low-level details, keeps
31 found in ``Documentation/ABI/testing/sysfs-bus-thunderbolt``.
33 Those users who just want to connect any device without any sort of
35 ``/etc/udev/rules.d/99-local.rules``::
61 User is asked whether the device is allowed to be connected.
62 Based on the device identification information available through
67 User is asked whether the device is allowed to be connected. In
68 addition to UUID the device (if it supports secure connect) is sent
69 a challenge that should match the expected one based on a random key
93 device must be authorized by the user before PCIe tunnels are created
94 (e.g the PCIe device appears).
96 Each Thunderbolt device plugged in will appear in sysfs under
97 ``/sys/bus/thunderbolt/devices``. The device directory carries
98 information that can be used to identify the particular device,
102 -----------------------------------------------------------------
103 When a device is plugged in it will appear in sysfs as follows::
105 /sys/bus/thunderbolt/devices/0-1/authorized - 0
106 /sys/bus/thunderbolt/devices/0-1/device - 0x8004
107 /sys/bus/thunderbolt/devices/0-1/device_name - Thunderbolt to FireWire Adapter
108 /sys/bus/thunderbolt/devices/0-1/vendor - 0x1
109 /sys/bus/thunderbolt/devices/0-1/vendor_name - Apple, Inc.
110 /sys/bus/thunderbolt/devices/0-1/unique_id - e0376f00-0300-0100-ffff-ffffffffffff
113 created yet. The user can authorize the device by simply entering::
115 # echo 1 > /sys/bus/thunderbolt/devices/0-1/authorized
117 This will create the PCIe tunnels and the device is now connected.
119 If the device supports secure connect, and the domain security level is
121 a random 32-byte value used for authorization and challenging the device in
124 /sys/bus/thunderbolt/devices/0-3/authorized - 0
125 /sys/bus/thunderbolt/devices/0-3/device - 0x305
126 /sys/bus/thunderbolt/devices/0-3/device_name - AKiTiO Thunder3 PCIe Box
127 /sys/bus/thunderbolt/devices/0-3/key -
128 /sys/bus/thunderbolt/devices/0-3/vendor - 0x41
129 /sys/bus/thunderbolt/devices/0-3/vendor_name - inXtron
130 /sys/bus/thunderbolt/devices/0-3/unique_id - dc010000-0000-8508-a22d-32ca6421cb16
138 If the user wants to use secure connect, the first time the device is
139 plugged a key needs to be created and sent to the device::
141 # key=$(openssl rand -hex 32)
142 # echo $key > /sys/bus/thunderbolt/devices/0-3/key
143 # echo 1 > /sys/bus/thunderbolt/devices/0-3/authorized
145 Now the device is connected (PCIe tunnels are created) and in addition
146 the key is stored on the device NVM.
148 Next time the device is plugged in the user can verify (challenge) the
149 device using the same key::
151 # echo $key > /sys/bus/thunderbolt/devices/0-3/key
152 # echo 2 > /sys/bus/thunderbolt/devices/0-3/authorized
154 If the challenge the device returns back matches the one we expect based
155 on the key, the device is connected and the PCIe tunnels are created.
159 If the user still wants to connect the device they can either approve
160 the device without a key or write a new key and write 1 to the
161 ``authorized`` file to get the new key stored on the device NVM.
163 De-authorizing devices
164 ----------------------
165 It is possible to de-authorize devices by writing ``0`` to their
171 When a device is de-authorized the PCIe tunnel from the parent device
172 PCIe downstream (or root) port to the device PCIe upstream port is torn
173 down. This is essentially the same thing as PCIe hot-remove and the PCIe
174 toplogy in question will not be accessible anymore until the device is
176 there is a risk for data loss if the filesystem on that storage is not
180 ------------------------------
184 allocated for them by drivers. When Linux is running on such system it
199 Upgrading NVM on Thunderbolt device, host or retimer
200 ----------------------------------------------------
201 Since most of the functionality is handled in firmware running on a
202 host controller or a device, it is important that the firmware can be
211 Before you upgrade firmware on a device, host or retimer, please make
212 sure it is a suitable upgrade. Failing to do that may render the device
216 Host NVM upgrade on Apple Macs is not supported.
219 Thunderbolt device so that the host controller appears. It does not
220 matter which device is connected (unless you are upgrading NVM on a
221 device - then you need to connect that particular device).
223 Note an OEM-specific method to power the controller up ("force power") may
225 Thunderbolt device.
227 After that we can write the firmware to the non-active parts of the NVM
228 of the host or device. As an example here is how Intel NUC6i7KYK (Skull
231 # dd if=KYK_TBT_FW_0018.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem
236 # echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate
246 # cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate
248 # cat /sys/bus/thunderbolt/devices/0-0/nvm_version
256 depend on the order they are registered in the NVMem subsystem. N in
259 Upgrading on-board retimer NVM when there is no cable connected
260 ---------------------------------------------------------------
267 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline
270 and also ensures the retimers are powered on. The next step is to scan
273 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan
275 This enumerates and adds the on-board retimers. Now retimer NVM can be
281 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan
286 # echo 0 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline
289 --------------------------------------------------
293 ``nvm_version`` fails with ``ENODATA`` and the device identification
300 ---------------------------------
309 ``thunderbolt-net`` driver is loaded automatically. If the other host is
310 also Linux you should load ``thunderbolt-net`` manually on one host (it
313 # modprobe thunderbolt-net
315 This triggers module load on the other host automatically. If the driver
316 is built-in to the kernel image, there is no need to do anything.
319 port which are named like ``thunderbolt0`` and so on. From this point
324 -------------
326 Thunderbolt controller to an "On" state even if nothing is connected.
330 For example the intel-wmi-thunderbolt driver exposes this attribute in:
331 /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power
333 To force the power to on, write 1 to this attribute file.