Skip to content

Commit 75e7125

Browse files
committed
rockchip64: add device tree for NanoPC-T6 LTS Plus (6.18 + 7.0)
1 parent 832f9db commit 75e7125

File tree

3 files changed

+252
-0
lines changed

3 files changed

+252
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Rockchip RK3588S octa core 8GB RAM SoC eMMC USB3 USB2 1x GbE 2x 2.5GbE
2+
source "${SRC}/config/boards/nanopct6.conf"
3+
BOARD_NAME="NanoPC T6 LTS Plus"
4+
BOARD_VENDOR="friendlyelec"
5+
# Important: despite sourcing the nanopct6 file above, this file still has to contain some variables, due the way Armbian's JSON matrix generator works.
6+
BOARDFAMILY="rockchip-rk3588"
7+
BOARD_MAINTAINER="igorpecovnik"
8+
BOOT_FDT_FILE="rockchip/rk3588-nanopc-t6-lts-plus.dtb"
9+
KERNEL_TARGET="current,edge,vendor"
10+
KERNEL_TEST_TARGET="vendor,current"
11+
declare -g GRUB_FDT_FILE="${BOOT_FDT_FILE}" # u-boot autodetects, but grub needs to know; store it here so we can unset later
12+
13+
function post_family_tweaks__nanopct6_lts_plus_naming_audios() {
14+
display_alert "$BOARD" "Renaming nanopct6-lts-plus audio" "info"
15+
16+
mkdir -p $SDCARD/etc/udev/rules.d/
17+
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules
18+
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi1-sound", ENV{SOUND_DESCRIPTION}="HDMI1 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
19+
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmiin-sound", ENV{SOUND_DESCRIPTION}="HDMI-In Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
20+
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
21+
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-es8389-sound", ENV{SOUND_DESCRIPTION}="ES8389 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
22+
23+
return 0
24+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
/delete-node/ &rt5616;
16+
17+
/ {
18+
model = "FriendlyElec NanoPC-T6 LTS Plus";
19+
compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588";
20+
21+
/delete-node/ sound;
22+
23+
sound {
24+
compatible = "simple-audio-card";
25+
pinctrl-names = "default";
26+
pinctrl-0 = <&hp_det>;
27+
28+
simple-audio-card,name = "everest,es8389-codec";
29+
simple-audio-card,format = "i2s";
30+
simple-audio-card,mclk-fs = <256>;
31+
32+
simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
33+
34+
simple-audio-card,widgets =
35+
"Headphone", "Headphones",
36+
"Microphone", "Microphone Jack";
37+
simple-audio-card,routing =
38+
"Headphones", "HPOL",
39+
"Headphones", "HPOR",
40+
"INPUT1", "Microphone Jack",
41+
"INPUT2", "Microphone Jack";
42+
43+
simple-audio-card,cpu {
44+
sound-dai = <&i2s0_8ch>;
45+
};
46+
simple-audio-card,codec {
47+
sound-dai = <&es8389>;
48+
};
49+
};
50+
51+
/* provide power for on-board USB 2.0 hub */
52+
vcc5v0_usb20_host: regulator-vcc5v0-usb20-host {
53+
compatible = "regulator-fixed";
54+
enable-active-high;
55+
gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
56+
pinctrl-0 = <&usb20_host_pwren>;
57+
pinctrl-names = "default";
58+
regulator-always-on;
59+
regulator-boot-on;
60+
regulator-max-microvolt = <5000000>;
61+
regulator-min-microvolt = <5000000>;
62+
regulator-name = "vcc5v0_usb20_host";
63+
vin-supply = <&vcc5v0_sys>;
64+
};
65+
};
66+
67+
&i2c7 {
68+
es8389: audio-codec@10 {
69+
compatible = "everest,es8389";
70+
reg = <0x10>;
71+
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
72+
assigned-clock-rates = <12288000>;
73+
clocks = <&cru I2S0_8CH_MCLKOUT>;
74+
clock-names = "mclk";
75+
#sound-dai-cells = <0>;
76+
};
77+
};
78+
79+
&i2s0_8ch {
80+
/delete-node/ port;
81+
};
82+
83+
&pinctrl {
84+
usb {
85+
usb20_host_pwren: usb20-host-pwren {
86+
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
87+
};
88+
};
89+
};
90+
91+
&u2phy1 {
92+
status = "okay";
93+
};
94+
95+
&u2phy1_otg {
96+
status = "okay";
97+
};
98+
99+
&u2phy2_host {
100+
phy-supply = <&vcc5v0_usb20_host>;
101+
};
102+
103+
&u2phy3_host {
104+
phy-supply = <&vcc5v0_usb20_host>;
105+
};
106+
107+
&usbdp_phy1 {
108+
status = "okay";
109+
};
110+
111+
&usb_host1_xhci {
112+
dr_mode = "host";
113+
status = "okay";
114+
};
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
/delete-node/ &rt5616;
16+
17+
/ {
18+
model = "FriendlyElec NanoPC-T6 LTS Plus";
19+
compatible = "friendlyarm,nanopc-t6-lts-plus", "rockchip,rk3588";
20+
21+
/delete-node/ sound;
22+
23+
sound {
24+
compatible = "simple-audio-card";
25+
pinctrl-names = "default";
26+
pinctrl-0 = <&hp_det>;
27+
28+
simple-audio-card,name = "everest,es8389-codec";
29+
simple-audio-card,format = "i2s";
30+
simple-audio-card,mclk-fs = <256>;
31+
32+
simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
33+
34+
simple-audio-card,widgets =
35+
"Headphone", "Headphones",
36+
"Microphone", "Microphone Jack";
37+
simple-audio-card,routing =
38+
"Headphones", "HPOL",
39+
"Headphones", "HPOR",
40+
"INPUT1", "Microphone Jack",
41+
"INPUT2", "Microphone Jack";
42+
43+
simple-audio-card,cpu {
44+
sound-dai = <&i2s0_8ch>;
45+
};
46+
simple-audio-card,codec {
47+
sound-dai = <&es8389>;
48+
};
49+
};
50+
51+
/* provide power for on-board USB 2.0 hub */
52+
vcc5v0_usb20_host: regulator-vcc5v0-usb20-host {
53+
compatible = "regulator-fixed";
54+
enable-active-high;
55+
gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
56+
pinctrl-0 = <&usb20_host_pwren>;
57+
pinctrl-names = "default";
58+
regulator-always-on;
59+
regulator-boot-on;
60+
regulator-max-microvolt = <5000000>;
61+
regulator-min-microvolt = <5000000>;
62+
regulator-name = "vcc5v0_usb20_host";
63+
vin-supply = <&vcc5v0_sys>;
64+
};
65+
};
66+
67+
&i2c7 {
68+
es8389: audio-codec@10 {
69+
compatible = "everest,es8389";
70+
reg = <0x10>;
71+
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
72+
assigned-clock-rates = <12288000>;
73+
clocks = <&cru I2S0_8CH_MCLKOUT>;
74+
clock-names = "mclk";
75+
#sound-dai-cells = <0>;
76+
};
77+
};
78+
79+
&i2s0_8ch {
80+
/delete-node/ port;
81+
};
82+
83+
&pinctrl {
84+
usb {
85+
usb20_host_pwren: usb20-host-pwren {
86+
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
87+
};
88+
};
89+
};
90+
91+
&u2phy1 {
92+
status = "okay";
93+
};
94+
95+
&u2phy1_otg {
96+
status = "okay";
97+
};
98+
99+
&u2phy2_host {
100+
phy-supply = <&vcc5v0_usb20_host>;
101+
};
102+
103+
&u2phy3_host {
104+
phy-supply = <&vcc5v0_usb20_host>;
105+
};
106+
107+
&usbdp_phy1 {
108+
status = "okay";
109+
};
110+
111+
&usb_host1_xhci {
112+
dr_mode = "host";
113+
status = "okay";
114+
};

0 commit comments

Comments
 (0)