All of lore.kernel.org
 help / color / mirror / Atom feed
* SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
@ 2017-07-04 12:53 Stefan Roese
  2017-07-04 13:53 ` Andy Shevchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2017-07-04 12:53 UTC (permalink / raw)
  To: linux-mmc; +Cc: Adrian Hunter, Andy Shevchenko

Hi,

we are currently investigating, if its possible to connect a SDIO
device (WLAN module) to the SD-card interface "SD3" of the BayTrail
SoC instead of the SDIO interface "SD2". The BayTrail manual states, 
that the SDIO interface is capable of connecting SDIO devices. Is
this also possible for the SD-card interface "SD3", even if its not
explicitly mentioned in the manual? If not, why is this not possible?

Any insight on this would be really helpful.

Thanks in advance,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-07-04 12:53 SDIO "SD2" vs. SD-card "SD3" interface on BayTrail Stefan Roese
@ 2017-07-04 13:53 ` Andy Shevchenko
  2017-07-04 14:12   ` Stefan Roese
  2017-08-31  9:38   ` Stefan Roese
  0 siblings, 2 replies; 10+ messages in thread
From: Andy Shevchenko @ 2017-07-04 13:53 UTC (permalink / raw)
  To: Stefan Roese, linux-mmc; +Cc: Adrian Hunter

On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
> Hi,
> 
> we are currently investigating, if its possible to connect a SDIO
> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
> SoC instead of the SDIO interface "SD2". The BayTrail manual states, 
> that the SDIO interface is capable of connecting SDIO devices. Is
> this also possible for the SD-card interface "SD3", even if its not
> explicitly mentioned in the manual? If not, why is this not possible?
> 
> Any insight on this would be really helpful.

Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
public one. Internally I found some charts that shows similarities
between two. So, taking that into consideration I would suggest to try
it out on real hardware (MinnowBoard MAX, for example), only impediment
I can see is the absence of support in the drivers in Linux OS. If you
need it only in U-Boot, you perhaps may fix it easily.

P.S. Adrian on vacation.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-07-04 13:53 ` Andy Shevchenko
@ 2017-07-04 14:12   ` Stefan Roese
  2017-07-04 15:56     ` Andy Shevchenko
  2017-08-31  9:38   ` Stefan Roese
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2017-07-04 14:12 UTC (permalink / raw)
  To: Andy Shevchenko, linux-mmc; +Cc: Adrian Hunter

Hi Andy,

On 04.07.2017 15:53, Andy Shevchenko wrote:
> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>> Hi,
>>
>> we are currently investigating, if its possible to connect a SDIO
>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>> that the SDIO interface is capable of connecting SDIO devices. Is
>> this also possible for the SD-card interface "SD3", even if its not
>> explicitly mentioned in the manual? If not, why is this not possible?
>>
>> Any insight on this would be really helpful.
> 
> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
> public one. Internally I found some charts that shows similarities
> between two. So, taking that into consideration I would suggest to try
> it out on real hardware (MinnowBoard MAX, for example), only impediment
> I can see is the absence of support in the drivers in Linux OS. If you
> need it only in U-Boot, you perhaps may fix it easily.

Its not only for U-Boot unfortunately. Do you think, a quick test in 
Linux should be possible by simply swapping the PCI device IDs in
sdhci-pci.core.c (PCI_DEVICE_ID_INTEL_BYT_SDIO vs.
PCI_DEVICE_ID_INTEL_BYT_SD)?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-07-04 14:12   ` Stefan Roese
@ 2017-07-04 15:56     ` Andy Shevchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2017-07-04 15:56 UTC (permalink / raw)
  To: Stefan Roese, linux-mmc; +Cc: Adrian Hunter

On Tue, 2017-07-04 at 16:12 +0200, Stefan Roese wrote:
> 
> On 04.07.2017 15:53, Andy Shevchenko wrote:
> > On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
> > > Hi,
> > > 
> > > we are currently investigating, if its possible to connect a SDIO
> > > device (WLAN module) to the SD-card interface "SD3" of the
> > > BayTrail
> > > SoC instead of the SDIO interface "SD2". The BayTrail manual
> > > states,
> > > that the SDIO interface is capable of connecting SDIO devices. Is
> > > this also possible for the SD-card interface "SD3", even if its
> > > not
> > > explicitly mentioned in the manual? If not, why is this not
> > > possible?
> > > 
> > > Any insight on this would be really helpful.
> > 
> > Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except
> > the
> > public one. Internally I found some charts that shows similarities
> > between two. So, taking that into consideration I would suggest to
> > try
> > it out on real hardware (MinnowBoard MAX, for example), only
> > impediment
> > I can see is the absence of support in the drivers in Linux OS. If
> > you
> > need it only in U-Boot, you perhaps may fix it easily.
> 
> Its not only for U-Boot unfortunately. Do you think, a quick test in 
> Linux should be possible by simply swapping the PCI device IDs in
> sdhci-pci.core.c (PCI_DEVICE_ID_INTEL_BYT_SDIO vs.
> PCI_DEVICE_ID_INTEL_BYT_SD)?

If it utilizes ACPI (card detection) I'm not sure you can magically get
it working, though it worth to try.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-07-04 13:53 ` Andy Shevchenko
  2017-07-04 14:12   ` Stefan Roese
@ 2017-08-31  9:38   ` Stefan Roese
  2017-08-31 12:41     ` Adrian Hunter
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2017-08-31  9:38 UTC (permalink / raw)
  To: Andy Shevchenko, Adrian Hunter; +Cc: linux-mmc

Hi Andy, Hi Adrian,

On 04.07.2017 15:53, Andy Shevchenko wrote:
> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>> Hi,
>>
>> we are currently investigating, if its possible to connect a SDIO
>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>> that the SDIO interface is capable of connecting SDIO devices. Is
>> this also possible for the SD-card interface "SD3", even if its not
>> explicitly mentioned in the manual? If not, why is this not possible?
>>
>> Any insight on this would be really helpful.
> 
> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
> public one. Internally I found some charts that shows similarities
> between two. So, taking that into consideration I would suggest to try
> it out on real hardware (MinnowBoard MAX, for example), only impediment
> I can see is the absence of support in the drivers in Linux OS. If you
> need it only in U-Boot, you perhaps may fix it easily.
> 
> P.S. Adrian on vacation.

I hope your vacation was great!

Sorry for getting back to this, but I would really like to get some
more feedback on this. Perhaps Adrian has some additional comments
about the SDIO usage of the SD interface (SD3 - PCI Device ID 0x0f16)
on BayTrail.

I'm now running latest mainline Linux on this board and am trying to
get the Linux MMC / SDIO subsystem to just detect a device on this
SD PCI interface. For this I have added quite a bit of debug code to
the MMC / SDIO code to see, if any device is detected on the SDIO
port. But all command queries return timeout as far as I can tell.

Adrian, do you have some additional information, if this mode of
operation is possible at all on this SD-card interface, even if
its not explicitly mentioned in the BayTrail datasheet? Or do you
have some suggestions, how I could test such a basic SDIO connection
(without integrating of the WLAN driver first) in the simplest way?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-08-31  9:38   ` Stefan Roese
@ 2017-08-31 12:41     ` Adrian Hunter
  2017-08-31 15:24       ` Stefan Roese
  2017-10-07  8:25       ` Stefan Roese
  0 siblings, 2 replies; 10+ messages in thread
From: Adrian Hunter @ 2017-08-31 12:41 UTC (permalink / raw)
  To: Stefan Roese, Andy Shevchenko; +Cc: linux-mmc

On 31/08/17 12:38, Stefan Roese wrote:
> Hi Andy, Hi Adrian,
> 
> On 04.07.2017 15:53, Andy Shevchenko wrote:
>> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>>> Hi,
>>>
>>> we are currently investigating, if its possible to connect a SDIO
>>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>>> that the SDIO interface is capable of connecting SDIO devices. Is
>>> this also possible for the SD-card interface "SD3", even if its not
>>> explicitly mentioned in the manual? If not, why is this not possible?
>>>
>>> Any insight on this would be really helpful.
>>
>> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
>> public one. Internally I found some charts that shows similarities
>> between two. So, taking that into consideration I would suggest to try
>> it out on real hardware (MinnowBoard MAX, for example), only impediment
>> I can see is the absence of support in the drivers in Linux OS. If you
>> need it only in U-Boot, you perhaps may fix it easily.
>>
>> P.S. Adrian on vacation.
> 
> I hope your vacation was great!
> 
> Sorry for getting back to this, but I would really like to get some
> more feedback on this. Perhaps Adrian has some additional comments
> about the SDIO usage of the SD interface (SD3 - PCI Device ID 0x0f16)
> on BayTrail.
> 
> I'm now running latest mainline Linux on this board and am trying to
> get the Linux MMC / SDIO subsystem to just detect a device on this
> SD PCI interface. For this I have added quite a bit of debug code to
> the MMC / SDIO code to see, if any device is detected on the SDIO
> port. But all command queries return timeout as far as I can tell.

I would usually interpret that to mean the SDIO card is not turned on.

> Adrian, do you have some additional information, if this mode of
> operation is possible at all on this SD-card interface, even if
> its not explicitly mentioned in the BayTrail datasheet?

I have used removable SDIO cards in SD slots before.  It should work.

>                                                         Or do you
> have some suggestions, how I could test such a basic SDIO connection
> (without integrating of the WLAN driver first) in the simplest way?

Only to try a removable SDIO card.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-08-31 12:41     ` Adrian Hunter
@ 2017-08-31 15:24       ` Stefan Roese
  2017-10-07  8:25       ` Stefan Roese
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2017-08-31 15:24 UTC (permalink / raw)
  To: Adrian Hunter, Andy Shevchenko; +Cc: linux-mmc

Hi Adrian,

On 31.08.2017 14:41, Adrian Hunter wrote:
> On 31/08/17 12:38, Stefan Roese wrote:
>> Hi Andy, Hi Adrian,
>>
>> On 04.07.2017 15:53, Andy Shevchenko wrote:
>>> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>>>> Hi,
>>>>
>>>> we are currently investigating, if its possible to connect a SDIO
>>>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>>>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>>>> that the SDIO interface is capable of connecting SDIO devices. Is
>>>> this also possible for the SD-card interface "SD3", even if its not
>>>> explicitly mentioned in the manual? If not, why is this not possible?
>>>>
>>>> Any insight on this would be really helpful.
>>>
>>> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
>>> public one. Internally I found some charts that shows similarities
>>> between two. So, taking that into consideration I would suggest to try
>>> it out on real hardware (MinnowBoard MAX, for example), only impediment
>>> I can see is the absence of support in the drivers in Linux OS. If you
>>> need it only in U-Boot, you perhaps may fix it easily.
>>>
>>> P.S. Adrian on vacation.
>>
>> I hope your vacation was great!
>>
>> Sorry for getting back to this, but I would really like to get some
>> more feedback on this. Perhaps Adrian has some additional comments
>> about the SDIO usage of the SD interface (SD3 - PCI Device ID 0x0f16)
>> on BayTrail.
>>
>> I'm now running latest mainline Linux on this board and am trying to
>> get the Linux MMC / SDIO subsystem to just detect a device on this
>> SD PCI interface. For this I have added quite a bit of debug code to
>> the MMC / SDIO code to see, if any device is detected on the SDIO
>> port. But all command queries return timeout as far as I can tell.
> 
> I would usually interpret that to mean the SDIO card is not turned on.

Yes, this is of course possible - or some signal issues while
level-shifting etc. I've also thought of this possibility. One of the
next things to do, will be to measure some of the signals.

>> Adrian, do you have some additional information, if this mode of
>> operation is possible at all on this SD-card interface, even if
>> its not explicitly mentioned in the BayTrail datasheet?
> 
> I have used removable SDIO cards in SD slots before.  It should work.

Sorry, but I need to double-check on this. You have successfully used
some SDIO cards in this "SD-card-only controller" (as stated in the
datasheet) on BayTrail?

Do you b y any chance remember, which SDIO card you have tested with?

>>                                                          Or do you
>> have some suggestions, how I could test such a basic SDIO connection
>> (without integrating of the WLAN driver first) in the simplest way?
> 
> Only to try a removable SDIO card.

Thats not possible on this board, as this WLAN module is soldered.
But I might find some other / alternative board, to test this. Let
me check on this...

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-08-31 12:41     ` Adrian Hunter
  2017-08-31 15:24       ` Stefan Roese
@ 2017-10-07  8:25       ` Stefan Roese
  2017-10-09  8:07         ` Adrian Hunter
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2017-10-07  8:25 UTC (permalink / raw)
  To: Adrian Hunter, Andy Shevchenko; +Cc: linux-mmc

Hi,

On 31.08.2017 14:41, Adrian Hunter wrote:
> On 31/08/17 12:38, Stefan Roese wrote:
>> Hi Andy, Hi Adrian,
>>
>> On 04.07.2017 15:53, Andy Shevchenko wrote:
>>> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>>>> Hi,
>>>>
>>>> we are currently investigating, if its possible to connect a SDIO
>>>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>>>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>>>> that the SDIO interface is capable of connecting SDIO devices. Is
>>>> this also possible for the SD-card interface "SD3", even if its not
>>>> explicitly mentioned in the manual? If not, why is this not possible?
>>>>
>>>> Any insight on this would be really helpful.
>>>
>>> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
>>> public one. Internally I found some charts that shows similarities
>>> between two. So, taking that into consideration I would suggest to try
>>> it out on real hardware (MinnowBoard MAX, for example), only impediment
>>> I can see is the absence of support in the drivers in Linux OS. If you
>>> need it only in U-Boot, you perhaps may fix it easily.
>>>
>>> P.S. Adrian on vacation.
>>
>> I hope your vacation was great!
>>
>> Sorry for getting back to this, but I would really like to get some
>> more feedback on this. Perhaps Adrian has some additional comments
>> about the SDIO usage of the SD interface (SD3 - PCI Device ID 0x0f16)
>> on BayTrail.
>>
>> I'm now running latest mainline Linux on this board and am trying to
>> get the Linux MMC / SDIO subsystem to just detect a device on this
>> SD PCI interface. For this I have added quite a bit of debug code to
>> the MMC / SDIO code to see, if any device is detected on the SDIO
>> port. But all command queries return timeout as far as I can tell.
> 
> I would usually interpret that to mean the SDIO card is not turned on.
> 
>> Adrian, do you have some additional information, if this mode of
>> operation is possible at all on this SD-card interface, even if
>> its not explicitly mentioned in the BayTrail datasheet?
> 
> I have used removable SDIO cards in SD slots before.  It should work.

A quick update with another question below:

After getting back to this issue, I now have the SD-card detection
working, if I boot into Linux using U-Boot as bootloader on this
BayTrail based board. But when I boot via original BIOS, the card
detection fails. While debugging, I found that one register differs
in both setups:

U-Boot:
[    2.374751] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[    2.374761] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000b502
[    2.374768] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[    2.374774] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[    2.374781] mmc0: sdhci: Present:   0x1fff0000 | Host ctl: 0x00000000
[    2.374787] mmc0: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
[    2.374793] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
[    2.374799] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[    2.374806] mmc0: sdhci: Int enab:  0x00ff0003 | Sig enab: 0x00ff0003
[    2.374812] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[    2.374819] mmc0: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000000
[    2.374825] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[    2.374831] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[    2.374837] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[    2.374842] mmc0: sdhci: Host ctl2: 0x00000000
[    2.374849] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000
[    2.374853] mmc0: sdhci: ============================================

BIOS:
[    3.435179] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[    3.435485] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000b502
[    3.435756] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[    3.436066] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[    3.436338] mmc0: sdhci: Present:   0x01ff0000 | Host ctl: 0x00000000
[    3.436603] mmc0: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
[    3.436868] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
[    3.437166] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[    3.437437] mmc0: sdhci: Int enab:  0x00ff0003 | Sig enab: 0x00ff0003
[    3.437704] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[    3.437969] mmc0: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000000
[    3.438266] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[    3.438537] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[    3.438802] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[    3.439135] mmc0: sdhci: Host ctl2: 0x00000000
[    3.439334] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000
[    3.439598] mmc0: sdhci: ============================================

As you can see, the "present" register (SDHCI_PRESENT_STATE at 0x24) is
different. Its read-only - do you have any idea, why this register is
set to the non-default value of 0x01ff0000 in the BIOS case?

BTW: Its set to the default value of 0x1fff0000 for the eMMC controller
in the BIOS case as well. So only the SD controller has this different
value.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
  2017-10-07  8:25       ` Stefan Roese
@ 2017-10-09  8:07         ` Adrian Hunter
       [not found]           ` <CAG8K7gQNmpMhLdnpua6cds1s7s3aq8B1kS7-z+hg6fjty6Hqxg@mail.gmail.com>
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Hunter @ 2017-10-09  8:07 UTC (permalink / raw)
  To: Stefan Roese, Andy Shevchenko; +Cc: linux-mmc

On 07/10/17 11:25, Stefan Roese wrote:
> Hi,
> 
> On 31.08.2017 14:41, Adrian Hunter wrote:
>> On 31/08/17 12:38, Stefan Roese wrote:
>>> Hi Andy, Hi Adrian,
>>>
>>> On 04.07.2017 15:53, Andy Shevchenko wrote:
>>>> On Tue, 2017-07-04 at 14:53 +0200, Stefan Roese wrote:
>>>>> Hi,
>>>>>
>>>>> we are currently investigating, if its possible to connect a SDIO
>>>>> device (WLAN module) to the SD-card interface "SD3" of the BayTrail
>>>>> SoC instead of the SDIO interface "SD2". The BayTrail manual states,
>>>>> that the SDIO interface is capable of connecting SDIO devices. Is
>>>>> this also possible for the SD-card interface "SD3", even if its not
>>>>> explicitly mentioned in the manual? If not, why is this not possible?
>>>>>
>>>>> Any insight on this would be really helpful.
>>>>
>>>> Hmm... I have no documentation for SD/SDIO/eMMC for BayTrail except the
>>>> public one. Internally I found some charts that shows similarities
>>>> between two. So, taking that into consideration I would suggest to try
>>>> it out on real hardware (MinnowBoard MAX, for example), only impediment
>>>> I can see is the absence of support in the drivers in Linux OS. If you
>>>> need it only in U-Boot, you perhaps may fix it easily.
>>>>
>>>> P.S. Adrian on vacation.
>>>
>>> I hope your vacation was great!
>>>
>>> Sorry for getting back to this, but I would really like to get some
>>> more feedback on this. Perhaps Adrian has some additional comments
>>> about the SDIO usage of the SD interface (SD3 - PCI Device ID 0x0f16)
>>> on BayTrail.
>>>
>>> I'm now running latest mainline Linux on this board and am trying to
>>> get the Linux MMC / SDIO subsystem to just detect a device on this
>>> SD PCI interface. For this I have added quite a bit of debug code to
>>> the MMC / SDIO code to see, if any device is detected on the SDIO
>>> port. But all command queries return timeout as far as I can tell.
>>
>> I would usually interpret that to mean the SDIO card is not turned on.
>>
>>> Adrian, do you have some additional information, if this mode of
>>> operation is possible at all on this SD-card interface, even if
>>> its not explicitly mentioned in the BayTrail datasheet?
>>
>> I have used removable SDIO cards in SD slots before.  It should work.
> 
> A quick update with another question below:
> 
> After getting back to this issue, I now have the SD-card detection
> working, if I boot into Linux using U-Boot as bootloader on this
> BayTrail based board. But when I boot via original BIOS, the card
> detection fails. While debugging, I found that one register differs
> in both setups:
> 
> U-Boot:
> [    2.374751] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
> [    2.374761] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000b502
> [    2.374768] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
> [    2.374774] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
> [    2.374781] mmc0: sdhci: Present:   0x1fff0000 | Host ctl: 0x00000000
> [    2.374787] mmc0: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
> [    2.374793] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
> [    2.374799] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
> [    2.374806] mmc0: sdhci: Int enab:  0x00ff0003 | Sig enab: 0x00ff0003
> [    2.374812] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
> [    2.374819] mmc0: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000000
> [    2.374825] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
> [    2.374831] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
> [    2.374837] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
> [    2.374842] mmc0: sdhci: Host ctl2: 0x00000000
> [    2.374849] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000
> [    2.374853] mmc0: sdhci: ============================================
> 
> BIOS:
> [    3.435179] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
> [    3.435485] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000b502
> [    3.435756] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
> [    3.436066] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
> [    3.436338] mmc0: sdhci: Present:   0x01ff0000 | Host ctl: 0x00000000
> [    3.436603] mmc0: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
> [    3.436868] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
> [    3.437166] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
> [    3.437437] mmc0: sdhci: Int enab:  0x00ff0003 | Sig enab: 0x00ff0003
> [    3.437704] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
> [    3.437969] mmc0: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000000
> [    3.438266] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
> [    3.438537] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
> [    3.438802] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
> [    3.439135] mmc0: sdhci: Host ctl2: 0x00000000
> [    3.439334] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000
> [    3.439598] mmc0: sdhci: ============================================
> 
> As you can see, the "present" register (SDHCI_PRESENT_STATE at 0x24) is
> different. Its read-only - do you have any idea, why this register is
> set to the non-default value of 0x01ff0000 in the BIOS case?
> 
> BTW: Its set to the default value of 0x1fff0000 for the eMMC controller
> in the BIOS case as well. So only the SD controller has this different

Those pins are DAT[7:4] line signal level.  SD has only 4 lines so the
values perhaps change depending on what the setup has been done for the pin
controller.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: SDIO "SD2" vs. SD-card "SD3" interface on BayTrail
       [not found]           ` <CAG8K7gQNmpMhLdnpua6cds1s7s3aq8B1kS7-z+hg6fjty6Hqxg@mail.gmail.com>
@ 2017-10-16  9:40             ` Stefan Roese
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2017-10-16  9:40 UTC (permalink / raw)
  To: Avri Altman, Adrian Hunter; +Cc: linux-mmc, Andy Shevchenko

Hi Avri,

On 14.10.2017 16:16, Avri Altman wrote:
> Maybe you can post ypur question in the wireless mailing list.
> Intel's wifi driver has a sdio transport layer, and their maintener, 
> Emmanuel Grumbach, is very responsive.

Thanks for the suggestion. As a matter of fact, I was able to solve
this detection issue (U-Boot vs BIOS) last week, by fixing some
power-supply related issues.

I will gladly check the wireless list, if I have specific TI WLAN
related questions.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-16  9:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 12:53 SDIO "SD2" vs. SD-card "SD3" interface on BayTrail Stefan Roese
2017-07-04 13:53 ` Andy Shevchenko
2017-07-04 14:12   ` Stefan Roese
2017-07-04 15:56     ` Andy Shevchenko
2017-08-31  9:38   ` Stefan Roese
2017-08-31 12:41     ` Adrian Hunter
2017-08-31 15:24       ` Stefan Roese
2017-10-07  8:25       ` Stefan Roese
2017-10-09  8:07         ` Adrian Hunter
     [not found]           ` <CAG8K7gQNmpMhLdnpua6cds1s7s3aq8B1kS7-z+hg6fjty6Hqxg@mail.gmail.com>
2017-10-16  9:40             ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.