# SPDX-License-Identifier: GPL-2.0-or-later

#
# Embedded FlashPro5
#
# https://www.microchip.com/en-us/development-tool/flashpro5
#

adapter driver ftdi

# vidpid 1514:2008 = embedded flashpro5
# vidpid 1514:200a = pic64gx
ftdi vid_pid 0x1514 0x2008 0x1514 0x200a

# That FTDI has 4 channels (channel 0 and 1 are MPSSE-capable, 2 and 3 are bitbang
ftdi channel 0

# Initial Layout - data[0..15] direction[0..15]
ftdi layout_init 0x0018 0xfdfb
#     Signal        Data    Direction       Notes
# AD0 TCK           0       1 (out)         Port A TCK
# AD1 TDI           0       1 (out)         Port A TDI
# AD2 TDO           0       0 (in)          PORT A TDO
# AD3 TMS           1       1 (out)         Port A TMS
# AD4 GPIOL0        1       1 (out)         Port A TRST
# AD5 GPIOL1        0       1 (out)         (unused)
# AD6 GPIOL2        0       1 (out)         (unused)
# AD7 GPIOL3        0       1 (out)         (unused)

# BD0 TCK           0       1 (out)         FTDI_UART_B_TXD
# BD1 TDI           0       0 (in)          FTDI_UART_B_RXD
# BD2 TDO           0       1 (out)         (unused)
# BD3 TMS           0       1 (out)         (unused)
# BD4 GPIOL0        0       1 (out)         (unused)
# BD5 GPIOL1        0       1 (out)         (unused)
# BD6 GPIOL2        0       1 (out)         (unused)
# BD7 GPIOL2        0       1 (out)         (unused)

# Signals definition
ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
