Skip to content

Add driver support for i.MX93 - #7462

Merged
dbaluta merged 5 commits into
thesofproject:mainfrom
LaurentiuM1234:imx93_driver_support
Apr 24, 2023
Merged

dbaluta merged 5 commits into
thesofproject:mainfrom
LaurentiuM1234:imx93_driver_support

Conversation

@LaurentiuM1234

@LaurentiuM1234 LaurentiuM1234 commented Apr 19, 2023 •

Copy link
Copy Markdown
Contributor

This PR introduces all required driver-related changes for i.MX93 platform.

Please see #7192 for PR dependency graph.

Just like IMX8ULP i.MX93's EDMA2 uses a channel multiplexer
to assign a peripheral to a channel. To make the driver work
it's required to write the peripheral's line number to the
CH_MUX register.

This commit also introduces all macros necessary for EDMA2.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@greg-intel

Copy link
Copy Markdown
Contributor

SOFCI TEST

Comment thread src/drivers/imx/ipc.c Outdated
Comment thread src/drivers/imx/ipc.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please explain why it souldn't exist interrupt_clear() for ARM64?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some extra clarifications here: #7470. Please let me know if you think the commit description is not clear enough. I can try re-writing it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"In the case of ARM64 with GIC the interrupts are cleared after the ISR is executed (as a reference please see arm_gic_eoi() from Zephyr and arch/arm64/core/isr_wrapper.S ) so there's no need to clear them explicitly." - this is from your comment .
This was useful for me, so it might be good to add it in the commit message.

Comment thread src/drivers/imx/ipc.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe create a separate empty macro interrupt_clear for ARM64 to avoid polluting the code with ifdefs?

i.MX93 uses V2 of the MU. This commit makes sure that all
offsets are set accordingly.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Since i.MX93 doesn't support PM and doesn't have an implementation
for wait_for_interrupt() we need to encase the D3 preparation in
an ifndef block. This commit does exacly so.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This commit makes sure that all macros used by the SAI driver
are correct in the case of i.MX93's SAI3.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@LaurentiuM1234

Copy link
Copy Markdown
Contributor Author

Added suggestions pointed out by @dbaluta and @iuliana-prodan.

@LaurentiuM1234

Copy link
Copy Markdown
Contributor Author

Added a more clear message for the commit introducing interrupt_clear() macro for ARM64.

In the case of ARM64 with GIC, the interrupts are cleared after
the ISR is executed (for reference please see arm_gic_eoi() and
arch/arm64/core/isr_wrapper.S from Zephyr). Thanks to this, we
don't need to clear them explicitly, hence there's no need for
interrupt_clear() to be defined. This commit fixes linkage
problems caused by the fact that interrupt_clear() is not
defined on ARM64.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@greg-intel

Copy link
Copy Markdown
Contributor

SOFCI TEST

@kv2019i

kv2019i commented Apr 24, 2023

Copy link
Copy Markdown
Collaborator

Intel tests are clear, feel free to merge @dbaluta

@dbaluta
dbaluta merged commit b532c31 into thesofproject:main Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants