ZynqMP DisplayPort Linux driver
Introduction
This page gives an overview of the DisplayPort driver which is available as part of the ZynqMP Linux distribution.
Paths, files, links and documentation on this page are given relative to the Linux kernel source tree.
HW IP features
Features in bold are supported by the driver
Based on the VESA DisplayPort V.12a source-only specification.
Video support for the following:
° Resolution up to 4K x 2K at 30Fps.
° Y-only, YCbCr444, YCbCr422, YCbCr420, and RGB video formats.
° 6, 8, 10, or 12 bits per color components.
° Progressive video.
° A 36-bit native video input interface to capture live video.
° Non-live video from frame buffers using internal DPDMA.
Graphics support for the following:
° Non-live graphics from the frame buffer.
° 36-bit native video interface along with an 8-bit alpha channel to capture live graphics.
° 2-plane, on-the-fly rendering of video and graphics.
° Chroma upsampling.
° Chroma downsampling.
° Color space conversion from YCbCr to RGB and vice versa.
° Video blending.
° Chroma keying.
Audio support for the following:
° Up to two audio channels.
° Sample size of up to 24 bits.
° Maximum sample rate of 48 KHz.
° Live 24-bit audio from the PL.
° Non-live 16-bit audio from the frame buffer.
Audio mixer and volume control.
° Mixing of two audio streams of the same sampling rate and channel count.
° Provides gain control for audio streams.
Streaming A/V output back to the PL.
Includes a system time clock (STC) that is compliant with the ISO/IEC 13818-1 standard. Provides time stamping of the A/V presentation unit.
Missing Features, Known Issues and Limitations
This section summarizes the known issues and missing features
.Live support hasn't been implemented
Input from / out to PL
10 bit YUV formats
Important AR links
Kernel Configuration
The following config options should be enabled in order to build the macb driver
CONFIG_ETHERNET
CONFIG_NET_CADENCE
CONFIG_MACB
CONFIG_NETDEVICES
CONFIG_HAS_DMA
{macb_kconfig.png}
Optional kernel configuration:
-> CONFIG_MACB_EXT_BD
Cadence MACB/GEM extended buffer descriptor (only supported in ZynqMP) - This config option supports use of extended buffer descriptor in ZynqMP and depends on HAS_DMA and MACB.
Two extra words are added to TX BD and RX BD when this option is selected. These two extra words are currently used to obtain PTP timestamp.
Devicetree
Compatible string can be:
-> "cdns,gem" for Zynq
-> "cdns,zynqmp-gem" fro ZynqMP. This compatible string enables use of jumbo frame sizes, 1588 and HW timestamping suport and any features exclusive to ZynqMP.
Timestamping clock used for 1588 is currently required as a devicetree property (tsu-clk). This might be revised in the future to be linked with the clock framework.
For more details on phy bindings please refer "Documentation/devicetree/bindings/net/macb.txt"
gem0: ethernet@e000b000 {
compatible = "cdns,gem";
reg = <0xe000b000 0x1000>;
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 22 4>;
clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <ðernet_phy>;
phy-mode = "rgmii-id";
ethernet_phy: ethernet-phy@7{
reg = <7>;
};
};
Related devicetree information
For generic ethernet DT property information, refer to:
https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/ethernet.txt
For PHY related DT information, refer to:
https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/phy.txt
When selecting phy specific settings, make sure to mention interface type, speed (if limited/fixed) and phy address properties.
PHY/Converter devices that may be used with this MAC:
-> Xilinx GMII2RGMII converter (https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt)
-> Xilinx PCS PMA PHY ( https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/xilinx-phy.txt )
[[code]]
RGMII tuning is driven in phy framework using "rgmii-id", "rgmii-txid", "rgmii-rxid" properties Make sure to set phy-mode to any of these as per your board requirement.
In addition to enabling tuning, some phys also give control of tuning values via devicetree. Please refer to the devicetree bindings documentation of the phy you use in order to tune these according to your board.
Clock adaption is present by default for both Zynq and ZynqMP. For more details refer to devicetree clock bindings and respective wiki pages
-> This driver can be used for a MAC - MAC fixed link connection. In order to do so, please update the devicetree fixed link node as per
https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/fixed-link.txt
and set the phy-mode to "moca" (https://github.com/Xilinx/linux-xlnx/blob/master/include/linux/phy.h)
=Performance=
These benchmark performance numbers were obtained by connecting Xilinx boards to Linux PCs/server machines (Ubuntu/Red Hat Enterprise).
The tool used is netperf (Refer to tool information below).
The protocol, MTU size and option to note CPU load can all be selected from netperf/netserver options
==Zynq==
Board: ZC706
CPU Freq: 666MHz (A9)
Link Speed: 1000Mbps, Full duplex
||= ||||||||= TCP (Mbps ||||||||= UDP(Mbps) ||
||= MTU ||= RX ||= CPU(%) ||= TX ||= CPU(%) ||= RX ||= CPU(%) ||= TX ||= CPU(%) ||
||= 1500 ||= 763 ||= 87 ||= 851 ||= 52 ||= 420 ||= 65 ||= 859 ||= 50 ||
==ZynqMP==
Board: ZCU102
CPU Freq 1100MHz (A53)
Link Speed 1000Mbps, Full duplex
DDR 533MHz
CCU: No
Linux version: 4.6
||= ||||||||= TCP ( Mbps) ||||||||= UDP(Mbps) ||
||= MTU ||= Rx ||= CPU(%) ||= Tx ||= CPU(%) ||= Rx ||= CPU(%) ||= Tx ||= CPU(%) ||
||= 1500 ||= 940 ||= 25.3 ||= 941.34 ||= 7.87 ||= 960 ||= 27 ||= 961 ||= 19.1 ||
||= 9200 ||= 960 ||= 3.78 ||= 990 ||= 3.08 ||= 770 ||= 5.65 ||= 992 ||= 11.89 ||
=Test Procedure=
==Diagnostic and Protocol Tests==
===PING===
This utility used to test the reachability of a host on an Internet Protocol(IP) network and to measure the round trip time for messages sent from the originating host to a destination computer.
How to run:
ping <Remote IP Address>
===WebServer===
Connect zynq board to a Linux x86 machine. Ensure that telnet server is running on the Zynq board. It tests for remote access for Zynq board on host machine
Open a web browser on host machine and enter the static IP assigned to zynq board. Webpage is expected to be displayed properly.
===Telnet===
telnet <Server IP Address>
===FTP & TFTP===
How to run:
Open a ftp client on the host with the Zynq.
x86> ftp 192.168.1.10
Transfer a big enough file (in MBs) using mput command.
x86> mput <file_name>
File transfer should be completed without any error.
===Pkt Generator===
Please refer to link below for how to run and various options
https://www.kernel.org/doc/Documentation/networking/pktgen.txt
==Performance Tests==
===Netperf===
How to run:
Server:
netserver
Client:
taskset 2 ./netperf -H <Server IP> -t TCP_STREAM
taskset 2 ./netperf -H <Server IP> -t UDP_STREAM
For more information please refer to the link below:
http://www.netperf.org/netperf/
===Iperf===
How to run:
Server:
./iperf_arm -s -u
./iperf_arm -s
Client:
./iperf_arm -c <Server IP> -u -b <banwidth>
./iperf_arm -c <Server IP>
For more information please refer to the link below:
http://en.wikipedia.org/wiki/Iperf
==Stress Test==
===Iperf with option -d===
Run iperf in dual testing mode. This will cause the server to connect back to the client on the port specified in the -L option (or defaults to the port the client connected to the server on). This is done immediately therefore running the tests simultaneously.
./iperf_arm -c <Server IP> -d
===Ping flood test===
Users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received
ping -f localhost
==PTP==
1588 synchronization can be tested on ZynqMP using open source linuxptp application.
http://linuxptp.sourceforge.net/
The setup requires a master with precise clock and timstamping capabilities, typically a NIC or another 1588 capable device.
How to run
master:
#ptp4l -i <interface name> -m
slave:
#ptp4l -i <interface name> -s -m
=Mainline status=
The macb driver is currently in sync with mainline kernel 4.9 except for the following:
-> 1588 support for ZynqMP
-> Fixed link support (patch from LKML)
-> Minor differences including HRESP error handling and RX unused queue tie-off
Any further changes will be upstreamed.
-> WOL patches from mainline are not merged in xilinx tree yet - this support will be tested and merged.
-> This mainline patch is also missing from the xilinx tree and will be merged in the next release:
net: macb: Probe MDIO bus before registering netdev
=PHY details=
The following PHYs were tested with ZynqMP GEM:
-> TI DP83867IR
-> TI DP83867E (SGMII)
-> Marvell 88E1112
-> Realtek RTL8211
-> Vitesse VSC8211
=Change Log=
**2017.4**
**No changes**
**2017.3**
**Summary:**
* Added support for partial store and forward
* Pulled in minor mainline fixes and phy related issues
* Added support for macb suspend/resume
**Commits:**
[[@https://github.com/Xilinx/linux-xlnx/commit/bf85fd466622bb344a0a1fb9db0468bed7d70052#diff-41909d180431659ccc1229aa30fd4e5a|bf85fd4]] net: macb: Add support for partial store and forward
[[@https://github.com/Xilinx/linux-xlnx/commit/f646336d92e52f6257abc625f280c6ecd8a37f21#diff-41909d180431659ccc1229aa30fd4e5a|f646336]] net: macb: Fix gpio for phy reset
[[@https://github.com/Xilinx/linux-xlnx/commit/a29aa21834c0dbf0edb8a8333f4311ad0803b1a8#diff-41909d180431659ccc1229aa30fd4e5a|a29aa21]] net: macb: Fix issues with FPD off
[[@https://github.com/Xilinx/linux-xlnx/commit/e1a214d0158b4b4472639c0d9a21f08f80258aab#diff-41909d180431659ccc1229aa30fd4e5a|e1a214d]] net: macb: Misc cleanup
**2017.2**
**Summary:**
* Pulled in a minor mainline fix for mdio bus scan error check
**Commits:**
[[@https://github.com/Xilinx/linux-xlnx/commit/43566342673a2fac2636909a5d3f8ab7389916d6|4356634]] macb: fix mdiobus_scan() error check
**2017.1**
**Summary:**
* Added PM runtime support
* Added context loss support; Cleanup around clock and suspend, resume paths. Although this support is added in macb driver, there is a know issue at the moment that GEM does not work on resume directly. It is required to bring the interface down and up again.
* Fixed ptp time adjustment for large negative delta
* Fix PHY reset and only call GPIOD functions when valid GPIO is present
* Fixed spinlocks in macb_close around ptp_clock_unregister to avoid kernel panic.
* Fixed TSU CAPS mask
Related phy driver changes:
* DP83867: Added a SW workaround for link instability on ZCU102 board.
**Commits:**
[[@https://github.com/Xilinx/linux-xlnx/commit/afeaf15a14a496bd8e9a5566003d89fdd86b3eb4|afeaf15]] arm64: zynqmp: macb: release spinlock before calling ptp_clock_unregister
[[@https://github.com/Xilinx/linux-xlnx/commit/36f7baa3ba4bf414c66dea65f3ae9e4408383dc8|36f7baa]] net: macb: Correct TSU_CAPS mask
[[@https://github.com/Xilinx/linux-xlnx/commit/27f1c64b971acdc159d46c22284e88064271c905|27f1c64]] macb: fix PHY reset
[[@https://github.com/Xilinx/linux-xlnx/commit/7613445d17915d122db6ea5c529132a2961d3310|7613445]] net: macb: Only call GPIO functions if there is a valid GPIO
[[@https://github.com/Xilinx/linux-xlnx/commit/2288919240cdf5687792e8504de099017ffdfd1c|2288919]] net: macb: Fix ptp time adjustment for large negative delta
[[@https://github.com/Xilinx/linux-xlnx/commit/6cbc5cde6a3f3daab80cd02d9c15571b3da85e3a|6cbc5cd]] net: cadence: macb: Fix kernel-doc format
[[@https://github.com/Xilinx/linux-xlnx/commit/ddd48049f2ef152621e7a2939e53db3dc4a64a2d|ddd4804]] net: macb: fix the clk enable and disable
[[@https://github.com/Xilinx/linux-xlnx/commit/1b0a659ac2940119125e2fad1b1fa38b1036d66b|1b0a659]] net: macb: Add runtime support
[[@https://github.com/Xilinx/linux-xlnx/commit/4dc7d7731b0443eaaa9d0a7822aab6aa5f402ae2|4dc7d77]] net: macb: Add context loss support
[[@https://github.com/Xilinx/linux-xlnx/commit/b9a29100dced3721165c6812c77e1fcb2dd69093|b9a2910]] net: macb: Fix the double disable of clocks
[[@https://github.com/Xilinx/linux-xlnx/commit/756de54e02c98beb60314541b7f9323b094a69db|756de54]] net: macb: Cleanup the clock code
[[@https://github.com/Xilinx/linux-xlnx/commit/2f2bb371f54f392ca1e6b5ce91cf2de1966464d1|2f2bb37]] net: macb: Fix unused warning
[[@https://github.com/Xilinx/linux-xlnx/commit/911b158fffd6c746c7395c5703434839e8dc08bb|911b158]] net: macb: Enable clocks for the mdio accesses
[[@https://github.com/Xilinx/linux-xlnx/commit/25f725502fcd47178b505e5462b9e8acf86cd1f5|25f7255]] net: macb: Convert the infinite wait loop to a timeout
[[@https://github.com/Xilinx/linux-xlnx/commit/53ac032b6bf557b632912f4aa60317a704a35ddc|53ac032]] net: macb: Move to runtime_put to cut clocks
[[@https://github.com/Xilinx/linux-xlnx/commit/d415d56118ecb1ec66f10e454c6aab945a39f293|d415d56]] net: macb: Update the phy write sequence
DP83867 phy driver:
[[@https://github.com/Xilinx/linux-xlnx/commit/7557928cecc63c43191eb23b41f66ad93c497f1b|7557928]] net: macb: SW workaround for link instability on DP83867
**2016.4**
**Summary:**
* Added support for fixed link
**Commits:**
[[https://github.com/Xilinx/linux-xlnx/commit/59e3534d47765cfe33bdf2ac1e7a5559ae70dec7|59e3534]] net: macb: Add support for fixed link
**2016.3**
**Summary:**
* Added support for 64 bit addressing
* Added support to use gmii2rgmii convertor driver
* Handle HRESP error with SW reset and re-initialization of necessary parameters
* The above changes are also in mainline
**Commits:**
[[https://github.com/Xilinx/linux-xlnx/commit/b0fbcba409da1246489948c2e45258396050c20b|b0fbcba]] net: macb: Handle HRESP error
[[https://github.com/Xilinx/linux-xlnx/commit/ff7364697e8e2d48af57fce47f66102b9a51a415|ff73646]] net: macb: Fixed mixed declaration and code warnings
[[https://github.com/Xilinx/linux-xlnx/commit/190b6afd5a9dd3f15053070ab64460d126d186cf|190b6af]] net: macb: Update TX and RX EXT BD registers only when required
[[https://github.com/Xilinx/linux-xlnx/commit/d470dfb315b8e62eb796da71e1d06e0b324c7b69|d470dfb]] net: macb: Correct CAPS masks
[[https://github.com/Xilinx/linux-xlnx/commit/6121d00ba957893641b823c3112f132f2f6c6d38|6121d00]] net: macb: Add support for 64 bit addressing
[[https://github.com/Xilinx/linux-xlnx/commit/f9c43e8386e46b129761b724d0268298e755bb36|f9c43e8]] net: macb: add support for mdio phy nodes
code
Related Links
Linux Drivers