drivers: i3c: npcx: introduce NPCX I3C driver

This implements basic driver to utilize the I3C IP block
on NPCX.

1. I3C mode: Main controller mode only.
2. Transfer: Support SDR only.
3. IBI: Support Hot-Join, IBI(MDB).
   Controller request is not supported.
4. Support 3 I3C modules:
   I3C1(3.3V), I3C2(1.8V, espi mode), (I3C3 1.8V or 3.3V)

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
This commit is contained in:
Alvis Sun 2024-04-22 14:24:44 +08:00 committed by Fabio Baltieri
commit c6763bd2ca
9 changed files with 2410 additions and 2 deletions

View file

@ -80,6 +80,20 @@
.bit = DT_CLOCKS_CELL_BY_IDX(DT_DRV_INST(inst), i, bit), \
}
/**
* @brief Construct a npcx_clk_cfg structure from 'clocks' with the same clock 'name'.
*
* @param inst instance number for compatible defined in DT_DRV_COMPAT.
* @param name name of the clock
* @return npcx_clk_cfg item from 'clocks' property with the same clock 'name'
*/
#define NPCX_DT_CLK_CFG_ITEM_BY_NAME(inst, name) \
{ \
.bus = DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, bus), \
.ctrl = DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, ctl), \
.bit = DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, bit), \
}
/**
* @brief Length of 'clocks' property which type is 'phandle-array'
*