Add 'gpio' command and enable it by default
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 11 Aug 2017 11:39:09 +0000 (13:39 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Fri, 11 Aug 2017 11:49:40 +0000 (13:49 +0200)
commit1fb9cda823edd2c9d48da214d43fc74b9c62bcac
tree8732b502fe0c88b3ee25d9d7d03629a0097a82a3
parentc2d57cf8ab5fe059338db9c3aea687c12ea5df26
Add 'gpio' command and enable it by default

This adds 'gpio' command, which allows to manipulate GPIO subsystem:
 - change direction
 - change output value
 - read input value (useful for scripts)
 - enable/disable JTAG
 - manage special/dedicated GPIO functions
 - list current configuration and available functions

For QCA95xx series, this allows full management of GPIO output and
input functionalities (mux). For AR933x, due to its capabilities,
function management is more simple and allows only enabling or
disabling selected bits in GPIO_FUNCTION_{1,2} registers.

Example commands:
 - list GPIO configuration:   gpio l
 - list available functions:  gpio l f
 - set GPIO10 output to high: gpio s 10
 - get GPIO10 input value:    gpio i 10
u-boot/common/Makefile
u-boot/common/cmd_qcagpio.c [new file with mode: 0644]
u-boot/include/cmd_qcagpio.h [new file with mode: 0644]
u-boot/include/configs/qca9k_common.h