I know that this is an older post, but I've just met the same problem so I'll drop the solution if anyone else is looking for an answer.
The gpio-17 (sda)
doesn't concern the SD card. The device tree for the board tell us that this is the i2c bus, so completely different from an SPI or SD bus. Moreover in this router the SD controller is actually a separate Genesys Logic chip on the USB bus:
root@AR750:~# opkg install usbutils
root@AR750:~# lsusb
Bus 001 Device 003: ID 05e3:0752 Generic USB Storage <--- that one
Bus 001 Device 002: ID 05e3:0618 USB2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.127 ehci_hcd EHCI Host Controller
It doesn't have an attached driver with the standard image (23.05.0-rc3 in my case):
root@AR750:~# lsusb -tv
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
ID 1d6b:0002
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
ID 05e3:0618
|__ Port 1: Dev 3, If 0, Class=, Driver=, 480M <--- dang, no driver
ID 05e3:0752
The default image only has the bare minimum USB support:
root@AR750:~# opkg list-installed | grep kmod-usb
kmod-usb-core - 5.15.127-1
kmod-usb-ehci - 5.15.127-1
kmod-usb2 - 5.15.127-1
But it doesn't have what we need:
root@AR750:~# opkg info kmod-usb-storage
Package: kmod-usb-storage
Version: 5.15.127-1
Depends: kernel (= 5.15.127-1-7882f8992415e49ff2792f44c55b856e), kmod-scsi-core, kmod-usb-core
Status: unknown ok not-installed <--- not installed
Section: kernel
Architecture: mips_24kc
Size: 25147
Filename: kmod-usb-storage_5.15.127-1_mips_24kc.ipk
Description: Kernel support for USB Mass Storage devices
So let's install it, as well as the all-important block-mount
package:
root@AR750:~# opkg install kmod-usb-storage block-mount
And check that we can now see our card:
root@AR750:~# lsusb -tv
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
ID 1d6b:0002
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
ID 05e3:0618
|__ Port 1: Dev 3, If 0, Class=, Driver=usb-storage, 480M <--- we've got a driver
ID 05e3:0752
root@AR750:~# block info
/dev/mtdblock5: UUID="XXXX" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock6: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="XXXX" VERSION="1.15" TYPE="f2fs" <--- the card
Note that what you actually see in the last command is whether there's a recognizable, formatted partition on the card. If you use an unpartitioned card it won't appear in this output. You should still see some information in the syslog (dmesg | grep sda
).
kmod-usb-storage
should probably be added to the default image. I'll see if I can open a ticket or something.