1
0
Fork 0
alistair23-linux/drivers/pinctrl/aspeed
Andrew Jeffery 22faec182e pinctrl: aspeed: Fix GPIO requests on pass-through banks
[ Upstream commit 7aeb353802 ]

Commit 6726fbff19bf ("pinctrl: aspeed: Fix GPI only function problem.")
fixes access to GPIO banks T and U on the AST2600. Both banks contain
input-only pins and the GPIO pin function is named GPITx and GPIUx
respectively. Unfortunately the fix had a negative impact on GPIO banks
D and E for the AST2400 and AST2500 where the GPIO pass-through
functions take similar "GPI"-style names. The net effect on the older
SoCs was that when the GPIO subsystem requested a pin in banks D or E be
muxed for GPIO, they were instead muxed for pass-through mode.
Mistakenly muxing pass-through mode e.g. breaks booting the host on
IBM's Witherspoon (AC922) platform where GPIOE0 is used for FSI.

Further exploit the names in the provided expression structure to
differentiate pass-through from pin-specific GPIO modes.

This follow-up fix gives the expected behaviour for the following tests:

Witherspoon BMC (AST2500):

1. Power-on the Witherspoon host
2. Request GPIOD1 be muxed via /sys/class/gpio/export
3. Request GPIOE1 be muxed via /sys/class/gpio/export
4. Request the balls for GPIOs E2 and E3 be muxed as GPIO pass-through
   ("GPIE2" mode) via a pinctrl hog in the devicetree

Rainier BMC (AST2600):

5. Request GPIT0 be muxed via /sys/class/gpio/export
6. Request GPIU0 be muxed via /sys/class/gpio/export

Together the tests demonstrate that all three pieces of functionality
(general GPIOs via 1, 2 and 3, input-only GPIOs via 5 and 6, pass-through
mode via 4) operate as desired across old and new SoCs.

Fixes: 9b92f5c51e ("pinctrl: aspeed: Fix GPI only function problem.")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Tested-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20201126063337.489927-1-andrew@aj.id.au
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:50:54 +01:00
..
Kconfig pinctrl: aspeed: Add AST2600 pinmux support 2019-08-05 12:41:18 +02:00
Makefile pinctrl: aspeed: Add AST2600 pinmux support 2019-08-05 12:41:18 +02:00
pinctrl-aspeed-g4.c Linux 5.3-rc5 2019-08-21 13:35:16 +02:00
pinctrl-aspeed-g5.c This is the bulk of pin control changes for the v5.4 kernel 2019-09-19 14:19:33 -07:00
pinctrl-aspeed-g6.c pinctrl: aspeed-g6: Fix LPC/eSPI mux configuration 2020-01-12 12:21:27 +01:00
pinctrl-aspeed.c pinctrl: aspeed: Fix GPIO requests on pass-through banks 2020-12-30 11:50:54 +01:00
pinctrl-aspeed.h This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinmux-aspeed.c pinctrl: aspeed: Fix spurious mux failures on the AST2500 2019-09-12 00:08:27 +01:00
pinmux-aspeed.h pinctrl: aspeed: Fix GPIO requests on pass-through banks 2020-12-30 11:50:54 +01:00