Skip to content

Conversation

@mathieuchopstm
Copy link
Contributor

Replace the existing Kconfig-based mechanism to select the power supply with a Devicetree-based approach, inspired by the STM32WB0 implementation.

Commits could be reorganized: currently, they're split by series, but also squash SoC DTSI and board DTS changes together - I could mark properties as not required initially then perform updates separately, and make required in a last-pass commit if that sounds cleaner.

@etienne-lms
Copy link
Contributor

As CI build notes, there are a few board DTS files that need to be updated with &pwr { power-supply = "ldo"; };, all embedding an STM32H7xx SoC:
boards/ruiside/art_pi/art_pi.dts
boards/st/nucleo_h723zg/nucleo_h723zg.dts
boards/st/nucleo_h743zi/nucleo_h743zi.dts
boards/st/nucleo_h753zi/nucleo_h753zi.dts
boards/st/stm32h735g_disco/stm32h735g_disco.dts
boards/witte/linum/linum.dts
boards/weact/mini_stm32h743/mini_stm32h743.dts
boards/weact/mini_stm32h7b0/mini_stm32h7b0.dts
boards/fanke/fk7b0m1_vbt6/fk7b0m1_vbt6.dts
boards/fanke/fk750m1_vbt6/fk750m1_vbt6.dts
boards/fanke/fk723m1_zgt6/fk723m1_zgt6.dts
boards/fanke/fk743m5_xih6/fk743m5_xih6.dts

Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

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

Cool

@jhedberg
Copy link
Member

@mathieuchopstm there's a merge conflict - please rebase

@mathieuchopstm
Copy link
Contributor Author

Rebased + added a STM32 header, similar to what was found in previous migration guides

@mathieuchopstm mathieuchopstm requested review from asm5878, erwango and etienne-lms and removed request for erwango November 14, 2025 15:40
@zephyrbot zephyrbot requested a review from erwango November 14, 2025 15:41
Fix some formatting issues in the board's DTS which trigger CI failures.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce a new binding for the power controller of STM32H7 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add node representing the Power Controller to SoC DTSI of STM32H7 series,
and update DTS of all STM32H7-based boards since the new node has required
properties.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree. Also update all boards that were defining
the Kconfig to no longer do so.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce a new binding for the Power Controller of the STM32H7R/S series.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add node representing the Power Controller to SoC DTSI of STM32H7RS series,
and update DTS of all STM32H7RS-based boards since the new node has
required properties.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree. Also update all boards that were defining
the Kconfig to no longer do so.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce power controller binding for series equipped with two voltage
regulators (LDO + SMPS).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree.
Set the LDO as default to reduce out-of-tree breakage - most users were
relying on LDO being the default and it is harmless to use LDO if board
is designed for SMPS. (Existing SMPS users should break anyways since the
Kconfig symbol no longer exists, but this ensures they actively set the
power supply to SMPS in DT)

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree, and update all boards according to new
mechanism.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add an entry about the STM32 power supply configuration to the migration
guide for release 4.4 - it is now done through Devicetree instead of
Kconfig, and all existing Kconfig symbols have been deleted.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
@sonarqubecloud
Copy link

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Non-blocking comments.


* ``CONFIG_POWER_SUPPLY_LDO``

* ``CONFIG_POWER_SUPPLY_DIRECT_SMPS``,
Copy link
Contributor

@etienne-lms etienne-lms Nov 20, 2025

Choose a reason for hiding this comment

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

Nitpicking; comma here and at line 57 but not for the other configs?
Also, I think you could drop the empty lines between lines 51 and 67.

I wondered if this enumeration should use :kconfig:option: prefix. But maybe not applicable since the config symbols have been removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comma is a good catch - stray remains from rework...

Indeed, :kconfig:option: can't be used here since the options no longer exist.

@fabiobaltieri fabiobaltieri merged commit a8349e7 into zephyrproject-rtos:main Nov 20, 2025
26 checks passed
@mathieuchopstm mathieuchopstm deleted the stm32_pwr_via_dt branch November 20, 2025 16:43
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