1
0
Fork 0
alistair23-linux/drivers/pinctrl
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
..
actions
aspeed pinctrl: aspeed: Fix GPIO requests on pass-through banks 2020-12-30 11:50:54 +01:00
bcm pinctrl: bcm: fix kconfig dependency warning when !GPIOLIB 2020-10-29 09:57:34 +01:00
berlin
cirrus pinctrl: lochnagar: select GPIOLIB 2020-01-17 19:48:18 +01:00
freescale pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()' 2020-06-24 17:50:38 +02:00
intel pinctrl: baytrail: Avoid clearing debounce value when turning it off 2020-12-30 11:50:52 +01:00
mediatek
meson pinctrl: meson-gxl: fix GPIOX sdio pins 2020-03-18 07:17:55 +01:00
mvebu pinctrl: mvebu: Fix i2c sda definition for 98DX3236 2020-10-07 08:01:28 +02:00
nomadik
nuvoton
pxa
qcom pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage 2020-06-30 15:37:04 -04:00
samsung pinctrl: samsung: Save/restore eint_mask over suspend for EINT_TYPE GPIOs 2020-06-22 09:31:20 +02:00
sh-pfc pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs 2020-02-24 08:36:41 +01:00
sirf
spear
sprd
stm32
sunxi
tegra pinctrl: tegra: Use noirq suspend/resume callbacks 2020-06-30 15:37:04 -04:00
ti pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call 2020-01-17 19:48:50 +01:00
uniphier
vt8500
zte
Kconfig
Makefile
core.c pinctrl: core: Remove extra kref_get which blocks hogs being freed 2020-03-18 07:17:55 +01:00
core.h
devicetree.c
devicetree.h
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: remove debounce filter setting in IRQ type setting 2020-12-16 10:56:58 +01:00
pinctrl-amd.h pinctrl: amd: fix npins for uart0 in kerncz_groups 2020-07-29 10:18:26 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c
pinctrl-at91.c
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-coh901.c
pinctrl-coh901.h
pinctrl-da850-pupd.c
pinctrl-digicolor.c
pinctrl-falcon.c pinctrl: falcon: fix syntax error 2020-03-18 07:17:51 +01:00
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ 2020-08-21 13:05:29 +02:00
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Fix mcp23x17 precious range 2020-10-29 09:57:39 +01:00
pinctrl-ocelot.c pinctrl: ocelot: Fix GPIO interrupt decoding on Jaguar2 2020-06-24 17:50:14 +02:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq 2020-11-24 13:29:00 +01:00
pinctrl-rza1.c pinctrl: rza1: Fix wrong array assignment of rza1l_swio_entries 2020-06-24 17:50:21 +02:00
pinctrl-rza2.c
pinctrl-rzn1.c
pinctrl-single.c pinctrl-single: fix pcs_parse_pinconf() return value 2020-08-19 08:16:21 +02:00
pinctrl-st.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinmux.c pinctrl: pinmux: fix a possible null pointer in pinmux_can_be_used_for_gpio 2020-01-12 12:21:28 +01:00
pinmux.h