public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Vincent Li <vincent.mc.li@gmail.com>
To: Vincent Li <vincent.mc.li@gmail.com>
Cc: Michael Tremer <michael.tremer@ipfire.org>, development@lists.ipfire.org
Subject: Re: [PATCH] kernel: Enable loongarch64 kernel config MMC_LOONGSON2
Date: Fri, 4 Dec 2026 07:21:45 +0000 (UTC)	[thread overview]
Message-ID: <d7c257ce-37e-a725-dca8-d6dae5cddb@gmail.com> (raw)
In-Reply-To: <3b0243a-d5ff-18f5-1060-9a813d964d7e@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 8191 bytes --]


Hi Michael,

I let the AI pass through the kernel message and your question, here is 
answer from AI, sorry I am not fluent with the kernel boot message and 
lazy :).

================================================================================
ANSWERS: eMMC / dmesg / lspci -k / serial / reboot / ACPI vs DT
Sources: kernel.txt (dmesg), lsblk, lspci -k
Board: Loongson OrangePi-Nova-V1.1 (LA364, 8 cores), kernel 6.18.65-ipfire
================================================================================

--------------------------------------------------------------------------------
1. DOES THE eMMC SHOW UP, AND DOES IT WORK NOW?
--------------------------------------------------------------------------------
YES. The eMMC is detected and functional.

lsblk:
   mmcblk1        179:0    0  29.2G  0 disk
   ├─mmcblk1p1    179:1    0   512M  0 part
   ├─mmcblk1p2    179:2    0    32M  0 part
   ├─mmcblk1p3    179:3    0     1G  0 part
   └─mmcblk1p4    179:4    0  27.7G  0 part
   mmcblk1boot0   179:8    0     4M  1 disk
   mmcblk1boot1   179:16   0     4M  1 disk

dmesg:
   mmc0: new HS200 MMC card at address 0001
   mmcblk0: mmc0:0001 VM040 29.2 GiB
    mmcblk0: p1 p2 p3 p4
   mmcblk0boot0: mmc0:0001 VM040 4.00 MiB
   mmcblk0boot1: mmc0:0001 VM040 4.00 MiB

NOTE: the kernel enumerates it as mmcblk0; lsblk reports mmcblk1. Same 
device,different naming between the two captures (re-probe/udev rename). Size and
partition layout match. It probes at HS200 speed => functional, not just 
detected.

--------------------------------------------------------------------------------
2. WHAT DOES dmesg SAY? ERRORS FROM NEW DRIVERS / DEVICES WITH NO DRIVER?
--------------------------------------------------------------------------------
No device is left without a driver. eMMC and NVMe both probe successfully.
However, the NEW loongson2-mmc driver emits repeated errors because it is 
being driven through ACPI PRP0001 (the "DT-compatible" HID) without real 
DT properties:

   loongson2-mmc PRP0001:00: Can't get voltage, defaulting to 3.3V
   loongson2-mmc PRP0001:01: Can't get voltage, defaulting to 3.3V
   loongson2-mmc PRP0001:01: Failed to parse device node
   loongson2-mmc PRP0001:01: Got CD GPIO
   genirq: Setting trigger mode 3 for irq 26 failed 
(pch_pic_set_type+0x0/0x310)
   loongson2-mmc PRP0001:01: error -EINVAL: request_irq(26) 0x0 
mmc_gpio_cd_irqt
       [mmc_core] PRP0001:01 cd

Interpretation:
   - "Can't get voltage, defaulting to 3.3V": regulator/voltage property 
missing from ACPI; driver falls back. Warning, not fatal.
   - "Failed to parse device node": driver expects DT properties ACPI is 
not
     supplying. Repeats many times during boot.
   - "request_irq(26) ... -EINVAL": card-detect GPIO interrupt cannot be 
set up because pch_pic_set_type cannot program trigger mode 3 for IRQ 26.
     => hot-plug / CD detection via IRQ is broken; card still probes 
(driver continues without the CD IRQ).

Other non-fatal issues in dmesg:
   - r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
   - nvme nvme0: missing or invalid SUBNQN field.
   - nvme nvme0: Ignoring bogus Namespace Identifiers  (NVMe still works)
   - xhci_hcd 0000:00:04.0: USB3 root hub has no ports
   - i8042: PNP: No PS/2 controller found.

--------------------------------------------------------------------------------
3. WHAT DOES lspci -k SHOW FOR DEVICES WITHOUT A DRIVER?
--------------------------------------------------------------------------------
PCI functions with NO "Kernel driver in use" line:

   00:06.0  Multimedia video controller
            Loongson Technology LLC LG200 GPU (rev 10)
            => NO DRIVER

   00:06.3  Multimedia controller
            Loongson Technology LLC Video Processing Unit Decoder
            => NO DRIVER

   00:06.4  Multimedia controller
            Loongson Technology LLC Video Processing Unit Encoder
            => NO DRIVER

   00:06.1  VGA compatible controller
            Loongson Technology LLC Video Display Controller (rev 10)
            => NO PCI driver bound; handled only by simpledrm /
               simple-framebuffer in dmesg (not a real GPU driver)

Everything else is bound:
   00:03.0  dwmac-loongson-pci   (dwmac_loongson)
   00:04.0  xhci_hcd             (xhci_pci)
   00:06.2  snd_hda_intel        (snd_hda_intel)
   00:07.0  snd_hda_intel        (snd_hda_intel)
   00:09.0  pcieport             (shpchp)
   00:0a.0  pcieport             (shpchp)
   00:0b.0  pcieport             (shpchp)
   00:0c.0  pcieport             (shpchp)
   00:0d.0  pcieport             (shpchp)
   00:16.0  loongson-spi-pci     (spi_loongson_pci)
   00:19.0  xhci_hcd             (xhci_pci)
   03:00.0  r8169                (r8169)
   05:00.0  nvme                 (nvme)

SUMMARY of unbound: 00:06.0 (LG200 GPU), 00:06.3 (VPU decoder),
00:06.4 (VPU encoder) have no driver; 00:06.1 (VGA) only has simpledrm.

--------------------------------------------------------------------------------
4. DOES THE SERIAL CONSOLE WORK, AND DOES THE BOARD REBOOT/POWER OFF 
CLEANLY?
--------------------------------------------------------------------------------
SERIAL: ports are initialized but NOT used as a kernel console.
   dmesg:
     00:00: ttyS0 at MMIO 0x1fe001e0 (irq = 42, base_baud = 6250000) is a 
8250
     00:01: ttyS1 at MMIO 0x10100000 (irq = 43, base_baud = 3000000) is a 
8250
     00:02: ttyS2 at MMIO 0x10100100 (irq = 43, base_baud = 3000000) is a 
8250
     00:03: ttyS3 at MMIO 0x10100200 (irq = 43, base_baud = 3000000) is a 
8250

   BUT the kernel command line is:
     BOOT_IMAGE=/boot/vmlinuz-6.18.65-ipfire root=UUID=... ro rd.auto
     panic=10 console=tty1
   => only console=tty1; NO console=ttyS0. Serial is not a kernel console 
in this boot. Interactive function cannot be proven from the log.

REBOOT: the log shows a clean second boot at Dec 4 14:47:01 (fresh kernel
banner, full ACPI/PCI re-enumeration), consistent with a successful 
reboot,but there is no explicit "reboot: Restarting system" message in the 
excerpt.

POWER OFF: ACPI PM reports "(supports S0 S5)" and
"ACPI S3 supported with Loongson ACPI SADR extension", so S5 poweroff is
advertised, but there is no explicit power-down message in the log to 
confirm it completed cleanly.

--------------------------------------------------------------------------------
5. DEVICE TREE OR ACPI? WHICH DRIVERS ARE USED?
--------------------------------------------------------------------------------
ACPI. Evidence:
   - efi: ACPI 2.0=0xeceaf000 ... (EFI passes ACPI)
   - full ACPI table set: RSDP, XSDT, FACP, DSDT, APIC, MCFG, IVRS, IOVT,
     SRAT, SLIT, VIAT, PPTT, FPDT, BGRT
   - ACPI: Interpreter enabled
   - ACPI: 1 ACPI AML tables successfully acquired and loaded
   - ACPI: PCI Root Bridge [PCI0]
   - ACPI: Using LPIC for interrupt routing
   - pnp: PnP ACPI: found 8 devices
   - eMMC enumerated as loongson2-mmc PRP0001:00 / PRP0001:01
     (PRP0001 = ACPI mechanism to bind DT-compatible drivers; NOT a real DT)

Drivers in use (ACPI path):
   loongson2-mmc (via PRP0001), dwmac-loongson-pci, r8169, nvme, xhci_hcd,
   snd_hda_intel, pcieport, loongson-spi-pci, loongson-rtc, simpledrm.

The loongson2-mmc driver is the one showing DT-property/ACPI mismatch 
errors and the CD-IRQ failure - expected when a DT-oriented driver is 
exercised via ACPI PRP0001 without full DT properties.

================================================================================
BOTTOM LINE
================================================================================
- eMMC: present and functional (HS200), 29.2G, 4 partitions + boot0/boot1.
- New driver errors: loongson2-mmc (ACPI PRP0001) logs voltage fallback,
   "Failed to parse device node", and CD IRQ request_irq(26) -EINVAL.
- No-driver PCI devices: 00:06.0 LG200 GPU, 00:06.3 VPU decoder,
   00:06.4 VPU encoder (00:06.1 VGA only has simpledrm).
- Serial: 4x 8250 ports registered, but console=tty1 only (no ttyS0 
console).
- Reboot: implied by clean second boot; poweroff (S5) advertised but not
   explicitly logged.
- Boot method: ACPI (not DT).
================================================================================

  reply	other threads:[~2026-12-04  7:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  2:34 Vincent Li
2026-12-03 17:03 ` Michael Tremer
2026-12-04  5:19   ` Vincent Li
2026-12-04  7:21     ` Vincent Li [this message]
2026-12-04  7:36       ` Vincent Li
2026-12-04  8:43         ` Vincent Li
2026-12-04 14:37           ` Michael Tremer
2026-12-05  0:36             ` Vincent Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7c257ce-37e-a725-dca8-d6dae5cddb@gmail.com \
    --to=vincent.mc.li@gmail.com \
    --cc=development@lists.ipfire.org \
    --cc=michael.tremer@ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox