boards: sam0: pinmux: Add Kconfig check for UART
To avoid pin conflicts add CONFIG_UART_SAM0 flag for each uart pinmux config. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
9a7171304f
commit
85ca73ccf8
|
@ -16,25 +16,25 @@ static int board_pinmux_init(struct device *dev)
|
|||
#endif
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM0 on RX=PA11/pad 3, TX=PA10/pad 2 */
|
||||
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
|
||||
#endif
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -14,28 +14,28 @@ static int board_pinmux_init(struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM0 on RX=PA7/pad 3, TX=PA6/pad 2 */
|
||||
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxa, 6, PINMUX_FUNC_D);
|
||||
#endif
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM2 on RX=PA9/pad 1, TX=PA8/pad 0 */
|
||||
pinmux_pin_set(muxa, 9, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxa, 8, PINMUX_FUNC_D);
|
||||
#endif
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,28 +15,28 @@ static int board_pinmux_init(struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM0 on RX=PA11, TX=PA10 */
|
||||
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
|
||||
#endif
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM5 on RX=PB23, TX=PB22 */
|
||||
pinmux_pin_set(muxb, 23, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxb, 22, PINMUX_FUNC_D);
|
||||
#endif
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,25 +15,25 @@ static int board_pinmux_init(struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM3 on RX=PA25, TX=PA24 */
|
||||
pinmux_pin_set(muxa, 24, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 25, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
pinmux_pin_set(muxb, 8, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxb, 9, PINMUX_FUNC_D);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,28 +15,28 @@ static int board_pinmux_init(struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM0 on RX=PA11, TX=PA10 */
|
||||
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM3 ON RX=PA19, TX=PA16 */
|
||||
pinmux_pin_set(muxa, 19, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 16, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM3 ON RX=PA23, TX=PA22 */
|
||||
pinmux_pin_set(muxa, 23, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 22, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,33 +21,33 @@ static int board_pinmux_init(struct device *dev)
|
|||
ARG_UNUSED(muxc);
|
||||
ARG_UNUSED(muxd);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* NOTE: SERCOM1 UART is used by the UART driver tests */
|
||||
/* SERCOM1 ON RX=PC22, TX=PC23 */
|
||||
pinmux_pin_set(muxc, 22, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxc, 23, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM2 ON RX=PB24, TX=PB25 */
|
||||
pinmux_pin_set(muxb, 24, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxb, 25, PINMUX_FUNC_D);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(6, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(6, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(7, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(7, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17,27 +17,27 @@ static int board_pinmux_init(struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(0, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM0 on RX=PA5, TX=PA4 */
|
||||
pinmux_pin_set(muxa, 4, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxa, 5, PINMUX_FUNC_D);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(1, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(2, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(3, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* NOTE: SERCOM3 UART is used by the UART driver tests */
|
||||
/* SERCOM3 on RX=PA22, TX=PA23 */
|
||||
pinmux_pin_set(muxa, 22, PINMUX_FUNC_C);
|
||||
pinmux_pin_set(muxa, 23, PINMUX_FUNC_C);
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
#warning Pin mapping may not be configured
|
||||
#endif
|
||||
#if ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart)
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(5, atmel_sam0_uart) && CONFIG_UART_SAM0)
|
||||
/* SERCOM5 on RX=PA23, TX=PA22 */
|
||||
pinmux_pin_set(muxa, 22, PINMUX_FUNC_D);
|
||||
pinmux_pin_set(muxa, 23, PINMUX_FUNC_D);
|
||||
|
|
Loading…
Reference in a new issue