Hi Jacobe,
On 12/4/24 10:45 AM, Jacobe Zang wrote:
[You don't often get email from [email protected]. Learn why this is
important at https://aka.ms/LearnAboutSenderIdentification ]
Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
by Khadas.
There are tree variants depending on the DRAM size : 8G and 16G.
What's the third variant :)?
Specification:
Rockchip RK3588S SoC
4x ARM Cortex-A76, 4x ARM Cortex-A55
8/16GB memory LPDDR4x
Mali G610MP4 GPU
3x MIPI CSI 4x lanes
2x MIPI-DSI DPHY 4x lanes
32/64GB eMMC
1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
1x HDMI 2.1 output, 1x DP 1.4 output
USB PD over USB Type-C
Kernel commit:
04d552993522 ("arm64: dts: rockchip: Add Khadas edge2 board")
Signed-off-by: Jacobe Zang <[email protected]>
---
Add support for Khadas Edge2
---
Changes in v2:
- defconfig: Update defconfig made from upstream
How did you generate the defconfig?
I applied your patch and ran make khadas-edge2-rk3588s_defconfig
followed by make savedefconfig and they are different enough to make me
suspicious of how this defconfig was generated?
- Link to v1:
https://lore.kernel.org/r/[email protected]
---
arch/arm/mach-rockchip/rk3588/Kconfig | 23 ++++
board/khadas/khadas-edge2-rk3588s/Kconfig | 12 +++
board/khadas/khadas-edge2-rk3588s/MAINTAINERS | 6 ++
configs/khadas-edge2-rk3588s_defconfig | 146 ++++++++++++++++++++++++++
doc/board/rockchip/rockchip.rst | 1 +
include/configs/khadas-edge2-rk3588s.h | 15 +++
6 files changed, 203 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3588/Kconfig
b/arch/arm/mach-rockchip/rk3588/Kconfig
index b5a0e624a53..7d817e7f1bd 100644
--- a/arch/arm/mach-rockchip/rk3588/Kconfig
+++ b/arch/arm/mach-rockchip/rk3588/Kconfig
@@ -74,6 +74,28 @@ config TARGET_JAGUAR_RK3588
- fan controller (AMC6821 emulation)
* 80-pin Mezzanine connector
+config TARGET_KHADAS_EDGE2_RK3588
+ bool "Khadas Edge2 RK3588 board"
+ select BOARD_LATE_INIT
+ help
+ Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
+ by Khadas.
+
+ There are tree variants depending on the DRAM size : 8G and 16G.
+
If there's a third variant, please make it explicit as well here.
+ Specification:
+
+ Rockchip RK3588S SoC
+ 4x ARM Cortex-A76, 4x ARM Cortex-A55
+ 8/16GB memory LPDDR4x
+ Mali G610MP4 GPU
+ 3x MIPI CSI 4x lanes
+ 2x MIPI-DSI DPHY 4x lanes
+ 32/64GB eMMC
+ 1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
+ 1x HDMI 2.1 output, 1x DP 1.4 output
+ USB PD over USB Type-C
+
config TARGET_NANOPCT6_RK3588
bool "FriendlyElec NanoPC-T6 RK3588 board"
select BOARD_LATE_INIT
@@ -393,6 +415,7 @@ source "board/friendlyelec/nanopi-r6c-rk3588s/Kconfig"
source "board/friendlyelec/nanopi-r6s-rk3588s/Kconfig"
source "board/hardkernel/odroid_m2/Kconfig"
source "board/indiedroid/nova/Kconfig"
+source "board/khadas/khadas-edge2-rk3588s/Kconfig"
source "board/pine64/quartzpro64-rk3588/Kconfig"
source "board/turing/turing-rk1-rk3588/Kconfig"
source "board/radxa/rock5a-rk3588s/Kconfig"
diff --git a/board/khadas/khadas-edge2-rk3588s/Kconfig
b/board/khadas/khadas-edge2-rk3588s/Kconfig
new file mode 100644
index 00000000000..dd7b6cd8054
--- /dev/null
+++ b/board/khadas/khadas-edge2-rk3588s/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_KHADAS_EDGE2_RK3588
+
+config SYS_BOARD
+ default "khadas-edge2-rk3588s"
+
+config SYS_VENDOR
+ default "khadas"
+
+config SYS_CONFIG_NAME
+ default "khadas-edge2-rk3588s"
+
+endif
diff --git a/board/khadas/khadas-edge2-rk3588s/MAINTAINERS
b/board/khadas/khadas-edge2-rk3588s/MAINTAINERS
new file mode 100644
index 00000000000..3f16923b0f2
--- /dev/null
+++ b/board/khadas/khadas-edge2-rk3588s/MAINTAINERS
@@ -0,0 +1,6 @@
+KHADAS-EDGE2-RK3588S
+M: Jacobe Zang <[email protected]>
+S: Maintained
+F: configs/khadas-edge2-rk3588s_defconfig
+F: include/configs/khadas-edge2-rk3588s.h
+F: dts/upstream/src/arm64/rockchip/rk3588s-khadas-edge2.dts
\ No newline at end of file
diff --git a/configs/khadas-edge2-rk3588s_defconfig
b/configs/khadas-edge2-rk3588s_defconfig
new file mode 100644
index 00000000000..bc9e8f39ec5
--- /dev/null
+++ b/configs/khadas-edge2-rk3588s_defconfig
@@ -0,0 +1,146 @@
The board seems to have an SPI-NOR flash. If it can boot from it, you
probably want to enable
CONFIG_ROCKCHIP_SPI_IMAGE=y
to generate u-boot-rockchip-spi.bin?
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=24000000
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588s-khadas-edge2"
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x80000
+CONFIG_ROCKCHIP_RK3588=y
+CONFIG_SPL_SERIAL=y
+CONFIG_TARGET_KHADAS_EDGE2_RK3588=y
+CONFIG_DEBUG_UART_BASE=0xFEB50000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_SYS_LOAD_ADDR=0xc00800
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-khadas-edge2.dtb"
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+CONFIG_SPL_PAD_TO=0x7f8000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_MMC_WRITE=y
+CONFIG_SPL_MTD_SUPPORT=y
+CONFIG_SPL_ATF=y
+CONFIG_SYS_PROMPT="kedge2# "
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot\n"
+CONFIG_AUTOBOOT_STOP_STR=" "
+CONFIG_CMD_BOOTZ=y
Can one really use bootz for Aarch64 images?
Otherwise the rest of the defconfig looks pretty similar to the rock5b
defconfig so I guess this is fine.
I'm very surprised there's no -u-boot.dtsi file though. You may want to
check that everything that can be used in SPL/TPL makes it in the
respective DT (spl/u-boot-spl.dtb and tpl/u-boot-tpl.dtb). E.g. if you
want to be able to fallback to SPI-NOR for U-Boot proper when booting
from eMMC/SD card, you would need everything related to the SPI
controller the flash is routed to (as well as the pinmux, pinconf,
regulators, etc...) be present in the TPL/SPL DT. Nothing we cannot
improve in later commits though, so not necessarily a blocker.
Cheers,
Quentin