Skip to contentSkip to conversation

board: rockchip: Add rk3588 evb

PATCH Superseded Kever Yang 3 participants 5 messages Feb 28, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kever Yang

author
#0 lore raw

PATCH 1/1 board: rockchip: Add rk3588 evb

rk3588 evb1 v10 is a evalution board from Rockchip, it is a dev board for rockchip and also a reference board for board vendors.

Hardware:
SoC: RK3588
DRAM: LPDDR4X 8GB
Debug: UART2 via USB
PCIe: 3x4 *1
SATA *2
HDMI out *2
HDMI IN *1
USB2.0 Host *2
USB3.0 Host *1
Type C *1
MIPI DSI panel

rk3588-evb.dts is from Linux v6.2 with rename of rk3588-evb1-v10.dts

---

 arch/arm/dts/Makefile                  |   1 +
 arch/arm/dts/rk3588-evb-u-boot.dtsi    |  17 ++++
 arch/arm/dts/rk3588-evb.dts            | 129 +++++++++++++++++++++++++
 arch/arm/mach-rockchip/rk3588/Kconfig  |   7 ++
 board/rockchip/evb_rk3588/Kconfig      |  15 +++
 board/rockchip/evb_rk3588/MAINTAINERS  |   7 ++
 board/rockchip/evb_rk3588/Makefile     |   6 ++
 board/rockchip/evb_rk3588/evb-rk3588.c |  39 ++++++++
 configs/evb-rk3588_defconfig           |  70 ++++++++++++++
 doc/board/rockchip/rockchip.rst        |  10 ++
 include/configs/evb_rk3588.h           |  15 +++
 11 files changed, 316 insertions(+)
 create mode 100644 arch/arm/dts/rk3588-evb-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3588-evb.dts
 create mode 100644 board/rockchip/evb_rk3588/Kconfig
 create mode 100644 board/rockchip/evb_rk3588/MAINTAINERS
 create mode 100644 board/rockchip/evb_rk3588/Makefile
 create mode 100644 board/rockchip/evb_rk3588/evb-rk3588.c
 create mode 100644 configs/evb-rk3588_defconfig
 create mode 100644 include/configs/evb_rk3588.h
arch/arm/dts/Makefile +1 -0
index c160e884bf6..aa4421cad84 100644
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
 
 dtb-$(CONFIG_ROCKCHIP_RK3588) += \
 	rk3588-edgeble-neu6a-io.dtb \
+	rk3588-evb.dtb \
 	rk3588-rock-5b.dtb
 
 dtb-$(CONFIG_ROCKCHIP_RV1108) += \
arch/arm/dts/rk3588-evb-u-boot.dtsi new file +17 -0
new file mode 100644
index 00000000000..1e1c676b4bd
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
+ */
+
+#include "rk3588-u-boot.dtsi"
+
+/ {
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
+	chosen {
+		u-boot,spl-boot-order = &sdhci;
+	};
+};
arch/arm/dts/rk3588-evb.dts new file +129 -0

129 lines not on this page · raw message

arch/arm/mach-rockchip/rk3588/Kconfig +7 -0
index aee71ca1dab..1fde7aefb24 100644
@@ -1,5 +1,11 @@
 if ROCKCHIP_RK3588
 
+config TARGET_RK3588_EVB
+	bool "Rockchip EVB1 v10"
+	select BOARD_LATE_INIT
+	help
+	  RK3588 EVB is a evaluation board for Rockchp RK3588.
+
 config TARGET_RK3588_NEU6
 	bool "Edgeble Neural Compute Module 6(Neu6) SoM"
 	select BOARD_LATE_INIT
@@ -51,6 +57,7 @@ config SYS_MALLOC_F_LEN
 	default 0x80000
 
 source board/edgeble/neural-compute-module-6/Kconfig
+source board/rockchip/evb_rk3588/Kconfig
 source board/radxa/rock5b-rk3588/Kconfig
 
 endif
board/rockchip/evb_rk3588/Kconfig new file +15 -0
new file mode 100644
index 00000000000..836bd897bd3
@@ -0,0 +1,15 @@
+if TARGET_RK3588_EVB
+
+config SYS_BOARD
+	default "evb_rk3588"
+
+config SYS_VENDOR
+	default "rockchip"
+
+config SYS_CONFIG_NAME
+	default "evb_rk3588"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+
+endif
board/rockchip/evb_rk3588/MAINTAINERS new file +7 -0
new file mode 100644
index 00000000000..7b7df3c5a8a
@@ -0,0 +1,7 @@
+EVB-RK3588
+M:	Kever Yang <[email protected]>
+S:	Maintained
+F:	board/rockchip/evb_rk3588
+F:	include/configs/evb_rk3588.h
+F:	configs/evb-rk3588_defconfig
+F:	arch/arm/dts/rk3588-evb-u-boot.dtsi
board/rockchip/evb_rk3588/Makefile new file +6 -0
new file mode 100644
index 00000000000..240d2ec597e
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier:     GPL-2.0+
+#
+# Copyright (c) 2023 Rockchip Electronics Co,. Ltd.
+#
+
+obj-y += evb-rk3588.o
board/rockchip/evb_rk3588/evb-rk3588.c new file +39 -0
new file mode 100644
index 00000000000..caf94d8d29c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co,. Ltd.
+ */
+
+#include <fdtdec.h>
+#include <fdt_support.h>
+
+#ifdef CONFIG_OF_BOARD_SETUP
+static int rk3588_add_reserved_memory_fdt_nodes(void *new_blob)
+{
+	struct fdt_memory gap1 = {
+		.start = 0x3fc000000,
+		.end = 0x3fc4fffff,
+	};
+	struct fdt_memory gap2 = {
+		.start = 0x3fff00000,
+		.end = 0x3ffffffff,
+	};
+	unsigned long flags = FDTDEC_RESERVED_MEMORY_NO_MAP;
+	unsigned int ret;
+
+	/*
+	 * Inject the reserved-memory nodes into the DTS
+	 */
+	ret = fdtdec_add_reserved_memory(new_blob, "gap1", &gap1,  NULL, 0,
+					 NULL, flags);
+	if (ret)
+		return ret;
+
+	return fdtdec_add_reserved_memory(new_blob, "gap2", &gap2,  NULL, 0,
+					  NULL, flags);
+}
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+	return rk3588_add_reserved_memory_fdt_nodes(blob);
+}
+#endif
configs/evb-rk3588_defconfig new file +70 -0

70 lines not on this page · raw message

doc/board/rockchip/rockchip.rst +10 -0
index b5563b8f7f9..af6e466de1e 100644
@@ -91,6 +91,7 @@ List of mainline supported Rockchip boards:
      - Rockchip Evb-RK3568 (evb-rk3568)
 
 * rk3588
+     - Rockchip EVB (evb-rk3588)
      - Edgeble Neural Compute Module 6 SoM - Neu6a (neu6a-io-rk3588)
      - Radxa ROCK 5B (rock5b-rk3588)
 
@@ -185,6 +186,15 @@ To build rk3568 boards:
         make evb-rk3568_defconfig
         make CROSS_COMPILE=aarch64-linux-gnu-
 
+To build rk3588 boards:
+
+.. code-block:: bash
+
+        export BL31=../rkbin/bin/rk35/rk3588_bl31_v1.33.elf
+        export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.09.bin
+        make evb-rk3588_defconfig
+        make CROSS_COMPILE=aarch64-linux-gnu-
+
 Flashing
 --------
 
include/configs/evb_rk3588.h new file +15 -0
new file mode 100644
index 00000000000..4568e2cace6
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
+ */
+
+#ifndef __EVB_RK3588_H
+#define __EVB_RK3588_H
+
+#include <configs/rk3588_common.h>
+
+#define ROCKCHIP_DEVICE_SETTINGS \
+		"stdout=serial,vidconsole\0" \
+		"stderr=serial,vidconsole\0"
+
+#endif
Signature · 1 line
2.25.1
#1 lore raw
Quoted 17 lines · Kever Yang

rk3588 evb1 v10 is a evalution board from Rockchip, it is a dev board for rockchip and also a reference board for board vendors.

Hardware:
SoC: RK3588
DRAM: LPDDR4X 8GB
Debug: UART2 via USB
PCIe: 3x4 *1
SATA *2
HDMI out *2
HDMI IN *1
USB2.0 Host *2
USB3.0 Host *1
Type C *1
MIPI DSI panel

Quoted 1 line

rk3588-evb.dts is from Linux v6.2 with rename of rk3588-evb1-v10.dts

IMHO - do not rename Linux sync (It will break the Linux syncs, every time), Matching DTS from Linux make maintenance easy and easy to fix. If it is really needed then this change has to be in Linux.

Jagan.

author
#2 lore raw

Hi Jagan,

Quoted 17 lines · Jagan Teki
Quoted 16 lines · Kever Yang

rk3588 evb1 v10 is a evalution board from Rockchip, it is a dev board for rockchip and also a reference board for board vendors.

Hardware:
SoC: RK3588
DRAM: LPDDR4X 8GB
Debug: UART2 via USB
PCIe: 3x4 *1
SATA *2
HDMI out *2
HDMI IN *1
USB2.0 Host *2
USB3.0 Host *1
Type C *1
MIPI DSI panel

Quoted 4 lines
Quoted 1 line

rk3588-evb.dts is from Linux v6.2 with rename of rk3588-evb1-v10.dts

IMHO - do not rename Linux sync (It will break the Linux syncs, every time), Matching DTS from Linux make maintenance easy and easy to fix. If it is really needed then this change has to be in Linux.

I can understand your concern, keep everything the same seems easier.

As I have said for rk3568-evb, not like the boards from other board vendor which sales

to End customer, rockchip EVB is a reference board, many boards copy core part the the

evb schematic. Not all the boards will upstream, but still many boards can re-use the

EVB U-Boot to boot their boards.

For U-Boot, I would like to keep the same usage of evb like other rkxx-evb unless there have

conflict by more than one EVB.

    When there is only one evb, and without modification by U-Boot, the Linux sync won't be break.

Thanks,
- Kever

Quoted 2 lines

Jagan.

#3 lore raw
Quoted 41 lines

Date: Tue, 28 Feb 2023 18:00:35 +0800
From: Kever Yang <[email protected]>

Hi Jagan,

Quoted 17 lines · Jagan Teki
Quoted 16 lines · Kever Yang

rk3588 evb1 v10 is a evalution board from Rockchip, it is a dev board for rockchip and also a reference board for board vendors.

Hardware:
SoC: RK3588
DRAM: LPDDR4X 8GB
Debug: UART2 via USB
PCIe: 3x4 *1
SATA *2
HDMI out *2
HDMI IN *1
USB2.0 Host *2
USB3.0 Host *1
Type C *1
MIPI DSI panel

Quoted 4 lines
Quoted 1 line

rk3588-evb.dts is from Linux v6.2 with rename of rk3588-evb1-v10.dts

IMHO - do not rename Linux sync (It will break the Linux syncs, every time), Matching DTS from Linux make maintenance easy and easy to fix. If it is really needed then this change has to be in Linux.

I can understand your concern, keep everything the same seems easier.

As I have said for rk3568-evb, not like the boards from other board vendor which sales

to End customer, rockchip EVB is a reference board, many boards copy core part the the

evb schematic. Not all the boards will upstream, but still many boards can re-use the

EVB U-Boot to boot their boards.

Quoted 7 lines

For U-Boot, I would like to keep the same usage of evb like other rkxx-evb unless there have

conflict by more than one EVB.

    When there is only one evb, and without modification by U-Boot, the
Linux sync won't be break.

The synchronization process should be as simple as:

cp linux/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts u-boot/arch/arm/dts

Doing it any other way is just going to cause confusion about whether the .dts files are supposed to be the same or if there is some variation.

Cheers,

Mark

#4 lore raw
In reply to Kever Yang

Hi Kever,

Quoted 39 lines · Kever Yang

Hi Jagan,

Quoted 17 lines · Jagan Teki
Quoted 16 lines · Kever Yang

rk3588 evb1 v10 is a evalution board from Rockchip, it is a dev board for rockchip and also a reference board for board vendors.

Hardware:
SoC: RK3588
DRAM: LPDDR4X 8GB
Debug: UART2 via USB
PCIe: 3x4 *1
SATA *2
HDMI out *2
HDMI IN *1
USB2.0 Host *2
USB3.0 Host *1
Type C *1
MIPI DSI panel

Quoted 4 lines
Quoted 1 line

rk3588-evb.dts is from Linux v6.2 with rename of rk3588-evb1-v10.dts

IMHO - do not rename Linux sync (It will break the Linux syncs, every time), Matching DTS from Linux make maintenance easy and easy to fix. If it is really needed then this change has to be in Linux.

I can understand your concern, keep everything the same seems easier.

As I have said for rk3568-evb, not like the boards from other board vendor which sales

to End customer, rockchip EVB is a reference board, many boards copy core part the the

evb schematic. Not all the boards will upstream, but still many boards can re-use the

EVB U-Boot to boot their boards.

Quoted 7 lines

For U-Boot, I would like to keep the same usage of evb like other rkxx-evb unless there have

conflict by more than one EVB.

When there is only one evb, and without modification by U-Boot, the
Linux sync won't be break.

I was aware of all these details, why cannot we use the same dts name and add it evb-rk3588_defconfig?

So, we have evb-rk3588_defconfig like other evb boards defconfig with rk3588-evb1-v10.dts

Jagan.