Table of Contents
Table of Contents
Introduction
ZynqMP SoC has a Serdes/SIOU(Serial Input and Output block) module which provides High Speed Physical interfacefor the below High Speed peripherals present in the SoC
- USB (2 controllers)
- SATA (1 controller with two lanes)
- Display Port (1 controller with two lanes)
- SGMII (4 controllers)
- PCIe (1 controller with four lanes)
HW/IP Features
The ZynqMP PS shall incorporate a quad GT. Features include- A quad-transceiver
- Supports PCIe, SATA, USB3.0, SGMII and DisplayPort requirements
- 1,2, or 4 lane PCIe support at 2.5 or 5.0Gbps
- 1 or 2 lane DisplayPort (TX only) at 1.62, 2.7, or 5.4Gbps
- 1-2 SATA channels at 1.5, 3.0 or 6.0Gbps
- 1-2 USB3.0 channel at 5.0Gbps
- 1-4 Ethernet SGMII channels at 1.25Gbps
- Support SGMII for data only (no clock, or clock optional)
- Support any 4 of the standards simultaneously
- Provide flexible host-programmable multiplexing function for connecting the GT resources to the PS masters (DisplayPort, PCIe, SATA, GEM).
Kernel Configuration
OLD FLOW:
Code Block | ||
---|---|---|
| ||
Device Drivers------> Phy Subsystem--> <*> Xilinx ZynqMP phy driver |
CONFIG_PHY_XIILINX_ZYNQMP=y
...
CONFIG_PHY_XILINX_ZYNQMP=y
Devicetree
OLD FLOW:
Device nodes should specify the configuration required in their "phys" property, containing a phandle to the phy port node and a device typeThe phys property should be as mentioned below:
phys = <PHANDLE CONTOLLER_TYPE CONTROLLER_INSTANCE LANE_NUM LANE_FREQ>;
PHANDLE can be any among &lane0 or &lane1 or &lane2 or &lane3
CONTROLLER_TYPE can be any among PHY_TYPE_PCIE or PHY_TYPE_SATA or PHY_TYPE_USB or PHY_TYPE_DP or PHY_TYPE_SGMII
CONTROLLER_INSTANCE depends on CONTROLLER TYPE used, can be any of below
PHY_TYPE_PCIE : 0 or 1 or 2 or 3
PHY_TYPE_SATA : 0 or 1
PHY_TYPE_USB : 0 or 1
PHY_TYPE_DP : 0 or 1
PHY_TYPE_SGMII: 0 or 1 or 2 or 3
LANE_NUM depends on which lane clock is used as ref clk, can be 0 or 1 or 2 or 3
LANE_FREQ is the Frequency that controller can operate, can be any among 19.2Mhz,20Mhz,24Mhz,26Mhz,27Mhz,28.4Mhz,40Mhz,52Mhz,100Mhz,108Mhz,125Mhz,135Mhz,150Mhz
Example
Below Code should is required for probing the serdes driver. This should be added in zynqmp.dtsi
Code Block | ||
---|---|---|
| ||
serdes: zynqmp_phy@fd400000 { compatible = "xlnx,zynqmp-psgtr"; status = "okay"; reg = <0x0 0xfd400000 0x0 0x40000>, <0x0 0xfd3d0000 0x0 0x1000>, <0x0 0xfd1a0000 0x0 0x1000>, <0x0 0xff5e0000 0x0 0x1000>; reg-names = "serdes", "siou", "fpd", "lpd"; xlnx,tx_termination_fix; lane0: lane@0 { #phy-cells = <4>; }; lane1: lane@1 { #phy-cells = <4>; }; lane2: lane@2 { #phy-cells = <4>; }; lane3: lane@3 { #phy-cells = <4>; }; }; |
The below code configures the USB 0 instance to use lane 2 and get 26 MHZ lane refclk from lane 2.
Code Block | ||
---|---|---|
| ||
usb@fe200000 { ... phys = <&&lane2 PHY_TYPE_USB3 0 2 2600000>; ... }; |
This below code configures the SATA 1 instance to use lane 3 and get 125MHZ lane refclk from lane 1.
Code Block | ||
---|---|---|
| ||
ahci@fd0c0000 { ... phys = <&&lane3 PHY_TYPE_SATA 1 1 125000000>; ... }; |
NEW UPSTREAMED FLOW:
...
Test Procedure
As this driver is being used by SATA, USB, PCIe, SGMII and DP protocols. Testing the functionality any of those protocols will automatically test this IP.Expected O/P
Once linux is booted type "grep | gtr" and check whether PLL lock is happening, the below output is expectedCode Block | ||
---|---|---|
| ||
root@Xilinx-ZCU102-2016_3:~# dmesg | grep gtr [ 6.575387] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:3 protocol:2 pll_locked:yes [ 6.808627] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes [ 7.570858] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes |
Mainline Status
The driver is upstreamed into the mainline kernel v5.9-rc1.Change log
2016.3Summary:
- Correct swing and preemphasis values
- Reset the de-emphasis and swing control for DP
- Added separate function for bypassing scrambler/descrambler and encoder/decoder feature
- Add SGMII support to serdes driver
- Fix kernel-doc format for xpsgtr_set_rxwidth
- Add missing header to declare exported functions
- Change serdes calibration logic to ICM_CFG1
ffdbb29
aabcb4
4e8a03
c1212e
bef32e
3f3097
c1c13c
2016.4
Summary:
- NONE
2017.1
Summary:
- Removed tx_termination_fix flag and added the calibration fix based on the silicon revision
- Use reset-controller framework to assert/de-assert reset signals while configuring serdes lanes
- Corrected the logic for freeing NVMEM buffer
- Corrected the logic for waitng for assert/de-assert to happen
- Added configuring USB PIPE3 signals during reset release
27aa0
9b4ee
330ed
d52db
88c55
2017.2
Summary:
- None
2017.3
Summary:
- Use the configured GT lane instead of hardcoding a value into ICM_CFG1 for tx termination fix
ebbed
2017.4
Summary:
- Export functions for asserting/de-asserting usb core reset
52f8f
...