AnsweredAssumed Answered

IMX6Q怎么使用ECSPI3的两个片选

Question asked by mark hello on Jun 27, 2016
Latest reply on Dec 7, 2016 by AMY Lee

我在使用康佳特公司的imx6q的qseven模块,我想在ecspi3的上分别接max14830和MAX7301的spi slave设备,以下是我修改的imx6qdl-qmx6.dtsi文件,但是总不对,能告诉我怎么修改dts文件使能ECSPI3吗,尤其是我需要两个cs信号:

 

 

我增加的代码:

&ecspi3 {

        fsl,spi-num-chipselects = <2>;

        cs-gpios = <

                &gpio4 24 GPIO_ACTIVE_LOW

                &gpio4 25 GPIO_ACTIVE_LOW

        >;

 

        //cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>,<&gpio4 25 GPIO_ACTIVE_LOW>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi3>;

        dmas = <&sdma 7 7 1>, <&sdma 8 7 2>;

        dma-names = "rx", "tx";

        status = "okay";

        max7301:max7301@0{

                compatible = "maxim,max7301";

                reg = <0>;

                spi-max-frequency = <26000000>;

 

        };

        max14830: max14830@1 {

                compatible = "maxim,max14830";

                reg = <1>;

                spi-max-frequency = <26000000>;

                clocks = <&ref4>;

                clock-names = "xtal";

      //          interrupt-parent = <&gpio3>;

       //         interrupts = <7 IRQ_TYPE_EDGE_FALLING>;

        //        gpio-controller;

         //       #gpio-cells = <2>;

        };

 

};

还增加了:

 

  pinctrl_ecspi3: ecspi3grp {

                        fsl,pins = <

                                MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO              0x100b1

                                MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI              0x100b1

                                MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK              0x100b1

                                //MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24             0x100b1

                                //MX6QDL_PAD_DISP0_DAT4__GPIO4_IO25             0x100b1

                        >;

                };

 

 

我是否疏忽了其他的地方?

Outcomes