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 1111
1212LOG_MODULE_REGISTER (board_control , CONFIG_BOARD_MIMX93_EVK_LOG_LEVEL );
1313
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 )
1615
1716#define BOARD_EXP_SEL_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(imx93evk_exp_sel)
1817
@@ -22,8 +21,7 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_MIMX93_EVK_LOG_LEVEL);
2221static int board_init_exp_sel (void )
2322{
2423 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 );
2725 uint32_t pin_state = DT_ENUM_IDX (BOARD_EXP_SEL_NODE , mux );
2826
2927 if (!gpio_is_ready_dt (& mux )) {
@@ -43,10 +41,8 @@ static int board_init_exp_sel(void)
4341 LOG_ERR ("Write EXP_SEL Pin error %d" , rc );
4442 return rc ;
4543 }
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 );
5046
5147 return 0 ;
5248}
Original file line number Diff line number Diff line change @@ -85,6 +85,35 @@ Serial Port
8585This board configuration uses a single serial communication channel with the
8686CPU's UART4.
8787
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+
88117Programming and Debugging
89118*************************
90119
You can’t perform that action at this time.
0 commit comments