board: rockchip: add FriendlyElec NanoPC-T6 rk3588 board
Subsystems (3)
PATCH v3 1/1 board: rockchip: add FriendlyElec NanoPC-T6 rk3588 board
The NanoPC-T6 is a Rockchip RK3588 based SBC by FriendlyElec.
There are four variants depending on the DRAM size: 4G/32GB eMMC, 8G/64GB eMMC, 16G/16MB SPI NOR, and 16G/256GB eMMC/16MB SPI NOR
Specifications:
CPU: Rockchip RK3588, 4x Cortex-A76 (up to 2.4GHz)
+ 4x Cortex-A55 (up to 1.8GHz)
GPU: Mali-G610 MP4
VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder,
4K@60fps AV1 decoder, 8K@30fps H.264 and H.265 encoder
NPU: 6TOPs, supports INT4/INT8/INT16/FP16
RAM: 64-bit 4GB/8GB/16GB LPDDR4X at 2133MHz
eMMC: 0GB/32GB/64GB/256GB HS400
MicroSD Slot: MicroSD SDR104
PCIe 3.0: M.2 M-Key x1, PCIe 3.0 x4 for NVMe SSDs up to 2,500 MB/s
Ethernet: PCIe 2.5G 2x Ethernet (RTL8125BG)
PCIe 2.1: M.2 E-Key x1, PCIe 2.1 x1 and USB2.0 Host,
supports M.2 WiFi and Bluetooth
4G Module: MiniPCIe x1, MicroSIM Card Slot x1
Audio Out: 3.5mm jack for stereo headphone output
Audio In: 2.0mm PH-2A connector for analog microphone input Video Input: standard HDMI input port, up to 4Kp60
2x 4-lane MIPI-CSI, compatible with MIPI V1.2
Video Output: 2x standard HDMI output ports compatible with HDMI2.1,
HDMI2.0, and HDMI1.4
2x 4-lane MIPI-DSI, compatible with MIPI DPHY 2.0 or CPHY 1.1
USB-A: USB 3.0, Type A
USB-C: Full function USB Type‑C port, DP display up to 4Kp60, USB 3.0 40-pin 2.54mm header connector: up to 2x SPIs, 6x UARTs, 1x I2Cs,
8x PWMs, 2x I2Ss, 28x GPIOs
Debug UART: 3 Pin 2.54mm header, 3V level, 1500000bps Onboard IR receiver: 38KHz carrier frequency
RTC Battery: 2 Pin 1.27/1.25mm RTC battery connector for low power
RTC IC HYM8563TS
5V Fan connector
Working Temperature: 0C to 70C
Power: 5.5*2.1mm DC Jack, 12VDC input
Dimensions: 110x80x1.6mm (without case) / 86x114.5x30mm (with case)
Kernel commits:893c17716d0c ("arm64: dts: rockchip: Add NanoPC T6") a721e28dfad2 ("arm64: dts: rockchip: Add NanoPC T6 PCIe Ethernet support") ac76b786cc37 ("arm64: dts: rockchip: Add NanoPC T6 PCIe e-key support")
---
Changes in v3:
- The vendor device tree uses "FriendlyElec NanoPC-T6" therefore, use FriendlyElec over FriendlyARM.
- Bug: use IS_ENABLED(CONFIG_TARGET_NANOPCT6_RK3588) rather than CONFIG_IS_ENABLED(TARGET_NANOPCT6_RK3588)
Changes in v2:
- resync dt from:
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/plain/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts?h=for-next
- config changes:
-CONFIG_PCI_INIT_R=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
-CONFIG_REGULATOR_PWM=y
-# CONFIG_USB_XHCI_DWC3_OF_SIMPLE is not set
-CONFIG_SPL_USB_DWC3_GENERIC=y- added board files:
create mode 100644 board/friendlyarm/nanopct6-rk3588/Kconfig create mode 100644 board/friendlyarm/nanopct6-rk3588/MAINTAINERS create mode 100644 board/friendlyarm/nanopct6-rk3588/Makefile create mode 100644 board/friendlyarm/nanopct6-rk3588/nanopct6-rk3588.c create mode 100644 include/configs/nanopct6-rk3588.h
- improved BROM_LAST_BOOTSOURCE handling for SPI NOR:
if (CONFIG_IS_ENABLED(TARGET_NANOPCT6_RK3588) && bootdevice_brom_id == 4)
bootdevice_ofpath = boot_devices[BROM_BOOTSOURCE_SPINOR];
else
bootdevice_ofpath = boot_devices[bootdevice_brom_id];arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3588-nanopc-t6-u-boot.dtsi | 36 + arch/arm/dts/rk3588-nanopc-t6.dts | 916 ++++++++++++++++++ arch/arm/mach-rockchip/rk3588/Kconfig | 46 + arch/arm/mach-rockchip/spl.c | 8 +- board/friendlyelec/nanopc-t6-rk3588/Kconfig | 15 + .../friendlyelec/nanopc-t6-rk3588/MAINTAINERS | 9 + board/friendlyelec/nanopc-t6-rk3588/Makefile | 6 + .../nanopc-t6-rk3588/nanopc-t6-rk3588.c | 39 + configs/nanopc-t6-rk3588_defconfig | 109 +++ doc/board/rockchip/rockchip.rst | 1 + include/configs/nanopc-t6-rk3588.h | 15 + 12 files changed, 1199 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/rk3588-nanopc-t6-u-boot.dtsi create mode 100644 arch/arm/dts/rk3588-nanopc-t6.dts create mode 100644 board/friendlyelec/nanopc-t6-rk3588/Kconfig create mode 100644 board/friendlyelec/nanopc-t6-rk3588/MAINTAINERS create mode 100644 board/friendlyelec/nanopc-t6-rk3588/Makefile create mode 100644 board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c create mode 100644 configs/nanopc-t6-rk3588_defconfig create mode 100644 include/configs/nanopc-t6-rk3588.h
arch/arm/dts/Makefile +1 -0
@@ -189,6 +189,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \ rk3588-edgeble-neu6a-io.dtb \ rk3588-edgeble-neu6b-io.dtb \ rk3588-evb1-v10.dtb \ + rk3588-nanopc-t6.dtb \ rk3588s-rock-5a.dtb \ rk3588-rock-5b.dtb
arch/arm/dts/rk3588-nanopc-t6-u-boot.dtsi new file +36 -0
@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 John Clark <[email protected]> + * + */ + +#include "rk3588-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci; + }; +}; + +&fspim1_pins { + bootph-all; +}; + +&sfc { + bootph-pre-ram; + u-boot,spl-sfc-no-dma; + pinctrl-names = "default"; + pinctrl-0 = <&fspim1_pins>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash@0 { + bootph-pre-ram; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <1>; + }; +};
arch/arm/dts/rk3588-nanopc-t6.dts new file +916 -0
916 lines not on this page · raw message
arch/arm/mach-rockchip/rk3588/Kconfig +46 -0
58 lines not on this page · raw message
arch/arm/mach-rockchip/spl.c +6 -2
@@ -35,8 +35,12 @@ const char *board_spl_was_booted_from(void)u32 bootdevice_brom_id =readl (BROM_BOOTSOURCE_ID_ADDR );const char *bootdevice_ofpath =NULL ; -if (bootdevice_brom_id <ARRAY_SIZE (boot_devices)) - bootdevice_ofpath = boot_devices[bootdevice_brom_id]; +if (bootdevice_brom_id <ARRAY_SIZE (boot_devices)) { +if (IS_ENABLED (CONFIG_TARGET_NANOPCT6_RK3588 ) && bootdevice_brom_id ==4 ) + bootdevice_ofpath = boot_devices[BROM_BOOTSOURCE_SPINOR ]; +else + bootdevice_ofpath = boot_devices[bootdevice_brom_id]; + }if (bootdevice_ofpath) debug("%s: brom_bootdevice_id %x maps to '%s'\n",
board/friendlyelec/nanopc-t6-rk3588/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_NANOPCT6_RK3588 + +config SYS_BOARD + default "nanopc-t6-rk3588" + +config SYS_VENDOR + default "friendlyelec" + +config SYS_CONFIG_NAME + default "nanopc-t6-rk3588" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/friendlyelec/nanopc-t6-rk3588/MAINTAINERS new file +9 -0
@@ -0,0 +1,9 @@ +NANOPCT6-RK3588 +M: John Clark <[email protected]> +R: Jonas Karlman <[email protected]> +S: Maintained +F: board/friendlyelec/nanopc-t6-rk3588 +F: include/configs/nanopc-t6-rk3588.h +F: configs/nanopc-t6-rk3588_defconfig +F: arch/arm/dts/rk3588-nanopc-t6.dts +F: arch/arm/dts/rk3588-nanopc-t6-u-boot.dtsi
board/friendlyelec/nanopc-t6-rk3588/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2023 Rockchip Electronics Co,. Ltd. +# + +obj-y += nanopc-t6-rk3588.o
board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c new file +39 -0
@@ -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 +int nanopc_t6_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 nanopc_t6_add_reserved_memory_fdt_nodes (blob); +} +#endif
configs/nanopc-t6-rk3588_defconfig new file +109 -0
109 lines not on this page · raw message
doc/board/rockchip/rockchip.rst +1 -0
@@ -112,6 +112,7 @@ List of mainline supported Rockchip boards: - Rockchip EVB (evb-rk3588) - Edgeble Neural Compute Module 6A SoM - Neu6a (neu6a-io-rk3588) - Edgeble Neural Compute Module 6B SoM - Neu6b (neu6b-io-rk3588) + - FriendlyElec NanoPC-T6 (nanopc-t6-rk3588) - Radxa ROCK 5A (rock5a-rk3588s) - Radxa ROCK 5B (rock5b-rk3588)
include/configs/nanopc-t6-rk3588.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2023 Rockchip Electronics Co., Ltd. +*/ + +#ifndef __NANOPCT6_RK3588_H +#define __NANOPCT6_RK3588_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3588_common.h> + +#endif /* __NANOPCT6_RK3588_H */
Signature · 1 line
2.42.0