1 |
# Rule for unbinding XVC_FT220X device from ftdi_sio driver and setting permissions for everyone |
1 |
# Rule for unbinding XVC_FT220X device from ftdi_sio driver and setting permissions for everyone |
2 |
# Put this file to /etc/udev/rules.d |
2 |
# Put this file to /etc/udev/rules.d |
3 |
|
3 |
|
4 |
# MLAB Module XVC_FT220X for JTAG programming of Xilinx uses standard VendorID and DeviceID |
4 |
# MLAB Module XVC_FT220X for JTAG programming of Xilinx uses standard VendorID and DeviceID |
5 |
# of used FTDI chips. Unfortunately on latest Linux there is udev automaticaly loading |
5 |
# of used FTDI chips. Unfortunately on latest Linux there is udev automaticaly loading |
6 |
# device driver ftdi_sio which creates ttyUSBxx device for any attached FTDI chip. |
6 |
# device driver ftdi_sio which creates ttyUSBxx device for any attached FTDI chip. |
7 |
# This driver prevents XVC program to comunicate with FTDI chip via FT2XX library. |
7 |
# This driver prevents XVC program to comunicate with FTDI chip via FT2XX library. |
8 |
# It is necessary to disconnect (unbind) our FTDI device (identifyed by its name) from |
8 |
# It is necessary to disconnect (unbind) our FTDI device (identifyed by its name) from |
9 |
# ftdi_sio driver. |
9 |
# ftdi_sio driver. |
10 |
|
10 |
|
11 |
# (c)miho 2013 http://www.mlab.cz |
11 |
# (c)miho 2013 http://www.mlab.cz |
12 |
|
12 |
|
13 |
# Hints: |
13 |
# Hints: |
14 |
# lsusb -v |
14 |
# sudo lsusb -d 0403:6015 -v |
15 |
# udevadm info -a -p /devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0 |
15 |
# udevadm info -a -p /devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0 |
16 |
# udevadm control --reload-rules |
16 |
# udevadm control --reload-rules |
17 |
|
17 |
|
18 |
# Ubind "MLAB XVC with FTxxxx" form ftdi_sio driver to release it for mlab_xvc program |
18 |
# Ubind "MLAB XVC with FTxxxx" form ftdi_sio driver to release it for mlab_xvc program |
19 |
SUBSYSTEM=="usb", ATTRS{interface}=="MLAB XVC with FT*", RUN="/bin/sh -c 'echo %k > /sys/bus/usb/drivers/ftdi_sio/unbind'" |
19 |
SUBSYSTEM=="usb", ATTRS{interface}=="MLAB XVC with FT*", RUN="/bin/sh -c 'echo %k > /sys/bus/usb/drivers/ftdi_sio/unbind'" |
20 |
|
20 |
|
21 |
# Set permissions to the device to enable run mlab_xvc program without root permissions |
21 |
# Set permissions to the device to enable run mlab_xvc program without root permissions |
22 |
# If you do not want everyone remove MODE and add GROUP |
22 |
# If you do not want everyone remove MODE and add GROUP |
23 |
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{product}=="MLAB XVC with FT*", MODE:="0666", RUN+="/bin/sh -c 'echo k: %k p: %p >> /tmp/XVC'" |
23 |
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{product}=="MLAB XVC with FT*", MODE:="0666", RUN+="/bin/sh -c 'echo k: %k p: %p >> /tmp/XVC'" |