-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
soc: arm: cypress: psoc6: Add Cortex-M0+ interrupt mux support #29459
soc: arm: cypress: psoc6: Add Cortex-M0+ interrupt mux support #29459
Conversation
8cb24ce
to
df5f945
Compare
Rebase and add missing map-nvic documentation. |
Need to look at this in more detail. Wondering how this compares to what we have for rv32m1_vega |
I know this is an intermediate solution. At drivers, the work was done on the macro that connects IRQ and it was defined externally for an rebase, if necessary. @mbolivar already told me about rv32m1_vega but I didn't see how user define the interrupt on DT, Cy m0 problem. What I think it will be easy to user is described at #28442 but I face the constfy problem with DT_INST_FOREACH_CHILD. |
I don't understand "Cy m0 problem", sorry. Perhaps this is a chance to clean up the devicetree documentation (and maybe implementation) with regards to multi-level interrupts, but can you explain what you tried when you tried to make intermediate interrupt controller nodes for the interrupt mux? The idea is to set the |
df5f945
to
d351be5
Compare
I think I understand my difficult, for some reason I didn't look at some file on rv32m1_vega dts directory. That create a gap that I wasn't understand how to fill. I hope this update is close to what I rely need to do. |
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.
This looks nice to me! Just a couple of minor questions but I think this seems sane.
d351be5
to
05e96b5
Compare
05e96b5
to
5c10933
Compare
rebase |
c5d2b9c
to
2b0c1b5
Compare
2b0c1b5
to
9e3470e
Compare
Hello @galak ! |
9e3470e
to
0fe5353
Compare
Is this ready to be merged then? |
No, it needs another +1, ideally from @galak |
Update <soc.h> include files. This removes the unnecessary <kernel_includes.h> file. In addition, add <sys/util.h> to expose macros and <devicetree.h> following general standards. Signed-off-by: Gerson Fernando Budke <[email protected]>
The psoc6.dtsi file declare a reference to nvic. Since it was proper defined at psoc6_cm0/4.dtsi files this entry is redundant. Drop the useless entry. Signed-off-by: Gerson Fernando Budke <[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.
- Change #size-cells to 1 for mux registers. Even if size is just 1, since these are still MMIO registers.
- Add some comments on what / how the mux values are figured out. Seen inline.
0fe5353
to
2533497
Compare
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.
Some minor tweaks, and on general question if we should just remove status="disabled"
for the "cypress,psoc6-intmux-ch" nodes. Means one less thing the board dts file would have to modify.
One other nit: can you see if we can remove |
PSoC-6 SoC needs that user define the nvic interrupt number to bind with the peripheral interrupt line for the Cortex-M0+ CPU. It uses a multiplex before any NVIC interrupt line. The interrupt vector is selected using interrupt-parent property with the intmux_chN number reference. Note: The PSoC-6 SoC allows that both CPUs receive the same interrupt. A tipical use is GPIO interrupt handle and user is responsable to define interrupt line, priority and take care of enable same peripheral instance on both CPUs only when appropriated. Signed-off-by: Gerson Fernando Budke <[email protected]>
2533497
to
0f32ac8
Compare
Yes, I removed and tested with GPIO driver which depends on this. |
PSoC-6 SoC needs that user define the nvic interrupt number to bind with the peripheral interrupt line for the Cortex-M0+ CPU. It uses a multiplex before any NVIC interrupt line. The minimal support was added to allow interrupts be available for both CPUs.
Note: The PSoC-6 SoC allows that both CPUs receive the same interrupt. A tipical use is GPIO interrupt handle and user is responsable to define interrupt line, priority and take care of enable same peripheral instance on both CPUs only when appropriated.
This update <soc.h> include files removing the unnecessary <kernel_includes.h> file. In addition, add <sys/util.h> to expose macros and <devicetree.h> following general standards.
This solves #28442 and allows development of drivers that can be shared between SoC cores including, external interrupts by GPIO, serial, spi etc.