| 1 | # USB4 Retimers |
| 2 | |
| 3 | ## Introduction |
| 4 | As USB speeds continue to increase (up to 5G, 10G, and even 20G or higher in |
| 5 | newer revisions of the spec), it becomes more difficult to maintain signal |
| 6 | integrity for longer traces. Devices such as retimers and redrivers can be used |
| 7 | to help signals maintain their integrity over long distances. |
| 8 | |
| 9 | A redriver is a device that boosts the high-frequency content of a signal in |
| 10 | order to compensate for the attenuation typically caused by travelling through |
| 11 | various circuit components (PCB, connectors, CPU, etc.). Redrivers are not |
| 12 | protocol-aware, which makes them relatively simple. However, their effectiveness |
| 13 | is limited, and may not work at all in some scenarios. |
| 14 | |
| 15 | A retimer is a device that retransmits a fresh copy of the signal it receives, |
| 16 | by doing CDR and retransmitting the data (i.e., it is protocol-aware). Since |
| 17 | this is a digital component, it may have firmware. |
| 18 | |
| 19 | |
| 20 | ## Driver Usage |
| 21 | |
| 22 | Some operating systems may have the ability to update firmware on USB4 retimers, |
| 23 | and ultimately will need some way to power the device on and off so that its new |
| 24 | firmware can be loaded. This is achieved by providing a GPIO signal that can be |
| 25 | used for this purpose; its active state must be the one in which power is |
| 26 | applied to the retimer. This driver will generate the required ACPI AML code |
| 27 | which will toggle the GPIO in response to the kernel's request (through the |
| 28 | `_DSM` ACPI method). Simply put something like the following in your devicetree: |
| 29 | |
| 30 | ``` |
| 31 | device pci 0.0 on |
| 32 | chip drivers/intel/usb4/retimer |
| 33 | register "power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A0)" |
| 34 | device generic 0 on end |
| 35 | end |
| 36 | end |
| 37 | ``` |
| 38 | |
| 39 | replacing the GPIO with the appropriate pin and polarity. |
| 40 |