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_P0_18 = 18U, /*!< port_pin number P0_18. */
54     kSWM_PortPin_P0_19 = 19U, /*!< port_pin number P0_19. */
55     kSWM_PortPin_P0_20 = 20U, /*!< port_pin number P0_20. */
56     kSWM_PortPin_P0_21 = 21U, /*!< port_pin number P0_21. */
57     kSWM_PortPin_P0_22 = 22U, /*!< port_pin number P0_22. */
58     kSWM_PortPin_P0_23 = 23U, /*!< port_pin number P0_23. */
59     kSWM_PortPin_P0_24 = 24U, /*!< port_pin number P0_24. */
60     kSWM_PortPin_P0_25 = 25U, /*!< port_pin number P0_25. */
61     kSWM_PortPin_P0_26 = 26U, /*!< port_pin number P0_26. */
62     kSWM_PortPin_P0_27 = 27U, /*!< port_pin number P0_27. */
63     kSWM_PortPin_P0_28 = 28U, /*!< port_pin number P0_28. */
64     kSWM_PortPin_Reset = 0xffU /*!< port_pin reset number. */
65 } swm_port_pin_type_t;
66 
67 /*! @brief SWM movable selection */
68 typedef enum _swm_select_movable_t
69 {
70     kSWM_USART0_TXD = 0U,  /*!< Movable function as USART0_TXD. */
71     kSWM_USART0_RXD = 1U,  /*!< Movable function as USART0_RXD. */
72     kSWM_USART0_RTS = 2U,  /*!< Movable function as USART0_RTS. */
73     kSWM_USART0_CTS = 3U,  /*!< Movable function as USART0_CTS. */
74     kSWM_USART0_SCLK = 4U, /*!< Movable function as USART0_SCLK. */
75     kSWM_SPI0_SCK = 15U,   /*!< Movable function as SPI0_SCK. */
76     kSWM_SPI0_MOSI = 16U,  /*!< Movable function as SPI0_MOSI. */
77     kSWM_SPI0_MISO = 17U,  /*!< Movable function as SPI0_MISO. */
78     kSWM_SPI0_SSEL0 = 18U, /*!< Movable function as SPI0_SSEL0. */
79     kSWM_SPI0_SSEL1 = 19U, /*!< Movable function as SPI0_SSEL1. */
80     kSWM_SPI0_SSEL2 = 20U, /*!< Movable function as SPI0_SSEL2. */
81     kSWM_SPI0_SSEL3 = 21U, /*!< Movable function as SPI0_SSEL3. */
82     kSWM_SPI1_SCK = 22U,   /*!< Movable function as SPI1_SCK. */
83     kSWM_SPI1_MOSI = 23U,  /*!< Movable function as SPI1_MOSI. */
84     kSWM_SPI1_MISO = 24U,  /*!< Movable function as SPI1_MISO. */
85     kSWM_SPI1_SSEL0 = 25U, /*!< Movable function as SPI1_SSEL0. */
86     kSWM_SPI1_SSEL1 = 26U, /*!< Movable function as SPI1_SSEL1. */
87     kSWM_SCT_PIN0 = 27U, /*!< Movable function as SCT_PIN0. */
88     kSWM_SCT_PIN1 = 28U, /*!< Movable function as SCT_PIN1. */
89     kSWM_SCT_PIN2 = 29U, /*!< Movable function as SCT_PIN2. */
90     kSWM_SCT_PIN3 = 30U, /*!< Movable function as SCT_PIN3. */
91     kSWM_SCT_OUT0 = 31U, /*!< Movable function as SCT_OUT0. */
92     kSWM_SCT_OUT1 = 32U, /*!< Movable function as SCT_OUT1. */
93     kSWM_SCT_OUT2 = 33U, /*!< Movable function as SCT_OUT2. */
94     kSWM_SCT_OUT3 = 34U, /*!< Movable function as SCT_OUT3. */
95     kSWM_SCT_OUT4 = 35U, /*!< Movable function as SCT_OUT4. */
96     kSWM_SCT_OUT5 = 36U, /*!< Movable function as SCT_OUT5. */
97     kSWM_ADC_PINTRIG0 = 43U,         /*!< Movable function as PINTRIG0. */
98     kSWM_ADC_PINTRIG1 = 44U,        /*!< Movable function as  PINTRIG1. */
99     kSWM_CLKOUT = 46U,        /*!< Movable function as CLKOUT. */
100     kSWM_GPIO_INT_BMAT = 47U, /*!< Movable function as GPIO_INT_BMAT. */
101 
102     kSWM_MOVABLE_NUM_FUNCS = 48U, /*!< Movable function number. */
103 } swm_select_movable_t;
104 
105 /*! @brief SWM fixed pin selection */
106 typedef enum _swm_select_fixed_pin_t
107 {
108     kSWM_SWCLK = SWM_PINENABLE0_SWCLK_MASK,         /*!< Fixed-pin function as SWCLK. */
109     kSWM_SWDIO = SWM_PINENABLE0_SWDIO_MASK,         /*!< Fixed-pin function as SWDIO. */
110     kSWM_XTALIN = SWM_PINENABLE0_XTALIN_MASK,       /*!< Fixed-pin function as XTALIN. */
111     kSWM_XTALOUT = SWM_PINENABLE0_XTALOUT_MASK,     /*!< Fixed-pin function as XTALOUT. */
112     kSWM_RESETN = SWM_PINENABLE0_RESETN_MASK,       /*!< Fixed-pin function as RESETN. */
113     kSWM_CLKIN = SWM_PINENABLE0_CLKIN_MASK,         /*!< Fixed-pin function as CLKIN. */
114     kSWM_I2C0_SDA = SWM_PINENABLE0_I2C0_SDA_MASK,   /*!< Fixed-pin function as I2C0_SDA. */
115     kSWM_I2C0_SCL = SWM_PINENABLE0_I2C0_SCL_MASK,   /*!< Fixed-pin function as I2C0_SCL. */
116     kSWM_ADC_CHN0 = SWM_PINENABLE0_ADC_0_MASK,      /*!< Fixed-pin function as ADC_CHN0. */
117     kSWM_ADC_CHN1 = SWM_PINENABLE0_ADC_1_MASK,      /*!< Fixed-pin function as ADC_CHN1. */
118     kSWM_ADC_CHN2 = SWM_PINENABLE0_ADC_2_MASK,      /*!< Fixed-pin function as ADC_CHN2. */
119     kSWM_ADC_CHN3 = SWM_PINENABLE0_ADC_3_MASK,      /*!< Fixed-pin function as ADC_CHN3. */
120     kSWM_ADC_CHN4 = SWM_PINENABLE0_ADC_4_MASK,      /*!< Fixed-pin function as ADC_CHN4. */
121     kSWM_ADC_CHN5 = SWM_PINENABLE0_ADC_5_MASK,      /*!< Fixed-pin function as ADC_CHN5. */
122     kSWM_ADC_CHN6 = SWM_PINENABLE0_ADC_6_MASK,      /*!< Fixed-pin function as ADC_CHN6. */
123     kSWM_ADC_CHN7 = SWM_PINENABLE0_ADC_7_MASK,      /*!< Fixed-pin function as ADC_CHN7. */
124     kSWM_ADC_CHN8 = SWM_PINENABLE0_ADC_8_MASK,      /*!< Fixed-pin function as ADC_CHN8. */
125     kSWM_ADC_CHN9 = SWM_PINENABLE0_ADC_9_MASK,      /*!< Fixed-pin function as ADC_CHN9. */
126     kSWM_ADC_CHN10 = SWM_PINENABLE0_ADC_10_MASK,    /*!< Fixed-pin function as ADC_CHN10. */
127     kSWM_ADC_CHN11 = SWM_PINENABLE0_ADC_11_MASK,    /*!< Fixed-pin function as ADC_CHN11. */
128 
129     kSWM_FIXEDPIN_NUM_FUNCS = 0x80000041U, /*!< Fixed-pin function number. */
130 } swm_select_fixed_pin_t;
131 
132 /*@}*/
133 
134 #endif /* _FSL_INPUTMUX_CONNECTIONS_ */
135