Skip to content

Add NanoPC-T6 LTS Plus board support#9617

Open
igorpecovnik wants to merge 1 commit intomainfrom
nanopct6ltsplus
Open

Add NanoPC-T6 LTS Plus board support#9617
igorpecovnik wants to merge 1 commit intomainfrom
nanopct6ltsplus

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented Mar 29, 2026

Summary

Add board support for the FriendlyElec NanoPC-T6 LTS Plus, a variant of the NanoPC-T6 LTS that replaces the Realtek RT5616 audio codec with an Everest ES8389.

What's included

  • Board config (config/boards/nanopct6-lts-plus.conf) — sources the base T6 config, overrides DTB and audio udev rules for ES8389
  • Device tree for 6.18 and 7.0 (patch/kernel/archive/rockchip64-{6.18,7.0}/dt/rk3588-nanopc-t6-lts-plus.dts) — based on the mainline T6 dtsi with:
    • RT5616 codec replaced by ES8389 (at I2C7 address 0x10, mainline driver available since 6.x)
    • USB 2.0 host power regulator on GPIO1_A4 (same as T6 LTS)
    • u2phy3_host supply wired to the USB 2.0 host regulator
    • USB host1 XHCI and usbdp_phy1 enabled

Needs: armbian/linux-rockchip#462
Ref: #9446

Hardware differences from T6 LTS

Feature T6 LTS T6 LTS Plus
Audio codec Realtek RT5616 Everest ES8389
Codec I2C address 0x1b 0x10
Headphone detect GPIO1_C4 (same) GPIO1_C4 (same)

Reference: friendlyarm/kernel-rockchip@524e3e0

Test plan

  • Build image for nanopct6-lts-plus vendor
  • Build image for nanopct6-lts-plus current, edge
  • Verify DTB compiles without warnings
  • Boot on NanoPC-T6 LTS Plus hardware
  • Verify ES8389 audio codec is detected and functional
  • Verify USB 2.0 hub is powered and operational
  • Verify HDMI video and audio
  • Verify video acceleration in Chromium

Summary by CodeRabbit

  • New Features
    • Official support for the NanoPC T6 LTS Plus device.
    • New audio setup using the ES8389 codec over I2S with headphone-detect and per-port audio naming (HDMI, HDMI-in, DP, headset).
    • USB 2.0 host power controlled by a dedicated regulator for reliable hub/PHY power.
    • Support added for kernel branches 6.18 and 7.0.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds NanoPC T6 LTS Plus support: new Armbian board config plus kernel Device Tree files (6.18 and 7.0) that replace rt5616 with an ES8389 simple-audio-card, add a GPIO-controlled 5V USB regulator tied to USB PHYs, and install udev audio naming rules.

Changes

Cohort / File(s) Summary
Board configuration
config/boards/nanopct6-lts-plus.conf
New board config sourcing nanopct6.conf; sets BOARD_* metadata, BOOT_FDT_FILE/kernel targets, exports GRUB_FDT_FILE, adds post-family hooks and writes /etc/udev/rules.d/90-naming-audios.rules.
Device Tree — kernel 6.18
patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
New DTS based on rk3588-nanopc-t6.dtsi: deletes rt5616 and inherited sound; adds top-level simple-audio-card for everest,es8389 (I2S, mclk-fs=256, hp-det GPIO), adds es8389 I2C node, introduces vcc5v0_usb20_host fixed 5V regulator with GPIO/pinctrl, removes &i2s0_8ch/port, and sets USB host PHY phy-supply.
Device Tree — kernel 7.0
patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts
Analogous DTS for 7.0: removes rt5616, defines simple-audio-card for everest,es8389 (I2S/MCLK, hp-detect), adds es8389 at I2C 0x10/assigned-clock-rates, adds GPIO-controlled vcc5v0_usb20_host and usb20_host_pwren pinctrl, deletes port under &i2s0_8ch, and ties USB host PHYs to the regulator.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Bootloader as Bootloader
participant Kernel as Kernel
participant Regulator as vcc5v0_usb20_host
participant PHY as USB Host PHYs
participant Codec as ES8389
participant Udev as udev

Bootloader->>Kernel: Load kernel with rk3588-nanopc-t6-lts-plus DT
Kernel->>Regulator: Initialize fixed-regulator node (configure GPIO/pinctrl)
Regulator-->>PHY: Provide 5V supply to USB host PHYs
Kernel->>PHY: Register and enable USB host PHYs/controllers
Kernel->>Codec: Probe ES8389 over I2C and bind to I2S (&i2s0_8ch)
Kernel->>Udev: Emit udev events
Udev-->>Kernel: Apply 90-naming-audios.rules (ENV{SOUND_DESCRIPTION})

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I found a tiny board beneath a mossy log,
I tied 5V threads and woke the sleepy cog,
ES8389 hummed as hubs took flight,
Udev named voices in the quiet night,
Hooray for T6 Plus — a rabbit’s little jog!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add NanoPC-T6 LTS Plus board support' directly and clearly summarizes the main change: introducing new board support for the NanoPC-T6 LTS Plus variant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nanopct6ltsplus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/large PR with 250 lines or more 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
config/boards/nanopct6-lts-plus.conf (1)

16-21: Quote $SDCARD to handle paths with spaces.

While unlikely in practice, unquoted variable expansion can cause issues if $SDCARD contains spaces.

🔧 Proposed fix
-	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
+	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"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/nanopct6-lts-plus.conf` around lines 16 - 21, The shell
commands use unquoted $SDCARD in mkdir and the echo redirections (e.g., mkdir -p
$SDCARD/etc/udev/rules.d/ and the echo ... >
$SDCARD/etc/udev/rules.d/90-naming-audios.rules), so update all occurrences to
quote the variable (preferably as "${SDCARD}") when composing paths to
/etc/udev/rules.d/ and the file 90-naming-audios.rules to safely handle paths
with spaces.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/boards/nanopct6-lts-plus.conf`:
- Line 7: The BOARD_MAINTAINER field in the .conf is empty so the file cannot
use the .conf extension; either populate BOARD_MAINTAINER with at least one
maintainer (e.g., "Full Name <email@example.com>") or rename the file to use the
.csc or .wip extension to mark community-supported / work-in-progress status so
it complies with Armbian board support rules.
- Around line 13-24: The child function
post_family_tweaks__nanopct6_lts_plus_naming_audios is being executed before the
parent post_family_tweaks__nanopct6_naming_audios which truncates the rules
file; rename the child to
post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios so it runs last (or
alternatively add a no-op override for
post_family_tweaks__nanopct6_naming_audios in this file) to prevent the parent
from overwriting the child's appended rules; update the function name used in
this config and ensure no other references rely on the old name.

In `@patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts`:
- Around line 67-77: The device node es8389:audio-codec@10 uses the
everest,es8389 compatible which is not present in kernel 6.18; either backport
the ES8389 driver and binding into this 6.18 tree (apply the
sound/soc/codecs/es8389.c driver and the
Documentation/devicetree/bindings/sound/everest,es8389.yaml binding) so the
compatible string and properties in the es8389 node are recognized, or retarget
this DTS change to kernel 6.19+ where everest,es8389 is upstream; ensure the
es8389:audio-codec@10 node, compatible = "everest,es8389", and the clock
properties remain unchanged once the driver/binding are available.

---

Nitpick comments:
In `@config/boards/nanopct6-lts-plus.conf`:
- Around line 16-21: The shell commands use unquoted $SDCARD in mkdir and the
echo redirections (e.g., mkdir -p $SDCARD/etc/udev/rules.d/ and the echo ... >
$SDCARD/etc/udev/rules.d/90-naming-audios.rules), so update all occurrences to
quote the variable (preferably as "${SDCARD}") when composing paths to
/etc/udev/rules.d/ and the file 90-naming-audios.rules to safely handle paths
with spaces.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ddf1b2dc-2a6e-4d40-ab37-1ce3b3ed8192

📥 Commits

Reviewing files that changed from the base of the PR and between 832f9db and 704dae5.

📒 Files selected for processing (3)
  • config/boards/nanopct6-lts-plus.conf
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts

Comment on lines +13 to +24
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
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify if both functions will be invoked and in what order
# Check how Armbian's extension system orders hook functions

rg -n 'call_extension_method.*post_family_tweaks' --type sh -A 5 -B 2 lib/

Repository: armbian/build

Length of output: 1698


🏁 Script executed:

#!/bin/bash
# Check the parent nanopct6.conf for its audio naming function
cat config/boards/nanopct6.conf | grep -A 15 'post_family_tweaks__nanopct6_naming_audios'

Repository: armbian/build

Length of output: 1183


🏁 Script executed:

#!/bin/bash
# Search for call_extension_method implementation to understand execution order
rg -n 'call_extension_method' lib/ --type sh -A 20 | head -100

Repository: armbian/build

Length of output: 9766


🏁 Script executed:

#!/bin/bash
# Check if there's any mechanism to handle duplicate hook functions or skip parent functions
rg -n 'post_family_tweaks' config/boards/ --type sh | grep -E '(nanopct6|lts)'

Repository: armbian/build

Length of output: 39


🏁 Script executed:

#!/bin/bash
# Search for call_extension_method implementation
rg -n 'call_extension_method\s*\(\)' lib/ --type sh -A 50 | head -150

Repository: armbian/build

Length of output: 13960


🏁 Script executed:

#!/bin/bash
# Check both functions exist in their respective files and understand parent-child relationship
echo "=== Parent function in nanopct6.conf ===" 
rg -n 'post_family_tweaks__nanopct6_naming_audios' config/boards/nanopct6.conf -A 10

echo -e "\n=== Child function in nanopct6-lts-plus.conf ===" 
rg -n 'post_family_tweaks__nanopct6_lts_plus_naming_audios' config/boards/nanopct6-lts-plus.conf -A 10

Repository: armbian/build

Length of output: 2093


Functions with the same hook point execute in alphanumerical order, causing parent post_family_tweaks__nanopct6_naming_audios to overwrite child rules.

The parent post_family_tweaks__nanopct6_naming_audios (from nanopct6.conf) executes after post_family_tweaks__nanopct6_lts_plus_naming_audios because "nanopct6_naming_audios" sorts after "nanopct6_lts_plus_naming_audios". Since the parent's first echo uses > (truncate), it will overwrite the entire file, losing the ES8389 Audio rule that the child function defined.

Rename this function to post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios to ensure it executes last, or redefine the parent function as a no-op in this file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/nanopct6-lts-plus.conf` around lines 13 - 24, The child
function post_family_tweaks__nanopct6_lts_plus_naming_audios is being executed
before the parent post_family_tweaks__nanopct6_naming_audios which truncates the
rules file; rename the child to
post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios so it runs last (or
alternatively add a no-op override for
post_family_tweaks__nanopct6_naming_audios in this file) to prevent the parent
from overwriting the child's appended rules; update the function name used in
this config and ensure no other references rely on the old name.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Mar 29, 2026
@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge Needs review Seeking for review and removed Ready to merge Reviewed, tested and ready for merge labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
config/boards/nanopct6-lts-plus.conf (1)

13-24: ⚠️ Potential issue | 🟠 Major

Parent hook will overwrite child's ES8389 audio rule due to execution order.

The parent post_family_tweaks__nanopct6_naming_audios (from nanopct6.conf) executes after this function because "nanopct6_naming_audios" sorts after "nanopct6_lts_plus_naming_audios" alphanumerically. Since the parent's first echo uses > (truncate), the ES8389 Audio rule on line 21 will be lost.

Rename to post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios so it executes last, or override the parent function as a no-op in this file.

,

🐛 Suggested fix: rename function to execute last
-function post_family_tweaks__nanopct6_lts_plus_naming_audios() {
+function post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios() {
 	display_alert "$BOARD" "Renaming nanopct6-lts-plus audio" "info"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/nanopct6-lts-plus.conf` around lines 13 - 24, The child's
function post_family_tweaks__nanopct6_lts_plus_naming_audios is executed before
the parent post_family_tweaks__nanopct6_naming_audios and gets its ES8389 rule
truncated by the parent's leading echo (>)—rename the function to
post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios so it sorts last and
runs after the parent (or alternatively add a no-op override for
post_family_tweaks__nanopct6_naming_audios in this file) so the ES8389 echo line
(ENV{ID_PATH}=="platform-es8389-sound") is not lost.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@config/boards/nanopct6-lts-plus.conf`:
- Around line 13-24: The child's function
post_family_tweaks__nanopct6_lts_plus_naming_audios is executed before the
parent post_family_tweaks__nanopct6_naming_audios and gets its ES8389 rule
truncated by the parent's leading echo (>)—rename the function to
post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios so it sorts last and
runs after the parent (or alternatively add a no-op override for
post_family_tweaks__nanopct6_naming_audios in this file) so the ES8389 echo line
(ENV{ID_PATH}=="platform-es8389-sound") is not lost.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3625a1c2-995c-419f-aed8-954457ae2042

📥 Commits

Reviewing files that changed from the base of the PR and between 704dae5 and 75e7125.

📒 Files selected for processing (3)
  • config/boards/nanopct6-lts-plus.conf
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts
🚧 Files skipped from review as they are similar to previous changes (2)
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts

@armbian armbian deleted a comment from github-actions bot Mar 29, 2026
@armbian armbian deleted a comment from github-actions bot Mar 29, 2026
@igorpecovnik igorpecovnik added Work in progress Unfinished / work in progress and removed Ready to merge Reviewed, tested and ready for merge Needs review Seeking for review labels Mar 29, 2026
@github-actions github-actions bot added Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines and removed size/large PR with 250 lines or more labels Mar 30, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
config/boards/nanopct6-lts-plus.conf (1)

13-24: ⚠️ Potential issue | 🟠 Major

Hook order still allows parent rule file overwrite.

Line 13 defines post_family_tweaks__nanopct6_lts_plus_naming_audios, which sorts before the inherited post_family_tweaks__nanopct6_naming_audios; the parent then truncates the same rules file (>), so the ES8389 rule from Line 21 is lost.

Suggested fix
-function post_family_tweaks__nanopct6_lts_plus_naming_audios() {
+function post_family_tweaks__999_nanopct6_lts_plus_naming_audios() {
 	display_alert "$BOARD" "Renaming nanopct6-lts-plus audio" "info"

Alternative: redefine post_family_tweaks__nanopct6_naming_audios() as a no-op in this file.

Based on learnings: In the Armbian extension framework, functions with the same hook point run in alphanumerical order by the suffix after __.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/nanopct6-lts-plus.conf` around lines 13 - 24, The hook runs
before the parent hook and gets overwritten because
post_family_tweaks__nanopct6_naming_audios in the parent truncates the same
rules file; rename this function so it sorts after the parent (e.g.,
post_family_tweaks__nanopct6_lts_plus_z_naming_audios or similar alphanumeric
suffix that comes later) so its echo lines append after the parent, or
alternatively define post_family_tweaks__nanopct6_naming_audios() in this file
as a no-op to prevent the parent from truncating the file; update the function
name or noop override accordingly and keep the same body/behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@config/boards/nanopct6-lts-plus.conf`:
- Around line 13-24: The hook runs before the parent hook and gets overwritten
because post_family_tweaks__nanopct6_naming_audios in the parent truncates the
same rules file; rename this function so it sorts after the parent (e.g.,
post_family_tweaks__nanopct6_lts_plus_z_naming_audios or similar alphanumeric
suffix that comes later) so its echo lines append after the parent, or
alternatively define post_family_tweaks__nanopct6_naming_audios() in this file
as a no-op to prevent the parent from truncating the file; update the function
name or noop override accordingly and keep the same body/behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 045559a4-9c21-426c-8b0d-73f56ef1c0f0

📥 Commits

Reviewing files that changed from the base of the PR and between 75e7125 and 47544d1.

📒 Files selected for processing (3)
  • config/boards/nanopct6-lts-plus.conf
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts
🚧 Files skipped from review as they are similar to previous changes (2)
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts

@igorpecovnik igorpecovnik force-pushed the nanopct6ltsplus branch 2 times, most recently from 1949b83 to c7799b3 Compare March 31, 2026 06:06
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
config/boards/nanopct6-lts-plus.conf (1)

18-29: ⚠️ Potential issue | 🟠 Major

Audio udev hook may still be overwritten by parent hook order.

Because this file sources nanopct6.conf and uses the same post_family_tweaks__* hook point, alphanumerical execution can run this function before the parent audio hook; if the parent still writes with >, the ES8389 rule gets replaced.

Suggested fix
-function post_family_tweaks__nanopct6_lts_plus_naming_audios() {
+function post_family_tweaks__zzz_nanopct6_lts_plus_naming_audios() {
#!/bin/bash
# Verify whether parent + child hooks collide and whether parent truncates rules file.

echo "=== Hook definitions ==="
rg -n -C3 'post_family_tweaks__nanopct6(_lts_plus)?_naming_audios' config/boards --type sh

echo
echo "=== Parent rule writing operators in nanopct6.conf ==="
rg -n -C2 '90-naming-audios.rules|post_family_tweaks__nanopct6_naming_audios|>\s*\$SDCARD|>>\s*\$SDCARD' config/boards/nanopct6.conf --type sh

echo
echo "=== Hook execution ordering implementation ==="
rg -n -C4 'call_extension_method.*post_family_tweaks|compgen -A function|sort' lib --type sh

Based on learnings: in Armbian extensions, functions sharing a hook point execute in alphanumerical order (hook_point__unique_identifier()).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/nanopct6-lts-plus.conf` around lines 18 - 29, The child hook
post_family_tweaks__nanopct6_lts_plus_naming_audios can run before the parent
post_family_tweaks__nanopct6_naming_audios and get its 90-naming-audios.rules
truncated because the first echo uses >; change the first echo that currently
writes with > to use >> (i.e., append like the other lines) or otherwise always
append (e.g., tee -a) so the ES8389 and other rules are never overwritten when
both hooks run, keeping the function name and the 90-naming-audios.rules target
the same.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@config/boards/nanopct6-lts-plus.conf`:
- Around line 18-29: The child hook
post_family_tweaks__nanopct6_lts_plus_naming_audios can run before the parent
post_family_tweaks__nanopct6_naming_audios and get its 90-naming-audios.rules
truncated because the first echo uses >; change the first echo that currently
writes with > to use >> (i.e., append like the other lines) or otherwise always
append (e.g., tee -a) so the ES8389 and other rules are never overwritten when
both hooks run, keeping the function name and the 90-naming-audios.rules target
the same.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42f0e305-6eb3-4a2b-abc3-6f8f0d5291e8

📥 Commits

Reviewing files that changed from the base of the PR and between 1949b83 and c7799b3.

📒 Files selected for processing (3)
  • config/boards/nanopct6-lts-plus.conf
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts
  • patch/kernel/archive/rockchip64-7.0/dt/rk3588-nanopc-t6-lts-plus.dts
🚧 Files skipped from review as they are similar to previous changes (1)
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-nanopc-t6-lts-plus.dts

@armbian armbian deleted a comment from github-actions bot Mar 31, 2026
@armbian armbian deleted a comment from github-actions bot Mar 31, 2026
@armbian armbian deleted a comment from github-actions bot Mar 31, 2026
@armbian armbian deleted a comment from github-actions bot Mar 31, 2026
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

# Override: u-boot can't auto-detect the LTS Plus variant, so keep BOOT_FDT_FILE set
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed; could you poke at adc@fec10000 to see what it needs? That way we could send patch to upstream at https://github.com/u-boot/u-boot/blob/master/board/friendlyelec/nanopc-t6-rk3588/nanopc-t6-rk3588.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines Work in progress Unfinished / work in progress

Development

Successfully merging this pull request may close these issues.

4 participants