SD Card on GL-AR750 (GPIO issue)

Sorry, not sure where to post this!

I am having issues mounting/reading from an SD card plugged into my GL-AR750. I have confirmed it is detected fine and works with the stock firmware.

When I checked dmesg | grep sda I get the following message

[ 0.123912] gpio-17 (sda): enforced open drain please flag it properly in DT/ACPI DSDT/board file

The firmware that works is openwrt-ar750-3.211-1227 (stock from GL iNet)
The firmware I am trying to get it to work on is openwrt-21.02.1-ath79-generic-glinet_gl-ar750-initramfs-kernel

I have tried flashing OpenWRT from uboot as well as upgrading through LUCI from a stock install. I have tried installing drivers, but my guess from the message, this goes deeper than that. I have tried Google and a ton of troubleshooting, without any luck.

Any help is appreciated!

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.

1 Like

Ticket: https://github.com/openwrt/openwrt/issues/13349