Skip to content

fix: LicheePi 4A ethernet - correct DWMAC defconfig symbol#299

Open
zhuzhenxxx-collab wants to merge 1 commit into
RVCK-Project:rvck-6.6from
zhuzhenxxx-collab:fix/dwmac
Open

fix: LicheePi 4A ethernet - correct DWMAC defconfig symbol#299
zhuzhenxxx-collab wants to merge 1 commit into
RVCK-Project:rvck-6.6from
zhuzhenxxx-collab:fix/dwmac

Conversation

@zhuzhenxxx-collab
Copy link
Copy Markdown

@zhuzhenxxx-collab zhuzhenxxx-collab commented Jun 4, 2026

Fix LicheePi 4A (TH1520) ethernet being non-functional.

Change: CONFIG_DWMAC_XUANTIE=mCONFIG_DWMAC_THEAD=m

Tested on LicheePi 4A - ethernet works after this fix.

root@light-a-val:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:321 errors:0 dropped:0 overruns:0 frame:0
          TX packets:321 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20460 (19.9 KiB)  TX bytes:20460 (19.9 KiB)

root@light-a-val:~# insmod /lib/modules/6.6.141+/kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-thead.ko
[  195.008850] thead-dwmac ffe7070000.ethernet: IRQ eth_wake_irq not found
[  195.015846] thead-dwmac ffe7070000.ethernet: PTP uses main clock
[  195.024276] thead-dwmac ffe7070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[  195.031579] thead-dwmac ffe7070000.ethernet:         DWMAC1000
[  195.036927] thead-dwmac ffe7070000.ethernet: DMA HW capability register supported
[  195.044501] thead-dwmac ffe7070000.ethernet: RX Checksum Offload Engine supported
[  195.052047] thead-dwmac ffe7070000.ethernet: COE Type 2
[  195.057352] thead-dwmac ffe7070000.ethernet: TX Checksum insertion supported
[  195.064462] thead-dwmac ffe7070000.ethernet: Enhanced/Alternate descriptors
[  195.071496] thead-dwmac ffe7070000.ethernet: Enabled extended descriptors
[  195.078343] thead-dwmac ffe7070000.ethernet: Ring mode enabled
[  195.084265] thead-dwmac ffe7070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[  195.117835] thead-dwmac ffe7060000.ethernet: IRQ eth_wake_irq not found
[  195.124989] thead-dwmac ffe7060000.ethernet: PTP uses main clock
[  195.132227] thead-dwmac ffe7060000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[  195.139479] thead-dwmac ffe7060000.ethernet:         DWMAC1000
[  195.144810] thead-dwmac ffe7060000.ethernet: DMA HW capability register supported
[  195.152389] thead-dwmac ffe7060000.ethernet: RX Checksum Offload Engine supported
[  195.160012] thead-dwmac ffe7060000.ethernet: COE Type 2
[  195.165325] thead-dwmac ffe7060000.ethernet: TX Checksum insertion supported
[  195.172457] thead-dwmac ffe7060000.ethernet: Enhanced/Alternate descriptors
[  195.179507] thead-dwmac ffe7060000.ethernet: Enabled extended descriptors
[  195.186461] thead-dwmac ffe7060000.ethernet: Ring mode enabled
[  195.192531] thead-dwmac ffe7060000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[  195.216405] thead-dwmac ffe7070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[  195.238180] thead-dwmac ffe7070000.ethernet eth0: PHY [stmmac-0:01] driver [Generic PHY] (irq=POLL)
[  195.247463] dwmac1000: Master AXI performs fixed burst length
[  195.253329] thead-dwmac ffe7070000.ethernet eth0: No Safety Features support found
[  195.261013] thead-dwmac ffe7070000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[  195.270342] thead-dwmac ffe7070000.ethernet eth0: registered PTP clock
[  195.278016] thead-dwmac ffe7070000.ethernet eth0: configuring for phy/rgmii-id link mode
root@light-a-val:~# [  195.423590] thead-dwmac ffe7060000.ethernet eth1: Register MEM_TYPE_PAGE_POOL RxQ-0
[  195.439486] thead-dwmac ffe7060000.ethernet eth1: PHY [stmmac-0:02] driver [Generic PHY] (irq=POLL)
[  195.456142] dwmac1000: Master AXI performs fixed burst length
[  195.462053] thead-dwmac ffe7060000.ethernet eth1: No Safety Features support found
[  195.469924] thead-dwmac ffe7060000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[  195.484830] thead-dwmac ffe7060000.ethernet eth1: registered PTP clock
[  195.494390] thead-dwmac ffe7060000.ethernet eth1: configuring for phy/rgmii-id link mode

root@light-a-val:~# [  197.346067] thead-dwmac ffe7070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
if^C
root@light-a-val:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 46:CE:7D:81:C2:2D
          inet6 addr: fe80::8d31:2a1c:1a2:5828/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:660 (660.0 B)  TX bytes:2361 (2.3 KiB)
          Interrupt:32 Base address:0x6000

eth1      Link encap:Ethernet  HWaddr 46:CE:7D:81:C2:2E
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:33 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:969 errors:0 dropped:0 overruns:0 frame:0
          TX packets:969 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:59836 (58.4 KiB)  TX bytes:59836 (58.4 KiB)

root@light-a-val:~# uname -a
Linux light-a-val 6.6.141+ #57 SMP Fri Jun  5 02:11:15 UTC 2026 riscv64 GNU/Linux
root@light-a-val:~#

Link: #298

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/26926320203

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/299/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware ['qemu']
LAVA Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:
check result
kunit-test success
kernel-build success
check-patch success
lava-trigger-qemu success
lava-trigger-sg2042 skipped
lava-trigger-k1 skipped
lava-trigger-lpi4a skipped

Kunit Test Result

[02:30:42] Testing complete. Ran 482 tests: passed: 466, skipped: 16

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 0

LAVA Check (qemu)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/qemu/qemu-ltp.yaml
testcase_path lava-testcases/common-test/ltp/ltp.yaml
kernel_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/299_26926320203_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/299_26926320203_1/initramfs.img
rootfs_download_url https://fast-mirror.isrc.ac.cn/openeuler-sig-riscv/openEuler-RISC-V/RVCK/openEuler24.03-LTS-SP1/openeuler-rootfs.img.zst
testcase_ref main
testitem_name RVCK-Project_rvck_pull_request_target_299__common-test_qemu

result: Lava check done!

Comment thread arch/riscv/configs/th1520_defconfig Outdated
dist inclusion
category: cleanup
Link: RVCK-Project#298

--------------------------------

CONFIG_DWMAC_XUANTIE does not exist in Kconfig (the actual symbol is
CONFIG_DWMAC_THEAD). The invalid config meant the TH1520 GMAC glue
driver was never built, leaving ethernet non-functional. Change to
CONFIG_DWMAC_THEAD=y to build it in.

Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/26990328769

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/299/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware ['qemu']
LAVA Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:
check result
kunit-test success
kernel-build success
check-patch success
lava-trigger-qemu success
lava-trigger-sg2042 skipped
lava-trigger-k1 skipped
lava-trigger-lpi4a skipped

Kunit Test Result

[01:49:42] Testing complete. Ran 482 tests: passed: 466, skipped: 16

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 0

LAVA Check (qemu)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/qemu/qemu-ltp.yaml
testcase_path lava-testcases/common-test/ltp/ltp.yaml
kernel_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/299_26990328769_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/299_26990328769_1/initramfs.img
rootfs_download_url https://fast-mirror.isrc.ac.cn/openeuler-sig-riscv/openEuler-RISC-V/RVCK/openEuler24.03-LTS-SP1/openeuler-rootfs.img.zst
testcase_ref main
testitem_name RVCK-Project_rvck_pull_request_target_299__common-test_qemu

result: Lava check done!

@zhuzhenxxx-collab
Copy link
Copy Markdown
Author

@sterling-teng Please merge this pr

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants