AnsweredAssumed Answered

IMX7D PCIE Support

Question asked by Chris Tsang on Nov 27, 2018
Latest reply on Nov 28, 2018 by Chris Tsang

Hi everyone,

 

I am developing on my custom board using imx7. I want to have PCIe NVME SSD support on my board. I have enable several options in my kernel (linux-imx  4.9.11) config.

 

Here are the options I have added base on the imx7 sabre config and it works on IMX7 Sabre board, in which my NVME SSD can be mounted and transfer data..

CONFIG_PCI=y
CONFIG_PCI_MSI=y
CONFIG_PCI_IMX6=y

CONFIG_BLK_DEV_NVME=y

 

For the PCIe part, the connections of PCIE_RST_B and PCIE_DIS_B is different from IMX7D sabre board. The RESET_B is connected to GPIO1_IO13 and the DISABLE_B is connected to GPIO1_IO12 instead.

 

So I have also modified the device tree as shown below:

 

&pcie {
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_pcie>;
     reset-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
     disable-gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
     status = "okay";
};

&iomuxc {
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_hog_1>;

     imx7d-sdb {

          pinctrl_hog_1: hoggrp-1 {
               fsl,pins = <
                    MX7D_PAD_EPDC_BDR0__GPIO2_IO28     0x59 /* headphone detect */
               >;
          };
          
          pinctrl_pcie: pciegrp {
               fsl,pins = <
                    MX7D_PAD_GPIO1_IO12__GPIO1_IO12     0x77     /* PCIE_DIS_B */
                    MX7D_PAD_GPIO1_IO13__GPIO1_IO13     0x77     /* PCIE_RST_B */
               >;
          };

However my kernel cannot start after this amendment. There should be problems in the pcie node. The kernel can start properly by removal of the entire pcie node as show above, though PCIe feature will be no longer enabled.

 

Is there anything I did wrong or missed in my approach? Is there any extra configuration on the reset and disable GPIOs? 

 

Please advise.

 

Chris Tsang

Outcomes