usb: esp32c6: Add support for USB serial port
Device tree configuration for USB serial node and clock control fix for proper device initialization. Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
parent
4bdcf44a8c
commit
3dc2e83c7a
2 changed files with 12 additions and 0 deletions
|
|
@ -41,6 +41,7 @@
|
||||||
#include <esp32c6/rom/rtc.h>
|
#include <esp32c6/rom/rtc.h>
|
||||||
#include <soc/dport_access.h>
|
#include <soc/dport_access.h>
|
||||||
#include <hal/clk_tree_ll.h>
|
#include <hal/clk_tree_ll.h>
|
||||||
|
#include <hal/usb_serial_jtag_ll.h>
|
||||||
#endif /* CONFIG_SOC_SERIES_ESP32xx */
|
#endif /* CONFIG_SOC_SERIES_ESP32xx */
|
||||||
|
|
||||||
#include <zephyr/drivers/clock_control.h>
|
#include <zephyr/drivers/clock_control.h>
|
||||||
|
|
@ -117,6 +118,8 @@ static void esp32_clock_perip_init(void)
|
||||||
REG_CLR_BIT(PCR_PVT_MONITOR_CONF_REG, PCR_PVT_MONITOR_CLK_EN);
|
REG_CLR_BIT(PCR_PVT_MONITOR_CONF_REG, PCR_PVT_MONITOR_CLK_EN);
|
||||||
REG_CLR_BIT(PCR_PVT_MONITOR_FUNC_CLK_CONF_REG, PCR_PVT_MONITOR_FUNC_CLK_EN);
|
REG_CLR_BIT(PCR_PVT_MONITOR_FUNC_CLK_CONF_REG, PCR_PVT_MONITOR_FUNC_CLK_EN);
|
||||||
WRITE_PERI_REG(PCR_CTRL_CLK_OUT_EN_REG, 0);
|
WRITE_PERI_REG(PCR_CTRL_CLK_OUT_EN_REG, 0);
|
||||||
|
|
||||||
|
usb_serial_jtag_ll_enable_bus_clock(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,15 @@
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usb_serial: uart@6000f000 {
|
||||||
|
compatible = "espressif,esp32-usb-serial";
|
||||||
|
reg = <0x6000F000 0x1000>;
|
||||||
|
status = "disabled";
|
||||||
|
interrupts = <USB_SERIAL_JTAG_INTR_SOURCE>;
|
||||||
|
interrupt-parent = <&intc>;
|
||||||
|
clocks = <&rtc ESP32_USB_MODULE>;
|
||||||
|
};
|
||||||
|
|
||||||
ledc0: ledc@60007000 {
|
ledc0: ledc@60007000 {
|
||||||
compatible = "espressif,esp32-ledc";
|
compatible = "espressif,esp32-ledc";
|
||||||
pwm-controller;
|
pwm-controller;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue