i2c and spi pinmuxing

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

i2c and spi pinmuxing

4,263 次查看
joissrinidhites
Contributor II

Hi NXP support Team,

 

We have used I2C1 and SPI3 digital interface in our custom board design and in software kernel level we have configured both the interface as below, But after complete board booting both the interface nodes are not creating.

 

Could you please look into our configuration details and boot logs attached in the mail and looking forward your support to debug both interface bring-up issues.

 

Below is the i2c1 configuration in our dtsi file

 

----------------------------------------------------------------

pinctrl1_i2c1: i2c1grp { //GoBox: Chnaged from sda=PK5 to PB4, and scl=PK3 to PB3

                       fsl,pins = <

                               S32_GEN1_PAD_PB4__I2C1_DATA_OUT

                               S32_GEN1_PAD_PB4__I2C1_DATA_IN

                               S32_GEN1_PAD_PB3__I2C1_SCLK_OUT

                               S32_GEN1_PAD_PB3__I2C1_SCLK_IN

                       >;

                };

&i2c1 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl1_i2c1>;

        status = "okay";

}; 

----------------------------------------------------------------

 

Below is the SPI configuration in our dtsi file

----------------------------------------------------------------

 

&spi3 { // GoBox: Added fxos8700 imu driver

     fxos8700@0 {

         compatible = "nxp,fxos8700";

         spi-max-frequency = <1000000>;

         reg = <0>; /* CS #0 */

     };

};

// GoBox: Added SPI3

&spi3 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl0_dspi3>, <&pinctrl1_dspi3>;

        #address-cells = <1>;

        #size-cells = <0>;

        status = "okay";

};

pinctrl0_dspi3: dspi3grp { //GoBox: Added SPI3 pinmux

                        fsl,pins = <

                                S32_GEN1_PAD_PK_03__SPI3_SOUT_OUT

                                S32_GEN1_PAD_PK_04__SPI3_SIN_OUT

                                S32_GEN1_PAD_PJ_15__SPI3_SCK_OUT

                                S32_GEN1_PAD_PK_01__SPI3_CS0_OUT

                        >;

                };

----------------------------------------------------------------

 

With this existing configuration, we are not able to detect i2c1 and spi3 node like below logs:

 

----------------------------------------------------------------

 

root@s32g274ardb2:~# i2cdetect -y -a 1

Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

root@s32g274ardb2:~#

root@s32g274ardb2:~# cat /sys/bus/i2c/devices/

0-0050/  i2c-0/   i2c-2/   i2c-3/   i2c-4/

root@s32g274ardb2:~# cat /sys/bus/i2c/devices/

 

----------------------------------------------------------------

0 项奖励
回复
3 回复数

4,200 次查看
bpe
NXP Employee
NXP Employee

The markings you added on the attached screen captures make the lines immediately before and after the error messages not readable. Besides that, screen captures are not searchable and completely missing the context of the error. Please update this thread with a full boot log of the problematic system in text format. Refer to the documentation of your terminal emulation program on how to enable session logging.

 

Best Regards,
Platon

 

0 项奖励
回复

4,175 次查看
vimalrajendran
Contributor II

Hi ,

       Here I have attached Boot log for your reference. and i pointed I2c-1 log. check the text file.

 

 

 

Thanks

Vimal.R

0 项奖励
回复

4,139 次查看
bpe
NXP Employee
NXP Employee


The console logs you attached do not match the screen captures that you posted
earlier, which suggests that they have been taken with a different configuration.

Anyway, there are changes in BSP 30.0 that add a ready configuration for I2C1 signals
on the pins you are trying to configure, for one of NXP boards, namely S32G-VNP-EVB.
Consider migration to BSP 30.0 and using fsl-s32g274a-evb.dts as a reference.

For more information on specifying S32G274 pin functions in the Device Tree
refer to the kernel documentation:

https://source.codeaurora.org/external/autobsps32/linux/tree/Documentation/devicetree/bindings/pinct...
https://source.codeaurora.org/external/autobsps32/linux/tree/Documentation/devicetree/bindings/pinct...

Best Regards,
Platon

 

0 项奖励
回复