From f3b92cabfaae7023fd1431e5546facfdcf73d781 Mon Sep 17 00:00:00 2001 From: Shen Weilong Date: Tue, 2 Jul 2024 21:47:19 +0800 Subject: [PATCH] update(phy): Added phy support for esp32c5 --- components/esp_phy/lib | 2 +- components/esp_rom/CMakeLists.txt | 9 +++++++++ components/esp_rom/esp32c5/ld/esp32c5.rom.phy.ld | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/esp_phy/lib b/components/esp_phy/lib index 06e7625de1..c68aa637a2 160000 --- a/components/esp_phy/lib +++ b/components/esp_phy/lib @@ -1 +1 @@ -Subproject commit 06e7625de197bc12797dd701d6762229bca01826 +Subproject commit c68aa637a2e90da689003503b530df724f82667e diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index 526b191938..305f74d508 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -182,8 +182,17 @@ else() # Regular app build rom_linker_script("coexist") rom_linker_script("net80211") rom_linker_script("pp") + + elseif(target STREQUAL "esp32c5") + # esp32c5.rom.api.ld has been split to several lds by components. + # esp32c5.rom.api.ld is still reserved to map the APIs + rom_linker_script("phy") + rom_linker_script("coexist") + rom_linker_script("net80211") + rom_linker_script("pp") endif() + if(CONFIG_ESP_ROM_HAS_NEWLIB AND NOT target STREQUAL "esp32" AND NOT target STREQUAL "esp32s2") # ESP32 and S2 are a bit different, keep them as special cases in the target specific include section rom_linker_script("newlib") diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.phy.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.phy.ld index 46f5383ccf..9bd20793be 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.phy.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.phy.ld @@ -284,5 +284,10 @@ phy_wifi_set_tx_gain = 0x400014f4; phy_bt_get_tx_tab_ = 0x400014f8; phy_bt_set_tx_gain = 0x400014fc; phy_bt_tx_gain_init = 0x40001500; +phy_pbus_xpd_rx_off = 0x40002518; +phy_i2c_writeReg_Mask = 0x4000787e; +phy_pbus_xpd_rx_on = 0x40002628; +phy_pbus_xpd_tx_on = 0x4000274c; /* Data (.data, .bss, .rodata) */ +phy_rom_phyFuns = 0x4085fb80; phy_param_rom = 0x4085fc70;