* Using SD cards on Samsung S3C2410/S3C2440 based systems
@ 2009-12-15 13:43 Juergen Beisert
2009-12-15 17:31 ` Andy Green
0 siblings, 1 reply; 7+ messages in thread
From: Juergen Beisert @ 2009-12-15 13:43 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
has anyone experience with SD card usage on Samsung S3C2410/S3C2440 CPU based
systems?
I tried with:
- a very old Canon SD Memory Card SDC, 16 MiB
- SanDisk SD, 512 MiB
- SanDisk Micro-SD with adapter, 512 MiB
- Transcend SD ultra, 1 GiB
- Kingston Micro SD with adapter, 2 GiB
- hama SD Class 2, 2GB
- MMC plus, extreme memory, 2 GB
- Platinum SD 1, GB
I tried with a few kernels of the 2.6.31.x revision and 2.6.32.1, but most of
these cards are failing always.
The old Canon card works with every kernel. The others do not work with any
2.6.31.x revision kernel, but some(!) are working with 2.6.32.1 (both SanDisk
(512 MiB) and the Kingston Micro SD).
Kernel's output is most of the time:
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c2440-sdi s3c2440-sdi: powered down.
mmc0: error -110 whilst initialising SD card
s3c2440-sdi s3c2440-sdi: powered down.
The output for the "Kingston Micro SD" in kernel 2.6.32.1:
s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 24978kHz (requested: 25000kHz).
s3c-sdi s3c2440-sdi: running at 24978kHz (requested: 25000kHz).
mmc0: new SD card at address 8d7e
mmcblk0: mmc0:8d7e SD02G 1.83 GiB
mmcblk0: p1 p2
Any idea why most of the cards do not work?
Regards
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-15 13:43 Using SD cards on Samsung S3C2410/S3C2440 based systems Juergen Beisert
@ 2009-12-15 17:31 ` Andy Green
2009-12-20 12:22 ` Juergen Beisert
0 siblings, 1 reply; 7+ messages in thread
From: Andy Green @ 2009-12-15 17:31 UTC (permalink / raw)
To: linux-arm-kernel
On 12/15/09 13:43, Somebody in the thread at some point said:
Hi Juergen -
> s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
> s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
> mmc0: new SD card at address 8d7e
> mmcblk0: mmc0:8d7e SD02G 1.83 GiB
> mmcblk0: p1 p2
>
> Any idea why most of the cards do not work?
-110 is timeout... it might be worth setting CONFIG_PRINTK_TIME and
looking to see what the real time looks like in both cases.
I guess you have the pullups on your PCB OK for the MMC bus (everything
except CLK), and you looked with your scope that power is OK there from
early boot and the signals look well-formed. (And the clock is 400kHz).
I noticed that at 115kbps console set on the kernel commandline on an
iMX31, I can cause SD Card boot we use to fail like you describe at the
moment just by setting loglevel=8 on the commandline. So try one of the
"bad" cards at loglevel=4 and see if that changes anything.
-Andy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-15 17:31 ` Andy Green
@ 2009-12-20 12:22 ` Juergen Beisert
2009-12-20 12:48 ` Andy Green
2009-12-20 13:02 ` Andy Green
0 siblings, 2 replies; 7+ messages in thread
From: Juergen Beisert @ 2009-12-20 12:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Andy,
On Dienstag, 15. Dezember 2009, Andy Green wrote:
> > s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
> > s3c2440-sdi s3c2440-sdi: running at 399kHz (requested: 400kHz).
> >
> > mmc0: new SD card at address 8d7e
> > mmcblk0: mmc0:8d7e SD02G 1.83 GiB
> > mmcblk0: p1 p2
> >
> > Any idea why most of the cards do not work?
>
> -110 is timeout... it might be worth setting CONFIG_PRINTK_TIME and
> looking to see what the real time looks like in both cases.
>
> I guess you have the pullups on your PCB OK for the MMC bus (everything
> except CLK),
Yes, all signals except the clock are pulled up to +5V (10K), and a small cap
to ground (don't know their values yet).
> and you looked with your scope that power is OK there from early boot
I started to add some caps close to the socket. Now more cards are working
with a 2.6.32.2 kernel. But when I boot a 2.6.31 kernel instead, some are
still do not work. Curious.
> and the signals look well-formed. (And the clock is 400kHz).
To be continued...
> I noticed that at 115kbps console set on the kernel commandline on an
> iMX31, I can cause SD Card boot we use to fail like you describe at the
> moment just by setting loglevel=8 on the commandline. So try one of the
> "bad" cards at loglevel=4 and see if that changes anything.
I tried it, but it makes no difference.
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-20 12:22 ` Juergen Beisert
@ 2009-12-20 12:48 ` Andy Green
2009-12-20 13:03 ` Juergen Beisert
2009-12-20 13:02 ` Andy Green
1 sibling, 1 reply; 7+ messages in thread
From: Andy Green @ 2009-12-20 12:48 UTC (permalink / raw)
To: linux-arm-kernel
On 12/20/09 12:22, Somebody in the thread at some point said:
Hi Juergen -
>> and you looked with your scope that power is OK there from early boot
>
> I started to add some caps close to the socket. Now more cards are working
> with a 2.6.32.2 kernel. But when I boot a 2.6.31 kernel instead, some are
> still do not work. Curious.
Where did you connect the caps and what value are they?
Unless you have a very long bus to the SD Card, any caps on signal lines
are just there to suppress EMI and are not required for operation.
If you added a cap between power and ground at the socket and it started
behaving better, I would remove the cap and watch the power carefully
with a 'scope during boot.
Also I would try the "thumb test" as a sanity check against the socket,
try a bad card that never works with your thumb applying gentle pressure
to the socket.
-Andy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-20 12:48 ` Andy Green
@ 2009-12-20 13:03 ` Juergen Beisert
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Beisert @ 2009-12-20 13:03 UTC (permalink / raw)
To: linux-arm-kernel
Hi Andy,
On Sonntag, 20. Dezember 2009, Andy Green wrote:
> >> and you looked with your scope that power is OK there from early boot
> >
> > I started to add some caps close to the socket. Now more cards are
> > working with a 2.6.32.2 kernel. But when I boot a 2.6.31 kernel instead,
> > some are still do not work. Curious.
>
> Where did you connect the caps and what value are they?
4u7 and 100n, at the power supply pins of the SD socket. But...
> Unless you have a very long bus to the SD Card, any caps on signal lines
> are just there to suppress EMI and are not required for operation.
>
> If you added a cap between power and ground at the socket and it started
> behaving better, I would remove the cap and watch the power carefully
> with a 'scope during boot.
...this seems not the problem...
> Also I would try the "thumb test" as a sanity check against the socket,
> try a bad card that never works with your thumb applying gentle pressure
> to the socket.
...I added some delays to the driver, when it switches the clocks. You are
right: The driver states "switching to 400kHz" ----- but nothing happen!
There is no clock at the SD card! Not till it switches to the 25MHz clock. It
seems the driver is bogus (current 2.6.32.2). Time for bug hunting now. :-)
Thanks for pointing me to the right direction.
Regards
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-20 12:22 ` Juergen Beisert
2009-12-20 12:48 ` Andy Green
@ 2009-12-20 13:02 ` Andy Green
2009-12-20 13:14 ` Juergen Beisert
1 sibling, 1 reply; 7+ messages in thread
From: Andy Green @ 2009-12-20 13:02 UTC (permalink / raw)
To: linux-arm-kernel
On 12/20/09 12:22, Somebody in the thread at some point said:
Hi -
> Yes, all signals except the clock are pulled up to +5V (10K), and a small cap
> to ground (don't know their values yet).
Actually, they shouldn't be pulled up to your SD Card power rail.
If 5V IS your SD Card power rail, I have some bad news for you...
http://www.sdcard.org/developers/tech/
-Andy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Using SD cards on Samsung S3C2410/S3C2440 based systems
2009-12-20 13:02 ` Andy Green
@ 2009-12-20 13:14 ` Juergen Beisert
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Beisert @ 2009-12-20 13:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi Andy,
On Sonntag, 20. Dezember 2009, Andy Green wrote:
> > Yes, all signals except the clock are pulled up to +5V (10K), and a small
> > cap to ground (don't know their values yet).
>
> Actually, they shouldn't be pulled up to your SD Card power rail.
>
> If 5V IS your SD Card power rail, I have some bad news for you...
Ups, sorry, my fault. The pullups are connected to 3.3V. The SD card power is
also 3.3V (I was confused, because there is also 5V at the main board
connector, but not connected to the any SD related parts).
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-20 13:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 13:43 Using SD cards on Samsung S3C2410/S3C2440 based systems Juergen Beisert
2009-12-15 17:31 ` Andy Green
2009-12-20 12:22 ` Juergen Beisert
2009-12-20 12:48 ` Andy Green
2009-12-20 13:03 ` Juergen Beisert
2009-12-20 13:02 ` Andy Green
2009-12-20 13:14 ` Juergen Beisert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).