Skip to content

Commit 11fc182

Browse files
LucasTamborfabiobaltieri
authored andcommitted
soc: esp32: refactor esp32_net
SOC_ESP32_NET is now SOC_ESP32_APPCPU, following espressif's naming convention in the same manner as ESP32S3 app cpu. SOC_ESP32_APPCU is now a subset of SOC_SERIES_ESP32. This commit also changes the necessary files, samples and tests for bisect purposes. Signed-off-by: Lucas Tamborrino <[email protected]>
1 parent 38ed830 commit 11fc182

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+287
-943
lines changed

boards/xtensa/esp32_devkitc_wroom/Kconfig.board

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ config BOARD_ESP32_DEVKITC_WROOM
55
bool "ESP32-DEVKITC-WROOM Development Board"
66
depends on SOC_SERIES_ESP32
77

8+
config BOARD_ESP32_DEVKITC_WROOM_APPCPU
9+
bool "ESP32 Board configuration for APPCPU (core 1)."
10+
depends on SOC_SERIES_ESP32 && SOC_ESP32_APPCPU
11+
812
choice SOC_PART_NUMBER
913
default SOC_ESP32_WROOM_32UE_N4
1014
endchoice

boards/xtensa/esp32_devkitc_wroom/Kconfig.defconfig

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
# Copyright (c) 2017 Intel Corporation
44
# SPDX-License-Identifier: Apache-2.0
55

6+
if BOARD_ESP32_DEVKITC_WROOM
7+
68
config BOARD
79
default "esp32_devkitc_wroom"
8-
depends on BOARD_ESP32_DEVKITC_WROOM
9-
10-
config ENTROPY_GENERATOR
11-
default y
1210

1311
config HEAP_MEM_POOL_ADD_SIZE_BOARD
1412
int
@@ -19,3 +17,21 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
1917
choice BT_HCI_BUS_TYPE
2018
default BT_ESP32 if BT
2119
endchoice
20+
21+
endif # BOARD_ESP32_DEVKITC_WROOM
22+
23+
if BOARD_ESP32_DEVKITC_WROOM_APPCPU
24+
25+
config BOARD
26+
default "esp32_devkitc_wroom_appcpu"
27+
28+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
29+
default 4096
30+
31+
config KERNEL_BIN_NAME
32+
default "esp32_net_firmware"
33+
34+
endif # BOARD_ESP32_DEVKITC_WROOM_APPCPU
35+
36+
config ENTROPY_GENERATOR
37+
default y

boards/xtensa/esp32_devkitc_wroom/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ The features include the following:
4747

4848
ESP32-DevKitC-WROOM-32D DK
4949

50+
Asymmetric Multiprocessing (AMP)
51+
********************************
52+
53+
ESP32-DEVKITC-WROOM allows 2 different applications to be executed in ESP32 SoC. Due to its dual-core architecture, each core can be enabled to execute customized tasks in stand-alone mode
54+
and/or exchanging data over OpenAMP framework. See :ref:`ipc_samples` folder as code reference.
55+
5056
Supported Features
5157
==================
5258

boards/xtensa/esp32_net/esp32_net.dts renamed to boards/xtensa/esp32_devkitc_wroom/esp32_devkitc_wroom_appcpu.dts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
/*
2-
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/dts-v1/;
77

8-
#include <espressif/esp32/esp32_net.dtsi>
8+
#include <espressif/esp32/esp32_appcpu.dtsi>
99

1010
/ {
11-
model = "esp32_net";
12-
compatible = "espressif,esp32_net";
11+
model = "esp32_wroom_appcpu";
12+
compatible = "espressif,esp32_appcpu";
1313

1414
chosen {
1515
zephyr,sram = &sram0;
16+
zephyr,ipc_shm = &shm0;
17+
zephyr,ipc = &ipm0;
1618
};
1719
};
1820

boards/xtensa/esp32_net/esp32_net.yaml renamed to boards/xtensa/esp32_devkitc_wroom/esp32_devkitc_wroom_appcpu.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
identifier: esp32_net
2-
name: ESP32_NET
1+
identifier: esp32_devkitc_wroom_appcpu
2+
name: ESP32 DEVKITC WROOM APPCPU
33
type: mcu
44
arch: xtensa
55
toolchain:
66
- zephyr
77
supported:
8-
- gpio
9-
- i2c
108
- uart
119
testing:
1210
ignore_tags:
@@ -19,4 +17,11 @@ testing:
1917
- logging
2018
- kernel
2119
- pm
20+
- gpio
21+
- crypto
22+
- eeprom
23+
- heap
24+
- cmsis_rtos
25+
- jwt
26+
- zdsp
2227
vendor: espressif
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_SOC_SERIES_ESP32=y
4+
CONFIG_SOC_ESP32_APPCPU=y
5+
CONFIG_BOARD_ESP32_DEVKITC_WROOM_APPCPU=y
6+
7+
CONFIG_MAIN_STACK_SIZE=2048
8+
CONFIG_CLOCK_CONTROL=y
9+
CONFIG_MINIMAL_LIBC=y

boards/xtensa/esp32_devkitc_wrover/Kconfig.board

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ config BOARD_ESP32_DEVKITC_WROVER
55
bool "ESP32-DEVKITC-WROVER-E Development board"
66
depends on SOC_SERIES_ESP32
77

8+
config BOARD_ESP32_DEVKITC_WROVER_APPCPU
9+
bool "ESP32 Board configuration for APPCPU (core 1)."
10+
depends on SOC_SERIES_ESP32 && SOC_ESP32_APPCPU
11+
812
choice SOC_PART_NUMBER
913
default SOC_ESP32_WROVER_E_N4R8
1014
endchoice
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if BOARD_ESP32_DEVKITC_WROVER
5+
46
config BOARD
57
default "esp32_devkitc_wrover"
6-
depends on BOARD_ESP32_DEVKITC_WROVER
7-
8-
config ENTROPY_GENERATOR
9-
default y
108

119
config HEAP_MEM_POOL_ADD_SIZE_BOARD
1210
int
@@ -17,3 +15,20 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
1715
choice BT_HCI_BUS_TYPE
1816
default BT_ESP32 if BT
1917
endchoice
18+
19+
endif # BOARD_ESP32_DEVKITC_WROVER
20+
21+
if BOARD_ESP32_DEVKITC_WROVER_APPCPU
22+
23+
config BOARD
24+
default "esp32_devkitc_wrover_appcpu"
25+
26+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
27+
default 4096
28+
29+
config KERNEL_BIN_NAME
30+
default "esp32_net_firmware"
31+
endif
32+
33+
config ENTROPY_GENERATOR
34+
default y

boards/xtensa/esp32_devkitc_wrover/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ The features include the following:
4747

4848
ESP32-DevKitC-WROVER-IE
4949

50+
Asymmetric Multiprocessing (AMP)
51+
********************************
52+
53+
ESP32-DEVKITC-WROVER allows 2 different applications to be executed in ESP32 SoC. Due to its dual-core architecture, each core can be enabled to execute customized tasks in stand-alone mode
54+
and/or exchanging data over OpenAMP framework. See :ref:`ipc_samples` folder as code reference.
55+
5056
Supported Features
5157
==================
5258

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/dts-v1/;
7+
8+
#include <espressif/esp32/esp32_appcpu.dtsi>
9+
10+
/ {
11+
model = "esp32_wrover_appcpu";
12+
compatible = "espressif,esp32_appcpu";
13+
14+
chosen {
15+
zephyr,sram = &sram0;
16+
zephyr,ipc_shm = &shm0;
17+
zephyr,ipc = &ipm0;
18+
};
19+
};
20+
21+
&cpu0 {
22+
clock-frequency = <ESP32_CLK_CPU_240M>;
23+
};
24+
25+
&cpu1 {
26+
clock-frequency = <ESP32_CLK_CPU_240M>;
27+
};
28+
29+
&trng0 {
30+
status = "okay";
31+
};

0 commit comments

Comments
 (0)