[U-Boot] [PATCH 0/2] GPIO: CREG: improve flexibility of hsdk-creg-gpio driver

Eugeniy Paltsev Eugeniy.Paltsev at synopsys.com
Fri Jun 8 14:58:22 UTC 2018


CREG GPIO is a driver for weird soc-specific output ports, which are
controlled by some fields in memory mapped register.

Example:

31                 9        7        5           0   < bit number
|                  |        |        |           |
[     not used     | gpio-1 | gpio-0 | <-shift-> ]   < 32 bit register
                       ^        ^
                       |        |
                write 0x2 == set output to "1" (activate)
                write 0x3 == set output to "0" (deactivate)

As of tooday we only support fixed (hardcoded) bit per gpio line,
activate / deactivatei and shift values. Fix that by read them from
device tree to be able to use this driver for other boards.

Eugeniy Paltsev (2):
  GPIO: CREG: improve flexibility of hsdk-creg-gpio driver
  CREG GPIO: add device tree bindings

 MAINTAINERS                                      |   1 +
 arch/arc/dts/hsdk.dts                            |   7 +-
 doc/device-tree-bindings/gpio/snps,creg-gpio.txt |  43 ++++++++++
 drivers/gpio/hsdk-creg-gpio.c                    | 103 ++++++++++++++++++-----
 4 files changed, 131 insertions(+), 23 deletions(-)
 create mode 100644 doc/device-tree-bindings/gpio/snps,creg-gpio.txt

-- 
2.14.3



More information about the U-Boot mailing list