[Letux-kernel] X1600 / LX16 support - here: adding MMC
H. Nikolaus Schaller
hns at goldelico.com
Thu Feb 8 12:59:47 CET 2024
> Am 08.02.2024 um 12:42 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On Thursday, 8 February 2024 12:03:50 CET H. Nikolaus Schaller wrote:
>>
>> Indeed. It is a patch "hack: disable DMA for mmc" in feature branch
>> letux/jz4730-v12
>>
>> https://git.goldelico.com/?p=letux-kernel.git;a=commit;h=bc37b81a83b350a2897
>> 604b7e2591863b26673cd
>>
>> Otherwise we can't boot the jz4730...
>
> I will eventually revisit the JZ4730 with Linux in this area because I have
> been able to get DMA working on the JZ4730 in my L4Re-based system. I just
> need to demonstrate it working with MMC first, although there may be obvious
> issues in the Linux driver that I might be able to identify already.
>
> I briefly looked at the MMC driver last night, but I didn't get it to do more
> than report initialisation with DMA enabled, as previously shown. Weirdly, if
I got his now (with rootwait):
[ 0.000203] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 0.000203] jz4740-mmc 13450000.mmc: Ingenic SD/MMC card driver registered
[ 0.000203] jz4740-mmc 13450000.mmc: Using DMA, 4-bit mode
[ 0.000203] clk: Not disabling unused clocks
[ 0.000203] jz4740-mmc 13460000.mmc: Ingenic SD/MMC card driver registered
[ 0.000203] jz4740-mmc 13460000.mmc: Using DMA, 4-bit mode
[ 0.000203] Waiting for root device /dev/mmcblk0p2...
[ 0.000203] jz4740-mmc 13460000.mmc: no support for card's volts
[ 0.000203] mmc1: error -22 whilst initialising SDIO card
that is -EINVAL
[ 0.000203] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.000203] mmc0: error -145 whilst initialising SD card
that is -ETIMEDOUT. So the card is not responding.
I also tried with a second µSD in the second SD slot but it was not recognised
at all (same error -22).
What I also got was one -EIO
[ 0.000203] mmc0: error -5 whilst initialising SD card
> I added the vmmc-supply property along with a regulator, it wouldn't report
> initialisation at all, only doing so on MMC1 which didn't have the property
> specified, so I imagine there is something I don't understand about the MMC
> framework. (Again, the documentation is not very helpful, and it also seems
> that voltage-range is supported by some drivers and not others.)
>
> I do wonder if I should check that the clock management is working. That code
> isn't entirely finished because of the different divider computation that the
> X1600 seems to need.
Yes, clock setup might be a reason.
I now plan to trace this -EINVAL on mmc1...
BR,
Nikolaus
More information about the Letux-kernel
mailing list