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

dts: st: stm32u5: restore correct clocks on multi-bit devices #85874

Merged

Conversation

mathieuchopstm
Copy link
Collaborator

During the transition to STM32_CLOCK macro (in 57723cf), the clocks property of peripherals requiring more than one bit to be set were mistakenly modified. Commit 2c3294b partially fixed these errors, but some nodes for the U5 series are still wrong.

Restore clocks on affected devices in corresponding STM32U5 DTSI.

Fixes: 57723cf

During the transition to STM32_CLOCK macro (in 57723cf), the `clocks`
property of peripherals requiring more than one bit to be set were
mistakenly modified. Commit 2c3294b
partially fixed these errors, but some nodes for the U5 series are still
wrong.

Restore `clocks` on affected devices in corresponding STM32U5 DTSI.

Fixes: 57723cf
Signed-off-by: Mathieu Choplain <[email protected]>
@mathieuchopstm
Copy link
Collaborator Author

FTR, pre-STM32_CLOCK DTSI files:

backup_sram: memory@40036400 {
compatible = "zephyr,memory-region", "st,stm32-backup-sram";
reg = <0x40036400 DT_SIZE_K(2)>;
/* BKPSRAMEN and RAMCFGEN clock enable */
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x10020000>;
zephyr,memory-region = "BACKUP_SRAM";
status = "disabled";
};

usbotg_hs: otghs@42040000 {
compatible = "st,stm32-otghs";
reg = <0x42040000 0x20000>;
interrupts = <73 0>;
interrupt-names = "otghs";
num-bidir-endpoints = <9>;
ram-size = <4096>;
maximum-speed = "high-speed";
clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x0000c000>,
<&rcc STM32_SRC_HSI48 ICKLK_SEL(0)>;
phys = <&otghs_phy>;
status = "disabled";
};

Copy link
Collaborator

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this.

@fabiobaltieri fabiobaltieri merged commit 37bdc38 into zephyrproject-rtos:main Feb 19, 2025
26 checks passed
@mathieuchopstm
Copy link
Collaborator Author

I am realizing now - too late 😢 - that f72ef5c accidentally(?) fixed the error in stm32u959.dtsi by moving the OTGPHYEN bit to the OTG PHY node. As such, usbotg_hs is expected to have only STM32_CLOCK(AHB2, 14)...

The backup SRAM node was definitely wrong though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v4.0-branch Backport to the v4.0-branch platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants