Skip to content

Commit 774ddad

Browse files
committed
boards: st: added tsc peripheral to U0 series
update stm32u0 and stm32u083c_dk for TSC peripheral Signed-off-by: Arif Balik <[email protected]>
1 parent 4ee7861 commit 774ddad

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

boards/st/stm32u083c_dk/stm32u083c_dk.dts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <st/u0/stm32u083mctx-pinctrl.dtsi>
1010
#include "arduino_r3_connector.dtsi"
1111
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
#include <zephyr/dt-bindings/input/stm32-tsc-defines.h>
1213

1314
/ {
1415
model = "STMicroelectronics STM32U83C-DK board";
@@ -124,3 +125,30 @@
124125
status = "okay";
125126
};
126127
};
128+
129+
&tsc {
130+
status = "okay";
131+
pinctrl-0 = <&tsc_g1_io1_pb12 &tsc_g1_io2_pb13 &tsc_g6_io1_pd10 &tsc_g6_io2_pd11>;
132+
pinctrl-names = "default";
133+
134+
st,pulse-generator-prescaler = <TSC_PG_PRESCALER_2>;
135+
st,charge-transfer-pulse-high = <2>;
136+
st,charge-transfer-pulse-low = <2>;
137+
st,spread-spectrum;
138+
st,spread-spectrum-prescaler = <2>;
139+
st,spread-spectrum-deviation = <100>;
140+
st,max-count-value = <TSC_MAX_COUNT_8191>;
141+
142+
tsc_group1: g1 {
143+
group = <1>;
144+
st,use-as-shield;
145+
channel-ios = <TSC_IO2>;
146+
sampling-io = <TSC_IO1>;
147+
};
148+
149+
tsc_group6: g6 {
150+
group = <6>;
151+
channel-ios = <TSC_IO2>;
152+
sampling-io = <TSC_IO1>;
153+
};
154+
};

boards/st/stm32u083c_dk/stm32u083c_dk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ supported:
1616
- i2c
1717
- pwm
1818
- usart
19+
- tsc
1920
ram: 40
2021
flash: 256

dts/arm/st/u0/stm32u0.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,15 @@
541541
reg = <0x40009400 0x400>;
542542
interrupts = <18 1>;
543543
interrupt-names = "combined";
544+
};
545+
546+
tsc: tsc@40024000 {
547+
compatible = "st,stm32-tsc";
548+
reg = <0x40024000 0x400>;
549+
clocks = <&rcc STM32_CLOCK(AHB1, 24U)>;
550+
resets = <&rctl STM32_RESET(AHB1, 24U)>;
551+
interrupts = <21 0>;
552+
interrupt-names = "global";
544553
status = "disabled";
545554
};
546555
};

0 commit comments

Comments
 (0)