Realtek 5129 USB Card Reader Controller
Published on Mar 08, 2015 by Sachin.
Updated on March 24, 2020
The post explains how to enable Realtek RTS5129 Card Reader controller in the Linux kernel.
I never came across this problem of SD-card not been supported on Linux. At the
beginning, I thought it may be the hardware problem but Hey.. I just bought a
new Laptop!. I needed to burn an image on the SD-card as soon as I inserted a SD
card adapter, the OS was not able to detect it. I went ahead and scanned dmesg
log but no luck. OK! that’s fine, I looked into lspci
output but still not
trace of Card Reader Controller. May be the controller is not attached to PCI
bus. I fired lsusb
and voila! I got an entry. The output had a reference of
Card Reader Controller.
1: Bus 003 Device 003: ID 0bda:5728 Realtek Semiconductor Corp. 2: Bus 004 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller 3: Bus 005 Device 007: ID 0cf3:3004 Atheros Communications, Inc. 4: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 5: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 6: Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 7: Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 8: Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 9: Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
This proved that the Card Reader Controller was attached to USB bus and Linux kernel(My kernel was 3.16.1) had support for it but may be few user-space modules are missing. So I downloaded the source code for the latest kernel(Version 3.19.0) and searched for the string ’RTS’ in Linux kernel configuration.
Figure 1: Linux kernel 3.19.0. Result of ’RTS’
I ignored MFD_RTSX_PCI
and enabled MFD_RTSX_USB
from Device
Drivers -> Multifunctional device drivers -> Realtek USB Card Reader
as module.
Figure 2: Enable MFD RTSX USB
I recompiled the kernel and inserted SD-card. Nothing showed up in
dmesg
log. I loaded the module manually using the command
modprobe rtsx_usb
Still the SD-card was not detected. Something was still missing. I went ahead and searched the Linux kernel config for ’MMC’(MultiMediaCard) and two familiar modules showed up.
Figure 3: Linux kernel 3.19.0. Result of ’MMC’
Again I safely ignored MMC_REALTEK_PCI
and enabled MMC_REALTEK_USB
from
Device Drivers -> MMC/SD/SDIO card support -> Realtek USB SD/MMC Card interface
Driver as module.
Figure 4: Enable MMC REALTEK USB
I compiled the kernel again and re-inserted the SD-card. This time the SD-card got successfully detected.
Support for Realtek USB card reader is patched into the Linux kernel 3.15 on Mar 19, 2014.
Note: The module rtsx_usb
should load automatically. If the module is not
able to load, create a file rtsx_usb.conf
inside /etc/modules-load.d/
with
following content:
1: # Load rtsx_usb.ko on boot This module is used to mount sdcard(mmc) 2: # for Realtek RTS5129 Card Reader Controller. You need to enable 3: # CONFIG_MDF_RTSX_USB and MMC_REALTEK_USB in kernel. 4: rtsx_usb