devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] arm64: dts: renesas: r8a77990: Add Ebisu-4D board support
@ 2023-10-02 11:34 Wolfram Sang
  2023-10-02 12:36 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2023-10-02 11:34 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Takeshi Kihara, Geert Uytterhoeven, Wolfram Sang, Magnus Damm,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-kernel

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

Add initial support for the Renesas Ebisu-4D development board.

The Ebisu-4D board is very similar to the Ebisu board, but the memory
configuration is different.

  - The memory map of Ebisu-4D board is as follows:
      Bank0: 2 GiB RAM : 0x000048000000 -> 0x000bfffffff

  - The memory map of Ebisu board is as follows:
      Bank0: 1 GiB RAM : 0x000048000000 -> 0x0007fffffff

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[wsa: rebased]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Resending this patch because I want to utilize all 2GB of memory on my
Ebisu. Since nobody updated U-Boot to handle different RAM sizes on
Ebisu in the last 4.5 years, let's add the Ebisu-4D as a seperate board.


 arch/arm64/boot/dts/renesas/Makefile          |  1 +
 .../boot/dts/renesas/r8a77990-ebisu-4d.dts    | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a77990-ebisu-4d.dts

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 7114cbbd8713..ad8f13f9907a 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -55,6 +55,7 @@ dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk.dtb
 dtb-$(CONFIG_ARCH_R8A77980) += r8a77980a-condor-i.dtb
 
 dtb-$(CONFIG_ARCH_R8A77990) += r8a77990-ebisu.dtb
+dtb-$(CONFIG_ARCH_R8A77990) += r8a77990-ebisu-4d.dtb
 
 dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb
 
diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu-4d.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu-4d.dts
new file mode 100644
index 000000000000..9f5bc7a7734f
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu-4d.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the Ebisu-4D board
+ *
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+#include "r8a77990-ebisu.dts"
+
+/ {
+	model = "Renesas Ebisu-4D board based on r8a77990";
+	compatible = "renesas,ebisu", "renesas,r8a77990";
+
+	memory@48000000 {
+		device_type = "memory";
+		/* first 128MB is reserved for secure area. */
+		reg = <0x0 0x48000000 0x0 0x78000000>;
+	};
+};
+
+&pciec0 {
+	/* Map all possible DDR as inbound ranges */
+	dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
+};
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] arm64: dts: renesas: r8a77990: Add Ebisu-4D board support
  2023-10-02 11:34 [PATCH RESEND] arm64: dts: renesas: r8a77990: Add Ebisu-4D board support Wolfram Sang
@ 2023-10-02 12:36 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-10-02 12:36 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Takeshi Kihara, Geert Uytterhoeven,
	Magnus Damm, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-kernel

Hi Wolfram,

On Mon, Oct 2, 2023 at 1:35 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> Add initial support for the Renesas Ebisu-4D development board.
>
> The Ebisu-4D board is very similar to the Ebisu board, but the memory
> configuration is different.
>
>   - The memory map of Ebisu-4D board is as follows:
>       Bank0: 2 GiB RAM : 0x000048000000 -> 0x000bfffffff
>
>   - The memory map of Ebisu board is as follows:
>       Bank0: 1 GiB RAM : 0x000048000000 -> 0x0007fffffff
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> [wsa: rebased]
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> Resending this patch because I want to utilize all 2GB of memory on my
> Ebisu. Since nobody updated U-Boot to handle different RAM sizes on
> Ebisu in the last 4.5 years, let's add the Ebisu-4D as a seperate board.

This patch is not needed: TF-A passes the memory size to U-Boot,
which updates the /memory node in the DTB passed to Linux:

$ dtc -O ebisu/r8a77990-ebisu.dtb | grep -A2 -w memory
    memory@48000000 {
            device_type = "memory";
            reg = <0x00 0x48000000 0x00 0x38000000>;
    };

When booting:

    NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA53) Rev.3.0.3
    NOTICE:  BL2: PRR is R-Car E3 Ver.1.0
    NOTICE:  BL2: PLL1 nonSSCG Clock select
    NOTICE:  BL2: Board is Ebisu-4D Rev.1.0
    ...
    NOTICE:  BL2: CH0: 400000000 - 47fffffff, 2 GiB
    ..
    U-Boot 2022.04-rc4-00082-g54082b91f22f7a49 (Mar 25 2022 - 11:25:09 +0100)

    CPU:   Renesas Electronics R8A77990 rev 1.0
    Model: Renesas Ebisu-4D board rev 1.0
    DRAM:  1.9 GiB
    ...
    Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    Linux version 6.6.0-rc3-ebisu-03722-g180199a69b82 (geert@rox)
(aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld
(GNU Binutils for Ubuntu) 2.38) #546 SMP Tue Sep 26 13:26:12 CEST 2023
    Machine model: Renesas Ebisu board based on r8a77990
    printk: debug: ignoring loglevel setting.
    efi: UEFI not found.
    Zone ranges:
       DMA      [mem 0x0000000048000000-0x00000000bfffffff]
    ...
    Memory: 1755932K/1966080K available (9088K kernel code, 2496K
rwdata, 4188K rodata, 3072K init, 17571K bss, 144612K reserved, 65536K
cma-reserved)

root@ebisu:~# hd /sys/firmware/devicetree/base/memory@48000000/reg
00000000  00 00 00 00 48 00 00 00  00 00 00 00 78 00 00 00  |....H.......x...|
00000010

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-02 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 11:34 [PATCH RESEND] arm64: dts: renesas: r8a77990: Add Ebisu-4D board support Wolfram Sang
2023-10-02 12:36 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).