Closed MikhailSiomin closed 6 months ago
@MikhailSiomin I recommend you also mention that you posted this RFC in the #NXP Discord channel
@henrikbrixandersen, what do you think of the generic driver suggested above?
Hi, is there any plans to move forward with using this generic FlexIO implementation?
Hi @harristomyx , There is an open PR to add this FlexIO driver at https://github.com/zephyrproject-rtos/zephyr/pull/53748.
Best regards
Add generic MCUX FlexIO driver.
Zephyr currently does not support mcux flexio.
I originally implemented mcux flexio spi driver that uses FlexIO as SPI only. But @henrikbrixandersen proposed an implementation of a generic FlexIO driver. Now I have a proposal to split the driver into parts:
zephyr\drivers\misc\mcux_flexio\mcux_flexio.c
– for initialization common resources (pinctrl, irq handler), initialization DEVICE_DT_DEFINE() for each childs (interfaces), and checking resource overlapping;zephyr\drivers\<interface>\<interface>_mcux_flexio.c
– for code of specific interface (spi, i2c, uart, etc.);zephyr\drivers\<interface>\<interface>_mcux_flexio.h
– for definition device data and device config structs.Compatible will define the interface type (SPI, I2C, UART, etc.).
zephyr\drivers\<interface>\<interface>_mcux_flexio.h
will be included tozephyr\drivers\misc\mcux_flexio\mcux_flexio.c
in the following way (for example for spi):zephyr\drivers\spi\spi_mcux_flexio.h
:example.overlay
:If the community approves this proposal, then I will implement it.