Skip to content

Commit 1c0e877

Browse files
Raffael Rostagnokartben
authored andcommitted
dts: esp32h2: Add peripherals
Add device tree entries for the following peripherals: - ADC - I2C - I2S - LEDC PWM - MCPWM - PCNT - SPI - DMA - TWAI - USB serial Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
1 parent 2ff00c6 commit 1c0e877

File tree

1 file changed

+122
-1
lines changed

1 file changed

+122
-1
lines changed

dts/riscv/espressif/esp32h2/esp32h2_common.dtsi

Lines changed: 122 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66
#include <mem.h>
77
#include <freq.h>
8+
#include <zephyr/dt-bindings/adc/adc.h>
89
#include <zephyr/dt-bindings/gpio/gpio.h>
10+
#include <zephyr/dt-bindings/i2c/i2c.h>
911
#include <zephyr/dt-bindings/interrupt-controller/esp-esp32h2-intmux.h>
1012
#include <zephyr/dt-bindings/clock/esp32h2_clock.h>
1113
#include <dt-bindings/pinctrl/esp32h2-pinctrl.h>
@@ -19,6 +21,7 @@
1921
};
2022

2123
chosen {
24+
zephyr,canbus = &twai;
2225
zephyr,entropy = &trng0;
2326
zephyr,flash-controller = &flash;
2427
};
@@ -156,7 +159,7 @@
156159

157160
flash: flash-controller@60002000 {
158161
compatible = "espressif,esp32-flash-controller";
159-
reg = <0x60002000 0x1000>;
162+
reg = <0x60002000 DT_SIZE_K(4)>;
160163

161164
#address-cells = <1>;
162165
#size-cells = <1>;
@@ -207,5 +210,123 @@
207210
interrupt-parent = <&intc>;
208211
clocks = <&clock ESP32_UART1_MODULE>;
209212
};
213+
214+
usb_serial: uart@6000f000 {
215+
compatible = "espressif,esp32-usb-serial";
216+
reg = <0x6000F000 DT_SIZE_K(4)>;
217+
status = "disabled";
218+
interrupts = <USB_SERIAL_JTAG_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
219+
interrupt-parent = <&intc>;
220+
clocks = <&clock ESP32_USB_DEVICE_MODULE>;
221+
};
222+
223+
spi2: spi@60081000 {
224+
compatible = "espressif,esp32-spi";
225+
reg = <0x60081000 DT_SIZE_K(4)>;
226+
interrupts = <GSPI2_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
227+
interrupt-parent = <&intc>;
228+
clocks = <&clock ESP32_SPI2_MODULE>;
229+
dma-host = <0>;
230+
status = "disabled";
231+
};
232+
233+
dma: dma@60080000 {
234+
compatible = "espressif,esp32-gdma";
235+
reg = <0x60080000 DT_SIZE_K(4)>;
236+
#dma-cells = <1>;
237+
interrupts =
238+
<DMA_IN_CH0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
239+
<DMA_OUT_CH0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
240+
<DMA_IN_CH1_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
241+
<DMA_OUT_CH1_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
242+
<DMA_IN_CH2_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
243+
<DMA_OUT_CH2_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
244+
interrupt-parent = <&intc>;
245+
clocks = <&clock ESP32_GDMA_MODULE>;
246+
dma-channels = <6>;
247+
dma-buf-addr-alignment = <4>;
248+
status = "disabled";
249+
};
250+
251+
i2c0: i2c@60004000 {
252+
compatible = "espressif,esp32-i2c";
253+
#address-cells = <1>;
254+
#size-cells = <0>;
255+
reg = <0x60004000 DT_SIZE_K(4)>;
256+
interrupts = <I2C_EXT0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
257+
interrupt-parent = <&intc>;
258+
clocks = <&clock ESP32_I2C0_MODULE>;
259+
status = "disabled";
260+
};
261+
262+
i2c1: i2c@60005000 {
263+
compatible = "espressif,esp32-i2c";
264+
#address-cells = <1>;
265+
#size-cells = <0>;
266+
reg = <0x60005000 DT_SIZE_K(4)>;
267+
interrupts = <I2C_EXT1_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
268+
interrupt-parent = <&intc>;
269+
clocks = <&clock ESP32_I2C1_MODULE>;
270+
status = "disabled";
271+
};
272+
273+
i2s: i2s@6000d000 {
274+
compatible = "espressif,esp32-i2s";
275+
#address-cells = <1>;
276+
#size-cells = <0>;
277+
reg = <0x6000D000 DT_SIZE_K(4)>;
278+
interrupts = <I2S1_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
279+
interrupt-parent = <&intc>;
280+
clocks = <&clock ESP32_I2S1_MODULE>;
281+
unit = <0>;
282+
status = "disabled";
283+
};
284+
285+
adc0: adc@6000e000 {
286+
compatible = "espressif,esp32-adc";
287+
reg = <0x6000E000 0x4>;
288+
clocks = <&clock ESP32_SARADC_MODULE>;
289+
unit = <1>;
290+
channel-count = <5>;
291+
#io-channel-cells = <1>;
292+
status = "disabled";
293+
};
294+
295+
ledc0: ledc@60008000 {
296+
compatible = "espressif,esp32-ledc";
297+
pwm-controller;
298+
#pwm-cells = <3>;
299+
reg = <0x60008000 DT_SIZE_K(4)>;
300+
clocks = <&clock ESP32_LEDC_MODULE>;
301+
status = "disabled";
302+
};
303+
304+
mcpwm0: mcpwm@60014000 {
305+
compatible = "espressif,esp32-mcpwm";
306+
reg = <0x60014000 DT_SIZE_K(4)>;
307+
interrupts = <MCPWM0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
308+
interrupt-parent = <&intc>;
309+
clocks = <&clock ESP32_MCPWM0_MODULE>;
310+
#pwm-cells = <3>;
311+
status = "disabled";
312+
};
313+
314+
twai: can@6000c000 {
315+
compatible = "espressif,esp32-twai";
316+
reg = <0x6000c000 DT_SIZE_K(4)>;
317+
interrupts = <TWAI0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
318+
interrupt-parent = <&intc>;
319+
clocks = <&clock ESP32_TWAI0_MODULE>;
320+
status = "disabled";
321+
};
322+
323+
pcnt: pcnt@60012000 {
324+
compatible = "espressif,esp32-pcnt";
325+
reg = <0x60012000 DT_SIZE_K(4)>;
326+
interrupts = <PCNT_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
327+
interrupt-parent = <&intc>;
328+
clocks = <&clock ESP32_PCNT_MODULE>;
329+
status = "disabled";
330+
};
210331
};
211332
};

0 commit comments

Comments
 (0)