-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add NanoPC-T6 LTS Plus board support #9617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
igorpecovnik
wants to merge
3
commits into
main
Choose a base branch
from
nanopct6ltsplus
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Rockchip RK3588 octa core 8-32GB RAM SoC 32-256GB eMMC USB3 USB2 2x 2.5GbE | ||
| source "${SRC}/config/boards/nanopct6.conf" | ||
| BOARD_NAME="NanoPC T6 LTS Plus" | ||
| BOARD_VENDOR="friendlyelec" | ||
| # Important: despite sourcing the nanopct6 file above, this file still has to contain some variables, due the way Armbian's JSON matrix generator works. | ||
| BOARDFAMILY="rockchip-rk3588" | ||
| BOARD_MAINTAINER="igorpecovnik" | ||
| BOOT_FDT_FILE="rockchip/rk3588-nanopc-t6-lts-plus.dtb" | ||
| KERNEL_TARGET="current,edge,vendor" | ||
| KERNEL_TEST_TARGET="vendor,current" | ||
| declare -g GRUB_FDT_FILE="${BOOT_FDT_FILE}" # u-boot autodetects, but grub needs to know; store it here so we can unset later | ||
|
|
||
| # u-boot auto-detects via ADC channel 5 (patched to include LTS Plus) | ||
| # No need to override the parent's auto-detection function | ||
|
|
||
| # Add LTS Plus device tree to OF_LIST so it's included in the FIT image | ||
| function post_config_uboot_target__nanopct6_lts_plus_of_list() { | ||
| [[ "${BRANCH}" == "vendor" ]] && return 0 | ||
| display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: add LTS Plus to OF_LIST" "info" | ||
| 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 | ||
| } | ||
|
|
||
| # Override parent's audio naming to prevent it from running (LTS Plus has es8389, not rt5616) | ||
| function post_family_tweaks__nanopct6_naming_audios() { :; } | ||
|
|
||
| function post_family_tweaks__nanopct6_lts_plus_naming_audios() { | ||
| display_alert "$BOARD" "Renaming nanopct6-lts-plus audio" "info" | ||
|
|
||
| mkdir -p $SDCARD/etc/udev/rules.d/ | ||
| echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules | ||
| echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi1-sound", ENV{SOUND_DESCRIPTION}="HDMI1 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules | ||
| echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmiin-sound", ENV{SOUND_DESCRIPTION}="HDMI-In Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules | ||
| echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules | ||
| echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-es8389-sound", ENV{SOUND_DESCRIPTION}="ES8389 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules | ||
|
|
||
| return 0 | ||
| } | ||
93 changes: 93 additions & 0 deletions
93
patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
| /* | ||
| * Copyright (c) 2021 Rockchip Electronics Co., Ltd. | ||
| * Copyright (c) 2023 Thomas McKahan | ||
| * Copyright (c) 2024 Linaro Ltd. | ||
| * Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd. | ||
| * Copyright (c) 2025 Armbian <igor@armbian.com> | ||
| * | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include "rk3588-nanopc-t6.dtsi" | ||
|
|
||
| /delete-node/ &rt5616; | ||
|
|
||
| / { | ||
| model = "FriendlyElec NanoPC-T6 LTS Plus"; | ||
| compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588"; | ||
|
|
||
| /delete-node/ sound; | ||
|
|
||
| sound { | ||
| compatible = "simple-audio-card"; | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&hp_det>; | ||
|
|
||
| simple-audio-card,name = "everest,es8389-codec"; | ||
| simple-audio-card,format = "i2s"; | ||
| simple-audio-card,mclk-fs = <256>; | ||
|
|
||
| simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>; | ||
|
|
||
| simple-audio-card,widgets = | ||
| "Headphone", "Headphones", | ||
| "Microphone", "Microphone Jack"; | ||
| simple-audio-card,routing = | ||
| "Headphones", "HPOL", | ||
| "Headphones", "HPOR", | ||
| "INPUT1", "Microphone Jack", | ||
| "INPUT2", "Microphone Jack"; | ||
|
|
||
| simple-audio-card,cpu { | ||
| sound-dai = <&i2s0_8ch>; | ||
| }; | ||
| simple-audio-card,codec { | ||
| sound-dai = <&es8389>; | ||
| }; | ||
| }; | ||
|
|
||
| /* provide power for on-board USB 2.0 hub */ | ||
| vcc5v0_usb20_host: regulator-vcc5v0-usb20-host { | ||
| compatible = "regulator-fixed"; | ||
| enable-active-high; | ||
| gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; | ||
| pinctrl-0 = <&usb20_host_pwren>; | ||
| pinctrl-names = "default"; | ||
| regulator-always-on; | ||
| regulator-boot-on; | ||
| regulator-max-microvolt = <5000000>; | ||
| regulator-min-microvolt = <5000000>; | ||
| regulator-name = "vcc5v0_usb20_host"; | ||
| vin-supply = <&vcc5v0_sys>; | ||
| }; | ||
| }; | ||
|
|
||
| &i2c7 { | ||
| es8389: audio-codec@10 { | ||
| compatible = "everest,es8389"; | ||
| reg = <0x10>; | ||
| assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; | ||
| assigned-clock-rates = <12288000>; | ||
| clocks = <&cru I2S0_8CH_MCLKOUT>; | ||
| clock-names = "mclk"; | ||
| #sound-dai-cells = <0>; | ||
| }; | ||
| }; | ||
SuperKali marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| &i2s0_8ch { | ||
| /delete-node/ port; | ||
| }; | ||
|
|
||
| &pinctrl { | ||
| usb { | ||
| usb20_host_pwren: usb20-host-pwren { | ||
| rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &u2phy3_host { | ||
| phy-supply = <&vcc5v0_usb20_host>; | ||
| }; | ||
93 changes: 93 additions & 0 deletions
93
patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
| /* | ||
| * Copyright (c) 2021 Rockchip Electronics Co., Ltd. | ||
| * Copyright (c) 2023 Thomas McKahan | ||
| * Copyright (c) 2024 Linaro Ltd. | ||
| * Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd. | ||
| * Copyright (c) 2025 Armbian <igor@armbian.com> | ||
| * | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include "rk3588-nanopc-t6.dtsi" | ||
|
|
||
| /delete-node/ &rt5616; | ||
|
|
||
| / { | ||
| model = "FriendlyElec NanoPC-T6 LTS Plus"; | ||
| compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588"; | ||
|
|
||
| /delete-node/ sound; | ||
|
|
||
| sound { | ||
| compatible = "simple-audio-card"; | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&hp_det>; | ||
|
|
||
| simple-audio-card,name = "everest,es8389-codec"; | ||
| simple-audio-card,format = "i2s"; | ||
| simple-audio-card,mclk-fs = <256>; | ||
|
|
||
| simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>; | ||
|
|
||
| simple-audio-card,widgets = | ||
| "Headphone", "Headphones", | ||
| "Microphone", "Microphone Jack"; | ||
| simple-audio-card,routing = | ||
| "Headphones", "HPOL", | ||
| "Headphones", "HPOR", | ||
| "INPUT1", "Microphone Jack", | ||
| "INPUT2", "Microphone Jack"; | ||
|
|
||
| simple-audio-card,cpu { | ||
| sound-dai = <&i2s0_8ch>; | ||
| }; | ||
| simple-audio-card,codec { | ||
| sound-dai = <&es8389>; | ||
| }; | ||
| }; | ||
|
|
||
| /* provide power for on-board USB 2.0 hub */ | ||
| vcc5v0_usb20_host: regulator-vcc5v0-usb20-host { | ||
| compatible = "regulator-fixed"; | ||
| enable-active-high; | ||
| gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; | ||
| pinctrl-0 = <&usb20_host_pwren>; | ||
| pinctrl-names = "default"; | ||
| regulator-always-on; | ||
| regulator-boot-on; | ||
| regulator-max-microvolt = <5000000>; | ||
| regulator-min-microvolt = <5000000>; | ||
| regulator-name = "vcc5v0_usb20_host"; | ||
| vin-supply = <&vcc5v0_sys>; | ||
| }; | ||
| }; | ||
|
|
||
| &i2c7 { | ||
| es8389: audio-codec@10 { | ||
| compatible = "everest,es8389"; | ||
| reg = <0x10>; | ||
| assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; | ||
| assigned-clock-rates = <12288000>; | ||
| clocks = <&cru I2S0_8CH_MCLKOUT>; | ||
| clock-names = "mclk"; | ||
| #sound-dai-cells = <0>; | ||
| }; | ||
| }; | ||
|
|
||
| &i2s0_8ch { | ||
| /delete-node/ port; | ||
| }; | ||
|
|
||
| &pinctrl { | ||
| usb { | ||
| usb20_host_pwren: usb20-host-pwren { | ||
| rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &u2phy3_host { | ||
| phy-supply = <&vcc5v0_usb20_host>; | ||
| }; |
42 changes: 42 additions & 0 deletions
42
patch/u-boot/v2026.01/board_nanopct6-lts-plus/add-nanopc-t6-lts-plus-detection.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| From: Igor Pecovnik <igor@armbian.com> | ||
| Date: Sun, 06 Apr 2026 12:00:00 +0200 | ||
| Subject: board: friendlyelec: add NanoPC-T6 LTS Plus support | ||
|
|
||
| Add NanoPC-T6 LTS Plus variant to the ADC-based board detection table. | ||
| The LTS Plus reads ~3076 on ADC channel 5, compared to T6 (348-528) | ||
| and T6 LTS (1957-2137). Set board_name so the correct model is | ||
| displayed during boot. | ||
|
|
||
| Signed-off-by: Igor Pecovnik <igor@armbian.com> | ||
| --- | ||
| --- a/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c | ||
| +++ b/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c | ||
| @@ -11,11 +11,13 @@ | ||
| unsigned int low; | ||
| unsigned int high; | ||
| const char *fdtfile; | ||
| + const char *board_name; | ||
| }; | ||
|
|
||
| static const struct board_model board_models[] = { | ||
| - { 348, 528, "rockchip/rk3588-nanopc-t6.dtb" }, | ||
| - { 1957, 2137, "rockchip/rk3588-nanopc-t6-lts.dtb" }, | ||
| + { 348, 528, "rockchip/rk3588-nanopc-t6.dtb", "NanoPC-T6" }, | ||
| + { 1957, 2137, "rockchip/rk3588-nanopc-t6-lts.dtb", "NanoPC-T6 LTS" }, | ||
| + { 2986, 3166, "rockchip/rk3588-nanopc-t6-lts-plus.dtb", "NanoPC-T6 LTS Plus" }, | ||
| }; | ||
|
|
||
| static const struct board_model *get_board_model(void) | ||
| @@ -42,8 +44,10 @@ | ||
| { | ||
| const struct board_model *model = get_board_model(); | ||
|
|
||
| - if (model) | ||
| + if (model) { | ||
| env_set("fdtfile", model->fdtfile); | ||
| + env_set("board_name", model->board_name); | ||
| + } | ||
|
|
||
| return 0; | ||
| } |
3 changes: 3 additions & 0 deletions
3
patch/u-boot/v2026.01/dt_uboot/rk3588-nanopc-t6-lts-plus-u-boot.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
|
|
||
| #include "rk3588-nanopc-t6-u-boot.dtsi" |
62 changes: 62 additions & 0 deletions
62
patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-nanopc-t6-lts-plus.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
| /* | ||
| * Copyright (c) 2021 Rockchip Electronics Co., Ltd. | ||
| * Copyright (c) 2023 Thomas McKahan | ||
| * Copyright (c) 2024 Linaro Ltd. | ||
| * Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd. | ||
| * Copyright (c) 2025 Armbian <igor@armbian.com> | ||
| * | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include "rk3588-nanopc-t6.dtsi" | ||
|
|
||
| / { | ||
| model = "FriendlyElec NanoPC-T6 LTS Plus"; | ||
| compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588"; | ||
|
|
||
| /* provide power for on-board USB 2.0 hub */ | ||
| vcc5v0_usb20_host: regulator-vcc5v0-usb20-host { | ||
| compatible = "regulator-fixed"; | ||
| enable-active-high; | ||
| gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; | ||
| pinctrl-0 = <&usb20_host_pwren>; | ||
| pinctrl-names = "default"; | ||
| regulator-always-on; | ||
| regulator-boot-on; | ||
| regulator-max-microvolt = <5000000>; | ||
| regulator-min-microvolt = <5000000>; | ||
| regulator-name = "vcc5v0_usb20_host"; | ||
| vin-supply = <&vcc5v0_sys>; | ||
| }; | ||
| }; | ||
|
|
||
| &pinctrl { | ||
| usb { | ||
| usb20_host_pwren: usb20-host-pwren { | ||
| rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &u2phy1 { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &u2phy1_otg { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &u2phy3_host { | ||
| phy-supply = <&vcc5v0_usb20_host>; | ||
| }; | ||
|
|
||
| &usbdp_phy1 { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &usb_host1_xhci { | ||
| dr_mode = "host"; | ||
| status = "okay"; | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.