]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/rtsx.4
MFV: xz 5.4.4.
[FreeBSD/FreeBSD.git] / share / man / man4 / rtsx.4
1 .\"
2 .\" Copyright (c) 2020 Henri Hennebert <hlh@restart.be>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. The name of the author may not be used to endorse or promote products
11 .\"    derived from this software without specific prior written permission.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd April 26, 2022
28 .Dt RTSX 4
29 .Os
30 .Sh NAME
31 .Nm rtsx
32 .Nd Realtek SD card reader
33 .Sh SYNOPSIS
34 To compile this driver into the kernel, place the following
35 lines in the kernel configuration file:
36 .Bd -ragged -offset indent
37 .Cd device mmc
38 .Cd device mmcsd
39 .Cd device rtsx
40 .Ed
41 .Pp
42 Alternatively, to load the driver as a module at boot time,
43 place the following lines in
44 .Xr loader.conf 5 :
45 .Bd -literal -offset indent
46 .Cd mmc_load="YES"
47 .Cd mmcsd_load="YES"
48 .Cd rtsx_load="YES"
49 .Ed
50 .Sh DESCRIPTION
51 The
52 .Nm
53 driver provides support for Realtek SD card reader.
54 Driver attaches mmc bus on card insertion and detaches it on card removing.
55 .Sh HARDWARE
56 The
57 .Nm
58 driver supports different specification compatible chips.
59 The following chips have been verified to work:
60 .Pp
61 .Bl -bullet -compact
62 .It
63 RTS5209
64 .It
65 RTS5227
66 .It
67 RTS5229
68 .It
69 RTS522A
70 .It
71 RTS525A
72 .It
73 RTS5260
74 .It
75 RTL8411B
76 .El
77 .Pp
78 It should also work for:
79 .Pp
80 .Bl -bullet -compact
81 .It
82 RTS5249
83 .It
84 RTL8402
85 .It
86 RTL8411
87 .El
88 .Sh SEE ALSO
89 .Xr mmc 4 ,
90 .Xr mmcsd 4
91 .Rs
92 .%T "SD Specifications, Part 2, SD Host Controller, Simplified Specification"
93 .%T "SanDisk Secure Digital Card"
94 .Re
95 .Sh HISTORY
96 The
97 .Nm
98 driver was ported from
99 .Ox
100 with modifications found in Linux and
101 .Nx .
102 .Sh AUTHORS
103 .An Henri Hennebert Aq Mt hlh@restart.be
104 .An Gary Jennejohn Aq Mt gj@freebsd.org
105 .An Jesper Schmitz Mouridsen Aq Mt jsm@FreeBSD.org
106 .Sh CONTRIBUTORS
107 .An Lutz Bichler Aq Mt Lutz.Bichler@gmail.com
108 .Sh DEBUGGING INFORMATION
109 .Em dev.rtsx.0.debug_mask
110 can be set with the following masks:
111 .Bl -bullet
112 .It
113 0x01 - to show the basic flow of the driver,
114 .It
115 0x02 - to trace the SD commands,
116 .It
117 0x04 - to trace the tuning phase.
118 .El
119 .Sh BUGS
120 .Bl -bullet
121 .It
122 RTS522A on Lenovo T470p, card detection and read-only switch are reversed.
123 This is solved by adding in
124 .Em loader.conf(5) :
125 .Bd -ragged
126 .Cd dev.rtsx.0.inversion=1
127 .Ed
128 .Pp
129 The driver tries to automate those exceptions.
130 If this automation is wrong, it can be avoided by adding in
131 .Em loader.conf(5) :
132 .Bd -ragged
133 .Cd dev.rtsx.0.inversion=0
134 .Ed
135 .It
136 Mounting a filesystem with write access on a card write protected may involve a kernel crash.
137 .It
138 Suspend/Resume do not work under MMCCAM.
139 .It
140 For some chips (e.g. RTS5260) after
141 .Cd devctl disable/enable
142 or
143 .Cd kldunload/kldload
144 the driver can't detect a card correctly.
145 .El