Skip to content

Commit c5fb9ee

Browse files
author
Raffael Rostagno
committed
soc: esp32c6: Kconfig and .ld updates, DTS and comments fix
Kconfig, .ld and comments fixing Fixed address of UART1, WDT and RTC timer disabled by default Signed-off-by: Raffael Rostagno <[email protected]>
1 parent 885651c commit c5fb9ee

File tree

8 files changed

+25
-30
lines changed

8 files changed

+25
-30
lines changed

arch/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ config RISCV
110110
bool
111111
select ARCH_IS_SET
112112
select ARCH_SUPPORTS_COREDUMP
113-
select ARCH_SUPPORTS_ROM_START if !SOC_SERIES_ESP32C3
113+
select ARCH_SUPPORTS_ROM_START if !SOC_FAMILY_ESPRESSIF_ESP32
114114
select ARCH_HAS_CODE_DATA_RELOCATION
115115
select ARCH_HAS_THREAD_LOCAL_STORAGE
116116
select ARCH_HAS_STACKWALK

dts/riscv/espressif/esp32c6/esp32c6_common.dtsi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -25,7 +25,7 @@
2525
cpu0: cpu@0 {
2626
device_type = "cpu";
2727
compatible = "espressif,riscv";
28-
riscv,isa = "rv32imc_zicsr";
28+
riscv,isa = "rv32imac_zicsr";
2929
reg = <0>;
3030
clock-source = <ESP32_CPU_CLK_SRC_PLL>;
3131
clock-frequency = <DT_FREQ_M(160)>;
@@ -82,7 +82,7 @@
8282
clocks = <&rtc ESP32_MODULE_MAX>;
8383
interrupts = <LP_RTC_TIMER_INTR_SOURCE>;
8484
interrupt-parent = <&intc>;
85-
status = "okay";
85+
status = "disabled";
8686
};
8787

8888
spi2: spi@60081000 {
@@ -96,18 +96,18 @@
9696
status = "disabled";
9797
};
9898

99-
wdt0: watchdog@6001f048 {
99+
wdt0: watchdog@60008048 {
100100
compatible = "espressif,esp32-watchdog";
101-
reg = <0x6001f048 0x20>;
101+
reg = <0x60008048 0x20>;
102102
interrupts = <TG0_WDT_LEVEL_INTR_SOURCE>;
103103
interrupt-parent = <&intc>;
104104
clocks = <&rtc ESP32_TIMG0_MODULE>;
105105
status = "disabled";
106106
};
107107

108-
wdt1: watchdog@60020048 {
108+
wdt1: watchdog@60009048 {
109109
compatible = "espressif,esp32-watchdog";
110-
reg = <0x60020048 0x20>;
110+
reg = <0x60009048 0x20>;
111111
interrupts = <TG1_WDT_LEVEL_INTR_SOURCE>;
112112
interrupt-parent = <&intc>;
113113
clocks = <&rtc ESP32_TIMG1_MODULE>;
@@ -147,9 +147,9 @@
147147
clocks = <&rtc ESP32_UART0_MODULE>;
148148
};
149149

150-
uart1: uart@60010000 {
150+
uart1: uart@60001000 {
151151
compatible = "espressif,esp32-uart";
152-
reg = <0x60010000 DT_SIZE_K(4)>;
152+
reg = <0x60001000 DT_SIZE_K(4)>;
153153
status = "disabled";
154154
interrupts = <UART1_INTR_SOURCE>;
155155
interrupt-parent = <&intc>;

soc/espressif/esp32c6/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if(CONFIG_MCUBOOT)
6262
${PYTHON_EXECUTABLE} ${ESP_IDF_PATH}/tools/ci/check_callgraph.py
6363
ARGS
6464
--rtl-dirs ${CMAKE_BINARY_DIR}/zephyr
65-
--elf-file ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.elf
65+
--elf-file ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.elf
6666
find-refs --from-section=.iram0.iram_loader --to-section=.iram0.text
6767
--exit-code)
6868
endif()

soc/espressif/esp32c6/Kconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
config SOC_SERIES_ESP32C6
@@ -8,6 +8,7 @@ config SOC_SERIES_ESP32C6
88
select CLOCK_CONTROL
99
select PINCTRL
1010
select RISCV_ISA_RV32I
11+
select RISCV_ISA_EXT_A
1112
select RISCV_ISA_EXT_M
1213
select RISCV_ISA_EXT_C
1314
select RISCV_ISA_EXT_ZICSR
@@ -18,10 +19,6 @@ config SOC_SERIES_ESP32C6
1819

1920
if SOC_SERIES_ESP32C6
2021

21-
config IDF_TARGET_ESP32C6
22-
bool "ESP32C6 as target board"
23-
default y
24-
2522
config ESP32_PHY_MAX_WIFI_TX_POWER
2623
int "Max WiFi TX power (dBm)"
2724
range 10 20
@@ -37,7 +34,6 @@ config ESP32_PHY_MAX_TX_POWER
3734
config MAC_BB_PD
3835
bool "Power down MAC and baseband of Wi-Fi and Bluetooth when PHY is disabled"
3936
depends on SOC_SERIES_ESP32C6 && TICKLESS_KERNEL
40-
default n
4137
help
4238
If enabled, the MAC and baseband of Wi-Fi and Bluetooth will be powered
4339
down when PHY is disabled. Enabling this setting reduces power consumption

soc/espressif/esp32c6/Kconfig.defconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# ESP32C3 board configuration
1+
# ESP32C6 board configuration
22

3-
# Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
3+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
44
# SPDX-License-Identifier: Apache-2.0
55

66
if SOC_SERIES_ESP32C6

soc/espressif/esp32c6/Kconfig.soc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
config SOC_SERIES_ESP32C6
@@ -21,9 +21,8 @@ config SOC_SERIES
2121
default "esp32c6" if SOC_SERIES_ESP32C6
2222

2323
config SOC
24-
default "esp32c6" if SOC_SERIES_ESP32C6
24+
default "esp32c6" if SOC_ESP32C6
2525

2626
config SOC_PART_NUMBER
2727
default "ESP32_C6_WROOM_1U_N4" if SOC_ESP32_C6_WROOM_1U_N4
2828
default "ESP32_C6_WROOM_1U_N8" if SOC_ESP32_C6_WROOM_1U_N8
29-
default "ESP32C6" if SOC_ESP32C6

soc/espressif/esp32c6/default.ld

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,6 @@ SECTIONS
610610
__bss_start = ABSOLUTE(.);
611611
_bss_start = ABSOLUTE(.);
612612

613-
/* bluetooth library requires this symbol to be defined */
614-
_btdm_bss_start = ABSOLUTE(.);
615613
*libbtdm_app.a:(.bss .bss.* COMMON)
616614
. = ALIGN (4);
617615
_btdm_bss_end = ABSOLUTE(.);
@@ -662,6 +660,7 @@ SECTIONS
662660
_instruction_reserved_start = ABSOLUTE(.);
663661
_text_start = ABSOLUTE(.);
664662
_instruction_reserved_start = ABSOLUTE(.);
663+
__text_region_start = ABSOLUTE(.);
665664

666665
#if !defined(CONFIG_ESP32_WIFI_IRAM_OPT)
667666
*libnet80211.a:( .wifi0iram .wifi0iram.* .wifislpiram .wifislpiram.*)
@@ -692,6 +691,7 @@ SECTIONS
692691
_instruction_reserved_end = ABSOLUTE(.);
693692
_text_end = ABSOLUTE(.);
694693
_instruction_reserved_end = ABSOLUTE(.);
694+
__text_region_end = ABSOLUTE(.);
695695
_etext = .;
696696

697697
} GROUP_DATA_LINK_IN(CACHED_REGION, ROMABLE_REGION)
@@ -701,16 +701,16 @@ SECTIONS
701701
/* --- START OF .rodata --- */
702702

703703
/* Align next section to 64k to allow mapping */
704-
.flash.align_rodata (NOLOAD) :
704+
.flash.align_rom (NOLOAD) :
705705
{
706-
/* Subsequent segment lma and vma align */
707706
. = ALIGN(CACHE_ALIGN);
708-
} GROUP_DATA_LINK_IN(CACHED_REGION, ROMABLE_REGION)
707+
} GROUP_LINK_IN(ROMABLE_REGION)
709708

710-
.flash.align_rom (NOLOAD) :
709+
.flash.align_rodata (NOLOAD) :
711710
{
711+
/* Subsequent segment lma and vma align */
712712
. = ALIGN(CACHE_ALIGN);
713-
} GROUP_LINK_IN(ROMABLE_REGION)
713+
} GROUP_LINK_IN(CACHED_REGION)
714714

715715
/* Symbols used during the application memory mapping */
716716
_image_drom_start = LOADADDR(.flash.rodata);

soc/espressif/esp32c6/mcuboot.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SECTIONS
101101
*(.iram1 .iram1.*)
102102
*(.iram0.literal .iram.literal .iram.text.literal .iram0.text .iram.text)
103103

104-
/* C3 memprot requires 512 B alignment for split lines */
104+
/* C6 memprot requires 512 B alignment for split lines */
105105
. = ALIGN (16);
106106
_init_end = ABSOLUTE(.);
107107
. = ALIGN(16);

0 commit comments

Comments
 (0)