How to make sure whether pcie is enabled in .dts ?

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

How to make sure whether pcie is enabled in .dts ?

1,335 Views
ImxUser_SO
Contributor I

Hi,

I want to enable pcie in .dts which is imx8mm-used EVK (nitrogen8mm BoundaryDevices).

In this .dts file, PCIE status is OK (status = "okay "), but there doesn't appear even pcie host by "lspci".

 

Is there any method to make sure whether pcie is enabled in .dts ?

Is "lspci"  inappropriate ?

 

#=============================

# imx8mm-nitrogen8mm.dts

#=============================

&iomuxc {
/* ... */
pinctrl_pcie0: pcie0grp {
fsl,pins = <
#define GP_PCIE0_RESET <&gpio4 31 GPIO_ACTIVE_LOW>
MX8MMN(IOMUXC_SAI3_TXFS_GPIO4_IO31, 0x100)
#define GP_PCIE0_DISABLE <&gpio1 4 GPIO_ACTIVE_LOW>
MX8MMN(IOMUXC_GPIO1_IO04_GPIO1_IO4, 0x100)
>;
};
/* ... */
};

&pcie0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie0>;
disable-gpio = GP_PCIE0_DISABLE;
reset-gpio = GP_PCIE0_RESET;
ext_osc = <0>;
status = "okay";
};


#=============================
# fsl-imx8mm.dtsi

#=============================

/ {
/* ... */
power-domains {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;

/* HSIOMIX */
hsio_pd: power-domain@0 {
compatible = "fsl,imx8mm-pm-domain";
#address-cells = <1>;
#size-cells = <0>;
domain-id = <0>;
#power-domain-cells = <0>;
domain-name = "HSIO_PD";
clocks = <&clk IMX8MM_CLK_USB1_CTRL_ROOT>,
<&clk IMX8MM_CLK_SIM_HSIO>;

pcie0_pd: power-domain@1 {
domain-id = <1>;
#power-domain-cells = <0>;
domain-name = "PCIE0_PD";
clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>;
};
/* ... */
};

pcie0: pcie@0x33800000 {
compatible = "fsl,imx8mm-pcie", "snps,dw-pcie";
reg = <0x0 0x33800000 0x0 0x400000>, <0x0 0x32f00000 0x0 0x10000>,
<0x0 0x1ff00000 0x0 0x80000>;
reg-names = "dbi", "phy", "config";
reserved-region = <&rpmsg_reserved>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
ranges = <0x81000000 0 0x00000000 0x0 0x1ff80000 0 0x00010000 /* downstream I/O 64KB */
0x82000000 0 0x18000000 0x0 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
num-lanes = <1>;
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
interrupt-names = "msi";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
interrupt-map = <0 0 0 1 &gic GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gic GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gic GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gic GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>,
<&clk IMX8MM_CLK_PCIE1_AUX>,
<&clk IMX8MM_CLK_PCIE1_PHY>;
clock-names = "pcie", "pcie_bus", "pcie_phy";
fsl,max-link-speed = <2>;
ctrl-id = <0>;
power-domains = <&pcie0_pd>;
status = "disabled";
};
/* ... */
};

0 Kudos
Reply
1 Reply

1,324 Views
igorpadykov
NXP Employee
NXP Employee

Hi

 

it is sufficient to have in dts status OK (status = "okay "), however it is necessary

to connect some pcie card to board connector. Preferably try several cards,

then check linux log if they will be recognized.

 

Best regards
igor

0 Kudos
Reply