eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Jookia
Hi there,

I've been working on getting FreeBSD to run on Olimex's LIME2 board.
Unfortunately I'm having some trouble when booting it with the eMMC
device tree.

The eMMC card (mmc1, 4GB) keeps giving off
AW_MMC_INT_RESP_TIMEOUT while the SD card (mmc0, 32GB) works fine.

I've looked through the source code for the driver but it's over my
head, so I was wondering if anyone here knows what's going on?

I tested the eMMC and it works fine in Linux and OpenBSD.

Jookia.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"

freebsd-emmc-fail.log (13K) Download Attachment
linux-good.log (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Emmanuel Vadot-7

 Hi,

On Thu, 8 Nov 2018 17:39:15 +1100
Jookia <[hidden email]> wrote:

> Hi there,
>
> I've been working on getting FreeBSD to run on Olimex's LIME2 board.
> Unfortunately I'm having some trouble when booting it with the eMMC
> device tree.
>
> The eMMC card (mmc1, 4GB) keeps giving off
> AW_MMC_INT_RESP_TIMEOUT while the SD card (mmc0, 32GB) works fine.
>
> I've looked through the source code for the driver but it's over my
> head, so I was wondering if anyone here knows what's going on?
>
> I tested the eMMC and it works fine in Linux and OpenBSD.
>
> Jookia.

 Which u-boot are you using ?
 If you are using the A20-OLinuXino-Lime2-eMMC_defconfig it should work
(and have worked since I used this board at $WORK-2 for a project) but
if you are using the A20-OLinuXino-Lime2_defconfig it will not as we
lack support for mmc-pwrseq-emmc (so the eMMC is never put of reset).

--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Jookia
In reply to this post by Jookia
As an update on this, it seems to be that the issue stops when DDR52
capability is disabled. Someone else had a similiar issue with the Pine64:
https://forum.pine64.org/archive/index.php?thread-6339.html

> * eMMC crashes on a protocol issue;
> Allwinner datasheet;
> * "SMHC Controller support up to MMC5.0"
>   -- 52 is activated in the features.

Apparently the A20 doesn't support HS200:
https://www.olimex.com/forum/index.php?topic=6653.0

> A20 do not support HS200
>
> we have two versions one is with Micron eMMC  ver. 4.51 which makes about 12-13MB/s transfer
> we have now new boards with eMMC v5.0 where same A20 processor due to the improved timing in v5.x improve the transfer up to 18-20MB/s
>
> A64 has eMMC v5.x support and multispeed mode and achieve up to 40MB/s transfers

This kernel thread alludes to the Pine64 issue:
https://groups.google.com/forum/?_escaped_fragment_=topic/linux.kernel/L9lXBGYgvXk

> mmc2 works fine for either 4 bit SDR/DDR or 8 bit SDR only. It does
> not work for 8 bit DDR. I actually tested all the above combinations.

Regardless I'm stumped since the FreeBSD driver code and Linux driver
code don't have any obvious differences with handling DDR52 in them that
I can see.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Emmanuel Vadot-7
On Sun, 11 Nov 2018 00:59:03 +1100
Jookia <[hidden email]> wrote:

> As an update on this, it seems to be that the issue stops when DDR52
> capability is disabled. Someone else had a similiar issue with the Pine64:
> https://forum.pine64.org/archive/index.php?thread-6339.html

 Different issue.
 After re-reading your log it fails when we update the mmc module clock,
maybe the clock isn't correct after switching to clkng and the main
clock isn't set correctly.

> > * eMMC crashes on a protocol issue;
> > Allwinner datasheet;
> > * "SMHC Controller support up to MMC5.0"
> >   -- 52 is activated in the features.
>
> Apparently the A20 doesn't support HS200:
> https://www.olimex.com/forum/index.php?topic=6653.0

 DDR52 != HS200
 We currently don't support >= HS200 for Allwinner, I never could make
it work.

> > A20 do not support HS200
> >
> > we have two versions one is with Micron eMMC  ver. 4.51 which makes about 12-13MB/s transfer
> > we have now new boards with eMMC v5.0 where same A20 processor due to the improved timing in v5.x improve the transfer up to 18-20MB/s
> >
> > A64 has eMMC v5.x support and multispeed mode and achieve up to 40MB/s transfers
>
> This kernel thread alludes to the Pine64 issue:
> https://groups.google.com/forum/?_escaped_fragment_=topic/linux.kernel/L9lXBGYgvXk
>
> > mmc2 works fine for either 4 bit SDR/DDR or 8 bit SDR only. It does
> > not work for 8 bit DDR. I actually tested all the above combinations.
>
> Regardless I'm stumped since the FreeBSD driver code and Linux driver
> code don't have any obvious differences with handling DDR52 in them that
> I can see.
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "[hidden email]"


--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Jookia
In reply to this post by Emmanuel Vadot-7
On Fri, Nov 09, 2018 at 10:15:09AM +0100, Emmanuel Vadot wrote:

>
>  Hi,
>
>  Which u-boot are you using ?
>  If you are using the A20-OLinuXino-Lime2-eMMC_defconfig it should work
> (and have worked since I used this board at $WORK-2 for a project) but
> if you are using the A20-OLinuXino-Lime2_defconfig it will not as we
> lack support for mmc-pwrseq-emmc (so the eMMC is never put of reset).
>
> --
> Emmanuel Vadot <[hidden email]> <[hidden email]>

Hi there, sorry for the late reply- GMail ate the mail since I didn't
reply.

I'm using U-Boot A20-OLinuXino-Lime2-eMMC_defconfig , compiled as a port
similiar to the other U-Boots.

A20-OLinuXino-Lime2_defconfig reads the SD card but not eMMC, so it's
able to boot instead of crashing.

Thanks,
Jookia.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: eMMC issues on Allwiner A20-OLinuXino-LIME2-eMMC

Jookia
In reply to this post by Emmanuel Vadot-7
On Sat, Nov 10, 2018 at 03:46:41PM +0100, Emmanuel Vadot wrote:
>  Different issue.
>  After re-reading your log it fails when we update the mmc module clock,
> maybe the clock isn't correct after switching to clkng and the main
> clock isn't set correctly.

Is there any debug flags or code I should add to check?

>  DDR52 != HS200
>  We currently don't support >= HS200 for Allwinner, I never could make
> it work.

Ah, okay.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"