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

Adding I2S Support for the RW612 #87773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EmilioCBen
Copy link
Contributor

Addresses #87239.

DerekSnell
DerekSnell previously approved these changes Mar 27, 2025
Copy link
Contributor

@DerekSnell DerekSnell left a comment

Choose a reason for hiding this comment

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

Thanks @EmilioCBen

You have compliance issues to clean up. But the i2s_speed test works for me on both boards. And your changes look good to me. Thanks

@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch 2 times, most recently from 7fce624 to 62ae838 Compare March 28, 2025 14:57
@decsny
Copy link
Member

decsny commented Mar 28, 2025

im not sure why did you split the board changes into two commit, neither of them work without the other, and both are just different parts of the code to enable i2s for the board, why not combine them to one commit

@@ -0,0 +1,5 @@
# Copyright 2024 NXP
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Also there is an overlap with this PR: RW612: Add power init code for PM3 support #87594

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for making me aware of this PR I will stay in sync, also I will update the copyrights.

#include <fsl_clock.h>
#include <fsl_power.h>
#include "fsl_io_mux.h"

Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably don't need a lot of these header files. Probably need only 1, can you please delete and check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing this out, updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see a lot of iomux related API's used in this file. Probably fsl_common.h is what you need?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think your right, I will update the PR.

@@ -0,0 +1,44 @@
/*
* Copyright 2022, 2024 NXP
Copy link
Collaborator

Choose a reason for hiding this comment

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

2024-25

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@@ -14,4 +14,5 @@ if(CONFIG_NXP_RW6XX_BOOT_HEADER)
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
zephyr_library()
zephyr_library_sources(MX25U51245GZ4I00_FCB.c)
zephyr_library_sources(init.c)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be moved outside the CONFIG as we need this file even when we have a bootloader.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you again for pointing this out, updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you again for pointing this out, updated.

@@ -0,0 +1,44 @@
/*
* Copyright 2022, 2024 NXP
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comments as rd_rw612_bga

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch from 62ae838 to 54c1415 Compare March 28, 2025 15:11
@EmilioCBen
Copy link
Contributor Author

im not sure why did you split the board changes into two commit, neither of them work without the other, and both are just different parts of the code to enable i2s for the board, why not combine them to one commit

Sorry, I thought this would be better for clarity and since the second commit is what enables the support on the board dts I thought I separate why the init.c was included with the dts node being added.

@decsny
Copy link
Member

decsny commented Mar 28, 2025

im not sure why did you split the board changes into two commit, neither of them work without the other, and both are just different parts of the code to enable i2s for the board, why not combine them to one commit

Sorry, I thought this would be better for clarity and since the second commit is what enables the support on the board dts I thought I separate why the init.c was included with the dts node being added.

it would make more sense to put the loop test code in init.c in the same commit as enabling the test, and put the clocks in the same commit as all the other normal board enablement code

@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch from 54c1415 to 561315b Compare March 28, 2025 17:25
@EmilioCBen
Copy link
Contributor Author

it would make more sense to put the loop test code in init.c in the same commit as enabling the test, and put the clocks in the same commit as all the other normal board enablement code

That does make more sense I will update the PR to reflect this.

@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch 3 times, most recently from 88462d3 to 6fc749a Compare April 1, 2025 14:02
Added I2S support for RW612.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch from 6fc749a to 80321b8 Compare April 1, 2025 14:31
#
# SPDX-License-Identifier: Apache-2.0
#

zephyr_library_sources(init.c)

if(CONFIG_NXP_RW6XX_BOOT_HEADER)
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
zephyr_library()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should move outside the if as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure that make sense, I can move this as well.

Added Internal pin connection for
I2S Loopback testing when I2S is enabled.
Added I2S testing support for RW612.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
@EmilioCBen EmilioCBen force-pushed the fix/rw_soc_i2s_clock branch from 80321b8 to 0b51f61 Compare April 1, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NXP I2S using DMA never completes
5 participants