On 10/9/23 18:46, Paul Barker wrote:
The Renesas RZ/G2L SMARC Evaluation Board Kit consists of the RZ/G2L
System-on-Module (SOM) based on the R9A07G044L2 SoC, and a common SMARC
carrier board.

The ARM TrustedFirmware code for the Renesas RZ/G2L SoC family passes a
devicetree blob to the bootloader as an argument in the same was
previous R-Car gen3/gen4 SoCs. This blob contains a compatible string
which can be used to identify the particular SoC we are running on and
this is used to select the appropriate device tree to load.

The configuration renesas_rzg2l_smarc_defconfig is added to support
building for this target. In the future this defconfig will be extended
to support other SoCs and evaluation boards from the RZ/G2L family.

Signed-off-by: Paul Barker <paul.barker...@bp.renesas.com>
Reviewed-by: Biju Das <biju.das...@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad...@bp.renesas.com>
---
v1->v2:
  * Move dram_init() & dram_init_banksize() to memmap-rzg2l.c
  * Add a TODO note for reset support.

  arch/arm/mach-rmobile/Kconfig.rzg2l   | 14 ++++++
  arch/arm/mach-rmobile/memmap-rzg2l.c  | 12 +++++
  board/renesas/rzg2l/Kconfig           | 18 +++++++
  board/renesas/rzg2l/MAINTAINERS       |  6 +++
  board/renesas/rzg2l/Makefile          |  4 ++
  board/renesas/rzg2l/rzg2l.c           | 67 +++++++++++++++++++++++++++
  configs/renesas_rzg2l_smarc_defconfig | 52 +++++++++++++++++++++
  include/configs/rzg2l-smarc.h         | 14 ++++++
  8 files changed, 187 insertions(+)
  create mode 100644 board/renesas/rzg2l/Kconfig
  create mode 100644 board/renesas/rzg2l/MAINTAINERS
  create mode 100644 board/renesas/rzg2l/Makefile
  create mode 100644 board/renesas/rzg2l/rzg2l.c
  create mode 100644 configs/renesas_rzg2l_smarc_defconfig
  create mode 100644 include/configs/rzg2l-smarc.h

diff --git a/arch/arm/mach-rmobile/Kconfig.rzg2l 
b/arch/arm/mach-rmobile/Kconfig.rzg2l
index 039d6b0a45aa..dc30bdf3e5c2 100644
--- a/arch/arm/mach-rmobile/Kconfig.rzg2l
+++ b/arch/arm/mach-rmobile/Kconfig.rzg2l
@@ -9,6 +9,20 @@ config R9A07G044L
        help
          Enable support for the Renesas R9A07G044L (RZ/G2L) SoC.
+choice
+       prompt "Renesas RZ/G2L Family Board selection"
+       default TARGET_RZG2L_SMARC_EVK
+
+config TARGET_RZG2L_SMARC_EVK
+       bool "Renesas RZ/G2L SMARC EVK"
+       imply R9A07G044L
+       help
+         Enable support for the RZ/G2L SMARC evaluation board.
+
+source "board/renesas/rzg2l/Kconfig"
+
+endchoice
+
  config MULTI_DTB_FIT_UNCOMPRESS_SZ
        default 0x80000 if TARGET_RZG2L_SMARC_EVK
diff --git a/arch/arm/mach-rmobile/memmap-rzg2l.c b/arch/arm/mach-rmobile/memmap-rzg2l.c
index d0509424fb73..a08d0ea08fc0 100644
--- a/arch/arm/mach-rmobile/memmap-rzg2l.c
+++ b/arch/arm/mach-rmobile/memmap-rzg2l.c
@@ -113,3 +113,15 @@ void enable_caches(void)
dcache_enable();
  }
+
+int dram_init(void)
+{
+       return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+       fdtdec_setup_memory_banksize();
+
+       return 0;
+}


You could add this piece ^ in patch 17/19 already.

[...]

diff --git a/board/renesas/rzg2l/rzg2l.c b/board/renesas/rzg2l/rzg2l.c
new file mode 100644
index 000000000000..5b919f0b495a

[...]

+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+       return 0;
+}
+
+int __weak board_init(void)

This one shouldn't be __weak anymore, DTTO for the reset_cpu().
The board specific functions are the final ones.

+{
+       return 0;
+}
+
+void __weak reset_cpu(void)
+{
+       /*
+        * TODO: Implement reset support once TrustedFirmware supports
+        * the appropriate call.
+        */
+}

[...]

Reply via email to