Skip to content

Commit 4470542

Browse files
committed
NanoPC-T6 LTS Plus: add U-Boot device tree and defconfig patch
Add upstream DTS, u-boot dtsi, and patch OF_LIST in defconfig to include the LTS Plus device tree in the FIT image.
1 parent 5b07b17 commit 4470542

4 files changed

Lines changed: 102 additions & 12 deletions

File tree

config/boards/nanopct6-lts-plus.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ declare -g GRUB_FDT_FILE="${BOOT_FDT_FILE}" # u-boot autodetects, but grub needs
1313
# u-boot auto-detects via ADC channel 5 (patched to include LTS Plus)
1414
# No need to override the parent's auto-detection function
1515

16+
# Add LTS Plus device tree to OF_LIST so it's included in the FIT image
17+
function post_config_uboot_target__nanopct6_lts_plus_of_list() {
18+
[[ "${BRANCH}" == "vendor" ]] && return 0
19+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: add LTS Plus to OF_LIST" "info"
20+
sed -i 's/CONFIG_OF_LIST=.*/CONFIG_OF_LIST="rockchip\/rk3588-nanopc-t6 rockchip\/rk3588-nanopc-t6-lts rockchip\/rk3588-nanopc-t6-lts-plus"/' .config
21+
}
22+
1623
# Override parent's audio naming to prevent it from running (LTS Plus has es8389, not rt5616)
1724
function post_family_tweaks__nanopct6_naming_audios() { :; }
1825

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,42 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
12
From: Igor Pecovnik <igor@armbian.com>
2-
Subject: [PATCH] board: friendlyelec: add NanoPC-T6 LTS Plus detection
3+
Date: Sun, 06 Apr 2026 12:00:00 +0200
4+
Subject: board: friendlyelec: add NanoPC-T6 LTS Plus support
35

46
Add NanoPC-T6 LTS Plus variant to the ADC-based board detection table.
57
The LTS Plus reads ~3076 on ADC channel 5, compared to T6 (348-528)
6-
and T6 LTS (1957-2137).
8+
and T6 LTS (1957-2137). Set board_name so the correct model is
9+
displayed during boot.
710

811
Signed-off-by: Igor Pecovnik <igor@armbian.com>
912
---
10-
board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c | 1 +
11-
1 file changed, 1 insertion(+)
12-
13-
diff --git a/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c b/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c
14-
index abcdef1..1234567 100644
1513
--- a/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c
1614
+++ b/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c
17-
@@ -16,6 +16,7 @@ struct board_model {
15+
@@ -11,11 +11,13 @@
16+
unsigned int low;
17+
unsigned int high;
18+
const char *fdtfile;
19+
+ const char *board_name;
20+
};
21+
1822
static const struct board_model board_models[] = {
19-
{ 348, 528, "rockchip/rk3588-nanopc-t6.dtb" },
20-
{ 1957, 2137, "rockchip/rk3588-nanopc-t6-lts.dtb" },
21-
+ { 2986, 3166, "rockchip/rk3588-nanopc-t6-lts-plus.dtb" },
23+
- { 348, 528, "rockchip/rk3588-nanopc-t6.dtb" },
24+
- { 1957, 2137, "rockchip/rk3588-nanopc-t6-lts.dtb" },
25+
+ { 348, 528, "rockchip/rk3588-nanopc-t6.dtb", "NanoPC-T6" },
26+
+ { 1957, 2137, "rockchip/rk3588-nanopc-t6-lts.dtb", "NanoPC-T6 LTS" },
27+
+ { 2986, 3166, "rockchip/rk3588-nanopc-t6-lts-plus.dtb", "NanoPC-T6 LTS Plus" },
2228
};
23-
29+
2430
static const struct board_model *get_board_model(void)
31+
@@ -42,8 +44,10 @@
32+
{
33+
const struct board_model *model = get_board_model();
34+
35+
- if (model)
36+
+ if (model) {
37+
env_set("fdtfile", model->fdtfile);
38+
+ env_set("board_name", model->board_name);
39+
+ }
40+
41+
return 0;
42+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
3+
#include "rk3588-nanopc-t6-u-boot.dtsi"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4+
* Copyright (c) 2023 Thomas McKahan
5+
* Copyright (c) 2024 Linaro Ltd.
6+
* Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd.
7+
* Copyright (c) 2025 Armbian <igor@armbian.com>
8+
*
9+
*/
10+
11+
/dts-v1/;
12+
13+
#include "rk3588-nanopc-t6.dtsi"
14+
15+
/ {
16+
model = "FriendlyElec NanoPC-T6 LTS Plus";
17+
compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588";
18+
19+
/* provide power for on-board USB 2.0 hub */
20+
vcc5v0_usb20_host: regulator-vcc5v0-usb20-host {
21+
compatible = "regulator-fixed";
22+
enable-active-high;
23+
gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
24+
pinctrl-0 = <&usb20_host_pwren>;
25+
pinctrl-names = "default";
26+
regulator-always-on;
27+
regulator-boot-on;
28+
regulator-max-microvolt = <5000000>;
29+
regulator-min-microvolt = <5000000>;
30+
regulator-name = "vcc5v0_usb20_host";
31+
vin-supply = <&vcc5v0_sys>;
32+
};
33+
};
34+
35+
&pinctrl {
36+
usb {
37+
usb20_host_pwren: usb20-host-pwren {
38+
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
39+
};
40+
};
41+
};
42+
43+
&u2phy1 {
44+
status = "okay";
45+
};
46+
47+
&u2phy1_otg {
48+
status = "okay";
49+
};
50+
51+
&u2phy3_host {
52+
phy-supply = <&vcc5v0_usb20_host>;
53+
};
54+
55+
&usbdp_phy1 {
56+
status = "okay";
57+
};
58+
59+
&usb_host1_xhci {
60+
dr_mode = "host";
61+
status = "okay";
62+
};

0 commit comments

Comments
 (0)