IMX8MQ

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MQ

943 Views
srinu_inaganti
Contributor III

Hi,

Can anybody help me in configuring the kernel to support SPI/UART peripherals for IMX8M SOM.

Thanks and regards,

Srinu

1 Reply

783 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

You could use our BSP as a reference. You just need to add the correct configuration in your device tree and then add the drivers to your kernels. All that information is included in the BSP.

The Only difference is that you will need to use the UART3 and ECSPI2. Just take note that the UART3 of the board is being used for the Bluetooth. But you could not use the Bluetooth device and use the UART3 for general purposes.

In the case of the ECSPI, there are some changes that need to be done. Since it is not implemented by default in our DTB. As I see, you will need to sacrifice the PCIe1 since some GPIOS used for controlling this bus are sharing pins with the ECSPI. Your device tree of the ECSPI part should be as following.

pinctrl_ecspi2: ecspi2grp {
  fsl,pins = <
    /* J17 */
    MX8MQ_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x19 /* Pin 1 */
    MX8MQ_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x19 /* Pin 3 */
    MX8MQ_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x19 /* Pin 5 */
    MX8MQ_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x19 /* Pin 7 */
   >;
 };
pinctrl_pcie1: pcie1grp {
  fsl,pins = <
    MX8MQ_IOMUXC_I2C4_SDA_PCIE2_CLKREQ_B 0x76 /* open drain, pull up */
  //MX8MQ_IOMUXC_ECSPI2_SCLK_GPIO5_IO10 0x16
  //MX8MQ_IOMUXC_ECSPI2_MISO_GPIO5_IO12 0x16
  >;
 };


&ecspi2 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi2>;
   status = "okay";
};


&pcie1{
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_pcie1>;
   disable-gpio = <&gpio5 10 GPIO_ACTIVE_LOW>;
   reset-gpio = <&gpio5 12 GPIO_ACTIVE_LOW>;
   ext_osc = <1>;
   status = "disable";
};

 

Or you could use as reference the "boundary device" device tree.

linux-imx6/imx8mq-nitrogen8m.dts at boundary-imx_4.9.x_8mq_ga-pass1-ath10k · boundarydevices/linux-i... 

Hope this could help you.

Best regards,

Diego.