[meta-xilinx] Recipes for MicroZed
Nathan Rossi
nathan.rossi at xilinx.com
Thu Jan 16 18:43:39 PST 2014
> -----Original Message-----
> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
> bounces at yoctoproject.org] On Behalf Of Anders Berndtsson
> Sent: Monday, January 13, 2014 10:11 PM
> To: meta-xilinx at yoctoproject.org
> Subject: [meta-xilinx] Recipes for MicroZed
>
> Hallo all,
>
> I have made recipes for the MiroZed board, based on the current Master
> branch.
>
> During the development I had problem to access the SD cards.
>
> Finally I found a solution at the Elphel project where the clocks
> frequency are changed in the device tree generator for the ps7_sd_0 as
> follows.
>
>
>
> ps7_sd_0: ps7-sdio at e0100000 {
>
> clock-frequency =
> <0x7735940>;
>
> clock-names = "ref_clk",
> "aper_clk";
>
> clocks = <&clkc 21>,
> <&clkc 32>;
>
> compatible = "xlnx,ps7-
> sdio-1.00.a", "generic-sdhci" , "arasan,sdhci-8.9a";
>
> interrupt-parent =
> <&ps7_scugic_0>;
>
> interrupts = <0 24 4>;
>
> reg = <0xe0100000 0x1000>;
>
> xlnx,has-cd = <0x0>;
>
> xlnx,has-power = <0x0>;
>
> xlnx,has-wp = <0x0>;
>
> xlnx,sdio-clk-freq-hz =
> <0x3f93e10>;
>
> } ;
>
>
>
> I have now following questions.
>
> 1. Why is it working with this frequencies? In Xilinx-Zynq manual
> max frequency for the SD core is 50Mhz and also the zedboard is using 50
> MHz.
For all Zynq boards in meta-xilinx we stick with 50 MHz and we do not have any issues. It is indeed interesting that you are having issues, but I suspect it may be board or card specific? Try a different brand/type of card and see if you get different results.
Unfortunately I don't know much about the MicroZed, does it have any external board or MIO changes such that it is forced to operate at a different clock?
>
> 2. On the zed board the WP and CD are connected to MDIO 46 and 47,
> on microzed there is no WP and CD is connected to MDIO 46. In the device
> tree generator I disabled all signals but it seems that the CD works
> anyway, how come?
The "xlnx,has-cd" and "xlnx,has-wp" properties are not actually used by the Linux kernel, they are merely generated from the device tree generator as the information is available.
Check the drivers there may be a different property you can use to disable WP. Although I imagine just disabling it via the MIO is enough?
>
> 3. Where can I find the source code for the ps7_sd_0 driver?
Depends on which kernel you are using, the newer kernels use the arasan driver, older kernels use the xilinxps driver.
https://github.com/Xilinx/linux-xlnx/blob/xlnx_3.8/drivers/mmc/host/sdhci-of-xilinxps.c
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/mmc/host/sdhci-of-arasan.c
Regards,
Nathan
>
>
>
> My images seems to work well and stable, but I'm a newbie for both linux
> and Yocto so I will not publish anything official.
>
> If someone is interested to test out this recipes and do the work I'm glad
> to chair my code. Just send a mail.
>
>
>
> Regards
>
> Anders
More information about the meta-xilinx
mailing list