AI analysis of 20g dtb versus fedoraworkstation.dtb

Device Tree Source (DTS) Comparison Report for Milk-V Megrez

Date: August 3, 2025
Author: Grok 3, xAI

Overview

This report compares two Device Tree Source (DTS) files for the Milk-V Megrez computer, based on the SiFive FU740 or Eswin EIC7700 SoC. The comparison focuses on the Neural Processing Unit (NPU) configuration, memory allocation, and other significant differences. The first DTS file, eic7700-milkv-megrez_NPU-20G, is comprehensive but truncated, while the second, eic7700-milkv-megrez, from fedora42 workstation, is complete but less detailed.

Key Findings

  1. File Structure and Completeness

    • First DTS File: Large (truncated at 145,946 characters), includes extensive peripheral nodes and NPU configuration.
    • Second DTS File: Complete, shorter, omits several peripheral nodes and NPU-specific configuration.
  2. NPU Configuration

    • First DTS File:
      • Includes opp-table@npu with operating points: 1.04 GHz at 0.9V, 1.5 GHz at 1.05V.
      • No explicit NPU device node, suggesting management via OPP table and system control registers.
    • Second DTS File:
      • No opp-table@npu or NPU device node, indicating either no NPU support or management outside DTS (e.g., firmware or proprietary driver).
      • Implication: Second file may target a system without NPU or with different NPU management.
  3. Memory Configuration

    • First DTS File:
      • Main Memory: 8GB at 0x80000000 (reg = <0x00 0x80000000 0x08 0x00>).
      • SPRAM: 4MB at 0x59000000 (reg = <0x00 0x59000000 0x00 0x400000>).
      • Reserved Memory:
        • linux,cma: 512MB shared DMA pool, reusable, 4KB alignment.
        • sprammemory@59000000: 4MB, no-map.
        • g2d_*_boundary_reserved_4k: Three 4KB regions at 4GB, 8GB, 12GB boundaries, no-map.
        • mmz_nid_0_part_0: 5GB at 0x300000000, no-map.
    • Second DTS File:
      • Main Memory: 4GB at 0x80000000 (reg = <0x00 0x80000000 0x04 0x00>).
      • SPRAM: 4MB at 0x59000000, identical to first file.
      • Reserved Memory:
        • linux,cma: 512MB, identical to first file.
        • sprammemory@59000000: 4MB, identical to first file.
        • g2d_*_boundary_reserved_4k: Three 4KB regions, identical to first file.
        • mmz_nid_0_part_0: 1.5GB at 0x300000000 (reg = <0x03 0x00 0x01 0x80000000>), smaller than 5GB in first file.
    • Differences:
      • Main memory reduced from 8GB to 4GB.
      • mmz_nid_0_part_0 reduced from 5GB to 1.5GB, potentially limiting NPU or other peripheral memory usage.
  4. CPU Configuration

    • Both Files:
      • Four CPU cores (cpu@0 to cpu@3) with identical properties:
        • Compatible: eswin,eic770x\riscv.
        • ISA: rv64imafdch_zicsr_zifencei_zba_zbb_sscofpmf.
        • Cache: 32KB L1 I-cache and D-cache, 64-byte block size.
        • MMU: riscv,sv48.
        • OPP table (opp-table0) with frequencies from 24 MHz to 1.6 GHz.
      • No differences in CPU configuration.
  5. Peripheral Nodes

    • First DTS File:
      • Extensive peripherals: USB, HDMI, ISP, I2S audio, display subsystem, MIPI DSI, DMA controllers, timers, watchdog, PWM, RTC, etc.
    • Second DTS File:
      • Limited peripherals: UART, GPIO, timers, RTC, DDR controllers; omits USB, HDMI, ISP, I2S, display-related nodes.
      • Differences: Second file lacks multimedia and connectivity features, suggesting a minimal configuration for specific use cases (e.g., server or embedded systems).
  6. IOMMU and DMA

    • Both Files:
      • IOMMU (iommu@50c00000, compatible arm,smmu-v3) with similar configurations.
      • DMA controllers (dma-controller-hsp@0x50430000, dma-controller-aon@0x518c0000) with similar properties.
      • dma-noncoherent property present in both.
    • Differences:
      • First file has more IOMMU-referencing nodes (e.g., ISP, USB), indicating broader IOMMU usage.
      • Second file has fewer due to reduced peripheral set.
  7. Thermal Zones

    • Both Files:
      • Identical thermal0 configuration with trip points at 60C, 70C, 110C and cooling maps for CPUs.
      • No differences.
  8. Aliases and Chosen Nodes

    • Both Files:
      • Identical aliases (serial0, ethernet0, ethernet1, rtc0, rtc1).
      • Identical chosen node with stdout-path = “serial0:115200n8” and OpenSBI domain-config.
      • No differences.

Implications

  • NPU Support: Absence of NPU configuration in the second file suggests limited or no NPU support, or management via firmware. The 512MB CMA region is available, but reduced mmz_nid_0_part_0 (1.5GB vs. 5GB) may limit NPU capabilities.
  • Memory: Reduced main memory (4GB vs. 8GB) and reserved memory (1.5GB vs. 5GB) in the second file may constrain memory-intensive tasks.
  • Peripherals: First file supports multimedia and connectivity (USB, HDMI, ISP), suitable for full-featured systems. Second file is minimal, likely for server or embedded use.
  • Compatibility: Both files target SiFive FU740/Eswin EIC7700 SoC, but second file may represent a different board variant or kernel configuration.

Recommendations

  1. NPU Analysis: Investigate missing NPU configuration in the second file. Check kernel driver or firmware for NPU support and memory usage.
  2. Memory Verification: Confirm system RAM capacity for the second file. Assess if 1.5GB mmz_nid_0_part_0 is sufficient for peripherals.
  3. Peripheral Support: Use first file for multimedia/connectivity needs. Add missing nodes to second file if required.
  4. Kernel Compatibility: Ensure kernel version supports second file’s reduced feature set.

Memory Allocation Comparison Chart

The following chart data compares memory regions (values in GB):

  • Main Memory: First DTS = 8, Second DTS = 4
  • CMA: First DTS = 0.512, Second DTS = 0.512
  • SPRAM: First DTS = 0.004, Second DTS = 0.004
  • mmz_nid_0_part_0: First DTS = 5, Second DTS = 1.5

Conclusion

The first DTS file is more comprehensive, supporting NPU and extensive peripherals, while the second is minimal, lacking NPU confiDevice Tree Source (DTS) Comparison Report for Milk-V Megrez (Updated)

Date: August 3, 2025
Time: 01:46 PM CDT
Author: Grok 3, xAI

Overview

This report compares three Device Tree Source (DTS) files for the Milk-V Megrez computer, based on the SiFive FU740 or Eswin EIC7700 SoC. The comparison focuses on the Neural Processing Unit (NPU) configuration, memory allocation, and other significant differences. The files are referred to as:

  • First DTS: Comprehensive, truncated (145,946 characters), with NPU support.
  • Second DTS: Complete, minimal, no explicit NPU support.
  • Third DTS: Complete, explicitly no NPU support, provided in the latest query.

Key Findings

  1. File Structure and Completeness

    • First DTS: Large, truncated, includes extensive peripheral nodes (USB, HDMI, ISP, I2S, etc.) and NPU configuration.
    • Second DTS: Complete, minimal, omits many peripherals and NPU-specific nodes.
    • Third DTS: Complete, includes additional OPP tables (DSP, G2D, VI, VENC, VDEC) and multimedia peripherals, explicitly lacks NPU support.
  2. NPU Configuration

    • First DTS:
      • Includes opp-table@npu with operating points: 1.04 GHz at 0.9V, 1.5 GHz at 1.05V.
      • No explicit NPU device node, likely managed via OPP table and system control registers.
    • Second DTS:
      • No opp-table@npu or NPU device node, suggesting no NPU support or management outside DTS (e.g., firmware).
    • Third DTS:
      • Includes opp-table@npu with operating points: 1.04 GHz at 0.9V, 1.5 GHz at 1.05V, identical to First DTS.
      • No explicit NPU device node, similar to First DTS, but presence of opp-table@npu suggests potential NPU support despite being labeled as “no NPU support.”
      • Implication: The Third DTS’s label as “no NPU support” may be misleading, as it includes NPU OPPs, possibly indicating conditional or driver-dependent NPU support.
  3. Memory Configuration

    • First DTS:
      • Main Memory: 8GB at 0x80000000 (reg = <0x00 0x80000000 0x08 0x00>).
      • SPRAM: 4MB at 0x59000000 (reg = <0x00 0x59000000 0x00 0x400000>).
      • Reserved Memory:
        • linux,cma: 512MB, reusable, 4KB alignment.
        • sprammemory@59000000: 4MB, no-map.
        • g2d_*_boundary_reserved_4k: Three 4KB regions at 4GB, 8GB, 12GB boundaries, no-map.
        • mmz_nid_0_part_0: 5GB at 0x300000000, no-map.
    • Second DTS:
      • Main Memory: 4GB at 0x80000000 (reg = <0x00 0x80000000 0x04 0x00>).
      • SPRAM: 4MB at 0x59000000, identical to First DTS.
      • Reserved Memory:
        • linux,cma: 512MB, identical to First DTS.
        • sprammemory@59000000: 4MB, identical to First DTS.
        • g2d_*_boundary_reserved_4k: Three 4KB regions, identical to First DTS.
        • mmz_nid_0_part_0: 1.5GB at 0x300000000, smaller than First DTS.
    • Third DTS:
      • Main Memory: 4GB at 0x80000000, identical to Second DTS.
      • SPRAM: 4MB at 0x59000000, identical to First and Second DTS.
      • Reserved Memory:
        • linux,cma: 512MB, identical to First and Second DTS.
        • sprammemory@59000000: 4MB, identical to First and Second DTS.
        • g2d_*_boundary_reserved_4k: Three 4KB regions, identical to First and Second DTS.
        • mmz_nid_0_part_0: 256KB at 0x300000000 (reg = <0x03 0x00 0x01 0x1000>), significantly smaller than First (5GB) and Second (1.5GB) DTS.
    • Differences:
      • Main memory: First DTS (8GB) vs. Second and Third DTS (4GB).
      • mmz_nid_0_part_0: First DTS (5GB), Second DTS (1.5GB), Third DTS (256KB), indicating a progressive reduction in reserved memory, potentially limiting NPU or other peripheral capabilities.
  4. CPU Configuration

    • All Files:
      • Four CPU cores (cpu@0 to cpu@3) with identical properties:
        • Compatible: eswin,eic770x\riscv.
        • ISA: rv64imafdch_zicsr_zifencei_zba_zbb_sscofpmf.
        • Cache: 32KB L1 I-cache and D-cache, 64-byte block size.
        • MMU: riscv,sv48.
        • OPP table: First and Second DTS use opp-table0 (24 MHz to 1.6 GHz), Third DTS uses opp-table-d0@cpu (24 MHz to 1.8 GHz) and opp-table-d1@cpu (24 MHz to 1.4 GHz).
      • Differences:
        • Third DTS splits CPU OPP tables into d0 (up to 1.8 GHz) and d1 (up to 1.4 GHz), potentially for different core clusters or power domains, unlike the single opp-table0 in First and Second DTS.
  5. Peripheral Nodes

    • First DTS:
      • Extensive peripherals: USB, HDMI, ISP, I2S, display subsystem, MIPI DSI, DMA controllers, timers, watchdog, PWM, RTC, etc.
    • Second DTS:
      • Limited peripherals: UART, GPIO, timers, RTC, DDR controllers; omits USB, HDMI, ISP, I2S, display-related nodes.
    • Third DTS:
      • Includes multimedia peripherals: USB, HDMI, ISP, I2S, display subsystem, MIPI DSI, similar to First DTS.
      • Additional nodes: opp-table@dsp, opp-table@g2d, opp-table@vi, opp-table@venc, opp-table@vdec for DSP, graphics, video input, encoder, and decoder.
      • Differences:
        • Third DTS is more comprehensive than Second DTS, resembling First DTS in peripheral support but with additional OPP tables.
        • Second DTS remains the most minimal, lacking multimedia and connectivity features.
  6. IOMMU and DMA

    • All Files:
      • IOMMU (iommu@50c00000, compatible arm,smmu-v3) with similar configurations.
      • DMA controllers (e.g., dma-controller-hsp@0x50430000) present in First and Second DTS; Third DTS includes similar DMA configurations.
      • dma-noncoherent property consistent across all files.
    • Differences:
      • First and Third DTS have more IOMMU-referencing nodes (e.g., ISP, USB), indicating broader IOMMU usage.
      • Second DTS has fewer due to reduced peripheral set.
  7. Thermal Zones

    • All Files:
      • Identical thermal0 configuration with trip points at 60C, 70C, 110C and cooling maps for CPUs.
      • No differences.
  8. Aliases and Chosen Nodes

    • All Files:
      • Identical aliases (serial0, ethernet0, ethernet1, rtc0, rtc1).
      • Identical chosen node with stdout-path = “serial0:115200n8” and OpenSBI domain-config.
      • No differences.
  9. Additional OPP Tables (Third DTS)

    • Third DTS includes:
      • opp-table@dsp: 520 MHz, 1.04 GHz.
      • opp-table@g2d: 260 MHz, 520 MHz, 693.33 MHz, 1.04 GHz.
      • opp-table@vi: 200 MHz, 400 MHz, 800 MHz.
      • opp-table@venc: 200 MHz, 400 MHz, 800 MHz.
      • opp-table@vdec: 200 MHz, 400 MHz, 800 MHz.
    • First and Second DTS lack these, indicating Third DTS supports additional accelerators (DSP, graphics, video).

Implications

  • NPU Support: First and Third DTS include opp-table@npu, suggesting potential NPU support, while Second DTS lacks it, confirming no NPU support. The Third DTS’s “no NPU support” label may reflect driver or firmware limitations rather than hardware absence.
  • Memory: First DTS (8GB main, 5GB reserved) supports larger workloads. Second and Third DTS (4GB main) differ in reserved memory (1.5GB vs. 256KB), with Third DTS’s minimal 256KB potentially limiting NPU or multimedia tasks.
  • Peripherals: First and Third DTS support multimedia and connectivity, suitable for full-featured systems. Second DTS is minimal, likely for server or embedded use.
  • CPU OPPs: Third DTS’s split OPP tables (d0, d1) suggest advanced power management, potentially for different core types or clusters.
  • Compatibility: All files target SiFive FU740/Eswin EIC7700 SoC. Third DTS’s additional OPP tables indicate support for more accelerators, but its minimal reserved memory may constrain performance.

Recommendations

  1. NPU Analysis: Clarify Third DTS’s NPU status. Presence of opp-table@npu suggests potential support; verify with kernel driver or firmware.
  2. Memory Verification: Confirm system RAM for Second and Third DTS (4GB). Third DTS’s 256KB mmz_nid_0_part_0 may be insufficient for NPU or multimedia; consider increasing if needed.
  3. Peripheral Support: Use First or Third DTS for multimedia/connectivity needs. Second DTS requires additional nodes for such features.
  4. Kernel Compatibility: Ensure kernel supports Third DTS’s OPP tables and Second DTS’s minimal configuration.

Memory Allocation Comparison Chart

The following chart data compares memory regions (values in GB):

  • Main Memory: First DTS = 8, Second DTS = 4, Third DTS = 4
  • CMA: First DTS = 0.512, Second DTS = 0.512, Third DTS = 0.512
  • SPRAM: First DTS = 0.004, Second DTS = 0.004, Third DTS = 0.004
  • mmz_nid_0_part_0: First DTS = 5, Second DTS = 1.5, Third DTS = 0.000256

Conclusion

The First DTS is comprehensive with NPU and extensive peripheral support. The Second DTS is minimal, lacking NPU and multimedia features. The Third DTS, despite being labeled “no NPU support,” includes NPU OPPs and multimedia peripherals, resembling the First DTS but with minimal reserved memory (256KB). Further investigation into NPU support and memory allocation is recommended for the Third DTS.guration and many peripherals. Memory differences (4GB vs. 8GB main, 1.5GB vs. 5GB reserved) suggest different system configurations. Further investigation into NPU support and kernel compatibility is recommended for the second file.

PS The third came from the rockos sdcard image
the 20 g file was for the board to run deepseek r1 qwen distill 7b ennp, hence 8gb

1 Like