Commit 8dff10df authored by Glauber Maroto Ferreira's avatar Glauber Maroto Ferreira Committed by Anas Nashif
Browse files

esp32s2: drivers: counter: add support



by bringing up on top of existing counter driver.

Signed-off-by: default avatarGlauber Maroto Ferreira <glauber.ferreira@espressif.com>
parent bd068e47
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -23,3 +23,19 @@
	status = "okay";
	current-speed = <115200>;
};

&timer0 {
	status = "okay";
};

&timer1 {
	status = "okay";
};

&timer2 {
	status = "okay";
};

&timer3 {
	status = "okay";
};
+2 −2
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@

menuconfig COUNTER_ESP32
	bool "ESP32 Counter Driver"
	depends on SOC_ESP32
	depends on SOC_ESP32 || SOC_ESP32S2
	help
	  Enable Counter driver for ESP32.
	  Enable Counter driver for ESP32 series devices.

if COUNTER_ESP32

+36 −0
Original line number Diff line number Diff line
@@ -75,6 +75,42 @@
			label = "GPIO_1";
			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";
		};
	};

};