[meta-xilinx] mmcblk not showing up? [sd card mounting]

Nathan Rossi nathan at nathanrossi.com
Thu Jan 21 07:50:23 PST 2016


On Fri, Jan 22, 2016 at 12:44 AM, Giordon Stark <kratsg at gmail.com> wrote:
> Hi Nathan,
>
> So the system.dts (and all the dts files) were generated from Xilinx. We
> made two changes:
>
> - first change was to connect the PHY chip to the ethernet
> - second change was to update the bootargs
>
> I'm assuming that if it exported the `xlnx,has-cd = <0x0>` -- it is
> something specific to only xilinx that doesn't work with the linux kernel.
> Although looking here (http://zedboard.org/content/sd-mounting-fails-linux)
> seems like it should do something, but maybe I don't quite understand.

Hi Giordon,

That binding was dropped some time ago now, even before the driver was
actually upstreamed. The old xlnx,has-cd binding was only valid for
kernels older than the xlnx_3.14 branch or older than the xilinx-v14.7
tag. The last version of meta-xilinx to include a kernel of said
vintage is 'dora'.

See this commit:
https://github.com/Xilinx/linux-xlnx/commit/99d2700c5ed443375386e65bb1c5412159223b76

>
> How do you determine what needs to be added to the device tree to get the
> driver hooked up correctly?

Depends greatly on your physical board setup.

In this case you likely have configured the Zynq IP (in the Vivado
"customize IP") without a "card detect" MIO or EMIO pin (note you will
need to expand the UI to see the individual signals for the SD
Peripheral Pins). This will result in FSBL not configuring the pinmux
setup to know which pin is physically tied the card detect line (in
the event you actually have it on your board). If you don't have the
card detect line on your board you will need to define in the device
tree whether the card detect line is 'broken' and that the kernel
should poll to detect if a card is connected. Or alternatively if you
have a non-removable card (e.g. eMMC) in which case you would use the
'non-removable' flag since the card cannot be disconnected.

I think in this case the device tree generator you are using is not
compatible for the kernel you are targeting. This is a common problem
since the Zynq device tree bindings have been changing and there is an
implicit version compatibility between Vivado tool release versions
and linux-xlnx release versions for generated device tree
compatibility.

It appears the newest device tree generator
(https://github.com/Xilinx/device-tree-xlnx/tree/cb1811c93e0c82500999eb16269cf61371de5d15/sdps/data)
will not actually emit this property nor an equivalent (e.g.
broken/non-removable). So as with most board level configuration you
are going to have to manually configure this.

Regards,
Nathan

>
> Giordon
>
> On Fri, Jan 15, 2016 at 2:14 AM Nathan Rossi <nathan at nathanrossi.com> wrote:
>>
>> On Fri, Jan 15, 2016 at 5:46 AM, Giordon Stark <kratsg at gmail.com> wrote:
>> > Hi all,
>> >
>> > I'm booting a board with an OS successfully (putting all my files on the
>> > micro sd card). However, I can't seem to bring up the SD Card at all.
>> >
>> > Log and an `ls` of the /dev directory:
>> > https://gist.github.com/anonymous/44bb6f541dce751a1f7b
>> >
>> > Machine definition is here:
>> >
>> > https://github.com/kratsg/meta-l1calo/blob/master/conf/machine/preprototype.conf
>> >
>> > Device trees are here:
>> >
>> > https://github.com/kratsg/meta-l1calo/tree/master/conf/machine/boards/preprototype
>> >
>> > I'm not sure what else to do to get it working.
>>
>> Im just looking at the system.dts here, it appears you have
>> "xlnx,has-cd = <0x0>;". Firstly do you not have the card detect signal
>> connected? if you don't have it connected "xlnx,has-cd" is not going
>> to do anything to help, you will need to use the boolean 'broken-cd'
>> or 'non-removable'. Have a look at the kernel mmc binding docs in
>> 'Documentation/devicetree/bindings/mmc/mmc.txt'.
>>
>> e.g.
>>
>> &sdhci0 {
>>   status = "okay";
>>   broken-cd;
>> };
>>
>> Regards,
>> Nathan
>>
>> >
>> > Thanks,
>> >
>> > Giordon
>> >
>> >
>> > --
>> > _______________________________________________
>> > meta-xilinx mailing list
>> > meta-xilinx at yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/meta-xilinx
>> >



More information about the meta-xilinx mailing list