i3c: add I3C controller driver for MCUX
This adds a very basic driver to utilize the I3C IP block on MCUX (e.g. RT685). Note that, for now, this only supports being the active controller on the bus. Origin: NXP MCUXpresso SDK License: BSD 3-Clause URL: https://github.com/zephyrproject-rtos/hal_nxp Commit: 2302a1e94f5bc00ce59db4e249b688ad2e959f58 Purpose: Enabling the I3C controller on RT685. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
3c8dcb568d
commit
3e8f97009d
|
@ -148,6 +148,12 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(
|
||||||
case MCUX_BUS_CLK:
|
case MCUX_BUS_CLK:
|
||||||
*rate = CLOCK_GetFreq(kCLOCK_BusClk);
|
*rate = CLOCK_GetFreq(kCLOCK_BusClk);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if defined(CONFIG_I3C_MCUX)
|
||||||
|
case MCUX_I3C_CLK:
|
||||||
|
*rate = CLOCK_GetI3cClkFreq();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -18,3 +18,8 @@ zephyr_library_sources_ifdef(
|
||||||
CONFIG_I3C_IBI_WORKQUEUE
|
CONFIG_I3C_IBI_WORKQUEUE
|
||||||
i3c_ibi_workq.c
|
i3c_ibi_workq.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
zephyr_library_sources_ifdef(
|
||||||
|
CONFIG_I3C_MCUX
|
||||||
|
i3c_mcux.c
|
||||||
|
)
|
||||||
|
|
|
@ -98,4 +98,6 @@ config I3C_CONTROLLER_INIT_PRIORITY
|
||||||
|
|
||||||
comment "Device Drivers"
|
comment "Device Drivers"
|
||||||
|
|
||||||
|
rsource "Kconfig.nxp"
|
||||||
|
|
||||||
endif # I3C
|
endif # I3C
|
||||||
|
|
19
drivers/i3c/Kconfig.nxp
Normal file
19
drivers/i3c/Kconfig.nxp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Copyright (c) 2022 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
DT_COMPAT_NXP_MCUX_I3C := nxp,mcux-i3c
|
||||||
|
|
||||||
|
module = I3C_MCUX
|
||||||
|
module-str = i3c-mcux
|
||||||
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
|
config I3C_MCUX
|
||||||
|
bool "MCUX I3C driver"
|
||||||
|
depends on HAS_MCUX
|
||||||
|
depends on DT_HAS_NXP_MCUX_I3C_ENABLED
|
||||||
|
select PINCTRL
|
||||||
|
select I3C_IBI_WORKQUEUE if I3C_USE_IBI
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable mcux I3C driver.
|
2178
drivers/i3c/i3c_mcux.c
Normal file
2178
drivers/i3c/i3c_mcux.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -42,4 +42,6 @@
|
||||||
|
|
||||||
#define MCUX_SDIF_CLK 29
|
#define MCUX_SDIF_CLK 29
|
||||||
|
|
||||||
|
#define MCUX_I3C_CLK 30
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */
|
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */
|
||||||
|
|
Loading…
Reference in a new issue