Skip to content

Commit 5a2765d

Browse files
Yunshao-Chiangdanieldegrasse
authored andcommitted
drivers: comparator: add it51xxx_evb analog comparator driver
Add analog comparator driver for ITE it51xxx chip. Signed-off-by: Yunshao Chiang <[email protected]>
1 parent 9751900 commit 5a2765d

File tree

10 files changed

+579
-1
lines changed

10 files changed

+579
-1
lines changed

boards/ite/it515xx_evb/it515xx_evb.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,11 @@
153153
&sha256 {
154154
status = "okay";
155155
};
156+
157+
/* voltage comparator for test */
158+
&vcmp1 {
159+
status = "okay";
160+
threshold-mv = <1500>;
161+
scan-period = <0x4>;
162+
io-channels = <&adc0 3>;
163+
};

drivers/comparator/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ zephyr_library()
88
zephyr_library_sources_ifdef(CONFIG_USERSPACE comparator_handlers.c)
99
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_SILABS_ACMP comparator_silabs_acmp.c)
1010
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_FAKE_COMP comparator_fake_comp.c)
11+
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_IT51XXX_VCMP comparator_it51xxx_vcmp.c)
1112
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_MCUX_ACMP comparator_mcux_acmp.c)
1213
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_NRF_COMP comparator_nrf_comp.c)
1314
zephyr_library_sources_ifdef(CONFIG_COMPARATOR_NRF_LPCOMP comparator_nrf_lpcomp.c)

drivers/comparator/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config COMPARATOR_INIT_PRIORITY
2020

2121
rsource "Kconfig.fake_comp"
2222
rsource "Kconfig.silabs_acmp"
23+
rsource "Kconfig.it51xxx_vcmp"
2324
rsource "Kconfig.mcux_acmp"
2425
rsource "Kconfig.nrf_comp"
2526
rsource "Kconfig.nrf_lpcomp"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ITE Voltage Comparator driver configuration options
2+
3+
# Copyright (c) 2025 ITE Technology Corporation.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config COMPARATOR_IT51XXX_VCMP
7+
bool "ITE it51xxx Voltage Comparator"
8+
default y
9+
depends on ADC_ITE_IT51XXX
10+
depends on DT_HAS_ITE_IT51XXX_VCMP_ENABLED
11+
depends on DYNAMIC_INTERRUPTS
12+
help
13+
This option enables the ITE it51xxx voltage comparator,
14+
it51xxx supports three 10-bit threshold voltage comparator
15+
channels, and the input of each comparator comes from ADC pin.

0 commit comments

Comments
 (0)