zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.77k stars 6.57k forks source link

ESP32-C6: Add support for the ESP32-C6 and ESP32-C6-DevKitC #54453

Closed ajf58 closed 1 year ago

ajf58 commented 1 year ago

Is this request related to a missing driver support for a particular hardware platform, SoC or board? Please describe. Describe in details the hardware support being requested and why this support benefits Zephyr.

From Espressif's website at https://www.espressif.com/en/products/socs/esp32-c6

ESP32-C6 is Espressif’s first Wi-Fi 6 SoC integrating 2.4 GHz Wi-Fi 6, Bluetooth 5 (LE) and the 802.15.4 protocol.

As with other SoCs from Espressif, there are modules built around the SoC, as well as development kits that support the module.

This is a proposal to:

  1. Add support for the ESP32-C6 SoC.
  2. Add support for the ESP32-C6-DevKitC development kit as a new board in the Zephyr project.

Describe why you are asking for this support? Describe why you are asking for this support instead of contributing it directly to the tree

I'm raising this issue to give visibility upstream of what I'm working on in my fork at https://github.com/ajf58/zephyr/tree/esp32c6 , so that others may contribute either directly and/or avoid duplication of effort.

If this is a new board or SoC, please state whether you are willing to maintain the Zephyr support for it if it is included in the main tree

Yes.

Additional context Add any other context or graphics (drag-and-drop an image) about the hardware here.

Press releases and general information can be found on Espressif's website at https://www.espressif.com/en/products/socs/esp32-c6

rftafas commented 1 year ago

@ajf58 , is your plan to support the DevKitC board once C6 is supported or do you plan to go all for C6?

ajf58 commented 1 year ago

@rftafas, I'm planning on supporting the DevKitC, and this in turn means adding support for the ESP32-C6.

rftafas commented 1 year ago

@ajf58, are you also planing to use hal_espressif? It's not available for C6 yet.

ajf58 commented 1 year ago

@rftafas I am, yes. AIUI https://github.com/zephyrproject-rtos/hal_espressif is a fork of https://github.com/espressif/esp-idf with some Zephyr Project modifications. Whilst the former doesn't have support for the ESP32-C6, the latter does (in v5.1), so we can update hal_espressif as required.

rftafas commented 1 year ago

@ajf58 tks for explaining. As we released documentation for ESP32-C6, I wanted to make sure you wouldn't go down to register level. As for hal_espressif and IDF, we have some ongoing internal work to make it cleaner.

If you find shortcomings, let us know.

ajf58 commented 1 year ago

If you find shortcomings, let us know.

Thanks. In the C6's TRM there's a few sections that are in progress, e.g. "Low-power Management (RTC_CNTL)" is currently 11% complete. Do you know if there's a planned update to the TRM?

rftafas commented 1 year ago

Unfortunately, I can't state an specific date. It will come, eventually.

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

siddharthgpta commented 1 year ago

@ajf58 / @rftafas was there any progress made on this?

lboue commented 1 year ago

Maybe your can try with that if you need ESP-IDF Release v5.1:

Obtaining ESP-IDF Release v5.1 (beta)

pip install esp-coredump
git clone -b release/v5.1 --recursive https://github.com/espressif/esp-idf.git esp-idf-v5.1
cd ~/esp-idf-v5.1

wget https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.1.txt
pip3 install -r espidf.constraints.v5.1.txt
python3 tools/idf_tools.py install

source export.sh
export IDF_CCACHE_ENABLE=1
rftafas commented 1 year ago

We are working on S3 and there is a few PRs to be timely submitted. So, unfortunately due to that, no C6 yet. We have started planning for it, though.

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

rftafas commented 1 year ago

FWIW, we started C6. Major hal_espressif improvements to come in order to support it. :)

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Dids commented 1 year ago

Could this issue be kept open until support is added/implemented, or is there another issue tracking this?

ajf58 commented 1 year ago

This became a lower priority activity for me, but I've got a more time to look at this now, and it seems that in ESP-IDF 5.1 there's support for the C6, so I'll take another look.

rftafas commented 1 year ago

In that case, I don't suggest using plain ESP-IDF. We are moving away from it and have been using something that extracts only the HAL from IDF repository. Next hal_espressif will look a lot like this repository: https://github.com/espressif/esp-hal-3rdparty/tree/release/v5.1.c .

It probably will jump from release to release. We are doing internal tests and when all regressions are fixed, it will replace current hal_espressif. Only then C6 work will start.

Finally, a WARNING: end users still are not encouraged to use any form of hal (be it either the hal_espressif or esp-hal-3rdparty) for applications. These repos are intended for system design only, hal is not a public API and it will change without notice.

If there is real interest in engaging in pre-alfa, let me know and I'll see what I can do to help.