Skip to content

Commit 17306b4

Browse files
committed
NanoPC-T6 LTS Plus: add U-Boot ADC detection
Patch mainline U-Boot to detect the NanoPC-T6 LTS Plus variant via ADC channel 5 (value ~3076, range 2986-3166) and automatically set the correct device tree. Remove the no-op override that disabled auto-detection since U-Boot can now handle all three variants.
1 parent fc3407c commit 17306b4

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

config/boards/nanopct6-lts-plus.conf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ KERNEL_TARGET="current,edge,vendor"
1010
KERNEL_TEST_TARGET="vendor,current"
1111
declare -g GRUB_FDT_FILE="${BOOT_FDT_FILE}" # u-boot autodetects, but grub needs to know; store it here so we can unset later
1212

13-
# Override: u-boot can't auto-detect the LTS Plus variant, so keep BOOT_FDT_FILE set
14-
function post_family_config__t6_and_t6_lts_auto_dtb_name_via_uboot_detection() {
15-
:
16-
}
13+
# u-boot auto-detects via ADC channel 5 (patched to include LTS Plus)
14+
# No need to override the parent's auto-detection function
15+
16+
# Override parent's audio naming to prevent it from running (LTS Plus has es8389, not rt5616)
17+
function post_family_tweaks__nanopct6_naming_audios() { :; }
1718

1819
function post_family_tweaks__nanopct6_lts_plus_naming_audios() {
1920
display_alert "$BOARD" "Renaming nanopct6-lts-plus audio" "info"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
From: Igor Pecovnik <igor@armbian.com>
2+
Subject: [PATCH] board: friendlyelec: add NanoPC-T6 LTS Plus detection
3+
4+
Add NanoPC-T6 LTS Plus variant to the ADC-based board detection table.
5+
The LTS Plus reads ~3076 on ADC channel 5, compared to T6 (348-528)
6+
and T6 LTS (1957-2137).
7+
8+
Signed-off-by: Igor Pecovnik <igor@armbian.com>
9+
---
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
15+
--- a/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c
16+
+++ b/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c
17+
@@ -16,6 +16,7 @@ struct board_model {
18+
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" },
22+
};
23+
24+
static const struct board_model *get_board_model(void)

0 commit comments

Comments
 (0)