2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/pinctrl/aspeed
Andrew Jeffery 7f354fd138 pinctrl: aspeed: Add core pinconf support
Several pinconf parameters have a fairly straight-forward mapping onto
the Aspeed pin controller. These include management of pull-down bias,
drive-strength, and some debounce configuration.

Pin biasing largely is managed on a per-GPIO-bank basis, aside from the
ADC and RMII/RGMII pins. As the bias configuration for each pin in a
bank maps onto a single per-bank bit, configuration tables will be
introduced to describe the ranges of pins and the supported pinconf
parameter. The use of tables also helps with the sparse support of
pinconf properties, and the fact that not all GPIO banks support
biasing or drive-strength configuration.

Further, as the pin controller uses a consistent approach for bias and
drive strength configuration at the register level, a second table is
defined for looking up the the bit-state required to enable or query the
provided configuration.

Testing for pinctrl-aspeed-g4 was performed on an OpenPOWER Palmetto
system, and pinctrl-aspeed-g5 on an AST2500EVB as well as under QEMU.
The test method was to set the appropriate bits via devmem and verify
the result through the controller's pinconf-pins debugfs file. This
simultaneously validates the get() path and half of the set() path. The
remainder of the set() path was validated by configuring a handful of
pins via the devicetree with the supported pinconf properties and
verifying the appropriate registers were touched.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-24 14:53:58 +02:00
..
Kconfig pinctrl: Add pinctrl-aspeed-g5 driver 2016-09-07 16:53:37 +02:00
Makefile pinctrl: Add pinctrl-aspeed-g5 driver 2016-09-07 16:53:37 +02:00
pinctrl-aspeed-g4.c pinctrl: aspeed: Fix unused-const-variable warnings 2017-04-11 09:47:44 +02:00
pinctrl-aspeed-g5.c pinctrl: aspeed-g5: Add mux configuration for all pins 2016-12-28 01:21:23 +01:00
pinctrl-aspeed.c pinctrl: aspeed: Add core pinconf support 2017-04-24 14:53:58 +02:00
pinctrl-aspeed.h pinctrl: aspeed: Add core pinconf support 2017-04-24 14:53:58 +02:00