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

dts: renesas_ra: Changing to describe clocks with DeviceTree's standard manner #78365

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

soburi
Copy link
Member

@soburi soburi commented Sep 12, 2024

DeviceTree typically references the clock source using the clocks
property defined in base.yaml, so we'll change it to this.

Move the process of replacing numerical values with macros to
the header, and set the division ratio in a numeric without
using macros in the device tree.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Sep 12, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@1ec8891 zephyrproject-rtos/hal_renesas@3dafd03 zephyrproject-rtos/[email protected]

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

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Sep 12, 2024
@soburi soburi force-pushed the renesas_ra_clock_rework branch 4 times, most recently from d782c9b to 8320b5d Compare September 15, 2024 10:33
@soburi soburi changed the title Renesas ra clock rework dts: renesas_ra: Changing to describe clocks with DeviceTree's standard manner Sep 15, 2024
@soburi soburi marked this pull request as ready for review September 15, 2024 10:39
* @return the node's full name with unit-address as a sequence of tokens,
* with no quotes
*/
#define DT_NODE_FULL_NAME_UNQUOTED(node_id) DT_CAT(node_id, _FULL_NAME_UNQUOTED)
Copy link
Member

Choose a reason for hiding this comment

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

add tests and macros.bnf if needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the review. I forgot about it. I've added it, so please check it again.

@soburi soburi force-pushed the renesas_ra_clock_rework branch 2 times, most recently from adf82ef to 7006d58 Compare September 16, 2024 10:22
@soburi soburi requested a review from gmarull September 16, 2024 21:31
gmarull
gmarull previously approved these changes Sep 17, 2024
duynguyenxa
duynguyenxa previously approved these changes Sep 18, 2024
Copy link
Member

@duynguyenxa duynguyenxa left a comment

Choose a reason for hiding this comment

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

Thank you for the implementation

@soburi
Copy link
Member Author

soburi commented Sep 18, 2024

@duynguyenxa

Thank you for the implementation

Thank you for your review.

Please check also zephyrproject-rtos/hal_renesas#36.

@soburi soburi dismissed stale reviews from duynguyenxa and gmarull via 44746f5 October 1, 2024 12:33
@soburi soburi force-pushed the renesas_ra_clock_rework branch from f775934 to 44746f5 Compare October 1, 2024 12:33
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 1, 2024
soburi added 6 commits October 1, 2024 21:35
Update HAL to improve the BSP clock setting process.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Changes the path name of a DTS node so that it can be used
as the stem of a BSP macro.
All nodes to be changed are referenced via labels,
so only the name is changed.

Signed-off-by: TOKITA Hiroshi <[email protected]>
DeviceTree typically references the clock source using the `clocks`
property defined in `base.yaml`, so we'll change it to this.

Also delete the custom clock source definitions in
`renesas,ra-cgc-pclk-block.yaml`, `renesas,ra-cgc-pclk.yaml`, and
`renesas,ra-cgc-pll.yaml`.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Move the process of replacing numerical values with macros to
the header, and set the division ratio in a numeric without
using macros in the device tree.

Change `clk-div` defined in `renesas,ra-cgc-pclk.yaml` to `div`.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Adding the macros `RA_CGC_CLK_SRC` and `RA_CGC_CLK_DIV` that derive
the BSP clock settings from the DeviceTree node settings.
I also define some aliases to fill in the gaps with the BSP
naming conventions.

Signed-off-by: TOKITA Hiroshi <[email protected]>
@soburi soburi force-pushed the renesas_ra_clock_rework branch from 44746f5 to 9c5ef6b Compare October 1, 2024 12:38
@soburi
Copy link
Member Author

soburi commented Oct 1, 2024

This needs to be merged before #78959 (or any other PR that includes hal-renesas updating).

@soburi soburi requested review from gmarull and duynguyenxa October 1, 2024 15:54
@soburi
Copy link
Member Author

soburi commented Oct 2, 2024

@gmarull @duynguyenxa

The hal module has been updated so it has been rebased.
Could you check again please?

@soburi
Copy link
Member Author

soburi commented Oct 8, 2024

@nordic-krch
Could you take a look?

@nashif nashif merged commit 0f80f99 into zephyrproject-rtos:main Oct 8, 2024
47 checks passed
@soburi soburi deleted the renesas_ra_clock_rework branch October 8, 2024 10:08
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.

6 participants