Skip to content
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

zephyr: add soc overlay for i.MX8QM and i.MX8QXP #24

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

LaurentiuM1234
Copy link

@LaurentiuM1234 LaurentiuM1234 commented Sep 22, 2023

Since the i.MX8 Zephyr SoC will be split into two SoCs: mimx8qm6 and mimx8qx6, the xtensa HAL needs to provide two different overlays with the same name as the SoCs. As such, this commit takes the files from the nxp_imx8 SoC and duplicates them, resulting in the creation of mimx8qm6 and mimx8qx6.

As a sidenote: we can/should remove the nxp_imx8 entry once the Zephyr changes have been merged.

IMPORTANT: there's no difference between the files found in nxp_imx8, mimx8qm6, and mimx8qx6.

@dcpleung
Copy link
Member

Since they are using the same overlay, I would assume they are both using the same toolchain. If that is the case, you can do a SoC series and use CONFIG_SOC_TOOLCHAIN_NAME as the directory name. As long as there is no CONFIG_SOC_NAME (which should not be set if doing SoC series), CONFIG_SOC_TOOLCHAIN_NAME would be used to construct the path.

Since the i.MX8 SoC will be split into 2 different SoCs:
mimx8qm6 and mimx8qx6, the nxp_imx8 name can no longer be
used. This is because the new SoCs will have different CONFIG_SOC
values such that CONFIG_SOC != nxp_imx8. Despite this, we can take
advantage of the fact that the 2 SoCs use the same toolchain.
As such, rename nxp_imx8 to nxp_imx_adsp. This works because
Zephyr looks for an overlay with the same name as the toolchain
if one with the same name as the SoC doesn't exist.

This won't break the current state of things because the i.MX8
SoC will also fallback to the nxp_imx_adsp overlay.

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

Since they are using the same overlay, I would assume they are both using the same toolchain. If that is the case, you can do a SoC series and use CONFIG_SOC_TOOLCHAIN_NAME as the directory name. As long as there is no CONFIG_SOC_NAME (which should not be set if doing SoC series), CONFIG_SOC_TOOLCHAIN_NAME would be used to construct the path.

You're right, they are using the same toolchain. Unfortunately, I can't get rid of CONFIG_SOC since this is used to fetch the NXP HAL files for the 2 SoCs it represents: i.MX8QM and i.MX8QXP. Luckily enough, if a SoC overlay with the CONFIG_SOC name cannot be found, Zephyr will look for an overlay with the toolchain name. As such, all we need to do here is change nxp_imx8 to nxp_imx_adsp. I've updated the PR accordingly.

@LaurentiuM1234
Copy link
Author

@mmahadevan108 I think this should be ready for merge

@iuliana-prodan
Copy link
Contributor

@dcpleung @nashif can you please merge this.
Thank you!

@dcpleung dcpleung merged commit 08325d6 into zephyrproject-rtos:master Oct 26, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants