取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
Highlighted
Contributor
Contributor
1,164 次查看
注册日期: ‎09-09-2017

zynqmp 中pinctrl配置(EMMC)

跳至解决方案

Hi,麻烦咨询下,zynqmp中 pinctrl的配置,
例如:附件 vivado-sdmio.png,我使用MIO 将SD0配置为MMC设备,SD1配置为SD设备。

 

	pinctrl_sdhci0_default: sdhci0-default {
		mux {
			groups = "sdio0_0_grp";
			function = "sdio0";
		};

		conf {
			groups = "sdio0_0_grp";
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
			bias-disable;
		};

        /*  eMMC not support CD(card detact),sd mode support
		mux-cd {
			groups = "sdio0_cd_0_grp";
			function = "sdio0_cd";
		};

		conf-cd {
			groups = "sdio0_cd_0_grp";
			bias-high-impedance;
			bias-pull-up;
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
		};
        */
	};
	pinctrl_sdhci1_default: sdhci1-default {
		mux {
			groups = "sdio1_2_grp";
			function = "sdio1";
		};

		conf {
			groups = "sdio1_2_grp";
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
			bias-pull-up;
		};

		mux-cd {
			groups = "sdio1_cd_0_grp";
			function = "sdio1_cd";
		};

		conf-cd {
			groups = "sdio1_cd_0_grp";
			bias-pull-up;
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
		};


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

		conf-wp {
			groups = "sdio1_wp_0_grp";
			bias-pull-up;
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
		};

结果却错了,出现

 

[ 4.862211] sdhci-arasan ff160000.mmc: Missing default pinctrl config
[ 4.868685] sdhci-arasan: probe of ff160000.mmc failed with error 1

 

请问:
1. EMMC的pinctrl如何配置

2. pinctrl中pin的group在哪看?如何确定某个pin在哪个group中?

3. 如何知道某种设备需要配哪些conf,比如 mux,conf,mux-cd,conf-cd ......
谢谢啦。

vivado-sdmio.png
0 项奖励
1 解答

已接受的解答
Highlighted
Contributor
Contributor
1,038 次查看
注册日期: ‎09-09-2017

谢谢啦,已经解决了,这个配置是对的。调用地方烧写了

&sdhci0 {
    status = "okay";
    bus-width = <8>;
    clock-frequency = <20000000>;
    xlnx,mio_bank = <0>;
    no-sd;
    no-sdio;
    disable-wp;
    pinctrl-names = "default";   // 忘了写这个 default
    pinctrl-0 = <&pinctrl_sdhci0_default>;                                                                                                                                                                         
    /* cd-gpios = <&gpio 78 GPIO_ACTIVE_LOW>; */
};

在原帖中查看解决方案

2 回复数
Highlighted
Xilinx Employee
Xilinx Employee
1,064 次查看
注册日期: ‎04-15-2011
这里面的这个板子,有与你类似的配置,你可以参考一下:
https://github.com/Xilinx/linux-xlnx/blob/master/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 项奖励
Highlighted
Contributor
Contributor
1,039 次查看
注册日期: ‎09-09-2017

谢谢啦,已经解决了,这个配置是对的。调用地方烧写了

&sdhci0 {
    status = "okay";
    bus-width = <8>;
    clock-frequency = <20000000>;
    xlnx,mio_bank = <0>;
    no-sd;
    no-sdio;
    disable-wp;
    pinctrl-names = "default";   // 忘了写这个 default
    pinctrl-0 = <&pinctrl_sdhci0_default>;                                                                                                                                                                         
    /* cd-gpios = <&gpio 78 GPIO_ACTIVE_LOW>; */
};

在原帖中查看解决方案