File tree Expand file tree Collapse file tree 2 files changed +33
-8
lines changed Expand file tree Collapse file tree 2 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 11
11
12
12
LOG_MODULE_REGISTER (board_control , CONFIG_BOARD_MIMX93_EVK_LOG_LEVEL );
13
13
14
- #if DT_HAS_COMPAT_STATUS_OKAY (imx93evk_exp_sel ) && \
15
- IS_ENABLED (CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT )
14
+ #if DT_HAS_COMPAT_STATUS_OKAY (imx93evk_exp_sel ) && IS_ENABLED (CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT )
16
15
17
16
#define BOARD_EXP_SEL_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(imx93evk_exp_sel)
18
17
@@ -22,8 +21,7 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_MIMX93_EVK_LOG_LEVEL);
22
21
static int board_init_exp_sel (void )
23
22
{
24
23
int rc = 0 ;
25
- const struct gpio_dt_spec mux =
26
- GPIO_DT_SPEC_GET (BOARD_EXP_SEL_NODE , mux_gpios );
24
+ const struct gpio_dt_spec mux = GPIO_DT_SPEC_GET (BOARD_EXP_SEL_NODE , mux_gpios );
27
25
uint32_t pin_state = DT_ENUM_IDX (BOARD_EXP_SEL_NODE , mux );
28
26
29
27
if (!gpio_is_ready_dt (& mux )) {
@@ -43,10 +41,8 @@ static int board_init_exp_sel(void)
43
41
LOG_ERR ("Write EXP_SEL Pin error %d" , rc );
44
42
return rc ;
45
43
}
46
- LOG_INF ("EXP_SEL mux %c with priority %d" ,
47
- pin_state ? 'B' : 'A' ,
48
- CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT_PRIO
49
- );
44
+ LOG_INF ("EXP_SEL mux %c with priority %d" , pin_state ? 'B' : 'A' ,
45
+ CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT_PRIO );
50
46
51
47
return 0 ;
52
48
}
Original file line number Diff line number Diff line change @@ -85,6 +85,35 @@ Serial Port
85
85
This board configuration uses a single serial communication channel with the
86
86
CPU's UART4.
87
87
88
+ Board MUX Control
89
+ -----------------
90
+
91
+ This board configuration uses a series of digital multiplexers to switch between
92
+ different board functions. The multiplexers are controlled by a GPIO signal called
93
+ ``EXP_SEL `` from onboard GPIO expander ADP5585. It can be configured to select
94
+ function set "A" or "B" by dts configuration if board control module is enabled.
95
+ The following dts node is defined:
96
+
97
+ .. code-block :: dts
98
+
99
+ board_exp_sel: board-exp-sel {
100
+ compatible = "imx93evk-exp-sel";
101
+ mux-gpios = <&gpio_exp0 4 GPIO_ACTIVE_HIGH>;
102
+ mux = "A";
103
+ };
104
+
105
+ Following steps are required to configure the ``EXP_SEL `` signal:
106
+
107
+ 1. Enable Kconfig option ``CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT ``.
108
+ 2. Select ``mux="A"; `` or ``mux="B"; `` in ``&board_exp_sel `` devicetree node.
109
+
110
+ Kconfig option ``CONFIG_BOARD_MIMX93_EVK_EXP_SEL_INIT `` is enabled if a board
111
+ function that requires configuring the mux is enabled. The MUX option is
112
+ automatically selected if certain board function is enabled, and takes precedence
113
+ over dts config. For instance, if ``CONFIG_CAN `` is enabled, MUX A is selected
114
+ even if ``mux="B"; `` is configured in dts, and an warning would be reported in
115
+ the log.
116
+
88
117
Programming and Debugging
89
118
*************************
90
119
You can’t perform that action at this time.
0 commit comments