Skip to content

Commit 13087ee

Browse files
Yunshao-Chiangkartben
authored andcommitted
drivers: adc: add it515xx_evb board adc driver
Add it515xx analog to digital converter driver which supports 8 channels ch0 ~ ch7 and 12-bit resolution. Signed-off-by: Yunshao Chiang <Yunshao.Chiang@ite.com.tw>
1 parent 2aff40b commit 13087ee

File tree

8 files changed

+547
-0
lines changed

8 files changed

+547
-0
lines changed

boards/ite/it515xx_evb/it515xx_evb.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,9 @@
104104
row-size = <8>;
105105
col-size = <16>;
106106
};
107+
108+
&adc0 {
109+
status = "okay";
110+
pinctrl-0 = <&adc0_ch3_gpi3_default>;
111+
pinctrl-names = "default";
112+
};

drivers/adc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ zephyr_library()
66

77
zephyr_library_sources_ifdef(CONFIG_ADC adc_common.c)
88
zephyr_library_sources_ifdef(CONFIG_ADC_TELINK_B91 adc_b91.c)
9+
zephyr_library_sources_ifdef(CONFIG_ADC_ITE_IT51XXX adc_ite_it51xxx.c)
910
zephyr_library_sources_ifdef(CONFIG_ADC_ITE_IT8XXX2 adc_ite_it8xxx2.c)
1011
zephyr_library_sources_ifdef(CONFIG_ADC_SHELL adc_shell.c)
1112
zephyr_library_sources_ifdef(CONFIG_ADC_MCUX_ADC12 adc_mcux_adc12.c)

drivers/adc/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ source "subsys/logging/Kconfig.template.log_config"
5656

5757
source "drivers/adc/Kconfig.b91"
5858

59+
source "drivers/adc/Kconfig.it51xxx"
60+
5961
source "drivers/adc/Kconfig.it8xxx2"
6062

6163
source "drivers/adc/Kconfig.mcux"

drivers/adc/Kconfig.it51xxx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# ADC configuration options
2+
3+
# Copyright (c) 2025 ITE Corporation. All Rights Reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config ADC_ITE_IT51XXX
7+
bool "ITE IT51XXX ADC driver"
8+
default y
9+
depends on DT_HAS_ITE_IT51XXX_ADC_ENABLED
10+
select PINCTRL
11+
help
12+
This option enables the ADC driver for IT51XXX
13+
family of processors.
14+
Voltage range 0 to 3300mV.
15+
Support 12-bit resolution.
16+
Support 8 channels: ch0~ch7.
17+
18+
if ADC_ITE_IT51XXX
19+
20+
config ADC_IT51XXX_VOL_FULL_SCALE
21+
bool "ADC internal voltage as full-scale"
22+
default y
23+
help
24+
This option enables ADC internal reference
25+
voltage as full-scale 3300mV.
26+
27+
endif # ADC_ITE_IT51XXX

0 commit comments

Comments
 (0)