Skip to content

dts: stm32h5: Add DCMI device information #88805

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dts/arm/st/h5/stm32h5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,15 @@
clocks = <&rcc STM32_CLOCK(APB1_2, 3U)>;
status = "disabled";
};

dcmi: dcmi@4202c000 {
compatible = "st,stm32-dcmi";
reg = <0x4202c000 0x400>;
interrupts = <108 0>;
interrupt-names = "dcmi";
clocks = <&rcc STM32_CLOCK(AHB2, 12U)>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
clocks = <&rcc STM32_CLOCK(AHB2, 12U)>;
clocks = <&rcc STM32_CLOCK(AHB2, 12)>;

status = "disabled";
};
Comment on lines +658 to +666
Copy link
Collaborator

Choose a reason for hiding this comment

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

Taking inspiration from #86690 (comment)
It seems like DCMI is absent from STM32H503xx. Maybe this will need to be put in a SoC-specific .dtsi file rather than in the shared .dsti.

Copy link
Collaborator

@josuah josuah Apr 18, 2025

Choose a reason for hiding this comment

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

@erwango / @JarmouniA what would be the best way to handle this? maybe adding DCMI it to each of these files except the h503?

Copy link
Author

@idekine idekine Apr 18, 2025

Choose a reason for hiding this comment

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

You bring up a good point @josuah, I appreciate you pointing out that there is an issue that I didn't notice.

Looking further, it seems even that might not be granular enough, since there is bifurcation even within particular SoCs, e.g. the STM32H533 HE/CE vs RE/VE/ZE (see page 15 of the datasheet). However, it looks like stm32h533.dtsi ignores the issue with FMC, which has the same inconsistency across STM32H533, so I'm inclined to put it there and also in stm32h562.dtsi (which gets included by STM32H563 and 573 dtsi files).

I definitely would like to hear @erwango opinion, and I'll be happy to update this as suggested.

(edited to fix a mistake about the dtsi include structure)

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like DCMI is absent from STM32H503xx. Maybe this will need to be put in a SoC-specific .dtsi file rather than in the shared .dtsi.

We can leave it in the root dtsi then use \delete-node\ dcmi; in the files of SoCs that don't have it.

Copy link
Author

Choose a reason for hiding this comment

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

Updated per @JarmouniA to use delete-node to remove from STM32H503xx SoCs

Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit late on this, but I'd prefer to put this node in h533 and h562 (and then use \delete-node\ in HE/CE).
Idea is to minimize the use of \delete-node\ (allowing it in package variants) otherwise this could quickly become a mess to maintain.

};

die_temp: dietemp {
Expand Down
2 changes: 2 additions & 0 deletions dts/arm/st/h5/stm32h503.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <st/h5/stm32h5.dtsi>

/delete-node/ &dcmi;

/ {
soc {
compatible = "st,stm32h503", "st,stm32h5", "simple-bus";
Expand Down
Loading