i.MX6Quad: Device tree configuration for SPI with manual SS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6Quad: Device tree configuration for SPI with manual SS

764件の閲覧回数
J_W
Contributor III

I'm trying to configure the device tree for my i.MX6 to activate SPI communications and I came across this thread:

https://community.nxp.com/t5/i-MX-Processors/How-are-the-gpio-arrays-used-in-the-Device-Tree/m-p/616...

Carlos says that this device tree is set-up to manually control the SS - which is exactly what I want to do. However, I am having no success. When I try to export my GPIO I get the message "write error: Device or resource busy".

 

This is my device tree:

&ecspi1 {
    fsl,spi-num-chipselects = <1>;
    cs-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; 
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_ecspi1>;
    status = "okay";

	 spidev@0 { 
        compatible = "rohm,dh2228fv"; /* this is a 'hack' see note below */
        reg = <0>;
        spi-max-frequency = <1000000>;
        status = "okay";
    };
};

&iomuxc {
	pinctrl_ecspi1: ecspi1grp {
		fsl,pins = <									
			MX6QDL_PAD_EIM_D18__ECSPI1_MOSI		0x0b0b0 
			MX6QDL_PAD_EIM_D17__ECSPI1_MISO		0x0b0b0 
			MX6QDL_PAD_EIM_D16__ECSPI1_SCLK		0x0b0b0 
			MX6QDL_PAD_GPIO_19__ECSPI1_RDY		0x0b0b0 
			MX6QDL_PAD_EIM_EB2__GPIO2_IO30		0x0b0b0 
		>;
	};
};

 

I've checked and GPIO2_30 is not used anywhere else - so it seems that the SPI driver has taken command of this pin - and I cannot drive it manually. I don't quite understand what I need to change in order to be able to drive this manually as a GPIO. 

ラベル(1)
0 件の賞賛
返信
0 返答(返信)