usdhc/pinmux: configure pinmux of usdhc on mimxrt1050 evk
Implementation of pinmux of usdhc depends on board design. Usdhc driver could change pinmux according to SD mode, SoC should provide API for this. Board pinmux should register its pinmux function to SoC. Signed-off-by: Jun Yang <jun.yang@nxp.com>
This commit is contained in:
parent
c6864dbea3
commit
6ff5ac05e4
3 changed files with 131 additions and 0 deletions
|
@ -192,6 +192,34 @@ static ALWAYS_INLINE void clkInit(void)
|
|||
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DISK_ACCESS_USDHC1) || \
|
||||
defined(CONFIG_DISK_ACCESS_USDHC2)
|
||||
|
||||
/* Usdhc driver needs to re-configure pinmux
|
||||
* Pinmux depends on board design.
|
||||
* From the perspective of Usdhc driver,
|
||||
* it can't access board specific function.
|
||||
* So SoC provides this for board to register
|
||||
* its usdhc pinmux and for usdhc to access
|
||||
* pinmux.
|
||||
*/
|
||||
|
||||
static usdhc_pin_cfg_cb g_usdhc_pin_cfg_cb;
|
||||
|
||||
void imxrt_usdhc_pinmux_cb_register(usdhc_pin_cfg_cb cb)
|
||||
{
|
||||
g_usdhc_pin_cfg_cb = cb;
|
||||
}
|
||||
|
||||
void imxrt_usdhc_pinmux(u16_t nusdhc, bool init,
|
||||
u32_t speed, u32_t strength)
|
||||
{
|
||||
if (g_usdhc_pin_cfg_cb)
|
||||
g_usdhc_pin_cfg_cb(nusdhc, init,
|
||||
speed, strength);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Perform basic hardware initialization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue