Skip to content

Fix NanoPC-T6 USB-C serial console: built-in driver + clock/power workarounds - #3

Draft
edtubbs with Copilot wants to merge 6 commits into
copilot/fix-ttyfioq0-console-accessfrom
copilot/debug-kernel-console-access
Draft

Fix NanoPC-T6 USB-C serial console: built-in driver + clock/power workarounds#3
edtubbs with Copilot wants to merge 6 commits into
copilot/fix-ttyfioq0-console-accessfrom
copilot/debug-kernel-console-access

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown

Earlycon output works on the USB-C debug port (UART2 @ 0xfeb50000) but the kernel goes silent after ~1s. The ttyS2 console never registers because the 8250 DesignWare driver isn't available early enough, and clock/power gating kills the UART hardware before the driver probes.

Changes

  • Force serial driver stack built-inSERIAL_8250_DW, SERIAL_8250_CONSOLE, SERIAL_OF_PLATFORM, SERIAL_EARLYCON as =y via extraStructuredConfig. The rockchip flake's kernel inherits NixOS linux_latest defaults which may have these as modules.

  • Prevent UART2 clock/power gatingclk_ignore_unused and pd_ignore_unused kernel params stop the clock framework from gating SCLK_UART2/PCLK_UART2 before the driver claims them.

  • Bridge earlycon → ttyS2 handoffkeep_bootcon keeps the boot console active alongside the real console so no output is lost during transition.

  • Enable serial gettyserial-getty@ttyS2 for interactive login on the debug port.

  • Remove FIQ debugger backport — the vendor FIQ debugger driver doesn't compile against mainline 6.18; use standard ttyS2 instead of ttyFIQ0.

  • Restore DT patch to upstream-compatible state — removed FIQ debugger DT node and uart2 disable; uart2 stays enabled per upstream NanoPC-T6 DTS with uart2m0_xfer pinctrl.

boot.kernelParams = [
  "earlycon=uart8250,mmio32,0xfeb50000"
  "keep_bootcon"
  "clk_ignore_unused"
  "pd_ignore_unused"
  "console=ttyS2,1500000"
  "console=tty1"
];

# in kernelPatches extraStructuredConfig:
SERIAL_8250 = yes;
SERIAL_8250_CONSOLE = yes;
SERIAL_8250_DW = yes;
SERIAL_OF_PLATFORM = yes;
SERIAL_EARLYCON = yes;

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 11, 2026 20:29
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix kernel console access on USB C port Fix USB-C serial console: use ttyS2 with earlycon+keep_bootcon instead of broken FIQ debugger Feb 11, 2026
Copilot AI requested a review from edtubbs February 11, 2026 20:32
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot AI changed the title Fix USB-C serial console: use ttyS2 with earlycon+keep_bootcon instead of broken FIQ debugger Fix USB-C serial console on NanoPC-T6: use ttyS2 with earlycon+keep_bootcon Feb 11, 2026
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot AI changed the title Fix USB-C serial console on NanoPC-T6: use ttyS2 with earlycon+keep_bootcon Fix USB-C serial console on NanoPC-T6: prevent UART2 clock gating during boot Feb 12, 2026
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot AI changed the title Fix USB-C serial console on NanoPC-T6: prevent UART2 clock gating during boot Fix NanoPC-T6 USB-C serial console: built-in driver + clock/power workarounds Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants