diff options
Diffstat (limited to 'drivers/pinctrl/stm32/pinctrl-stm32.h')
-rw-r--r-- | drivers/pinctrl/stm32/pinctrl-stm32.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.h b/drivers/pinctrl/stm32/pinctrl-stm32.h index 473a6238a27b..de5e7012ca03 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.h +++ b/drivers/pinctrl/stm32/pinctrl-stm32.h @@ -18,6 +18,12 @@ #define STM32_PIN_AF(x) ((x) + 1) #define STM32_PIN_ANALOG (STM32_PIN_AF(15) + 1) +/* package information */ +#define STM32MP_PKG_AA BIT(0) +#define STM32MP_PKG_AB BIT(1) +#define STM32MP_PKG_AC BIT(2) +#define STM32MP_PKG_AD BIT(3) + struct stm32_desc_function { const char *name; const unsigned char num; @@ -26,6 +32,7 @@ struct stm32_desc_function { struct stm32_desc_pin { struct pinctrl_pin_desc pin; const struct stm32_desc_function *functions; + const unsigned int pkg; }; #define STM32_PIN(_pin, ...) \ @@ -35,6 +42,13 @@ struct stm32_desc_pin { __VA_ARGS__, { } }, \ } +#define STM32_PIN_PKG(_pin, _pkg, ...) \ + { \ + .pin = _pin, \ + .pkg = _pkg, \ + .functions = (struct stm32_desc_function[]){ \ + __VA_ARGS__, { } }, \ + } #define STM32_FUNCTION(_num, _name) \ { \ .num = _num, \ |