SPI chip select configuration in IMX8M Nano processor

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI chip select configuration in IMX8M Nano processor

897 次查看
Maishalini
Contributor I

In IMX8M Nano processor (MIMX8MN5DVTJZAA )  it is possible to configure any GPIO pin for SPI Chip select ?

0 项奖励
回复
1 回复

874 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Maishalini ,

I hope you are doing well.

->One just needs to change the IOMUX setting for the SPI's CS pin to the GPIO pin.
->Please refer to this location in the linux source code to do the changes for the same.
<Linux_src_code>/Documentation/devicetree/bindings/spi

->One can refer to this link for reference to do pin configuration.
https://community.nxp.com/t5/i-MX-Processors/Native-chip-select-support-on-spi-fsl-lpspi-c/m-p/10115...

->I have shared an example for reference one can refer to that too.
&ecspi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1>;
        status = "okay";
        cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>, <&gpio3 2 GPIO_ACTIVE_LOW>;
        #address-cells = <1>;
        #size-cells = <0>;

        spidev: spidev@0 {
                compatible = "spidev";
                status = "okay";
                spi-max-frequency = <5000000>;
                reg = <0>;
        };
};

I hope this information helps you!

Thanks & Regards,

Sanket Parekh

0 项奖励
回复