esp32s2: drivers: counter: add support

by bringing up on top of existing counter driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
This commit is contained in:
Glauber Maroto Ferreira 2021-09-01 14:13:32 -03:00 committed by Anas Nashif
commit 8dff10dfbe
3 changed files with 54 additions and 2 deletions

View file

@ -23,3 +23,19 @@
status = "okay"; status = "okay";
current-speed = <115200>; current-speed = <115200>;
}; };
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};

View file

@ -5,9 +5,9 @@
menuconfig COUNTER_ESP32 menuconfig COUNTER_ESP32
bool "ESP32 Counter Driver" bool "ESP32 Counter Driver"
depends on SOC_ESP32 depends on SOC_ESP32 || SOC_ESP32S2
help help
Enable Counter driver for ESP32. Enable Counter driver for ESP32 series devices.
if COUNTER_ESP32 if COUNTER_ESP32

View file

@ -75,6 +75,42 @@
label = "GPIO_1"; label = "GPIO_1";
ngpios = <22>; /* 32..53 */ ngpios = <22>; /* 32..53 */
}; };
timer0: counter@3f41f000 {
compatible = "espressif,esp32-timer";
reg = <0x3f41f000 DT_SIZE_K(4)>;
interrupts = <TG0_T0_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "TIMG0_T0";
status = "disabled";
};
timer1: counter@3f41f024 {
compatible = "espressif,esp32-timer";
reg = <0x3ff5f024 DT_SIZE_K(4)>;
interrupts = <TG0_T1_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "TIMG0_T1";
status = "disabled";
};
timer2: counter@3f420000 {
compatible = "espressif,esp32-timer";
reg = <0x3f420000 DT_SIZE_K(4)>;
interrupts = <TG0_T1_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "TIMG1_T0";
status = "disabled";
};
timer3: counter@3f420024 {
compatible = "espressif,esp32-timer";
reg = <0x3f420024 DT_SIZE_K(4)>;
interrupts = <TG1_T1_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "TIMG1_T1";
status = "disabled";
};
}; };
}; };