drivers/am335xgpio: Migrate to adapter gpio commands
Use the new "adapter gpio" commands to configure the GPIOs used by the am335xgpio driver. The AM335x has 4 GPIO 'chips' (chip number 0-3 inclusive), with each one providing 32 GPIOs (gpio_num 0-31 inclusive). Change-Id: I7c63c0e4763657ea51790c43fc40d32b7c3580bb Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6984 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
82fd400542
commit
ace028262b
@@ -3387,86 +3387,16 @@ registers directly. The memory mapping requires read and write permission to
|
||||
kernel memory; if /dev/gpiomem exists it will be used, otherwise /dev/mem will
|
||||
be used. The driver restores the GPIO state on exit.
|
||||
|
||||
All four GPIO ports are available. GPIOs numbered 0 to 31 are mapped to GPIO port
|
||||
0, GPIO numbers 32 to 63 are mapped to GPIO port 1 and so on.
|
||||
|
||||
See @file{interface/beaglebone-swd-native.cfg} for a sample configuration file.
|
||||
|
||||
@deffn {Config Command} {am335xgpio jtag_nums} @var{tck} @var{tms} @var{tdi} @var{tdo}
|
||||
Set JTAG transport GPIO numbers for TCK, TMS, TDI, and TDO (in that order).
|
||||
Must be specified to enable JTAG transport. These pins can also be specified
|
||||
individually.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio tck_num} @var{tck}
|
||||
Set TCK GPIO number. Must be specified to enable JTAG transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio jtag_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio tms_num} @var{tms}
|
||||
Set TMS GPIO number. Must be specified to enable JTAG transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio jtag_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio tdo_num} @var{tdo}
|
||||
Set TDO GPIO number. Must be specified to enable JTAG transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio jtag_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio tdi_num} @var{tdi}
|
||||
Set TDI GPIO number. Must be specified to enable JTAG transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio jtag_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio swd_nums} @var{swclk} @var{swdio}
|
||||
Set SWD transport GPIO numbers for SWCLK and SWDIO (in that order). Must be
|
||||
specified to enable SWD transport. These pins can also be specified individually.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio swclk_num} @var{swclk}
|
||||
Set SWCLK GPIO number. Must be specified to enable SWD transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio swd_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio swdio_num} @var{swdio}
|
||||
Set SWDIO GPIO number. Must be specified to enable SWD transport. Can also be
|
||||
specified using the configuration command @command{am335xgpio swd_nums}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio swdio_dir_num} @var{swdio_dir}
|
||||
Set SWDIO direction control pin GPIO number. If specified, this pin can be used
|
||||
to control the direction of an external buffer on the SWDIO pin. The direction
|
||||
control state can be set with the command @command{am335xgpio
|
||||
swdio_dir_output_state}. If not specified this feature is disabled.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio swdio_dir_output_state} @var{output_state}
|
||||
Set the state required for an external SWDIO buffer to be an output. Valid
|
||||
values are @option{on} (default) and @option{off}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio srst_num} @var{srst}
|
||||
Set SRST GPIO number. Must be specified to enable SRST.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio trst_num} @var{trst}
|
||||
Set TRST GPIO number. Must be specified to enable TRST.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio led_num} @var{led}
|
||||
Set activity LED GPIO number. If not specified an activity LED is not enabled.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {am335xgpio led_on_state} @var{on_state}
|
||||
Set required logic level for the LED to be on. Valid values are @option{on}
|
||||
(default) and @option{off}.
|
||||
@end deffn
|
||||
All four GPIO ports are available. GPIO configuration is handled by the generic
|
||||
command @ref{adapter gpio, @command{adapter gpio}}.
|
||||
|
||||
@deffn {Config Command} {am335xgpio speed_coeffs} @var{speed_coeff} @var{speed_offset}
|
||||
Set SPEED_COEFF and SPEED_OFFSET for delay calculations. If unspecified
|
||||
speed_coeff defaults to 600000 and speed_offset defaults to 575.
|
||||
@end deffn
|
||||
|
||||
See @file{interface/beaglebone-swd-native.cfg} for a sample configuration file.
|
||||
|
||||
@end deffn
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user