Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce siwg917 #85144

Merged
merged 25 commits into from
Feb 11, 2025
Merged

Conversation

jerome-pouiller
Copy link
Contributor

@jerome-pouiller jerome-pouiller commented Feb 4, 2025

Add support for Silicon Labs SiWx91x series.

Note for archeologists: This code has been maintained for a few months in the Silicon Labs downstream repository.
It couldn't be merged before because of a license issue in WiseConnect 3.3 (a component of the hal_silabs). This problem has been fixed since this code now depends on WiseConnect 3.4.
This is the reason why several commits has Co-authors.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 4, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_silabs zephyrproject-rtos/hal_silabs@df3414d zephyrproject-rtos/hal_silabs@2e64a70 zephyrproject-rtos/hal_silabs@df3414d5..2e64a70d

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_silabs DNM This PR should not be merged (Do Not Merge) labels Feb 4, 2025
@fabiobaltieri fabiobaltieri added DNM (manifest) This PR should not be merged (controlled by action-manifest) and removed DNM This PR should not be merged (Do Not Merge) labels Feb 4, 2025
@jerome-pouiller jerome-pouiller force-pushed the introduce-siwg917 branch 5 times, most recently from 023300b to 0a60cf9 Compare February 4, 2025 17:59
@jhedberg jhedberg added the platform: Silabs Silicon Labs label Feb 4, 2025
Flashing
========

Applications for the ``siwx917_rb4338`` board target can be built in the usual
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a from board name here, and consistently in the rest of the Flashing section.

@jerome-pouiller
Copy link
Contributor Author

v2:

  • replace pow(2, x) by (1 << x)
  • get rid of dependency on sscanf()
  • get rid of dependency on sys/socket.h

@jerome-pouiller
Copy link
Contributor Author

jerome-pouiller commented Feb 5, 2025

v3:

  • s/siwx917_rb4338/siwx917_rb4338a/

@jerome-pouiller jerome-pouiller force-pushed the introduce-siwg917 branch 4 times, most recently from 1ce43ba to f60bbc9 Compare February 5, 2025 20:41
@jerome-pouiller
Copy link
Contributor Author

v4:

  • Only keep minimal features in siwx917_rb4338a_defconfig
  • Fix issue with <sys/select.h>
  • Fix issue with TIMERS
  • Remove useless RS1xxxx.h

@jerome-pouiller jerome-pouiller marked this pull request as ready for review February 5, 2025 21:52
jerome-pouiller and others added 3 commits February 11, 2025 11:39
This new board definition allow to test Silicon Labs SiWx917 SoC.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This device is included on Silabs SiWx91x series. The current driver is
able to manage "High Power" and "Ultra Low Power" pins.

Co-authored-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report pinctrl configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
jerome-pouiller and others added 18 commits February 11, 2025 13:05
Implement GPIO driver for Siliconlab SiWx917 family.

This driver support high Performance (HP), Ultra Low Power (ULP) and
Ultra Ultra Low Power (UULP) GPIOs.

Co-authored-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report gpio configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Ensure nobody break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Support for random number generator is required for most of the
cryptographic operations, including support for WiFi and TLS.

This driver has been tested with tests/drivers/entropy:

    *** Booting Zephyr OS build v3.7.0-4339-g1ec5ce05f9f8 ***
    Running TESTSUITE entropy_api
    ===================================================================
    START - test_entropy_get_entropy
    random device is 0x8217298, name is rng@45090000
      0x93
      0x3e
      0xf1
      0x68
      0xd4
      0x22
      0xbf
      0x4d
      0xad
     PASS - test_entropy_get_entropy in 0.012 seconds
    ===================================================================
    TESTSUITE entropy_api succeeded

    ------ TESTSUITE SUMMARY START ------

    SUITE PASS - 100.00% [entropy_api]: pass = 1, fail = 0, skip = 0 ...
     - PASS - [entropy_api.test_entropy_get_entropy] duration = 0.01 ...

    ------ TESTSUITE SUMMARY END ------

    ===================================================================
    RunID: d1547c805699201af769cb01331efcce
    PROJECT EXECUTION SUCCESSFUL

Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report entropy configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Implement DMA driver for siwx917 using UDMA peripheral. For now,
Scatter/Gather DMA is not yet supported.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report DMA configuration in the board definitions.

Note the addresses of the DMA buffers are hardcoded in the HAL. So,
these areas have to be declared in the linker file.

Co-authored-by: Sai Santhosh Malae <santhosh.malae@silabs.com>
Signed-off-by: Sai Santhosh Malae <santhosh.malae@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Network Processor (NWP) is used to run WiFi, Bluetooth and Flash
drivers.

Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add flash driver for Silicon Labs SiWx91x family.

Co-authored-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
A specific section of the flash on the SiWx917 is reserved for the
Network co-processor (NWP). This zone needs to be delimited in order to
not overwrite it. We then need to use "code-partition" to provide Zephyr
the application code flash location.

Co-authored-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Driver was tested with a custom application which enabled the BT_SHELL.
Basic functionalities were verified:
 - Scanning
 - Advertising
 - Connecting

Configuration needed for the test:
 - CONFIG_BT=y
 - CONFIG_BT_PERIPHERAL=y
 - CONFIG_BT_CENTRAL=y
 - CONFIG_BT_SHELL=y
 - CONFIG_SHELL=y

Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report Bluetooth HCI declaration in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This driver allow to use Zephyr native IP stack or the IP stack provided
by HAL / WiseConnect.

The WiseConnect implementation may take advantage of the specific
features provided by the 917 (power consumption, speed,
validation...).

Some notable features are not available with this interface:
  - It seems Zephyr does not provide API to offload multicast membership
    management. User should be to directly call WiseConnect APIs
  - Support for ICMP frames is difficult. Note that WiseConnect
    automatically answer to ping request. It is just not possible to
    send ping requests and receive ping responses.
  - Zephyr and WiseConnect both support TLS offloading. However this
    patch does not implement it.
  - Reentrancy in the WiseConnect side is uncertain.

This implementation has been tested with samples/net/wifi/ (which relies
on subsys/net/lib/shell).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report WiFi declaration in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Report configuration of the Si7021 in the board definitions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
@kartben kartben merged commit f63c611 into zephyrproject-rtos:main Feb 11, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants