imx93: add ADC support
Subsystems (2)
v3 cover imx93: add ADC support
Add ADC support for NXP iMX93
Changes for v2:
- add "static" to functions
- enable ADC in iMX93 EVK
Changes for v3:
- split in 3 commits
- keep dts file in sync with Linux devicetree
- add comments to commits
Luca Ellero (3):
dm: adc: add iMX93 ADC support
imx93_evk: add adc node to dts file
imx93_evk: defconfig: add adc support
arch/arm/dts/imx93-11x11-evk.dts | 4 + configs/imx93_11x11_evk_defconfig | 1 + drivers/adc/Kconfig | 8 + drivers/adc/Makefile | 1 + drivers/adc/imx93-adc.c | 284 ++++++++++++++++++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 drivers/adc/imx93-adc.c
Signature · 1 line
2.25.1
PATCH v3 1/3 dm: adc: add iMX93 ADC support
This commit adds driver for iMX93 ADC.
The driver is implemented using driver model and provides ADC uclass's methods for ADC single channel operations:
- adc_start_channel()
- adc_channel_data()
- adc_stop()
ADC features:
- channels: 4
- resolution: 12-bit
--- drivers/adc/Kconfig | 8 ++ drivers/adc/Makefile | 1 + drivers/adc/imx93-adc.c | 284 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+) create mode 100644 drivers/adc/imx93-adc.c
drivers/adc/Kconfig +8 -0
@@ -63,3 +63,11 @@ config STM32_ADC - core driver to deal with common resources - child driver to deal with individual ADC resources (declare ADC device and associated channels, start/stop conversions) + +config ADC_IMX93 + bool "Enable NXP IMX93 ADC driver" + help + This enables basic driver for NXP IMX93 ADC. + It provides: + - 4 analog input channels + - 12-bit resolution
drivers/adc/Makefile +1 -0
@@ -10,3 +10,4 @@ obj-$(CONFIG_ADC_SANDBOX) += sandbox.o obj-$(CONFIG_SARADC_ROCKCHIP) += rockchip-saradc.o obj-$(CONFIG_SARADC_MESON) += meson-saradc.o obj-$(CONFIG_STM32_ADC) += stm32-adc.o stm32-adc-core.o +obj-$(CONFIG_ADC_IMX93) += imx93-adc.o
drivers/adc/imx93-adc.c new file +284 -0
284 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 2/3 imx93_evk: add adc node to dts file
In reply to Luca ElleroThis node uses imx93_adc driver under drivers/adc.
The node is added keeping dts file in sync with iMX9 evk Linux devicetree.
--- arch/arm/dts/imx93-11x11-evk.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/imx93-11x11-evk.dts +4 -0
@@ -58,6 +58,10 @@ }; +&adc1 { + status = "okay"; +}; + &lpi2c1 { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.25.1
PATCH v3 3/3 imx93_evk: defconfig: add adc support
In reply to Luca ElleroiMX93 ADC features:
- 4 channels
- 12 bit resolution
--- configs/imx93_11x11_evk_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/imx93_11x11_evk_defconfig +1 -0
@@ -82,6 +82,7 @@ CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_REGMAP=y CONFIG_SYSCON=y +CONFIG_ADC_IMX93=y CONFIG_IMX_RGPIO2P=y CONFIG_DM_PCA953X=y CONFIG_DM_I2C=y
Signature · 1 line
2.25.1
+ Haibo
Quoted 24 lines · Luca Ellero
Add ADC support for NXP iMX93
Changes for v2:
- add "static" to functions
- enable ADC in iMX93 EVKChanges for v3:
- split in 3 commits
- keep dts file in sync with Linux devicetree
- add comments to commitsLuca Ellero (3):
dm: adc: add iMX93 ADC support
imx93_evk: add adc node to dts file
imx93_evk: defconfig: add adc supportarch/arm/dts/imx93-11x11-evk.dts | 4 + configs/imx93_11x11_evk_defconfig | 1 + drivers/adc/Kconfig | 8 + drivers/adc/Makefile | 1 + drivers/adc/imx93-adc.c | 284 ++++++++++++++++++++++++++++++ 5 files changed, 298 insertions(+)create mode 100644
drivers/adc/imx93-adc.c