1# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2# SPDX-License-Identifier: Apache-2.0
3
4config SOC_SERIES_ESP32S2
5	select XTENSA
6	select ATOMIC_OPERATIONS_C
7	select DYNAMIC_INTERRUPTS
8	select CLOCK_CONTROL
9	select PINCTRL
10	select HAS_ESPRESSIF_HAL
11	select ARCH_SUPPORTS_COREDUMP
12	select HAS_PM
13	select HAS_POWEROFF
14
15if SOC_SERIES_ESP32S2
16
17menu "Cache config"
18
19choice
20	prompt "Instruction cache line size"
21	default ESP32S2_INSTRUCTION_CACHE_LINE_32B
22
23	config ESP32S2_INSTRUCTION_CACHE_LINE_16B
24		bool "16 Bytes"
25
26	config ESP32S2_INSTRUCTION_CACHE_LINE_32B
27		bool "32 Bytes"
28
29endchoice
30
31choice
32	prompt "Instruction cache size"
33	default ESP32S2_INSTRUCTION_CACHE_8KB
34
35	config ESP32S2_INSTRUCTION_CACHE_8KB
36		bool "8KB instruction cache size"
37
38	config ESP32S2_INSTRUCTION_CACHE_16KB
39		bool "16KB instruction cache size"
40
41endchoice
42
43choice ESP32S2_DATA_CACHE_SIZE
44	prompt "Data cache size"
45	default ESP32S2_DATA_CACHE_8KB
46	help
47		Data cache size to be set on application startup.
48	config ESP32S2_DATA_CACHE_0KB
49		depends on !ESP_SPIRAM
50		bool "0KB"
51	config ESP32S2_DATA_CACHE_8KB
52		bool "8KB"
53	config ESP32S2_DATA_CACHE_16KB
54		bool "16KB"
55
56endchoice
57
58choice
59	prompt "Data cache line size"
60	default ESP32S2_DATA_CACHE_LINE_32B
61
62	config ESP32S2_DATA_CACHE_LINE_16B
63		bool "16 Bytes"
64
65	config ESP32S2_DATA_CACHE_LINE_32B
66		bool "32 Bytes"
67
68endchoice
69
70config ESP32S2_INSTRUCTION_CACHE_SIZE
71	hex
72	default 0x4000 if ESP32S2_INSTRUCTION_CACHE_16KB
73	default 0x2000
74
75config ESP32S2_DATA_CACHE_SIZE
76	hex
77	default 0x2000 if ESP32S2_DATA_CACHE_8KB
78	default 0x4000 if ESP32S2_DATA_CACHE_16KB
79	default 0x0000
80
81endmenu  # Cache config
82
83endif # SOC_SERIES_ESP32S2
84