1 /*
2  * Copyright  2017 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_SWM_CONNECTIONS_
10 #define _FSL_SWM_CONNECTIONS_
11 
12 #include "fsl_common.h"
13 
14 /*******************************************************************************
15  * Definitions
16  ******************************************************************************/
17 /* Component ID definition, used by tools. */
18 #ifndef FSL_COMPONENT_ID
19 #define FSL_COMPONENT_ID "platform.drivers.swm_connections"
20 #endif
21 
22 /*!
23  * @addtogroup swm
24  * @{
25  */
26 
27 /*!
28  * @name swm connections
29  * @{
30  */
31 
32 /*! @brief SWM port_pin number */
33 typedef enum _swm_port_pin_type_t
34 {
35     kSWM_PortPin_P0_0 = 0U,   /*!< port_pin number P0_0. */
36     kSWM_PortPin_P0_1 = 1U,   /*!< port_pin number P0_1. */
37     kSWM_PortPin_P0_2 = 2U,   /*!< port_pin number P0_2. */
38     kSWM_PortPin_P0_3 = 3U,   /*!< port_pin number P0_3. */
39     kSWM_PortPin_P0_4 = 4U,   /*!< port_pin number P0_4. */
40     kSWM_PortPin_P0_5 = 5U,   /*!< port_pin number P0_5. */
41     kSWM_PortPin_P0_6 = 6U,   /*!< port_pin number P0_6. */
42     kSWM_PortPin_P0_7 = 7U,   /*!< port_pin number P0_7. */
43     kSWM_PortPin_P0_8 = 8U,   /*!< port_pin number P0_8. */
44     kSWM_PortPin_P0_9 = 9U,   /*!< port_pin number P0_9. */
45     kSWM_PortPin_P0_10 = 10U, /*!< port_pin number P0_10. */
46     kSWM_PortPin_P0_11 = 11U, /*!< port_pin number P0_11. */
47     kSWM_PortPin_P0_12 = 12U, /*!< port_pin number P0_12. */
48     kSWM_PortPin_P0_13 = 13U, /*!< port_pin number P0_13. */
49     kSWM_PortPin_P0_14 = 14U, /*!< port_pin number P0_14. */
50     kSWM_PortPin_P0_15 = 15U, /*!< port_pin number P0_15. */
51     kSWM_PortPin_P0_16 = 16U, /*!< port_pin number P0_16. */
52     kSWM_PortPin_P0_17 = 17U, /*!< port_pin number P0_17. */
53     kSWM_PortPin_Reset = 0xffU /*!< port_pin reset number. */
54 } swm_port_pin_type_t;
55 
56 /*! @brief SWM movable selection */
57 typedef enum _swm_select_movable_t
58 {
59     kSWM_USART0_TXD = 0U, /*!< Movable function as USART0_TXD. */
60     kSWM_USART0_RXD = 1U, /*!< Movable function as USART0_RXD. */
61     kSWM_USART0_RTS = 2U, /*!< Movable function as USART0_RTS. */
62     kSWM_USART0_CTS = 3U, /*!< Movable function as USART0_CTS. */
63 
64     kSWM_USART0_SCLK = 4U, /*!< Movable function as USART0_SCLK. */
65     kSWM_USART1_TXD = 5U,  /*!< Movable function as USART1_TXD. */
66     kSWM_USART1_RXD = 6U,  /*!< Movable function as USART1_RXD. */
67     kSWM_USART1_RTS = 7U,  /*!< Movable function as USART1_RTS. */
68 
69     kSWM_USART1_CTS = 8U,  /*!< Movable function as USART1_CTS. */
70     kSWM_USART1_SCLK = 9U, /*!< Movable function as USART1_SCLK. */
71     kSWM_USART2_TXD = 10U, /*!< Movable function as USART2_TXD. */
72     kSWM_USART2_RXD = 11U, /*!< Movable function as USART2_RXD. */
73 
74     kSWM_USART2_RTS = 12U,  /*!< Movable function as USART2_RTS. */
75     kSWM_USART2_CTS = 13U,  /*!< Movable function as USART2_CTS. */
76     kSWM_USART2_SCLK = 14U, /*!< Movable function as USART2_SCLK. */
77     kSWM_SPI0_SCK = 15U,    /*!< Movable function as SPI0_SCK. */
78 
79     kSWM_SPI0_MOSI = 16U, /*!< Movable function as SPI0_MOSI. */
80     kSWM_SPI0_MISO = 17U, /*!< Movable function as SPI0_MISO. */
81     kSWM_SPI0_SSEL = 18U, /*!< Movable function as SPI0_SSEL0. */
82     kSWM_SPI1_SCK = 19U,  /*!< Movable function as SPI1_SCK. */
83 
84     kSWM_SPI1_MOSI = 20U, /*!< Movable function as SPI1_MOSI. */
85     kSWM_SPI1_MISO = 21U, /*!< Movable function as SPI1_MISO. */
86     kSWM_SPI1_SSEL = 22U, /*!< Movable function as SPI1_SSEL0. */
87     kSWM_CTIN_0 = 23U,    /*!< Movable function as CTIN_0. */
88 
89     kSWM_CTIN_1 = 24U,  /*!< Movable function as CTIN_1. */
90     kSWM_CTIN_2 = 25U,  /*!< Movable function as CTIN_2. */
91     kSWM_CTIN_3 = 26U,  /*!< Movable function as CTIN_3. */
92     kSWM_CTOUT_0 = 27U, /*!< Movable function as CTOUT_0. */
93 
94     kSWM_CTOUT_1 = 28U, /*!< Movable function as CTOUT_1. */
95     kSWM_CTOUT_2 = 29U, /*!< Movable function as CTOUT_2. */
96     kSWM_CTOUT_3 = 30U, /*!< Movable function as CTOUT_3. */
97     kSWM_I2C_SDA = 31U, /*!< Movable function as I2C_SDA. */
98 
99     kSWM_I2C_SCL = 32U,       /*!< Movable function as I2C_SCL. */
100     kSWM_ACMP_OUT = 33U,      /*!< Movable function as ACMP_OUT. */
101     kSWM_CLKOUT = 34U,        /*!< Movable function as CLKOUT. */
102     kSWM_GPIO_INT_BMAT = 35U, /*!< Movable function as GPIO_INT_BMAT. */
103 
104     kSWM_MOVABLE_NUM_FUNCS = 36U, /*!< Movable function number. */
105 } swm_select_movable_t;
106 
107 /*! @brief SWM fixed pin selection */
108 typedef enum _swm_select_fixed_pin_t
109 {
110     kSWM_ACMP_INPUT1 = SWM_PINENABLE0_ACMP_I1_MASK, /*!< Fixed-pin function as ACMP_INPUT1. */
111     kSWM_ACMP_INPUT2 = SWM_PINENABLE0_ACMP_I2_MASK, /*!< Fixed-pin function as ACMP_INPUT2. */
112     kSWM_SWCLK = SWM_PINENABLE0_SWCLK_MASK,         /*!< Fixed-pin function as SWCLK. */
113     kSWM_SWDIO = SWM_PINENABLE0_SWDIO_MASK,         /*!< Fixed-pin function as SWDIO. */
114     kSWM_XTALIN = SWM_PINENABLE0_XTALIN_MASK,       /*!< Fixed-pin function as XTALIN. */
115     kSWM_XTALOUT = SWM_PINENABLE0_XTALOUT_MASK,     /*!< Fixed-pin function as XTALOUT. */
116     kSWM_RESETN = SWM_PINENABLE0_RESETN_MASK,       /*!< Fixed-pin function as RESETN. */
117     kSWM_CLKIN = SWM_PINENABLE0_CLKIN_MASK,         /*!< Fixed-pin function as CLKIN. */
118     kSWM_VDDCMP = SWM_PINENABLE0_VDDCMP_MASK,       /*!< Fixed-pin function as VDDCMP. */
119 
120     kSWM_FIXEDPIN_NUM_FUNCS = (int)0x80000101U, /*!< Fixed-pin function number. */
121 } swm_select_fixed_pin_t;
122 
123 /*@}*/
124 
125 #endif /* _FSL_INPUTMUX_CONNECTIONS_ */
126