RTSX(4)
π³ RTSX(4) β Realtek SD card reader, but make it understood
okay bestie, so this is a kernel interfaces manual page for rtsx(4), and it's genuinely not that deep once I explain it. you got this π
β¨ NAME β¨
rtsx β the Realtek SD card reader driver. that's it. that's the whole vibe.
πΈ SYNOPSIS πΈ
so like, you want this bad boy inside your kernel? then drop these lines into the kernel configuration file, no cap:
device mmc
device mmcsd
device rtsx
or, alternatively, if you'd rather load it as a module at boot time β which, honestly, is giving β¨main character energyβ¨ β you put these into loader.conf(5):
mmc_load="YES"
mmcsd_load="YES"
rtsx_load="YES"
π DESCRIPTION π
the rtsx driver provides support for the Realtek SD card reader. the way it works is genuinely so clean: the driver attaches the mmc bus on card insertion and detaches it on card removal. in and out, periodt. π¦
π HARDWARE π
the rtsx driver supports the following Realtek SD card readers, and I'm listing every single one because we don't skip:
RTS5209RTS5227RTS5229RTS522ARTS525ARTS5260RTL8411BRTS5249(unverified)RTL8402(unverified)RTL8411(unverified)
the three marked (unverified) are literally the original page saying "unverified" β I'm just the messenger, bestie π
π SEE ALSO π
mmc(4)mmcsd(4)- SD Specifications, Part 2, SD Host Controller, Simplified Specification
- SanDisk Secure Digital Card
like, go read those if you want the full lore π§
π¦ HISTORY π¦
the rtsx driver appeared in FreeBSD 13.0 and was ported from OpenBSD with modifications found in Linux and NetBSD. so it's basically a collab across four operating systems β iconic behavior honestly π
π AUTHORS π
shoutout to the people who actually built this:
- Henri Hennebert
<hlh@restart.be> - Gary Jennejohn
<gj@freebsd.org> - Jesper Schmitz Mouridsen
<jsm@FreeBSD.org>
π«Ά CONTRIBUTORS π«Ά
and one more legend:
- Lutz Bichler
<Lutz.Bichler@gmail.com>
π₯ DEBUGGING INFORMATION π₯
so if something's acting cursed, dev.rtsx.0.debug_mask can be set with the following masks β pick your fighter:
0x01β to show the basic flow of the driver,0x02β to trace the SD commands,0x04β to trace the tuning phase.
ngl this is genuinely such a cute little feature, iykyk π
π BUGS π
okay. this is the part where you sit down and take notes, because some of this is actually scary π
RTS522Aon Lenovo T470p: card detection and read-only switch are reversed. this is solved by adding inloader.conf(5):
dev.rtsx.0.inversion=1
the driver tries to automate those exceptions. if this automation is wrong, it can be avoided by adding in loader.conf(5):
dev.rtsx.0.inversion=0
- Mounting a filesystem with write access on a card that's write protected may involve a kernel crash. yeah. a crash. like actually. be careful π¨
- Suspend/Resume do not work under MMCCAM. not great, not terrible, but definitely not great.
- For some chips (e.g.
RTS5260), afterdevctl disable/enableorkldunload/kldload, the driver can't detect a card correctly. so, something something, it gets confused. π
and that's the whole page, bestie!! no skipped flags, no skipped warnings, no skipped emails β we kept it all π
this iconic little writeup came from the Debian edition of the manual, dated May 26, 2025, and it's filed under RTSX(4) in the Kernel Interfaces Manual β go forth and read your SD cards πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2020 Henri Hennebert <hlh@restart.be>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms