Zynq7020 EMMC与SD卡之间的问题

我们的开发板是有一个EMMC和一个SD卡的,自带的uboot默认是从SD0启动,然而刚好我的EMMC就是在SD0上,但为了调试方便我希望在SD卡上启动,也就是在SD1上启动,这就存在了问题,我该如何修改才能实现此功能呢?

从官网下载下来的源码都是从SD0启动的,那么我们首先要修改设备树,以我的为例子,我的设备树文件在u-boot-xlnx-master/arch/arm/dts/zynq-zc702.dts。默认的uboot只有一个SD0,需要我们自己手动添加,如下:

	aliases {
                ............. ; 
		mmc0 = &sdhci0;
		mmc1 = &sdhci1;
	};
	pinctrl_sdhci1_default: sdhci1-default {
		mux {
			groups = "sdio1_0_grp";
			function = "sdio1";
		};

		conf {
			groups = "sdio1_0_grp";
			slew-rate = <0>;
			io-standard = <1>;
			bias-disable;
		};
/*
		mux-cd {
			groups = "gpio0_9_grp";
			function = "sdio1_cd";
		};

		conf-cd {
			groups = "gpio0_9_grp";
			bias-high-impedance;
			bias-pull-up;
			slew-rate = <0>;
			io-standard = <1>;
		};

		mux-wp {
			groups = "gpio0_15_grp";
			function = "sdio1_wp";
		};

		conf-wp {
			groups = "gpio0_15_grp";
			bias-high-impedance;
			bias-pull-up;
			slew-ra

你可能感兴趣的:(Xilinx,Zynq7020)