diff --git a/include/dt-bindings/pinctrl/stm32-pinctrl.h b/include/dt-bindings/pinctrl/stm32-pinctrl.h index 6e559659791..ebb1546d189 100644 --- a/include/dt-bindings/pinctrl/stm32-pinctrl.h +++ b/include/dt-bindings/pinctrl/stm32-pinctrl.h @@ -13,16 +13,34 @@ * * Pin configuration is coded with the following * fields - * Alternate Function [ 0 : 7 ] - * GPIO Mode [ 8 : 9 ] - * GPIO Output type [ 10 ] - * GPIO Speed [ 11 : 12 ] - * GPIO PUPD config [ 13 : 14 ] + * Alternate Functions [ 0 : 3 ] + * GPIO Mode [ 4 : 5 ] + * GPIO Output type [ 6 ] + * GPIO Speed [ 7 : 8 ] + * GPIO PUPD config [ 9 : 10 ] * * Applicable to STM32F3, STM32F4, STM32L4 series */ +/* Alternate functions */ +#define STM32_FUNC_ALT_0 0 +#define STM32_FUNC_ALT_1 1 +#define STM32_FUNC_ALT_2 2 +#define STM32_FUNC_ALT_3 3 +#define STM32_FUNC_ALT_4 4 +#define STM32_FUNC_ALT_5 5 +#define STM32_FUNC_ALT_6 6 +#define STM32_FUNC_ALT_7 7 +#define STM32_FUNC_ALT_8 8 +#define STM32_FUNC_ALT_9 9 +#define STM32_FUNC_ALT_10 10 +#define STM32_FUNC_ALT_11 11 +#define STM32_FUNC_ALT_12 12 +#define STM32_FUNC_ALT_13 13 +#define STM32_FUNC_ALT_14 14 +#define STM32_FUNC_ALT_15 15 #define STM32_AFR_MASK 0xF +#define STM32_AFR_SHIFT 0 /* GPIO Mode */ #define STM32_MODER_INPUT_MODE (0x0<