revyos / th1520-linux-kernel

TH1520 linux kernel
Other
11 stars 6 forks source link

fix: devicetree node sdio1 is missing. #13

Closed chainsx closed 3 months ago

chainsx commented 7 months ago

Tested: After adding the sdio1 node on the 6.6 kernel, the WiFi module can function properly.

root@licheepi-4a:~# lsmod
Module                  Size  Used by
lz4hc                  12288  0
lz4hc_compress         28672  1 lz4hc
lz4                    12288  0
lz4_compress           45056  1 lz4
binfmt_misc            24576  1
rtw88_8723ds           12288  0
rtw88_8723d            45056  1 rtw88_8723ds
rtw88_sdio             24576  1 rtw88_8723ds
rtw88_core            212992  2 rtw88_8723d,rtw88_sdio
mac80211             1454080  2 rtw88_sdio,rtw88_core
libarc4                12288  1 mac80211
cfg80211             1126400  2 rtw88_core,mac80211
rfkill                 28672  3 cfg80211
fuse                  200704  1
ip_tables              36864  0
root@licheepi-4a:~# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.148  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::6f7b:4495:eb1a:2904  prefixlen 64  scopeid 0x20<link>
        ether 5e:ae:c9:a9:69:c3  txqueuelen 1000  (Ethernet)
        RX packets 151  bytes 19022 (19.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 125  bytes 10351 (10.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 13  base 0xa000

eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 5e:ae:c9:a9:69:c4  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 14  base 0x6000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 2c:05:47:c3:45:73  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@licheepi-4a:~# uname -a
Linux licheepi-4a 6.6.14-current-thead #2 SMP Mon Jan 29 18:51:28 CST 2024 riscv64 riscv64 riscv64 GNU/Linux

However, the current system still has the following issues:

After inserting the SD card, the following error message will appear, but it does not affect the usage and may cause the speed of appearance of the SD device to slow down..

[  463.682592] mmc1: Tuning failed, falling back to fixed sampling clock
[  463.682662] sdhci-dwcmshc ffe7090000.mmc: tuning failed: -11
[  463.682756] mmc1: tuning execution failed: -5
[  463.682808] mmc1: error -5 whilst initialising SD card
[  473.918913] mmc1: Timeout waiting for hardware cmd interrupt.
[  473.918944] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[  473.918951] mmc1: sdhci: Sys addr:  0x00000001 | Version:  0x00000005
[  473.918959] mmc1: sdhci: Blk size:  0x00007040 | Blk cnt:  0x00000000
[  473.918966] mmc1: sdhci: Argument:  0x00000000 | Trn mode: 0x00000010
[  473.918972] mmc1: sdhci: Present:   0x03ff0000 | Host ctl: 0x00000017
[  473.918977] mmc1: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[  473.918982] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x0000000f
[  473.918986] mmc1: sdhci: Timeout:   0x00000004 | Int stat: 0x00000000
[  473.918991] mmc1: sdhci: Int enab:  0x00000020 | Sig enab: 0x00000020
[  473.918996] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[  473.919002] mmc1: sdhci: Caps:      0x3f69c881 | Caps_1:   0x08008177
[  473.919007] mmc1: sdhci: Cmd:       0x00000102 | Max curr: 0x00191919
[  473.919012] mmc1: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x00edc87f
[  473.919018] mmc1: sdhci: Resp[2]:   0x325b5900 | Resp[3]:  0x00400e00
[  473.919025] mmc1: sdhci: Host ctl2: 0x0000300b
[  473.919030] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000000ce8220
[  473.919036] mmc1: sdhci: ============================================
[  474.011045] mmc1: Tuning failed, falling back to fixed sampling clock
[  474.011147] sdhci-dwcmshc ffe7090000.mmc: tuning failed: -11
[  474.011199] mmc1: tuning execution failed: -5
[  474.081228] mmc1: new high speed SDHC card at address aaaa
[  474.085470] mmcblk1: mmc1:aaaa SC32G 29.7 GiB
[  474.105659]  mmcblk1: p1