-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
base: main
Are you sure you want to change the base?
Conversation
The STM32H5 dtsi file lacked DCMI device driver information, despite this SoC family containing a DCMI device driver. This adds device support for DCMI on the STM32H5. Signed-off-by: Isaac Dekine <[email protected]>
Hello @idekine, and thank you very much for your first pull request to the Zephyr project! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see the existing drivers are drop-in compatible. Thank you for testing it!
|
||
dcmi: dcmi@4202c000 { | ||
compatible = "st,stm32-dcmi"; | ||
reg = <0x4202c000 0x400>; | ||
interrupts = <108 0>; | ||
interrupt-names = "dcmi"; | ||
clocks = <&rcc STM32_CLOCK(AHB2, 12U)>; | ||
status = "disabled"; | ||
}; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Signed-off-by: Isaac Dekine <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
reg = <0x4202c000 0x400>; | ||
interrupts = <108 0>; | ||
interrupt-names = "dcmi"; | ||
clocks = <&rcc STM32_CLOCK(AHB2, 12U)>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clocks = <&rcc STM32_CLOCK(AHB2, 12U)>; | |
clocks = <&rcc STM32_CLOCK(AHB2, 12)>; |
The CI test system currently complains about this:
Here is an example commit message (but use anything you want):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #88805 (comment)
The STM32H5 dtsi file lacked DCMI device driver information, despite this SoC family containing a DCMI device driver. This adds device support for DCMI on the STM32H5.