Skip to content

Commit

Permalink
imx_gpio: add mmap based jtag interface for IMX processors
Browse files Browse the repository at this point in the history
For some targets (like nrf51) sysfs driver is too slow. This
patch implements memory maped driver for IMX processors.
Mostly based on bcm2835gpio. Tested on imx6ul CPU. However, it should
work on any NXP IMX CPU.

Change-Id: Idace4c98181c6e9c64dd158bfa52631204b5c4a7
Signed-off-by: Grzegorz Kostka <[email protected]>
Reviewed-on: http://openocd.zylin.com/4106
Tested-by: jenkins
Reviewed-by: Paul Fertser <[email protected]>
  • Loading branch information
gkostka authored and paulfertser committed May 31, 2017
1 parent f6449a7 commit 83c67b7
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 2 deletions.
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,15 @@ AS_CASE(["${host_cpu}"],
AC_ARG_ENABLE([bcm2835gpio],
AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]),
[build_bcm2835gpio=$enableval], [build_bcm2835gpio=no])
AC_ARG_ENABLE([imx_gpio],
AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]),
[build_imx_gpio=$enableval], [build_imx_gpio=no])
],
[
build_ep93xx=no
build_at91rm9200=no
build_bcm2835gpio=no
build_imx_gpio=no
])

AC_ARG_ENABLE([gw16012],
Expand Down Expand Up @@ -516,6 +520,13 @@ AS_IF([test "x$build_bcm2835gpio" = "xyes"], [
AC_DEFINE([BUILD_BCM2835GPIO], [0], [0 if you don't want bcm2835gpio.])
])

AS_IF([test "x$build_imx_gpio" = "xyes"], [
build_bitbang=yes
AC_DEFINE([BUILD_IMX_GPIO], [1], [1 if you want imx_gpio.])
], [
AC_DEFINE([BUILD_IMX_GPIO], [0], [0 if you don't want imx_gpio.])
])

AS_IF([test "x$parport_use_ppdev" = "xyes"], [
AC_DEFINE([PARPORT_USE_PPDEV], [1], [1 if you want parport to use ppdev.])
], [
Expand Down Expand Up @@ -686,6 +697,7 @@ AM_CONDITIONAL([ZY1000_MASTER], [test "x$build_zy1000_master" = "xyes"])
AM_CONDITIONAL([IOUTIL], [test "x$build_ioutil" = "xyes"])
AM_CONDITIONAL([AT91RM9200], [test "x$build_at91rm9200" = "xyes"])
AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
AM_CONDITIONAL([IMX_GPIO], [test "x$build_imx_gpio" = "xyes"])
AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"])
AM_CONDITIONAL([JTAG_VPI], [test "x$build_jtag_vpi" = "xyes" -o "x$build_jtag_vpi" = "xyes"])
AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"])
Expand Down
15 changes: 15 additions & 0 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ produced, PDF schematics are easily found and it is easy to make.
@item @b{bcm2835gpio}
@* A BCM2835-based board (e.g. Raspberry Pi) using the GPIO pins of the expansion header.

@item @b{imx_gpio}
@* A NXP i.MX-based board (e.g. Wandboard) using the GPIO pins (should work on any i.MX processor).

@item @b{jtag_vpi}
@* A JTAG driver acting as a client for the JTAG VPI server interface.
@* Link: @url{http://github.com/fjullien/jtag_vpi}
Expand Down Expand Up @@ -2992,6 +2995,18 @@ pinout.

@end deffn

@deffn {Interface Driver} {imx_gpio}
i.MX SoC is present in many community boards. Wandboard is an example
of the one which is most popular.

This driver is mostly the same as bcm2835gpio.

See @file{interface/imx-native.cfg} for a sample config and
pinout.

@end deffn


@deffn {Interface Driver} {openjtag}
OpenJTAG compatible USB adapter.
This defines some driver-specific commands:
Expand Down
5 changes: 3 additions & 2 deletions src/jtag/drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ endif
if BCM2835GPIO
DRIVERFILES += %D%/bcm2835gpio.c
endif

if OPENJTAG
DRIVERFILES += %D%/openjtag.c
endif

if CMSIS_DAP
DRIVERFILES += %D%/cmsis_dap_usb.c
endif
if IMX_GPIO
DRIVERFILES += %D%/imx_gpio.c
endif

if KITPROG
DRIVERFILES += %D%/kitprog.c
Expand Down
Loading

0 comments on commit 83c67b7

Please sign in to comment.