Skip to content

Commit f5dfb81

Browse files
dts: arm: st: add comparator to h7 and g4
adds comparator DTS entities for stm32h7 and stm32g4 series Signed-off-by: Alexander Kozhinov <[email protected]>
1 parent 5bb80f4 commit f5dfb81

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

dts/arm/st/g4/stm32g4.dtsi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2021 The Chromium OS Authors
33
* Copyright (c) 2019 Richard Osterloh <[email protected]>
4+
* Copyright (c) 2024 Alexander Kozhinov <[email protected]>
45
* Copyright (c) 2024 STMicroelectronics
56
* Copyright (c) 2025 Mario Paja
67
*
@@ -698,6 +699,24 @@
698699
STM32_DMA_16BITS)>;
699700
status = "disabled";
700701
};
702+
703+
comp1: comparator@40010200 {
704+
compatible = "st,stm32g4-comp", "st,stm32-comp";
705+
reg = <0x40010200 0x4>;
706+
interrupts = <64 0>;
707+
st,exti-line = <21>;
708+
clocks = <&rcc STM32_CLOCK(APB2, 0)>;
709+
status = "disabled";
710+
};
711+
712+
comp2: comparator@40010204 {
713+
compatible = "st,stm32g4-comp", "st,stm32-comp";
714+
reg = <0x40010204 0x4>;
715+
interrupts = <64 0>;
716+
st,exti-line = <22>;
717+
clocks = <&rcc STM32_CLOCK(APB2, 0)>;
718+
status = "disabled";
719+
};
701720
};
702721

703722
die_temp: dietemp {

dts/arm/st/h7/stm32h7.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,24 @@
11381138
STM32_DMA_16BITS) 0>;
11391139
status = "disabled";
11401140
};
1141+
1142+
comp1_ch1: comparator@5800380c {
1143+
compatible = "st,stm32h7-comp", "st,stm32-comp";
1144+
reg = <0x5800380c 0x200>;
1145+
interrupts = <137 0>;
1146+
st,exti-line = <20>;
1147+
clocks = <&rcc STM32_CLOCK(APB4, 14)>;
1148+
status = "disabled";
1149+
};
1150+
1151+
comp1_ch2: comparator@58003810 {
1152+
compatible = "st,stm32h7-comp", "st,stm32-comp";
1153+
reg = <0x58003810 0x200>;
1154+
interrupts = <137 0>;
1155+
st,exti-line = <20>;
1156+
clocks = <&rcc STM32_CLOCK(APB4, 14)>;
1157+
status = "disabled";
1158+
};
11411159
};
11421160

11431161
die_temp: dietemp {

0 commit comments

Comments
 (0)