Quantcast
Channel: Xilinx Wiki : Xilinx Wiki - all changes
Viewing all 11776 articles
Browse latest View live

Zynq Ultrascale MPSOC Linux USB device driver

$
0
0
...
USB 2.0 (High Speed)
467.2 Mbits/sec
USB ATTACHED SCSI PROTOCOL(UASP)
LIMITATION:
TCM MODULE USED FOR UASP does not support ATA_12 commands. so user needs to change VID and PID in file drivers/usb/gadget/legacy/tcm_usb_gadget.c as below
#define UAS_VENDOR_ID 0x0bc2
#define UAS_PRODUCT_ID 0xa013
Kernel Configuration Options
Device Drivers --->
<*> Generic Target Core Mod (TCM) and ConfigFS Infrastructure --->
--- Generic Target Core Mod (TCM) and ConfigFS Infrastructure
<*> TCM/IBLOCK Subsystem Plugin for Linux/BLOCK
<*> TCM/FILEIO Subsystem Plugin for Linux/VFS
<*> TCM/pSCSI Subsystem Plugin for Linux/SCSI
<*> TCM/USER Subsystem Plugin for Linux
<*> TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module
<*> Linux-iSCSI.org iSCSI Target Mode Stack
[*] USB support --->
<*> USB Gadget Support
<*> USB functions configurable through configfs
[*] USB Gadget Target Fabric
<M> USB Gadget Target Fabric Module
KCONFIG OPTIONS for UASP profile:
CONFIG_USB_DWC3 = y
CONFIG_USB_DWC3_DUAL_ROLE = y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_CONFIGFS_FS=m
CONFIG_USB_GADGET=y
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_CONFIGFS=m
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_TARGET_CORE=y
CONFIG_TCM_IBLOCK=y
CONFIG_TCM_FILEIO=y
CONFIG_TCM_PSCSI=y
CONFIG_TCM_USER2=y
CONFIG_LOOPBACK_TARGET=y
CONFIG_ISCSI_TARGET=y
CONFIG_USB_F_TCM=y
CONFIG_USB_CONFIGFS_F_TCM=y
CONFIG_USB_GADGET_TARGET=m
CONFIG_CRC_T10DIF=y
Device tree node details:
Example Device tree node:
&dwc3_0 {
status = "okay";
dr_mode = "peripheral";
}
Please find the required .ko files in the below mentioned paths:
linux-xlnx/fs/configfs/configfs.ko
linux-xlnx/drivers/usb/gadget/libcomposite.ko
linux-xlnx/drivers/usb/gadget/legacy/gadgetfs.ko
linux-xlnx/drivers/usb/gadget/legacy/tcm_usb_gadget.ko
Test procedure:
Connect the USB 3.0 cable to linux PC and perform the steps given below on the device side
### To Install module ###
modprobe tcm_usb_gadget
### To mount the configfs ###
mount a -t configfs /sys/kernel/config
### To create a memory that will be assigned to gadget (here creating memory of 750MB) ###
mkdir /root
dd if=/dev/zero of=/root/file.bin bs=10M count=75
### To format the memory that just has been created ###
mkdosfs -v /root/file.bin -n ramfs
### To assign memory to gadget module ###
mkdir -p /sys/kernel/config/target/core/fileio_0/fileio
echo "fd_dev_name=/root/file.bin,fd_dev_size=734003200" > /sys/kernel/config/target/core/fileio_0/fileio/control
echo 1 > /sys/kernel/config/target/core/fileio_0/fileio/enable
mkdir -p /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1
mkdir /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/lun/lun_0
echo naa.6001405c3214b06a > /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/nexus
ln -s /sys/kernel/config/target/core/fileio_0/fileio /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/lun/lun_0/virtual_scsi_port
#### To Change max busrt to get maximum performance ####
echo 15 > /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/maxburst
#### To connect device to Host ####
echo 1 > /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/enable
UBUNTU:
On performing the steps given above, below prints should be shown on host side on typing "dmesg"
{img4.PNG}
Do data transfer on HOST(UBUNTU) side
{img5.PNG}
WINDOWS(UASP supported on windows 8):
On windows need to follow below steps in order to mount device1. open manage by right click on Desktop (screen shot as below)
{img6.PNG}
2. open disk management and format the device (screen shot as below)
{img7.PNG}
3. It will mount the device as drive
4. Do data transfer

OTG MODE
Using the correct cables is the key to OTG operation. Testing was done using two cables joined together to create an OTG cable. An OTG cable has a micro A connector on one end and a micro B connector on the other end. The micro A connector is the host side of the cable and the micro B connector is the device side by default.

img8.PNG

img9.PNG

Zynq Ultrascale MPSOC Linux USB device driver

$
0
0
...
467.2 Mbits/sec
USB ATTACHED SCSI PROTOCOL(UASP)
LIMITATION:Limitation:
TCM MODULE USED FOR UASP does not support ATA_12 commands. so user needs to change VID and PID in file drivers/usb/gadget/legacy/tcm_usb_gadget.c as below
#define UAS_VENDOR_ID 0x0bc2
...
Do data transfer on HOST(UBUNTU) side
{img5.PNG}
WINDOWS(UASPWINDOWS:
Note: UASP is
supported onfrom windows 8):8
On windows
...
to mount device1.device
1.
open manage
{img6.PNG}
2. open disk management and format the device (screen shot as below)
...
3. It will mount the device as drive
4. Do data transfer
Performance Results:
HDPARM TOOL (UBUNTU Host)
Link Power Management (LPM) mode Enable
{img8.PNG}
Link Power Management (LPM) mode Disable
{img9.PNG}

OTG MODE
Using the correct cables is the key to OTG operation. Testing was done using two cables joined together to create an OTG cable. An OTG cable has a micro A connector on one end and a micro B connector on the other end. The micro A connector is the host side of the cable and the micro B connector is the device side by default.

Zynq Ultrascale MPSOC Linux USB device driver

$
0
0
...
Change log for 2017.2
Removed unnecessary ep_queue calling from UVC class driver (17360fb326e0a7fa424286973d0afa8da24f7b99)
Change log for 2017.3
Added SMMU support for HOST and DEVICE mode ( 2fcec851cbe34c )
Added workaround for BULK IN streams in HOST UAS mode ( 95349da0010b6e )
Add support for disabling clock during suspend ( 80ac0da9010ebabef6e )
Add supportf or remvoing VBUS when suspended ( a4769f84c50a76 )
Corrected errors when dwc3 loaded as module ( 244ddcbd8d1c )
Add device mode UASP (USB Attached SCSI PROTOCOL) suuport ( 43a8110cae00a0b4cb )

Related Links
Linux Device Drivers

Zynq Ultrascale MPSOC Linux SIOU driver

$
0
0
...
Change log for 2017.2
None
Change log for 2017.3
Use the configured GT lane instead of hardcoding a value into ICM_CFG1 for tx termination fix ( ebbdeb2313158d2 )

Related Links
Linux Device Drivers

Gpio-PS standalone driver

$
0
0
...
Source path for the driver:
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpiops
...
shows the iicpsgpiops driver source
Gpiops
|

RTC standalone driver

$
0
0
...
Source path for the driver:
https://github.com/Xilinx/embeddedsw/commits/master/XilinxProcessorIPLib/drivers/rtcpsu
...
shows the iicpsrtcpsu driver source
rtcps
|

reVISION Getting Started Guide 2017.2

$
0
0
...
Solution: UG894, page 18 "Initializing Tcl Scripts" shows how to create and modify the file Vivado_init.tcl which can be used to set additional global parameters. Add the following line to the Vivado_init.tcl file:
set_param drc.maxThreads 1
...
from any source.
Solution: Modify your PetaLinux configuration as follows:
% petalinux-config
--> Yocto Settings --->
---> YOCTO SOURCE MIRROR URL ( choose external path )
--> EXTERNAL PATH
Enter --> http://petalinux.xilinx.com/sswreleases/rel-v2017.2/downloads
source.. See XKB69564 for details.
HDMI input/output may behave incorrectly on ZCU102 board with ES2 silicon
Some designs may exhibit incorrect behavior when HDMI is used as the input and/or output. For the output, one possible behavior is that the display monitor does not show a picture, and remains black. For the input, one possible behavior is that even though a source is connected to the HDMI input, the system will not recognize this.

Gpio-PS standalone driver

$
0
0
...
None.
Test cases
Refer below pahpath for testing
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpiops/examples
ChangeLog
...
Added tab space for return statements in functions
Added notes about gpio pin description in examples
2017.3
Updated the source files to updated addtogroup version numbers.

reVISION Getting Started Guide 2017.2

$
0
0
...
Percentage of pixels above error threshold = 0.00168789 Count: 35
Follow the same procedure for other file I/O samples – Harris corner detection, optical flow, stereo block matching and warpTransform.
8 Platform Details
8.1 Vivado Hardware Design
The Vivado hardware design is packaged inside the DSA located at zcu102_[es2_]rv_ss/hw/zcu102_[es2_]rv_ss.dsa. The DSA also includes the hpfm file that describes the available AXI interfaces, clocks, resets, and interrupts. To open the hardware design in Vivado, run the following command from the tcl console:
% open_dsa zcu102_[es2_]rv_ss/hw/zcu102_[es2_]rv_ss.dsa
8.2 PetaLinux BSP
The PetaLinux BSP is located at zcu102_[es2_]rv_ss/sw/petalinux_bsp. The hdf file exported from the corresponding Vivado project (see 8.1) is available in the project-spec/hw-description/system.hdf subfolder inside to the PetaLinux BSP. To configure and build the PetaLinux BSP, run the following commands:
% petalinux-config --oldconfig
% petalinux-build
8.3 Video Library
The Xilinx software library libvideo is used to interface with V4L2 capture devices, DRM display devices, and SDSoC based hardware accelerators. A prebuilt version of this library is available at zcu102_[es2_]rv_ss/sw/a53_linux/lib/libvideo.a. The public API is available at zcu102_[es2_]rv_ss/sw/a53_linux/inc/video_lib/. The file filter.h describes the filter_s struct that needs to be implemented by SDSoC hardware accelerators along with callback functions.
The libvideo sources are provided as XSDK project and are located at zcu102_[es2_]rv_ss/sw/video_lib/. Perform the following steps from the SDx GUI to build libvideo.a:
Make sure the SYSROOT environment variable is set correctly before starting SDx. See design example tutorials for details.
From the SDx menu bar, select 'File -> Import -> General -> Existing Projects into Workspace'. Click 'Next'.
In the 'Import Project' dialog, browse to the project root directory at zcu102_[es2_]rv_ss/sw/a53_linux/inc/video_lib/. Make sure the video_lib project is checked. Also check the 'Copy projects into workspace' option and click 'Finish'.
Right-click the newly added 'video_lib' project in the 'Project Explorer' and select 'Build Project'. The libvideo.a output product will be placed inside the Debug (default) or Release subfolder relative to your workspace and project depending on the chosen build configuration.
9
Other Information
8.1

9.1
Known Issues
SDSoC accelerator code runs very slowly in pure software implementation when Debug configuration is used.
Solution: Set project build configurations to Release which sets sdsoc compiler to optimize most (-O3).
...
Some designs may exhibit incorrect behavior when HDMI is used as the input and/or output. For the output, one possible behavior is that the display monitor does not show a picture, and remains black. For the input, one possible behavior is that even though a source is connected to the HDMI input, the system will not recognize this.
Solution: For now, the workaround is to use DisplayPort as the system output to the display monitor. Note that the misbehavior is not systematic, and for some builds the HDMI output will work correctly. There is no workaround for a non-functional HDMI input.
8.29.2 Limitations
Do not connect a DisplayPort cable and HDMI Tx at the same time.
Make sure the DisplayPort or HDMI Tx cable is plugged in when you power on the board.
...
Does not support HDCP encrypted input.
Does not support hotplug or dynamic resolution changes while the application is running.
910 Support
To obtain technical support for this reference design, go to the:
Xilinx Answers Database to locate answers to known issues
Xilinx Community Forums to ask questions or discuss technical details and issues. Please make sure to browse the existing topics first before filing a new topic. If you do file a new topic, make sure it is filed in the sub-forum that best describes your issue or question e.g. Embedded Linux for any Linux related questions. Please include "ZCU102 reVISION" and the release version in the topic name along with a brief summary of the issue.
1011 References
Additional material that is not hosted on the wiki:
Base TRD User Guide: Contains information about system, software and hardware architecture which is similar to the reVISION platform.

TTC Standalone Driver

$
0
0
...
Successfully ran Lowlevel TTC Interrupt Example Test
Changelog
2017.3
Added suffix U for all macro definitions of ttcps in xparameters.h by modifying ttcps.tcl

2017.2
No changes for 2017.2

Gpio-PS standalone driver

$
0
0

Introduction
...
overview of Gpioaxi cdma driver which
...
SDK distribution.
The Xilinx General purpose I/O is a collection of input/output pins available to the software application running on Processing system.

Source pathPath for the driver:driver
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpiops
Driver source code is organized into different folders. Below diagram shows the gpiops driver source organization
...
Selectable sensitivity: Level-sensitive (High or Low) or edge-sensitive (positive, negative, or both).
Driver Supported Features
The gpio-psGpiops Standalone driver
...
things.
All Controller Featurescontroller features supported.
.

Known issues and Limitations
None.None
Test cases
Refer below path for testing different examples for each feature of the IP.

Gpio-PS standalone driver

$
0
0

Gpio-PS standalone driver

$
0
0

Introduction
...
overview of axi cdmaGpiops driver which
The Xilinx General purpose I/O is a collection of input/output pins available to the software application running on Processing system.
Source Path for the driver

Gpio-PS standalone driver

$
0
0
...
Added notes about gpio pin description in examples
2017.3
...
addtogroup version numbers.numbers.[[include component="navigation" ]]

Gpio-PS standalone driver

$
0
0
...
Added notes about gpio pin description in examples
2017.3
...
addtogroup version numbers.[[include component="navigation" ]]numbers.

Gpio-PS standalone driver

$
0
0

RTC standalone driver

$
0
0
...
The RTC has an alarm function that generates an alarm at a specific time and date with a 136-year range.
The RTC also has periodic software calibration and logic to correct the static fractional inaccuracy of an oscillator.
Source pathPath for the driver:driver
https://github.com/Xilinx/embeddedsw/commits/master/XilinxProcessorIPLib/drivers/rtcpsu
Driver source code is organized into different folders. Below diagram shows the rtcpsu driver source organization
rtcpsrtcpsu
|
-- Doc - Provides the API and data structure details
...
|
- Source - Driver source files
Controller Features supportedController Features supportedController Features supported
Maintains the real time, even when the device is off (powered-off).
Has the capability to generate an alarm at a specific time and date.
...
Allows wake-up at a specific second within the 136 years (32-bit alarm)
Driver Supported Features
The rtcRTC Standalone driver
...
things.
All Controller Featurescontroller features supported.
Known issues and LimitationsKnown issues and LimitationsKnown issues and
None.
Test casesTest casesTest cases
Refer
...
of the IP.https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/rtcpsu/examplesIP.
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/rtcpsu/examples

ChangeLog
2017.1
...
Commits
737dc86 rtcpsu: Modified filename tag in examples
2017.3
Summary
rtcpsu: Fixed compilation warnings
rtcpsu: Code cleanup
Commits
61974ae rtcpsu: Fixed compilation warnings.
dc74ed7 rtcpsu: Code cleanup.

TTC Standalone Driver

$
0
0
...
TTC Lowlevel Interrupt Example Test
Successfully ran Lowlevel TTC Interrupt Example Test
TTC tapp example:
https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/ttcps/examples/xttcps_tapp_example.c
This example uses triple timer counter to generate interrupt and update a flag which is checked in the interrupt example to confirm whether the interrupt is generated or not.
Output
Starting Timer interrupt Example
Successfully ran ttcps tapp Example

Changelog
2017.3
Added suffix U forUpdated ttcps.tcl to append 'U' to all macroconstant definitions ofexported from the ttcps indriver to the xparameters.h by modifying ttcps.tcl
2017.2
No changes for 2017.2
Viewing all 11776 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>