include/dt-bindings/pinctrl: stm32: Move non F1 compatible definitions

Macro STM32_PINMUX and related definitions are not compatible with
stm32f1 series and then should not be provided in -common.h.
Move them to stm32-pinctrl.h

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-08-11 14:41:39 +02:00 committed by Kumar Gala
commit e45757ffb1
2 changed files with 33 additions and 34 deletions

View file

@ -7,40 +7,6 @@
#ifndef ZEPHYR_STM32_PINCTRL_COMMON_H_
#define ZEPHYR_STM32_PINCTRL_COMMON_H_
/* Adapted from Linux: include/dt-bindings/pinctrl/stm32-pinfunc.h */
/**
* @brief Pin modes
*/
#define AF0 0x0
#define AF1 0x1
#define AF2 0x2
#define AF3 0x3
#define AF4 0x4
#define AF5 0x5
#define AF6 0x6
#define AF7 0x7
#define AF8 0x8
#define AF9 0x9
#define AF10 0xa
#define AF11 0xb
#define AF12 0xc
#define AF13 0xd
#define AF14 0xe
#define AF15 0xf
#define ANALOG 0x10
#define GPIO 0x11 /* Reserved for future use */
/**
* @brief Macro to generate pinmux int using port, pin number and mode arguments
* This is taken from Linux equivalent st,stm32f429-pinctrl binding
*/
#define PIN_NO(port, line) (((port) - 'A') * 0x10 + (line))
#define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode))
/**
* @brief numerical IDs for IO ports
*/

View file

@ -8,6 +8,39 @@
#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32_PINCTRL_H_
#include <dt-bindings/pinctrl/stm32-pinctrl-common.h>
/* Adapted from Linux: include/dt-bindings/pinctrl/stm32-pinfunc.h */
/**
* @brief Pin modes
*/
#define AF0 0x0
#define AF1 0x1
#define AF2 0x2
#define AF3 0x3
#define AF4 0x4
#define AF5 0x5
#define AF6 0x6
#define AF7 0x7
#define AF8 0x8
#define AF9 0x9
#define AF10 0xa
#define AF11 0xb
#define AF12 0xc
#define AF13 0xd
#define AF14 0xe
#define AF15 0xf
#define ANALOG 0x10
/**
* @brief Macro to generate pinmux int using port, pin number and mode arguments
* This is taken from Linux equivalent st,stm32f429-pinctrl binding
*/
#define PIN_NO(port, line) (((port) - 'A') * 0x10 + (line))
#define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode))
/**
* @brief PIN configuration bitfield
*