AnsweredAssumed Answered

Nitrogen6x spi out

Question asked by matthew montoya on Jun 24, 2016
Latest reply on Jul 12, 2016 by Gary Bisson

Hello all, im using a Nitrogen6X-SOM along with the host board. Im trying to reconfigure the pinmuxing on it to enable spi out via this post: https://boundarydevices.com/mx6-device-tree-customization/

 

in the imx6qdl-nitrogen6x.dtsi i have made the following changes: (ECSPI1 was pre-existing and im addint that for reference, my modifications are the ECSPI2 sections)

 

pinctrl_ecspi1: ecspi1grp {

                fsl,pins = <

                        MX6QDL_PAD_EIM_D17__ECSPI1_MISO         0x100b1

                        MX6QDL_PAD_EIM_D18__ECSPI1_MOSI         0x100b1

                        MX6QDL_PAD_EIM_D16__ECSPI1_SCLK         0x000b1

#define GP_ECSPI1_NOR_CS        <&gpio3 19 GPIO_ACTIVE_LOW>

                        MX6QDL_PAD_EIM_D19__GPIO3_IO19          0x0b0b1

                >;

        };

 

        pinctrl_ecspi2: ecspi2grp {

                fsl,pins = <

                        MX6QDL_PAD_DISP0_DAT20__ECSPI2_SCLK     0x100b1

                        MX6QDL_PAD_DISP0_DAT21__ECSPI2_MOSI     0x100b1

                        MX6QDL_PAD_DISP0_DAT22__ECSPI2_MISO     0x100b1

                >;

        };

 

 

 

&ecspi1 {

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

        cs-gpios = GP_ECSPI1_NOR_CS;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi1>;

        status = "okay";

 

        flash: m25p80@0 {

                compatible = "sst,sst25vf016b";

                spi-max-frequency = <20000000>;

                reg = <0>;

                #address-cells = <1>;

                #size-cells = <1>;

                mtd@00000000 {

                        label = "U-Boot";

                        reg = <0x0 0xC0000>;

                };

 

                mtd@000C0000 {

                        label = "env";

                        reg = <0xC0000 0x2000>;

                };

                mtd@000C2000 {

                        label = "splash";

                        reg = <0xC2000 0x13e000>;

                };

        };

};

 

&ecspi2 {

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

        cs-gpios = <&gpio5 17 0>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi2>;

        status = "okay";

        spidev@00 {

                compatible = "spidev";

                spi-max-frequency = <20000000>;

                reg = <0>;

        };

};

 

 

 

The issue im having is that on the 3 lines:

                        MX6QDL_PAD_DISP0_DAT20__ECSPI2_SCLK     0x100b1

                        MX6QDL_PAD_DISP0_DAT21__ECSPI2_MOSI     0x100b1

                        MX6QDL_PAD_DISP0_DAT22__ECSPI2_MISO     0x100b1

i get a syntax error on the ECSPI2. If i replace the ECSPI2 with ECSPI1 it compiles. I have checked every included .dts and .h and there are no other references to ECSPI1 that i could find, so there must be something wrong with my syntax in the .dtsi file but i cannot find where.

Outcomes