|
| 1 | +/* |
| 2 | + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 OR MIT |
| 5 | + */ |
| 6 | + |
| 7 | +#include <stddef.h> |
| 8 | +#include "soc.h" |
| 9 | + |
| 10 | +/* ESP32C2 capabilities */ |
| 11 | +static const struct soc_capabilities esp32c2_capabilities = { |
| 12 | + .is_riscv = true, |
| 13 | +}; |
| 14 | + |
| 15 | +/* ESP32C2 USB-OTG peripheral */ |
| 16 | +static const struct usb_otg esp32c2_usb_otg = { |
| 17 | + .usb_otg_intr_map_reg = 0, |
| 18 | + .hp_sys_usbotg20_ctrl_reg = 0, |
| 19 | + .usb_inum = 0, |
| 20 | + .clic_ext_intr_num_offset = 0, |
| 21 | +}; |
| 22 | + |
| 23 | +/* ESP32C2 Watchdog peripheral */ |
| 24 | +static const struct watchdog esp32c2_watchdog = { |
| 25 | + .option1_reg = 0, |
| 26 | + .wdtconfig0_reg = 0, |
| 27 | + .wdtwprotect_reg = 0, |
| 28 | + .swd_conf_reg = 0, |
| 29 | + .swd_wprotect_reg = 0, |
| 30 | + .cpu_per_conf_reg = 0, |
| 31 | + .sysclk_conf_reg = 0, |
| 32 | + .swd_wkey = 0, |
| 33 | + .wdt_wkey = 0, |
| 34 | + .swd_auto_feed_en_bit = 0, |
| 35 | + .force_download_boot_bit = 0, |
| 36 | + .cpuperiod_sel_mask = 0, |
| 37 | + .cpuperiod_sel_shift = 0, |
| 38 | + .cpuperiod_max = 0, |
| 39 | + .soc_clk_sel_mask = 0, |
| 40 | + .soc_clk_sel_shift = 0, |
| 41 | + .soc_clk_max = 0, |
| 42 | + .wdt_disable = NULL, |
| 43 | + .wdt_enable = NULL, |
| 44 | +}; |
| 45 | + |
| 46 | +/* ESP32C2 peripherals structure */ |
| 47 | +static const struct soc_peripherals esp32c2_peripherals = { |
| 48 | + .usb_otg = &esp32c2_usb_otg, |
| 49 | + .watchdog = &esp32c2_watchdog, |
| 50 | +}; |
| 51 | + |
| 52 | +/* ESP32C2 SoC info */ |
| 53 | +const struct soc_info g_soc_info = { |
| 54 | + .capabilities = &esp32c2_capabilities, |
| 55 | + .peripherals = &esp32c2_peripherals, |
| 56 | + .security_info_bytes = 0, |
| 57 | +}; |
0 commit comments