FreeBSD on Layerscape/QorIQ LX2160X

Marcin Wojtas mw at semihalf.com
Fri May 22 17:23:58 UTC 2020


wt., 19 maj 2020 o 19:45 <greg at unrelenting.technology> napisał(a):
>
> May 19, 2020 7:57 PM, "Marcin Wojtas" <mw at semihalf.com> wrote:
>
> > wt., 19 maj 2020 o 18:42 <greg at unrelenting.technology> napisał(a):
> >
> >> May 19, 2020 7:11 PM, "Dan Kotowski" <dan.kotowski at a9development.com> wrote:
> >>
> >> Getting closer...
> >> dmesg.boot: https://gist.github.com/agrajag9/99d26385be0f49a8a4f046f15a2c0f08
> >>
> >> "iicbus0: <unknown card> at addr 0x77" nice!
> >> Would be great if you could run `i2c -s` also.
> >>
> >> Scanning I2C devices on /dev/iic0: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 [..]
> >>
> >> Hey look at that! A bunch of numbers! Hopefully they mean more to you than they do to me...
> >>
> >> hmm, it shouldn't report all numbers as present. oh well.
> >>
> >> sdhci_acpi0-slot0 seems to have hung the boot process for almost 5min waiting for various timeouts.
> >>
> >> oops, so they didn't really make generic sdhci work :D
> >>
> >> Well turns out we do have a Freescale ESDHC driver already.
> >> It doesn't have DMA so performance won't be great (but SD/MMC is bad stuff anyway lol).
> >> (interesting dev note: NetBSD gets away with just some quirks in the sdhci acpi driver:
> >> SDHC_FLAG_HAVE_DVS|SDHC_FLAG_NO_PWR0|SDHC_FLAG_32BIT_ACCESS|SDHC_FLAG_ENHANCED)
> >>
> >> No worries - once I can get a reliable install, I hope to never need to touch those again anyways.
> >> I mostly am hoping to get eMMC so I can flash updated firmware, assuming the errata list is correct
> >> and my silicon rev CAN boot from firmware on eMMC and it was a layer 8 failure.
> >>
> >> Trying to add ACPI support to it:
> >>
> >> https://send.firefox.com/download/926c72b043182c40/#49y3TaeL7_hif_YEHUFQ2g
> >>
> >> Latest dmesg.boot: https://gist.github.com/agrajag9/f4e8186e4cea7da1e5d8887a8d74dd7a
> >>
> >> "mmcsd0: 32GB <SDHC SB32G 8.0 SN DD1242F8 MFG 09/2017 by 3 SD> at mmc0 43.7MHz/4bit/65535-block"
> >> is better than before, but controller timeouts are sad. Welp.
> >>
> >> If anyone is interested in debugging this (with the device in hand), my ACPI attachment patch is:
> >> https://github.com/myfreeweb/freebsd/commit/4abb60611c53b6bf109e8854f60ecc697419cf1c
> >>
> >> Once again, maybe NetBSD's way of supporting this (slight quirks in the generic ACPI SDHCI driver)
> >> would be better than fsl_sdhci.
> >
> > Do you have a knowledge if LS2KX controller is common with the one
> > found in LS1046? If that may help, we are going to upstream it (need
> > some rework after rebasing from 11.x).
>
> From a quick look at Linux, should be very similar.
> LX2160 uses just "fsl,esdhc" which is handled by the same driver as "fsl,ls1046a-esdhc"
> but w/o any specific clock data.
>
> https://github.com/torvalds/linux/blob/master/drivers/mmc/host/sdhci-of-esdhc.c
> https://github.com/SolidRun/edk2-platforms/blob/eec706c2d693be0b3793d9180e7d1a4813a526cf/Silicon/NXP/LX2160A/Include/DeviceTreeInclude/fsl-lx2160a.dtsi#L364-L387
>
> The changes you're going to upstream, are they for fsl_sdhci or generic sdhci?

In the original patch, the fsl_sdhci did not work well, due to
endianness issues and really significant register differences between
ppc and arm64 QoriQ sdhci controllers. I hope it will be submitted
some time in June by its author, you will be added to review.


More information about the freebsd-arm mailing list