Skip to content

Commit 18dbda5

Browse files
Raffael Rostagnohenrikbrixandersen
authored andcommitted
soc: esp32h2: Add BT support
Add bluetooth support to ESP32-H2. Signed-off-by: Raffael Rostagno <[email protected]>
1 parent 6290121 commit 18dbda5

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

dts/riscv/espressif/esp32h2/esp32h2_common.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
zephyr,canbus = &twai;
2525
zephyr,entropy = &trng0;
2626
zephyr,flash-controller = &flash;
27+
zephyr,bt-hci = &esp32_bt_hci;
2728
};
2829

2930
cpus {
@@ -54,6 +55,11 @@
5455
status = "okay";
5556
};
5657

58+
esp32_bt_hci: esp32_bt_hci {
59+
compatible = "espressif,esp32-bt-hci";
60+
status = "disabled";
61+
};
62+
5763
ieee802154: ieee802154 {
5864
compatible = "espressif,esp32-ieee802154";
5965
status = "disabled";

soc/espressif/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ config ESP_MAC_ADDR_UNIVERSE_ETH
1919
config ESP_MAC_ADDR_UNIVERSE_BT
2020
bool
2121

22+
config ESP_MAC_ADDR_UNIVERSE_IEEE802154
23+
bool
24+
2225
config ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE
2326
bool
2427

soc/espressif/esp32h2/Kconfig.mac

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_SERIES_ESP32H2
5+
6+
choice ESP32H2_UNIVERSAL_MAC_ADDRESSES
7+
bool "Number of universally administered (by IEEE) MAC address"
8+
default ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
9+
help
10+
Configure the number of universally administered (by IEEE) MAC addresses.
11+
During initialization, MAC addresses for each network interface are generated
12+
or derived from a single base MAC address.
13+
14+
config ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
15+
bool "Two"
16+
select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO
17+
select ESP_MAC_ADDR_UNIVERSE_IEEE802154
18+
select ESP_MAC_ADDR_UNIVERSE_BT
19+
20+
endchoice # ESP32H2_UNIVERSAL_MAC_ADDRESSES
21+
22+
config ESP32H2_UNIVERSAL_MAC_ADDRESSES
23+
int
24+
default 2 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
25+
26+
endif # SOC_SERIES_ESP32H2

soc/espressif/esp32h2/default.ld

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ SECTIONS
422422
*libzephyr.a:esp_cache.*(.literal .literal.* .text .text.*)
423423
*libzephyr.a:cache_utils.*(.literal .text .literal.* .text.*)
424424

425+
*libble_app.a:(.high_perf_code_iram1 .high_perf_code_iram1.*)
426+
*libble_app.a:(.bt_iram_text .bt_iram_text.*)
427+
425428
. = ALIGN(4) + 16;
426429
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
427430

@@ -693,6 +696,18 @@ SECTIONS
693696
__bss_start = ABSOLUTE(.);
694697
_bss_start = ABSOLUTE(.);
695698

699+
. = ALIGN (4);
700+
_bt_bss_start = ABSOLUTE(.);
701+
*libbtbb.a:(.bss .bss.* COMMON)
702+
. = ALIGN (4);
703+
_bt_bss_end = ABSOLUTE(.);
704+
705+
. = ALIGN (4);
706+
_bt_controller_bss_start = ABSOLUTE(.);
707+
*libble_app.a:(.bss .bss.* COMMON)
708+
. = ALIGN (4);
709+
_bt_controller_bss_end = ABSOLUTE(.);
710+
696711
*(.dynsbss)
697712
*(.sbss)
698713
*(.sbss.*)

0 commit comments

Comments
 (0)