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

Develop/nxp imx8m rdc setup #67886

Merged

Conversation

Zhiqiang-Hou
Copy link
Contributor

@Zhiqiang-Hou Zhiqiang-Hou commented Jan 21, 2024

This series is to add Resource Domain Conteroller (RDC) setup for NXP i.MX8M SoCx Cortex-A53 core, to make sure the Zephyr running on A core has permission to access the UART ports enabled in DTS.

@zephyrbot zephyrbot added area: UART Universal Asynchronous Receiver-Transmitter area: Devicetree Binding PR modifies or adds a Device Tree binding platform: NXP NXP area: ARM64 ARM (64-bit) Architecture labels Jan 21, 2024
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/nxp-imx8m-rdc-setup branch from 5ec8ca1 to f7c7d53 Compare January 22, 2024 05:49
@Zhiqiang-Hou
Copy link
Contributor Author

Update:

  1. fixed the compliance check failures.
  2. Changed the 'rdc' property of imx-iuart optional to fix the build error of other platforms integrated this uart.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we create a "driver" for this in zephyr/drivers/, instead of going back to SoC specific files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your comments!
The Resource Domain Controller (RDC) is used to control the resources (MEM, peripherals) access permission of the Cores and other bus masters, and generally it won't be changed once setup. So, I think it should be more likely classed to SoC/board setup than a driver.

iuliana-prodan
iuliana-prodan previously approved these changes Jan 27, 2024
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/nxp-imx8m-rdc-setup branch 2 times, most recently from 6ea9cd6 to f108a40 Compare February 2, 2024 08:18
@Zhiqiang-Hou
Copy link
Contributor Author

Please ignore the previous 2 updates and just help to review the latest update, which changes the RDC compatible string to "nxp,rdc". Thanks

iuliana-prodan
iuliana-prodan previously approved these changes Feb 2, 2024
danieldegrasse
danieldegrasse previously approved these changes Feb 2, 2024
@fabiobaltieri fabiobaltieri added this to the v3.7.0 milestone Feb 6, 2024
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Needs to be migrated to hwmv2

@Zhiqiang-Hou
Copy link
Contributor Author

Needs to be migrated to hwmv2

@JiafeiPan is working on hwmv2 migrating: #69400
so, let's merge this PR first, and Jiafei help to convert to hwmv2?

Copy link
Contributor

@JiafeiPan JiafeiPan left a comment

Choose a reason for hiding this comment

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

Currently platforms have been moved to hardware v2, please rebase your PR.

Add device tree binding file for the Resource Domain Controller (RDC)
on i.MX SoCs.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add RDC device tree node for i.MX8M SoCs Cortex-A core dtsi.

Signed-off-by: Hou Zhiqiang <[email protected]>
The new property is used to set the access permission for the IUART
device.

Signed-off-by: Hou Zhiqiang <[email protected]>
Assign the UART devices to both the Cortex-A and Cortex-M cores.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add domain ID definition for Cortex-A53 core on i.MX8M SoCs.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add MMU mapping for RDC MMIO on i.MX8M SoCs.

Signed-off-by: Hou Zhiqiang <[email protected]>
@Zhiqiang-Hou
Copy link
Contributor Author

Currently platforms have been moved to hardware v2, please rebase your PR.

rebased, thanks!

@nordicjm nordicjm dismissed their stale review March 13, 2024 07:49

addressed


static int soc_init(void)
{
soc_rdc_init();
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a shortcut though. We have a node with a compatible for the RDC, with its own memory map and yet we do not have a driver for it. Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please refer to #67886 (comment)
Thanks!

Add SoC initialization to set the UART RDC permission in the early
phase, so that the it can be used by Zephyr on Cortex-A cores.

Signed-off-by: Hou Zhiqiang <[email protected]>
As the RDC setup has been added in SoC initialization code.

Signed-off-by: Hou Zhiqiang <[email protected]>
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/nxp-imx8m-rdc-setup branch from 2593dba to 00a213d Compare March 15, 2024 03:59
@dleach02 dleach02 merged commit 795044e into zephyrproject-rtos:main Mar 28, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Architectures area: ARM64 ARM (64-bit) Architecture area: Console area: Devicetree Binding PR modifies or adds a Device Tree binding area: Samples Samples area: UART Universal Asynchronous Receiver-Transmitter 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.

10 participants