SDIO interrupt support in linux4sam, sama5d2

This forum is for users of Atmel's SAM Series and who are interested in using Linux OS.

Moderator: nferre

riktw
Posts: 8
Joined: Mon Sep 26, 2016 1:35 pm

SDIO interrupt support in linux4sam, sama5d2

Mon Feb 27, 2017 4:03 pm

Hello,

I am trying to get a WF111 module to work in combination with an SAMA5D2 running Linux4sam 5.5
One of the requierements of the module is that the SDIO driver supports SDIO interrupts and SDIO multiblock transfer.
I could not find it online, but does anyone know if the SDIO driver in the linux4sam kernel supports those things?

Best regards,

Rik
blue_z
Location: USA
Posts: 1507
Joined: Thu Apr 19, 2007 10:15 pm

Re: SDIO interrupt support in linux4sam, sama5d2

Tue Feb 28, 2017 1:35 am

riktw wrote:I am trying to get a WF111 module to work in combination with an SAMA5D2 running Linux4sam 5.5
The at91 Linux kernel release tagged linux4sam_5.5 is for version 4.4.
The Silicon Lads application note dated 11 January 2017 (i.e. less than two month old) states that
WF111 Linux driver requires kernel version 2.6.24 up to 4.1.
So you may have a forward-porting task.
riktw wrote:One of the requierements of the module is that the SDIO driver supports SDIO interrupts and SDIO multiblock transfer
What is the origin of these requirements? They are not mentioned in the SL app note.
riktw wrote:I could not find it online,
What did you look for?
How much effort did you expend?

Regards
riktw
Posts: 8
Joined: Mon Sep 26, 2016 1:35 pm

Re: SDIO interrupt support in linux4sam, sama5d2

Thu Mar 02, 2017 3:46 pm

Hello,
Silicon labs released a newer driver that has been tested with kernels up to 4.9, as the older driver indeed did not work at all in 4.4 and gave a kernel panic when loading the driver. So this should be no problem now. It seems that they forgot to update that in the app note.
In the hints sections (8.10) of the app note it mentions this: Are SDIO interrupts and SDIO multiblock tranfer supported by the SDIO host driver?
That is why I I asked about it. But you are correct that it's not mentioned anywhere else in the app note.

I have checked the Atmel MMC driver (atmel-mci.c) and did look like it has support for multiblock and interrupts, but I wanted to be sure so I know the issue is not related to that.

The issues I have with the wf111 module are also posted on the silicon labs forum and can be found here if it helps:
http://community.silabs.com/t5/Bluetoot ... m-p/190032

best regards,

Rik
blue_z
Location: USA
Posts: 1507
Joined: Thu Apr 19, 2007 10:15 pm

Re: SDIO interrupt support in linux4sam, sama5d2

Fri Mar 03, 2017 11:17 pm

riktw wrote:I have checked the Atmel MMC driver (atmel-mci.c) and did look like it has support for multiblock and interrupts, but I wanted to be sure so I know the issue is not related to that.
You're looking at the old MMC driver.
The SAMA5D2 has different MMC and ADC peripherals from older SAMA5 and SAM9 SoCs.
The Atmel sdhci-of-at91.c driver (as called out in sama5d2.dtsi) is rather brief, and relies on common core code of sdhci.c.
Since the sdhci-of-at91.c driver does not specify either SDHCI_QUIRK_NO_BUSY_IRQ or SDHCI_QUIRK_NO_MULTIBLOCK, it should be safe to assume that SDIO interrupts and SDIO multiblock transfer are available.
riktw wrote:The issues I have with the wf111 module are also posted on the silicon labs forum
That post clearly indicates that you have a misconfiguration in your Device Tree.
The CD pin is not properly allocated.
pinctrl-at91-pio4 fc038000.pinctrl: pin PA30 already requested by 80000000.nand; cannot claim for b0000000.sdio-host
...
sdhci-at91 b0000000.sdio-host: Error applying setting, reverse things back
IIRC that "reverse things back" will probably cause you to lose the SDMMC_CK pin assignment, a fatal condition that will silently break radio module operation.
IOW your sdhci device has probably not been properly initialized.
You need to correct your board's .dts file so that there are no pin conflicts.
Then study the sdhci-of-at91.c driver, as it has some comments about handling the absence of a CD input.

Regards
riktw
Posts: 8
Joined: Mon Sep 26, 2016 1:35 pm

Re: SDIO interrupt support in linux4sam, sama5d2

Mon Mar 06, 2017 5:47 pm

Ah, that explains, good to know sdhci-of-at91.c is the current driver. And thanks for the information about SDIO interrupts and multiblock transfer.

I have already fixed the issue with the CD pin, the warning that pin PA30 is already requested doesn't appear anymore.
I have added the "non-removable;" argument in the dtsi, which should take care of the possible problems that not having a CD pin can cause. I still have the same issues with the wifi module after this. I added the parts relevant of the sdio host of the device tree in the attachment.

Rik
Attachments
devtree.zip
(540 Bytes) Downloaded 29 times
blue_z
Location: USA
Posts: 1507
Joined: Thu Apr 19, 2007 10:15 pm

Re: SDIO interrupt support in linux4sam, sama5d2

Tue Mar 07, 2017 4:19 am

riktw wrote:I added the parts relevant of the sdio host of the device tree in the attachment.
Randomly pasting together fragments of DT makes no sense.

Since you have a custom board, what have you done to verify that it is fully functional?
IOW what, if anything, does work over the sdhci interface?
Consider using U-Boot or standalone code to validate the HW.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest