Skip to content

Commit aaf21a4

Browse files
fimohamedkalowsk
authored andcommitted
soc: silabs: siwx91x: Add configurable power profile support via DeviceTree
This commit adds support for configuring the power/performance profile for the siwx91x device using a generic 'power-profile' property in DeviceTree. The property is available for NWP nodes, allowing flexible selection of power management profiles per application or board via overlay. Signed-off-by: S Mohamed Fiaz <[email protected]>
1 parent dd37752 commit aaf21a4

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

dts/arm/silabs/siwg917.dtsi

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,19 @@
7272
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE)>;
7373
};
7474

75-
bt_hci0: bt_hci {
76-
compatible = "silabs,siwx91x-bt-hci";
77-
status = "disabled";
78-
};
75+
nwp: nwp {
76+
compatible = "silabs,siwx91x-nwp";
77+
power-profile = "high-performance";
78+
79+
bt_hci0: bt_hci {
80+
compatible = "silabs,siwx91x-bt-hci";
81+
status = "disabled";
82+
};
7983

80-
wifi0: wifi {
81-
compatible = "silabs,siwx91x-wifi";
82-
status = "disabled";
84+
wifi0: wifi {
85+
compatible = "silabs,siwx91x-wifi";
86+
status = "disabled";
87+
};
8388
};
8489

8590
soc {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025 Silicon Laboratories Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
title: Silicon Labs SiWx91x NWP (Network Wireless Processor)
5+
6+
description: |
7+
The Network Wireless Processor (NWP) manages Wi-Fi and Bluetooth connectivity on SiWx91x devices,
8+
offloading wireless networking tasks from the main processor and
9+
supporting configurable power and performance modes.
10+
11+
compatible: "silabs,siwx91x-nwp"
12+
13+
properties:
14+
power-profile:
15+
type: string
16+
description: Power/performance profile
17+
enum:
18+
- high-performance
19+
- associated-power-save
20+
- associated-power-save-low-latency
21+
- deep-sleep-without-ram-retention
22+
- deep-sleep-with-ram-retention
23+
required: true

soc/silabs/silabs_siwx91x/siwg917/nwp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <zephyr/kernel.h>
1414
#include <zephyr/net/wifi.h>
1515
#include <zephyr/logging/log.h>
16+
#include <zephyr/devicetree.h>
1617

1718
#include "nwp.h"
1819
#include "sl_wifi_callback_framework.h"
@@ -21,6 +22,8 @@
2122
#endif
2223
#include "sl_si91x_power_manager.h"
2324

25+
#define NWP_NODE DT_NODELABEL(nwp)
26+
#define SI91X_POWER_PROFILE DT_ENUM_IDX(NWP_NODE, power_profile)
2427
#define AP_MAX_NUM_STA 4
2528

2629
LOG_MODULE_REGISTER(siwx91x_nwp);
@@ -245,7 +248,7 @@ static int siwg917_nwp_init(void)
245248
sl_wifi_device_configuration_t network_config;
246249
sl_status_t status;
247250
__maybe_unused sl_wifi_performance_profile_t performance_profile = {
248-
.profile = DEEP_SLEEP_WITH_RAM_RETENTION};
251+
.profile = SI91X_POWER_PROFILE};
249252

250253
siwx91x_get_nwp_config(&network_config, WIFI_STA_MODE, false, 0);
251254
/* TODO: If sl_net_*_profile() functions will be needed for WiFi then call

0 commit comments

Comments
 (0)