Skip to content

Conversation

@fimohame
Copy link
Contributor

@fimohame fimohame commented Nov 26, 2025

Previously, the PSRAM boards exhibited high sleep current due to lack of half-sleep support. This PR implements half-sleep mode for PSRAM, reducing power consumption during device sleep.

Changes include:

  • DeviceTree and bindings updated to support 'half-sleep-supported' and 'ldo' for PSRAM
  • Build system updates for necessary sources and driver flags

With these fixes, PSRAM now enters half-sleep mode correctly, resulting in lower sleep current on siwx91x-PSRAM based boards which supports half sleep mode.

Signed-off-by: S Mohamed Fiaz [email protected]

@github-actions
Copy link

github-actions bot commented Nov 26, 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@091a5bb (main) zephyrproject-rtos/hal_silabs#155 zephyrproject-rtos/hal_silabs#155/files

DNM label due to: 1 project with PR revision

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

@github-actions github-actions bot added manifest manifest-hal_silabs DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Nov 26, 2025
@fimohame fimohame marked this pull request as ready for review November 26, 2025 09:09
@fimohame fimohame changed the title Fix and enable PSRAM half-sleep and LDO support Fix to enable PSRAM half-sleep support to reduce sleep current Nov 26, 2025
@fimohame fimohame force-pushed the fix-psram-half-sleep-support branch from ad67a65 to b407190 Compare November 26, 2025 09:28
@jhedberg jhedberg changed the title Fix to enable PSRAM half-sleep support to reduce sleep current silabs: siwx91x: Fix to enable PSRAM half-sleep support to reduce sleep current Nov 26, 2025
@jhedberg
Copy link
Member

@fimohame please use prefixes in PR subjects that are meaningful to everyone working with Zephyr. I fixed it now.

zephyr_compile_definitions(
SLI_SI91X_MCU_PSRAM_PRESENT
SLI_SI91X_MCU_ENABLE_PSRAM_FEATURE
SL_SI91X_REQUIRES_INTF_PLL
Copy link
Member

Choose a reason for hiding this comment

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

This defines seems to have other impact than just QSPI. It is used in the 91x clock manager.
Seems to also have impact on pm with ps state changes :

#ifdef SL_SI91X_REQUIRES_INTF_PLL
      // Set INTF PLL based on current state and mode
      intf_pll_freq = power_mode ? PS4_PERFORMANCE_MODE_INTF_FREQ : PS4_POWERSAVE_MODE_FREQ;

      sli_status = sl_si91x_clock_manager_set_pll_freq(INTF_PLL, intf_pll_freq, PLL_REF_CLK_VAL_XTAL);
      if (sli_status != SL_STATUS_OK) {
        break;
      }
      if (intf_pll_freq == PS4_PERFORMANCE_MODE_INTF_FREQ) {
        qspi_clk_source = QSPI_INTFPLLCLK;
      } else {
        qspi_clk_source = QSPI_ULPREFCLK;
      }
#endif /* SL_SI91X_REQUIRES_INTF_PLL */

Copy link
Contributor

Choose a reason for hiding this comment

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

I have to admit SL_SI91X_REQUIRES_INTF_PLL collides with the Zephyr architecture. If I have the correct full picture, two clocks should be associated to the memc device (PLL and ULPREF). On qspi TURN_OFF/TURN_ON, the drive should call the clock_control_off()/clock_control_on() on the relevant clocks.

Copy link
Member

@Martinhoff-maker Martinhoff-maker left a comment

Choose a reason for hiding this comment

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

With the correct support of ps_ram for dk2605a, you can also add the tag memc to the board .yaml

This commit updates the hal_silabs revision

Signed-off-by: S Mohamed Fiaz <[email protected]>
@fimohame fimohame force-pushed the fix-psram-half-sleep-support branch 3 times, most recently from 63e15f4 to 8ed2153 Compare December 2, 2025 09:21
@fimohame fimohame force-pushed the fix-psram-half-sleep-support branch from 8ed2153 to f670f12 Compare December 2, 2025 09:39
@fimohame
Copy link
Contributor Author

fimohame commented Dec 2, 2025

I've addressed most of the comments, but wrt to clock manager changes we might need to discuss on.

Until then converting this PR to draft

@fimohame fimohame marked this pull request as draft December 2, 2025 09:58
This patch adds the missing 'half-sleep-supported' and 'external-ldo'
properties to the silabs,siwx91x-qspi-memory binding for accurate
configuration of PSRAM features via DeviceTree.

Signed-off-by: S Mohamed Fiaz <[email protected]>
…ties

This commit fixes the device tree configuration by adding 'external-ldo'
and 'half-sleep-supported' properties for the PSRAM device, enabling
correct low-power and power source support on siwx917_dk2605a and
siwx917_rb4342a boards.

Signed-off-by: S Mohamed Fiaz <[email protected]>
This update fixes build system integration for PSRAM features by
adding rsi_d_cache.c to the sources and required compile definitions,
ensuring full support for half-sleep and LDO functionality.

Signed-off-by: S Mohamed Fiaz <[email protected]>
@fimohame fimohame force-pushed the fix-psram-half-sleep-support branch from f670f12 to a5a38a2 Compare December 3, 2025 08:01
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

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.

6 participants