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

Add support of h3ulcb and salvator xs m3 arm64 boards #57172

Conversation

xakep-amatop
Copy link
Contributor

@xakep-amatop xakep-amatop commented Apr 24, 2023

Add generic Renesas functions to CPG for getting/setting rates of clocks. Add associated tables of clocks and API for working with these tables.

Add MMIO mapping for PFC, UART and CPG Renesas drivers in order to avoid mappings inside mmu_regions.c file(s).

Added files for supporting ARM64 Renesas r8a77951/r8a77961 SoCs:
* add dtsi for r8a77951/r8a77961 soc;
* files for support PFC;

Add basic support of rcar_salvator_xs_m3 and rcar_h3ulcb_ca57 ARM64 boards.

@xakep-amatop xakep-amatop force-pushed the zephyr-arm64-add-support-of-h3ulcb-salvator-xs-boards branch 3 times, most recently from 2f31169 to e110128 Compare April 24, 2023 12:39
@xakep-amatop xakep-amatop changed the title Zephyr arm64 add support of h3ulcb salvator xs boards Zephyr arm64 add support of h3ulcb and salvator xs m3 boards Apr 24, 2023
@xakep-amatop xakep-amatop changed the title Zephyr arm64 add support of h3ulcb and salvator xs m3 boards Add support of h3ulcb and salvator xs m3 arm64 boards Apr 24, 2023
@xakep-amatop xakep-amatop force-pushed the zephyr-arm64-add-support-of-h3ulcb-salvator-xs-boards branch from e110128 to cec7719 Compare April 24, 2023 12:50
@xakep-amatop xakep-amatop marked this pull request as ready for review April 24, 2023 12:51
@zephyrbot zephyrbot added area: UART Universal Asynchronous Receiver-Transmitter area: Pinctrl area: ARM64 ARM (64-bit) Architecture area: Fuel Gauge area: Clock Control platform: Renesas R-Car Renesas R-Car labels Apr 24, 2023
*
*/

#ifndef _SOC__H_
Copy link
Member

Choose a reason for hiding this comment

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

-1 to soc.h, not needed for ARM64

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted

Comment on lines 8 to 29
#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <soc.h>

/**
*
* @brief Perform basic hardware initialization
*
* @return 0
*/

static int soc_init(void)
{
/* Install default handler that simply resets the CPU
* if configured in the kernel, NOP otherwise
*/
return 0;
}

SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
Copy link
Member

Choose a reason for hiding this comment

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

this file does nothing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted

*
*/

#ifndef ZEPHYR_SOC_ARM_RENESAS_RCAR_GEN3_PINCTRL_SOC_H_
Copy link
Member

Choose a reason for hiding this comment

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

nit: add a separate commit introducing pinctrl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Add associative tables for core and mod clocks.

Add possibility to enable/disable any of core clocks which presents
in the associative table.

Add handler for setting rate to driver and use generic rcar cpg
function for getting rate.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Delete IRQ lock/unlock calls from 'rcar_cpg_mstp_clock_endisable',
because 'rcar_cpg_mstp_clock_endisable' function is always called
under spin lock.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add MMIO mapping for Renesas CPG driver in order to avoid
mappings inside mmu_regions.c file. Remove MMU region for
Renesas CPG driver.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add files for supporting arm64 Renesas r8a77951 SoC.
Add config option CPU_CORTEX_A57.

Enable build of clock_control_r8a7795_cpg_mssr.c for
a new ARM64 SoC R8A77951.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add Pin Function Controller tables of registers and their bits
for ARM64 Renesas R-Car family. With this changes we can use
Renesas PFC driver for configuring bias and driving capabilities.

Note: some of files copy-pasted from Renesas Arm 32
      SoC directory and this commit is a temporary
      solution, we need to rework it in order to use
      the same source files for both architectures.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add basic functionality for supporting h3ulcb board:
  * add documentation for h3ulcb board;
  * add pinctrl dtsi for scif driver;
  * add dts, yaml and configuration files.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add support of r8a77961 SoC to gen3 series.
Create a dtsi file with a common part for both r8a77951 and r8a77961.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add Pin Function Controller tables of registers and their bits
for ARM64 Renesas R-Car family. With this changes we can use
Renesas PFC driver for configuring bias and driving capabilities.

Add only needed driver strength and bias pins to PFC,
e.g. SDx and UART TX/RX pins.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Add support of 'rcar_salvator_xs_m3' board: minimal dts
and configuration.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Renesas R-Car ARM64 platforms entry has been added to maintainers list.
lorc (Volodymyr Babchuk <volodymyr_babchuk@epam.com>) will be a maintainer
of the Renesas R-Car boards based on ARMv8.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
@xakep-amatop xakep-amatop force-pushed the zephyr-arm64-add-support-of-h3ulcb-salvator-xs-boards branch from 7b09a0c to 01f74f9 Compare June 27, 2023 12:36
@xakep-amatop
Copy link
Contributor Author

rebased onto the latest changes + added Renesas R-Car ARM64 entry to the maintainers list (last commit)

Copy link
Collaborator

@carlocaione carlocaione left a comment

Choose a reason for hiding this comment

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

For the arch part

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

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

For adding me as a maintainer

Copy link
Collaborator

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

MCUmgr is OK.

@carlescufi carlescufi dismissed aaillet’s stale review July 10, 2023 13:49

stale, addressed

@carlescufi
Copy link
Member

Compliance failure is the usual pin control typedef.

@carlescufi carlescufi merged commit 832e1e2 into zephyrproject-rtos:main Jul 11, 2023
26 of 27 checks passed
@aaillet
Copy link
Member

aaillet commented Jul 11, 2023

In fact PR wasn't ready to be merged, I was working on the clock changes review as it is containing errors and kept my "change needed" while doing it.
Sorry I took that much time, I will then address these errors in a new PR !

@carlocaione
Copy link
Collaborator

In fact PR wasn't ready to be merged

Next time please keep it in draft state until ready to be merged.

@aaillet
Copy link
Member

aaillet commented Jul 11, 2023

In fact PR wasn't ready to be merged

Next time please keep it in draft state until ready to be merged.

I'm not PR author, was I able to do that ?
I wasn't aware, that's why I used "changes needed" to block the PR

@aaillet
Copy link
Member

aaillet commented Jul 11, 2023

I validated that these changes didn't broke R7 (arm32) support of H3. I'm deeply reviewing clock control changes, I'll let you know.

I said that I was working on the clock control review (but not updated my status) as maintainer, but anyway, I'll fix it on another PR !

@xakep-amatop
Copy link
Contributor Author

I validated that these changes didn't broke R7 (arm32) support of H3. I'm deeply reviewing clock control changes, I'll let you know.

I said that I was working on the clock control review (but not updated my status) as maintainer, but anyway, I'll fix it on another PR !

Feel free to write comments about any issues you've found in the CPG driver here. If you'd like, I can address them and open a new pull request.

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.

None yet