Skip to content

Conversation

@deekshith-silabs
Copy link

@deekshith-silabs deekshith-silabs commented Feb 17, 2025

A new github action is added to update the wiseconnect SDK release source files and creates new branch in hal_silabs with notation of wiseconnect/release/ and triggers the action to test the build in zephyr-silabs.

.github/wiseconnect.yml file is used to copy the list of zephyr related files from an wiseconnect SDK release

jerome-pouiller and others added 30 commits October 25, 2024 08:36
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Purpose: Add basic support for SiWx917
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Purpose: Fix compilation error
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Purpose: Enable common flash boards

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Purpose: Enable clock configuration

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: Zlib
URL: https://github.com/siliconlabs/wiseconnect
commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Purpose: Enable gpio driver

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
WiseConnect and GeckoSDK share some APIs. The upcoming WiseConnect
update will require sl_bit.h and sl_string.h.

Note the original path of these files is platform/common/inc/ while this
patch locate them in common/inc/.

Origin: Silicon Labs Gecko SDK
License: Zlib
URL: https://github.com/SiliconLabs/gecko_sdk
Commit: 124fa19de8c8b3961d21c20857f7df32239786da
Version: 4.4
Purpose: Required by WiseConnect

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
Commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Version: 3.3
Purpose: Add WiFi support for SiWx917

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Zephyr also export its version of fd_set. The two definitions are
incompatible.

This patch has been is mostly done by:

    sed -i 's/\bFD_/SL_SI91X_FD_/' **/*.[ch]

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In order to compile, a few changes are needed. This patch mainly remove
orphan functions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Compiler complain with:
    .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c: In function 'sli_si91x_accept_async':
    .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c:243:5: error: implicit declaration of function 'close'; did you mean 'fclose'? [-Werror=implicit-function-declaration]
      243 |     close(client_socket_id);
          |     ^~~~~
          |     fclose

close() is indeed declared in the BSD socket abstraction provided by
WiseConnect:

    int close(int socket_id)
    {
      errno = 0; // Clear any existing error
      return sli_si91x_shutdown(socket_id, SHUTDOWN_BY_ID);
    }

To avoid any confusion between BSD sockets and WiseConnect API, this
patch just call the underlying function (sli_si91x_shutdown()) instead
of close().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This issue has been reported to upstream and is fixed in WiseConnect
3.3.1

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
Commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Version: 3.3
Purpose: Add Bluetooth support for SiWx917

Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
 - SDK typo fixes to pass the Zephyr compliance check.
 - Fix sscanf compiler warning.
 - Remove the need of an external ble_config.h file (common config was extended with 3 default macro).

Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
Commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Version: 3.3
Purpose: Add Random Number Generator support for SiWx917

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>
Used to populate main Zephyr repo with pinctrl macros for use with
devicetree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Added EFR32ZG23 device to the import_simplicity_sdk.py auto update
script.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Origin: Simplicity SDK
License: Zlib
URL: https://github.com/SiliconLabs/simplicity_sdk
Commit: 19a4476b12e9e827cbdd89c58141494fea188a67
Version: 2024.6.2
Purpose: HAL for EFR32ZG23 Silicon Labs device

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Prepare for import of SiSDK 2024.12.0

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Simplicity SDK
License: Zlib
URL: https://github.com/SiliconLabs/simplicity_sdk
Commit: 8627f8482564dc6d94b56512740a39d6f409a0eb
Purpose: HAL for Silicon Labs Series 2 devices

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Silicon Labs WiSeConnect SDK
License: MSLA
URL: https://github.com/siliconlabs/wiseconnect
Commit: e97a0ed00ddda347a8a39e8276f470e1c5fea469
Version: 3.3
Purpose: Allow use of RSI_CLK_GetBaseClock()

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add support for importing xG29 to SiSDK import scripts.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Simplicity SDK
License: Zlib
URL: https://github.com/SiliconLabs/simplicity_sdk
Commit: 8627f8482564dc6d94b56512740a39d6f409a0eb
Purpose: Add xG29 device family support

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Update module.yml to import blobs for xG29.
Fix license reference for link layer binaries to match declared
license in simplicity_sdk/License.txt.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Upgrading Wiseconnect is a tedious task. This new script simplifies
upgrade and track of changes between the upstream and the HAL.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Zephyr CI raise errors for misspelled words. So, the Zephyr code uses
"EXTENSION" while HAL still use "EXTENTION".

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Wiseconnect provides its own version (and its own definitions) of
socket.h. These conflict with the ones provided by Zephyr. So, change
Wiseconnect to use the Zephyr socket definition.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Zephyr also export its version of fd_set. The two definitions are
incompatible.

This patch can be partly automated with:

    sed -i -e 's/\bFD_/SL_SI91X_FD_/' -e 's/\bfd_set/sl_si91x_fd_set/' **/*.[ch]

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Wiseconnect define the "ETHERNET" macro. This causes failures during
Zephyr compilation. However "ETHERNET" symbol is not use by Wiseconnect,
so it can be safely removed.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
jerome-pouiller and others added 25 commits February 3, 2025 09:39
configTICK_RATE_HZ is specific to Wiseconnect. Equivalent in Zephyr is
CONFIG_SYS_CLOCK_TICKS_PER_SEC.

Note usually, configTICK_RATE_HZ == 1000 while
CONFIG_SYS_CLOCK_TICKS_PER_SEC == 1024.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Nothing from os_tick.h was used.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Compiler complain with:
    .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c: In function 'sli_si91x_accept_async':
    .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c:243:5: error: implicit declaration of function 'close'; did you mean 'fclose'? [-Werror=implicit-function-declaration]
      243 |     close(client_socket_id);
          |     ^~~~~
          |     fclose

close() is indeed declared in the BSD socket abstraction provided by
Wiseconnect:

    int close(int socket_id)
    {
      errno = 0; // Clear any existing error
      return sli_si91x_shutdown(socket_id, SHUTDOWN_BY_ID);
    }

To avoid any confusion between BSD sockets and Wiseconnect API, this
patch just call the underlying function (sli_si91x_shutdown()) instead
of close().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Wiseconnect allows to use an alternative clock if the temperature during
the start up is too high. However:
  - this feature relies on ADC and we don't want to import it for now
  - this kind of magic feature should be exposed to the user rather than
    hidden in the HAL (especially since use can also use ADC hardware)

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
ble_config.h is expected to contain the specific configuration for the
board. However, this does not fit very well with Zephyr board
definitions.

In the other hand, rsi_bt_common_config.h mostly contains all the
necessary definition. This patch just add a few missing definition.
These definitions are more or less arbitrary and we hope it will fit all
the use cases.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
sl_strlen() and sl_strnlen() can be safely replaced by Posix
equivalents.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Zephyr linker script does not define .common_ipmu_ram section. This
reverts the change introduced on Wiseconnect 3.4

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The Zephyr osEventFlags API has a bug when an osEventFlags is watched
from two different threads.

For WiseConnect, it means the events are not received by the thread
"si91x_bus".

WiseConnect 3.3 was not impacted because there there were a specific
osEventFlags for "si91x_bus" ("si91x_bus_events").

This patch restore use of "si91x_bus_events" to workaround the
osEventFlags bug.

Co-authored-by: Swami Das Nampalli <swami.das@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Swami Das Nampalli <swami.das@silabs.com>
Update import_simplicity_sdk.py to add platform/security
content.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Origin: Simplicity SDK
License: Zlib
URL: https://github.com/SiliconLabs/simplicity_sdk
Commit: 8627f8482564dc6d94b56512740a39d6f409a0eb
Version: 2024.12.0
Purpose: Crypto HAL for use by PSA Crypto

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The OS abstraction layer for the security subsystem must be made
aware of Zephyr.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Zephyr defines the MAX() macro in util.h, which causes a conflict
with a locally defined macro of the same name.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Corrects the assignment of SL_SI91X_TERMINATE_BUS_THREAD_EVENT to
si91x_bus_event instead of si91x_event, ensuring proper ACK reception
and successful platform deinitialization.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Wiseconnect define the "TIMERS" macro. This causes failures during
Zephyr compilation. However "TIMERS" symbol is not use by Wiseconnect,
so it can be safely removed.
pow() is not defined when Zephyr is built with minimal libc. There is
only one occurence of the pow() function in Wiseconnect.

Since Wiseconnect only use pow() to compute power of 2, it can be
replaced by a bit shift.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
ip_to_reverse_hex() relies son sscanf(). However sscanf() is not
available in minimal configuration of Zephyr.

However, ip_to_reverse_hex() is orphan and can be safely dropped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Definition of "fd_set" has diverged between Zephyr upstream and Silabs
downstream. The current patch align the code so it is now equivalent to
commit 14d1946 ("wiseconnect: Fix conflict with Zephyr definition of
"fd_set"")
RS1xxxx.h is not a part of the upstream branch and is not included by
any file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Generate ABUS bus allocation macros in addition to DBUS pinout.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
IADC inputs can be supplies (AVDD, DVDD, etc), dedicated analog
input pins (AIN0, etc), other peripherals (DAC0, etc), or ABUS
pins through GPIO (PA0, etc).

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
…eader

The script added will combine all possible ACMP positive and negative
input values and define helper macros to make it easier for applications
to select ACMP inputs for their comparator driver. The script also
verifies that the integer input values are consistent between the parts
that this header is generated for. However, it must be noted that some
of the input defines may not be available as positive and/or negative
inputs for some devices. It's recommended to always reference your
part's design book before selecting any of the inputs in this generated
header.

Signed-off-by: Christian Galante <christian.galante@silabs.com>
Prepare for import of DMADRV HAL functions.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Origin: Simplicity SDK
License: Zlib
URL: https://github.com/SiliconLabs/simplicity_sdk
Commit: 8627f8482564dc6d94b56512740a39d6f409a0eb
Version: 2024.12.0
Purpose: Import dmadrv in order to simplify the use of other hal driver.
         It has be done escpecially for future sl_* driver.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Patch needed to remain synchronize between zephyr DMA channels allocator
and dmadrv channel allocator.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants