pinctrl: stm32: prevent the use of the secure protected pins
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Mon, 2 May 2022 15:31:14 +0000 (17:31 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 4 May 2022 22:04:04 +0000 (00:04 +0200)
commit3389b09878dddd58ef52bd0bf43cc42ea5a9ea2a
tree3b75435c204df23b7b94ea562745c72079252f39
parent3296c473d9aada9b8ca1f47d395727595c01cff7
pinctrl: stm32: prevent the use of the secure protected pins

The hardware denies any access from the Linux non-secure world to the
secure-protected pins. Hence, prevent any driver to request such a pin.

Mark the secure-protected GPIO lines as invalid (.init_valid_mask) and
prevent the pinmux request / pinconf setting operations.
Identify the secure pins with "NO ACCESS" in the pinconf sysfs.

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20220502153114.283618-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c
drivers/pinctrl/stm32/pinctrl-stm32.h
drivers/pinctrl/stm32/pinctrl-stm32mp135.c