Skip to content

Conversation

biwenli
Copy link
Contributor

@biwenli biwenli commented Jul 28, 2025

enable irqsteer for imx943.

zephyr_library_sources_ifdef(CONFIG_RENESAS_RX_ICU intc_renesas_rx_icu.c)
zephyr_library_sources_ifdef(CONFIG_RENESAS_RZ_EXT_IRQ intc_renesas_rz_ext_irq.c)
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER intc_nxp_irqsteer.c)
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER1 intc_nxp_irqsteer1.c)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explain why do you need a new driver?
Why the intc_nxp_irqsteer.c driver is not enough?

In the commit message you state that the "old" intc_nxp_irqsteer driver can be replaced.
In this case, why don't you enhance the intc_nxp_irqsteer driver with the support that you need for i.MX943?

Copy link
Contributor Author

@biwenli biwenli Jul 29, 2025

Choose a reason for hiding this comment

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

Yes, it's a good question.

Because of the new structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX943/periph/PERI_IRQSTEER.h#L244) is different with the old structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX95/periph/PERI_IRQSTEER.h#L145),
image

The new driver doesn't depend on the structure IRQSTEER_TYPE. It can be used in all of platforms.(i.mx8, i.mx95, i.mx943. Include irqsteer instance dpu_irqsteer, m33_irqsteer, m7_irqsteer, a55_irqsteer, dsp_irqsteer, hdmi_irqsteer)

Copy link
Contributor

@dbaluta dbaluta Jul 29, 2025

Choose a reason for hiding this comment

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

@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?

Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?

Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.

Yes, the old driver will be phased out over time. New product will use the new driver directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

@biwenli Could you please add a note indicating that the old irqsteer will be deprecated and should no longer be used in new samples or products?
Also, it would be helpful to include at least one commit where the old irqsteer is replaced with the new implementation, so others can refer to it as an example.
Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@biwenli Could you please add a note indicating that the old irqsteer will be deprecated and should no longer be used in new samples or products? Also, it would be helpful to include at least one commit where the old irqsteer is replaced with the new implementation, so others can refer to it as an example. Thanks.

@iuliana-prodan ,

Sure, np. Thanks.

@decsny decsny assigned JiafeiPan and unassigned decsny Jul 28, 2025
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 2112635 to 1f02269 Compare July 29, 2025 04:49
Copy link

github-actions bot commented Jul 29, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@dbaluta
Copy link
Contributor

dbaluta commented Jul 30, 2025

@biwenli you will also need to convert at least 1 user of the old driver to test your new implemenation. Ideally would be to convert all users, but we can do it in phases as we don't want to slow you down.

@decsny decsny dismissed their stale review August 28, 2025 15:35

the code is shared now, no longer blocking, but suggesting a different paradigm to use a different SDK driver

@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 3b27006 to 5ca6417 Compare September 2, 2025 07:11
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 5ca6417 to 49c97ea Compare September 17, 2025 09:34
decsny
decsny previously approved these changes Sep 18, 2025
@dleach02
Copy link
Member

PR posted to fix CI failure (#96308)

@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 49c97ea to 2f8457e Compare September 22, 2025 06:21
@zephyrbot zephyrbot requested a review from decsny September 22, 2025 06:24
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 2f8457e to 0cb5c12 Compare September 24, 2025 08:55
@JiafeiPan
Copy link
Contributor

Hi, @biwenli , please fix twister failures.

biwenli added 10 commits October 2, 2025 16:41
Enable irqsteer for m33 of imx943

Signed-off-by: Biwen Li <[email protected]>
Enable edma4 by default for m33(in NETCMIX) of imx943_evk

Signed-off-by: Biwen Li <[email protected]>
Update interrupt-cells of irqsteer master
  - DT_INST_IRQ_BY_IDX(n, idx, priority) is used to
    get priority attribute of interrupt in some drivers,
    so add priority for irqsteer master to align priority
    attribute.

dts: arm: nxp: imx95: m7: update interrupt-cells

Update interrupt-cells for imx95_m7
  - Add priority attribute to fix build issue.

dts: xtensa: nxp: update interrupt-cells

Update interrupt-cells of imx8, imx8m, imx8qm, imx8qxp.
  - add priority attribute to fix build issue

tests: drivers: intc: imx8mp_evk: adsp: update interrupt-cells

Update interrupt-cells of imx8mp_evk_mimx8ml8_adsp
  - Add priority attribute to fix build issue.

Signed-off-by: Biwen Li <[email protected]>
Correct irq number for multi level interrupts

Signed-off-by: Biwen Li <[email protected]>
- Print SADDR, DADDR for debugging.

Signed-off-by: Biwen Li <[email protected]>
Add config for imx943_evk_mimx94398_m33
- Use the sample to test the irqsteer driver

Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts is enabled,
define TEST_IRQ_NUM as (CONFIG_2ND_LVL_ISR_TBL_OFFSET - 1)
  - CMSIS/Core/Include/core_cm33.h:2438:15: error: array subscript 24
    is above array bounds of volatile uint32_t[16]

Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts feature
is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to
support multi level interrupts case.
  - error: array subscript 24 is above array bounds of 'volatile
    uint32_t[16]' {aka 'volatile unsigned int[16]'}
    [-Werror=array-bounds])

Signed-off-by: Biwen Li <[email protected]>
Fix build issue when multi level interrupts is enabled,
define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi
level interrupts case.
  - core_cm33.h:2559:47: error: iteration 496 invokes undefined behavior
    [-Werror=aggressive-loop-optimizations]

Signed-off-by: Biwen Li <[email protected]>
Exclude imx943,
  - multi level interrupts feature is enabled defaultly,
    so irqsteer1 driver is enabled, then the test case
    report the build issue:
    multiple definition of z_soc_irq_enable,
    tests/arch/arm/arm_custom_interrupt/src/arm_custom_interrupt.c:47
    first defined here.

Signed-off-by: Biwen Li <[email protected]>
@dleach02 dleach02 force-pushed the imx943-add-new-irqsteer1-driver branch from 0cb5c12 to 2012972 Compare October 2, 2025 21:42
@dleach02
Copy link
Member

dleach02 commented Oct 2, 2025

@biwenli I rebased your PR and pushed it to see if the CI failures clear

Copy link

sonarqubecloud bot commented Oct 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: DMA Direct Memory Access area: Interrupt Controller area: Samples Samples area: UART Universal Asynchronous Receiver-Transmitter area: Xtensa Xtensa Architecture platform: NXP Drivers NXP Semiconductors, drivers platform: NXP MPU platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants