]> Git Repo - J-u-boot.git/commitdiff
board: rockchip: Add a common ROCK Pi 4 target
authorJonas Karlman <[email protected]>
Tue, 12 Mar 2024 23:36:14 +0000 (23:36 +0000)
committerKever Yang <[email protected]>
Thu, 14 Mar 2024 10:19:27 +0000 (18:19 +0800)
Move ROCK Pi 4 specific board code from the shared evb_rk3399 target
into its own board target and update related defconfigs to use the new
TARGET_ROCKPI4_RK3399 option.

Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Christopher Obbard <[email protected]>
Reviewed-by: Peter Robinson <[email protected]>
14 files changed:
arch/arm/mach-rockchip/rk3399/Kconfig
board/radxa/rockpi4-rk3399/Kconfig [new file with mode: 0644]
board/radxa/rockpi4-rk3399/MAINTAINERS [new file with mode: 0644]
board/radxa/rockpi4-rk3399/Makefile [new file with mode: 0644]
board/radxa/rockpi4-rk3399/rockpi4-rk3399.c [new file with mode: 0644]
board/rockchip/evb_rk3399/MAINTAINERS
board/rockchip/evb_rk3399/Makefile [deleted file]
board/rockchip/evb_rk3399/evb-rk3399.c [deleted file]
configs/rock-4c-plus-rk3399_defconfig
configs/rock-4se-rk3399_defconfig
configs/rock-pi-4-rk3399_defconfig
configs/rock-pi-4c-rk3399_defconfig
include/configs/rk3399_common.h
include/configs/rockpi4-rk3399.h [new file with mode: 0644]

index 38904291dfa640fcdec25232ae07899e22127fcd..04a84e2f6a04db4b9051bf58554488565e9a3c54 100644 (file)
@@ -89,6 +89,11 @@ config TARGET_ROCK960_RK3399
           * 2x USB 3.0 type A, 2x USB 2.0 type A (host mode only),
             1x USB 3.0 type C OTG
 
+config TARGET_ROCKPI4_RK3399
+       bool "Radxa ROCK Pi 4 board"
+       help
+         Support for ROCK Pi 4 board family by Radxa.
+
 config TARGET_ROCKPRO64_RK3399
        bool "Pine64 Rockpro64 board"
        help
@@ -177,6 +182,7 @@ source "board/google/gru/Kconfig"
 source "board/pine64/pinebook-pro-rk3399/Kconfig"
 source "board/pine64/pinephone-pro-rk3399/Kconfig"
 source "board/pine64/rockpro64_rk3399/Kconfig"
+source "board/radxa/rockpi4-rk3399/Kconfig"
 source "board/rockchip/evb_rk3399/Kconfig"
 source "board/theobroma-systems/puma_rk3399/Kconfig"
 source "board/vamrs/rock960_rk3399/Kconfig"
diff --git a/board/radxa/rockpi4-rk3399/Kconfig b/board/radxa/rockpi4-rk3399/Kconfig
new file mode 100644 (file)
index 0000000..d826635
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_ROCKPI4_RK3399
+
+config SYS_BOARD
+       default "rockpi4-rk3399"
+
+config SYS_VENDOR
+       default "radxa"
+
+config SYS_CONFIG_NAME
+       default "rockpi4-rk3399"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+       def_bool y
+
+endif
diff --git a/board/radxa/rockpi4-rk3399/MAINTAINERS b/board/radxa/rockpi4-rk3399/MAINTAINERS
new file mode 100644 (file)
index 0000000..da5273f
--- /dev/null
@@ -0,0 +1,22 @@
+ROCK-PI-4
+M:     Jagan Teki <[email protected]>
+R:     Jonas Karlman <[email protected]>
+S:     Maintained
+F:     board/radxa/rockpi4-rk3399/
+F:     configs/rock-pi-4-rk3399_defconfig
+F:     configs/rock-pi-4c-rk3399_defconfig
+F:     arch/arm/dts/rk3399-rock-pi-4*
+
+ROCK-4C+
+M:     FUKAUMI Naoki <[email protected]>
+R:     Jonas Karlman <[email protected]>
+S:     Maintained
+F:     configs/rock-4c-plus-rk3399_defconfig
+F:     arch/arm/dts/rk3399-rock-4c-plus*
+
+ROCK-4SE
+M:     Christopher Obbard <[email protected]>
+R:     Jonas Karlman <[email protected]>
+S:     Maintained
+F:     configs/rock-4se-rk3399_defconfig
+F:     arch/arm/dts/rk3399-rock-4se*
diff --git a/board/radxa/rockpi4-rk3399/Makefile b/board/radxa/rockpi4-rk3399/Makefile
new file mode 100644 (file)
index 0000000..3d02253
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2016 Rockchip Electronics Co., Ltd
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  += rockpi4-rk3399.o
diff --git a/board/radxa/rockpi4-rk3399/rockpi4-rk3399.c b/board/radxa/rockpi4-rk3399/rockpi4-rk3399.c
new file mode 100644 (file)
index 0000000..a533128
--- /dev/null
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ */
+
+#include <dm.h>
+#include <efi_loader.h>
+
+#define ROCKPI4_UPDATABLE_IMAGES       2
+
+#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
+static struct efi_fw_image fw_images[ROCKPI4_UPDATABLE_IMAGES] = {0};
+
+struct efi_capsule_update_info update_info = {
+       .num_images = ROCKPI4_UPDATABLE_IMAGES,
+       .images = fw_images,
+};
+
+#endif
+
+#ifndef CONFIG_SPL_BUILD
+#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION)
+static bool board_is_rockpi_4b(void)
+{
+       return of_machine_is_compatible("radxa,rockpi4b");
+}
+
+static bool board_is_rockpi_4c(void)
+{
+       return of_machine_is_compatible("radxa,rockpi4c");
+}
+
+void rockchip_capsule_update_board_setup(void)
+{
+       if (board_is_rockpi_4b()) {
+               efi_guid_t idbldr_image_type_guid =
+                       ROCKPI_4B_IDBLOADER_IMAGE_GUID;
+               efi_guid_t uboot_image_type_guid = ROCKPI_4B_UBOOT_IMAGE_GUID;
+
+               guidcpy(&fw_images[0].image_type_id, &idbldr_image_type_guid);
+               guidcpy(&fw_images[1].image_type_id, &uboot_image_type_guid);
+
+               fw_images[0].fw_name = u"ROCKPI4B-IDBLOADER";
+               fw_images[1].fw_name = u"ROCKPI4B-UBOOT";
+       } else if (board_is_rockpi_4c()) {
+               efi_guid_t idbldr_image_type_guid =
+                       ROCKPI_4C_IDBLOADER_IMAGE_GUID;
+               efi_guid_t uboot_image_type_guid = ROCKPI_4C_UBOOT_IMAGE_GUID;
+
+               guidcpy(&fw_images[0].image_type_id, &idbldr_image_type_guid);
+               guidcpy(&fw_images[1].image_type_id, &uboot_image_type_guid);
+
+               fw_images[0].fw_name = u"ROCKPI4C-IDBLOADER";
+               fw_images[1].fw_name = u"ROCKPI4C-UBOOT";
+       }
+}
+#endif /* CONFIG_EFI_HAVE_CAPSULE_SUPPORT && CONFIG_EFI_PARTITION */
+#endif /* !CONFIG_SPL_BUILD */
index 7815ea9ff07e848d25dc18a1b6969708c049efc9..8dab3fa70f565480b44711b57d6fb2f9fe49f93d 100644 (file)
@@ -84,28 +84,6 @@ S:   Maintained
 F:     configs/orangepi-rk3399_defconfig
 F:     arch/arm/dts/rk3399-orangepi*
 
-ROCK-4C+
-M:     FUKAUMI Naoki <[email protected]>
-R:     Jonas Karlman <[email protected]>
-S:     Maintained
-F:     configs/rock-4c-plus-rk3399_defconfig
-F:     arch/arm/dts/rk3399-rock-4c-plus*
-
-ROCK-4SE
-M:     Christopher Obbard <[email protected]>
-R:     Jonas Karlman <[email protected]>
-S:     Maintained
-F:     configs/rock-4se-rk3399_defconfig
-F:     arch/arm/dts/rk3399-rock-4se*
-
-ROCK-PI-4
-M:     Jagan Teki <[email protected]>
-R:     Jonas Karlman <[email protected]>
-S:     Maintained
-F:     configs/rock-pi-4-rk3399_defconfig
-F:     configs/rock-pi-4c-rk3399_defconfig
-F:     arch/arm/dts/rk3399-rock-pi-4*
-
 ROCK-PI-N10
 M:     Jagan Teki <[email protected]>
 S:     Maintained
diff --git a/board/rockchip/evb_rk3399/Makefile b/board/rockchip/evb_rk3399/Makefile
deleted file mode 100644 (file)
index aaa51c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# (C) Copyright 2016 Rockchip Electronics Co., Ltd
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  += evb-rk3399.o
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
deleted file mode 100644 (file)
index ebdd74a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-#include <common.h>
-#include <dm.h>
-#include <efi_loader.h>
-#include <init.h>
-#include <log.h>
-#include <asm/arch-rockchip/periph.h>
-#include <linux/kernel.h>
-
-#define ROCKPI4_UPDATABLE_IMAGES       2
-
-#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
-static struct efi_fw_image fw_images[ROCKPI4_UPDATABLE_IMAGES] = {0};
-
-struct efi_capsule_update_info update_info = {
-       .num_images = ROCKPI4_UPDATABLE_IMAGES,
-       .images = fw_images,
-};
-
-#endif
-
-#ifndef CONFIG_SPL_BUILD
-#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION)
-static bool board_is_rockpi_4b(void)
-{
-       return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) &&
-               of_machine_is_compatible("radxa,rockpi4b");
-}
-
-static bool board_is_rockpi_4c(void)
-{
-       return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) &&
-               of_machine_is_compatible("radxa,rockpi4c");
-}
-
-void rockchip_capsule_update_board_setup(void)
-{
-       if (board_is_rockpi_4b()) {
-               efi_guid_t idbldr_image_type_guid =
-                       ROCKPI_4B_IDBLOADER_IMAGE_GUID;
-               efi_guid_t uboot_image_type_guid = ROCKPI_4B_UBOOT_IMAGE_GUID;
-
-               guidcpy(&fw_images[0].image_type_id, &idbldr_image_type_guid);
-               guidcpy(&fw_images[1].image_type_id, &uboot_image_type_guid);
-
-               fw_images[0].fw_name = u"ROCKPI4B-IDBLOADER";
-               fw_images[1].fw_name = u"ROCKPI4B-UBOOT";
-       } else if (board_is_rockpi_4c()) {
-               efi_guid_t idbldr_image_type_guid =
-                       ROCKPI_4C_IDBLOADER_IMAGE_GUID;
-               efi_guid_t uboot_image_type_guid = ROCKPI_4C_UBOOT_IMAGE_GUID;
-
-               guidcpy(&fw_images[0].image_type_id, &idbldr_image_type_guid);
-               guidcpy(&fw_images[1].image_type_id, &uboot_image_type_guid);
-
-               fw_images[0].fw_name = u"ROCKPI4C-IDBLOADER";
-               fw_images[1].fw_name = u"ROCKPI4C-UBOOT";
-       }
-}
-#endif /* CONFIG_EFI_HAVE_CAPSULE_SUPPORT && CONFIG_EFI_PARTITION */
-#endif /* !CONFIG_SPL_BUILD */
index 1652da5b6ca611bd2a324071571789b705ebe145..bebea4fd06913c6f012974498e62032555deafcd 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4c-plus"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
-CONFIG_TARGET_EVB_RK3399=y
+CONFIG_TARGET_ROCKPI4_RK3399=y
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0x800800
index e51a074a2972beb8a3cea27a5ab1f9e9416941fc..712502517eb265e35d5f40d28f04d638ff842f67 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4se"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
-CONFIG_TARGET_EVB_RK3399=y
+CONFIG_TARGET_ROCKPI4_RK3399=y
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0x800800
index 6dc60759005061b7299b3447aeceee42218d5ed2..bca44beca12ff99b1dd3bde94f9568ea8711106c 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4a"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
-CONFIG_TARGET_EVB_RK3399=y
+CONFIG_TARGET_ROCKPI4_RK3399=y
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0x800800
index 5c71f0bd9e8e55ecca5ea198ac78fa858fcdd9e3..e1adec6001743c5f16329e5e454308c8aa17702a 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4c"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
-CONFIG_TARGET_EVB_RK3399=y
+CONFIG_TARGET_ROCKPI4_RK3399=y
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0x800800
index 96ba19c659bdc109b15e56928dc30d8e1c9f103d..4e75771055b89a8c8f35449a022dea8371595682 100644 (file)
 #define CFG_SYS_SDRAM_BASE             0
 #define SDRAM_MAX_SIZE                 0xf8000000
 
-#define ROCKPI_4B_IDBLOADER_IMAGE_GUID \
-       EFI_GUID(0x02f4d760, 0xcfd5, 0x43bd, 0x8e, 0x2d, \
-                0xa4, 0x2a, 0xcb, 0x33, 0xc6, 0x60)
-
-#define ROCKPI_4B_UBOOT_IMAGE_GUID \
-       EFI_GUID(0x4ce292da, 0x1dd8, 0x428d, 0xa1, 0xc2, \
-                0x77, 0x74, 0x3e, 0xf8, 0xb9, 0x6e)
-
-#define ROCKPI_4C_IDBLOADER_IMAGE_GUID \
-       EFI_GUID(0xfd68510c, 0x12d3, 0x4f0a, 0xb8, 0xd3, \
-                0xd8, 0x79, 0xe1, 0xd3, 0xa5, 0x40)
-
-#define ROCKPI_4C_UBOOT_IMAGE_GUID \
-       EFI_GUID(0xb81fb4ae, 0xe4f3, 0x471b, 0x99, 0xb4, \
-                0x0b, 0x3d, 0xa5, 0x49, 0xce, 0x13)
-
 #ifndef CONFIG_SPL_BUILD
 
 #define ENV_MEM_LAYOUT_SETTINGS \
diff --git a/include/configs/rockpi4-rk3399.h b/include/configs/rockpi4-rk3399.h
new file mode 100644 (file)
index 0000000..1936e06
--- /dev/null
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ */
+
+#ifndef __ROCKPI4_RK3399_H
+#define __ROCKPI4_RK3399_H
+
+#define ROCKPI_4B_IDBLOADER_IMAGE_GUID \
+       EFI_GUID(0x02f4d760, 0xcfd5, 0x43bd, 0x8e, 0x2d, \
+                0xa4, 0x2a, 0xcb, 0x33, 0xc6, 0x60)
+
+#define ROCKPI_4B_UBOOT_IMAGE_GUID \
+       EFI_GUID(0x4ce292da, 0x1dd8, 0x428d, 0xa1, 0xc2, \
+                0x77, 0x74, 0x3e, 0xf8, 0xb9, 0x6e)
+
+#define ROCKPI_4C_IDBLOADER_IMAGE_GUID \
+       EFI_GUID(0xfd68510c, 0x12d3, 0x4f0a, 0xb8, 0xd3, \
+                0xd8, 0x79, 0xe1, 0xd3, 0xa5, 0x40)
+
+#define ROCKPI_4C_UBOOT_IMAGE_GUID \
+       EFI_GUID(0xb81fb4ae, 0xe4f3, 0x471b, 0x99, 0xb4, \
+                0x0b, 0x3d, 0xa5, 0x49, 0xce, 0x13)
+
+#define ROCKCHIP_DEVICE_SETTINGS \
+               "stdin=serial,usbkbd\0" \
+               "stdout=serial,vidconsole\0" \
+               "stderr=serial,vidconsole\0"
+
+#include <configs/rk3399_common.h>
+
+#endif
This page took 0.056314 seconds and 4 git commands to generate.