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

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

jerome-pouiller
Copy link
Contributor

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

Add support for Silicon Labs SiWx91x series.

@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 (main) zephyrproject-rtos/hal_silabs#83 zephyrproject-rtos/hal_silabs#83/files

DNM label due to: 1 project with PR revision

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
Currently, ns16550 allows the user to specify a clock attribute in the
Device Tree. This node is use to retrieve the internal frequency of the
hardware block.

However, ns16550 expects the clock is already initialised and it doesn't
try to enable it. Let's fix that issue.

Signed-off-by: Jérôme Pouiller <[email protected]>
WiseConnect SDK is need for Silabs SiWx91x series.

Signed-off-by: Jérôme Pouiller <[email protected]>
This driver is mostly the initial seed for further implementation of a
real clock driver.

It doesn't allow the user to choose the clock source for the various
peripherals. The driver hardcodes some sane values.

Signed-off-by: Jérôme Pouiller <[email protected]>
@jerome-pouiller jerome-pouiller force-pushed the introduce-siwg917 branch 3 times, most recently from a55ac3c to 023300b Compare February 4, 2025 17:48
jerome-pouiller and others added 16 commits February 4, 2025 18:58
Introduce minimal support for Silicon Labs SiWx91x family. SiWx91x
provide many device and especially Bluetooth and Wifi connectivity. This
patch prepare Zephyr to receive further drivers.

Signed-off-by: Jérôme Pouiller <[email protected]>
This new board definition allow to test Silicon Labs SiWx917 SoC.

Signed-off-by: Jérôme Pouiller <[email protected]>
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 <[email protected]>
Signed-off-by: Aksel Skauge Mellbye <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Report pinctrl configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
Implement GPIO driver for Siliconlab SiWx917 family.

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

Signed-off-by: Jérôme Pouiller <[email protected]>
Report gpio configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <[email protected]>
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 <[email protected]>
Signed-off-by: Tibor Laczko <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Report entropy configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
Implement DMA driver for siwx917 using UDMA peripheral. For now,
Scatter/Gather DMA is not yet supported.

Signed-off-by: Jérôme Pouiller <[email protected]>
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.

Signed-off-by: Jérôme Pouiller <[email protected]>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <[email protected]>
Network Processor (NWP) is used to run WiFi, Bluetooth and Flash
drivers.

Co-authored-by: Tibor Laczko <[email protected]>
Signed-off-by: Tibor Laczko <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Add flash driver for Silicon Labs SiWx91x family.

Co-authored-by: Martin Hoff <[email protected]>
Signed-off-by: Martin Hoff <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
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 <[email protected]>
Signed-off-by: Martin Hoff <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <[email protected]>
jerome-pouiller and others added 8 commits February 4, 2025 18:58
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 <[email protected]>
Signed-off-by: Tibor Laczko <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Report Bluetooth HCI declaration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
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 <[email protected]>
Report WiFi declaration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <[email protected]>
For now driver snps,designware-i2c does not support "clocks" attribute.
So this patch hardcode the clock configuration in the init of the clock
driver.

Signed-off-by: Jérôme Pouiller <[email protected]>
Report i2c configuration in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
Report configuration of the Si7021 in the board definitions.

Signed-off-by: Jérôme Pouiller <[email protected]>
source "drivers/bluetooth/hci/Kconfig.silabs"

config BT_SILABS_SIWX91X
Copy link
Member

Choose a reason for hiding this comment

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

This should probably go before the source "drivers/bluetooth/hci/Kconfig.silabs" line, so that options specific to the 917 HCI driver can be put into Kconfig.silabs

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I think it'd be even justified to move the top-level Silabs driver options into that file too, however if the current situation is the common practice for HCI drivers we can do the refactoring in a later PR too.

@jhedberg jhedberg added the platform: Silabs Silicon Labs label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_silabs platform: Silabs Silicon Labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants