Skip to content

Commit 9117eb4

Browse files
author
Tanguy Raufflet
committed
drivers: pinctrl: stm32: add gpioz pinctrl support for STM32MP2
The STM32MP2 series needs gpioz pinctrl support to be able to use the GPIOZ pins. Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
1 parent 039de30 commit 9117eb4

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

drivers/pinctrl/pinctrl_stm32.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ static const struct device *const gpio_ports[] = {
6666
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioo)),
6767
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiop)),
6868
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioq)),
69+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpior)),
70+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpios)),
71+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiot)),
72+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiou)),
73+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiov)),
74+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiow)),
75+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiox)),
76+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioy)),
77+
DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioz)),
6978
};
7079

7180
/** Number of GPIO ports. */

include/zephyr/dt-bindings/pinctrl/stm32-pinctrl-common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
#define STM32_PORTO 14
2828
#define STM32_PORTP 15 /* IO port P (0xF) */
2929
#define STM32_PORTQ 16 /* IO port Q (0x10) */
30+
#define STM32_PORTZ 25 /* IO port Z (0x19) */
3031

3132
#ifndef STM32_PORTS_MAX
32-
#define STM32_PORTS_MAX (STM32_PORTQ + 1)
33+
#define STM32_PORTS_MAX (STM32_PORTZ + 1)
3334
#endif
3435

3536
/**

include/zephyr/dt-bindings/pinctrl/stm32-pinctrl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
* - line [ 5 : 8 ]
5656
* - port [ 9 : 13 ]
5757
*
58-
* @param port Port ('A'..'Q')
59-
* @param line Pin (0..15)
58+
* @param port Port ('A'..'Q', 'Z')
59+
* @param line Pin (0..25)
6060
* @param mode Mode (ANALOG, GPIO_IN, ALTERNATE).
6161
*/
6262
#define STM32_PINMUX(port, line, mode) \

0 commit comments

Comments
 (0)