<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: imx8mm PCI enabling issues.</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1311576#M177302</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We found out that in the code we had couple of errors regarding the PHY reset controllers.&lt;BR /&gt;We have 100%&amp;nbsp; the dts-es for the PCIE0 as from the links mentioned above for imx8mm.&lt;BR /&gt;&lt;BR /&gt;We get:&lt;/P&gt;&lt;PRE&gt;Failed to get PCIEPHY reset control&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y&lt;/A&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;We just reconfigured the power domain accordingly.&lt;BR /&gt;&lt;BR /&gt;Out power domain:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;gpc: gpc@303a0000 {
				compatible = "fsl,imx8mm-gpc";
				reg = &amp;lt;0x303a0000 0x10000&amp;gt;;
				interrupts = &amp;lt;GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
				interrupt-parent = &amp;lt;&amp;amp;gic&amp;gt;;
				interrupt-controller;
				#interrupt-cells = &amp;lt;3&amp;gt;;

				pgc {
					#address-cells = &amp;lt;1&amp;gt;;
					#size-cells = &amp;lt;0&amp;gt;;

					pgc_hsiomix: power-domain@0 {
						#power-domain-cells = &amp;lt;0&amp;gt;;
						reg = &amp;lt;IMX8MM_POWER_DOMAIN_HSIOMIX&amp;gt;;
						clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_USB_BUS&amp;gt;;
					};

                     pgc_pcie: power-domain@1 {
                            #power-domain-cells = &amp;lt;0&amp;gt;;
                            reg = &amp;lt;IMX8MM_POWER_DOMAIN_PCIE&amp;gt;;
                            power-domains = &amp;lt;&amp;amp;pgc_hsiomix&amp;gt;;
                            clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_PCIE1_ROOT&amp;gt;;
                     };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the change:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;			power-domains = &amp;lt;&amp;amp;pgc_pcie&amp;gt;;
		
			// #define IMX8MQ_RESET_PCIEPHY			26
			resets = &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIEPHY&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_EN&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_CLK_REQ&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF&amp;gt;;
			reset-names = "pciephy", "apps", "clkreq", "turnoff";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now all the calls to the reset controller fails as (we let the error go trough):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[    1.793909] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2404
[    1.800640] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    1.812090] imx6q-pcie 33800000.pcie: Failed to get PCIEPHY reset control
[    1.830531] imx6q-pcie 33800000.pcie: Failed to get PCIE APPS reset control
[    1.840459] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2649
[    1.840472] imx6q-pcie 33800000.pcie: Failed to get TURNOFF reset control
[    1.849718] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2658
[    1.863540] imx6q-pcie 33800000.pcie: Failed to get CLKREQ reset control
[    1.888080] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2666&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jul 2021 22:36:47 GMT</pubDate>
    <dc:creator>mariusoctavian</dc:creator>
    <dc:date>2021-07-21T22:36:47Z</dc:date>
    <item>
      <title>imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1299228#M176125</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have a custom board imx8mm. I am trying to enable the PCI1&lt;BR /&gt;&lt;BR /&gt;This is on kernel: 5.10.&lt;BR /&gt;&lt;BR /&gt;Is failing here. I am into this for 3 days already. I tried so many variants for the dtsi and I cannot pass this error&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;XXX&lt;/SPAN&gt; &lt;SPAN&gt;Failed&lt;/SPAN&gt; &lt;SPAN&gt;to&lt;/SPAN&gt; &lt;SPAN&gt;get&lt;/SPAN&gt; &lt;SPAN&gt;'pciephy'&lt;/SPAN&gt; &lt;SPAN&gt;reset&lt;/SPAN&gt; &lt;SPAN&gt;control&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[    3.578885] imx6q-pcie 33800000.pcie: XXX imx6_pcie_VARIANT = 5 XX
[    3.612272] imx6q-pcie 33800000.pcie:  reset_get exclusive failed for pciephy 
[    3.624251] imx6q-pcie 33800000.pcie: ?? XXX Failed to get 'pciephy' reset control -517&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;case IMX7D:
		if (dbi_base-&amp;gt;start == IMX8MQ_PCIE2_BASE_ADDR)
			imx6_pcie-&amp;gt;controller_id = 1;

		imx6_pcie-&amp;gt;pciephy_reset = devm_reset_control_get_exclusive(dev,
									    "pciephy");
		if (IS_ERR(imx6_pcie-&amp;gt;pciephy_reset)) {
			dev_err(dev, "?? XXX Failed to get 'pciephy' reset control %d\n",
						PTR_ERR(imx6_pcie-&amp;gt;pciephy_reset));
			return PTR_ERR(imx6_pcie-&amp;gt;pciephy_reset);
		}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My schematic is:&amp;nbsp; (is GPIO expander not pci expander&amp;nbsp; Sorry)&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pci6.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/148179i213C902A4A348A88/image-size/large?v=v2&amp;amp;px=999" role="button" title="pci6.png" alt="pci6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My dts file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/dts-v1/;

#include &amp;lt;dt-bindings/misc/nad-nmb.h&amp;gt;
#include &amp;lt;dt-bindings/clock/imx8mm-clock.h&amp;gt;
#include &amp;lt;dt-bindings/reset/imx8mq-reset.h&amp;gt;
#include &amp;lt;dt-bindings/clock/imx8mq-clock.h&amp;gt;
#include "imx8mm-pinfunc.h"
#include "imx8mq-pinfunc.h"

#define MX8MMN(a, b)	MX8MM_##a b
#define IMX8MMN(a)      IMX8MM_##a

/ {
    /* ...  */
    // -----------------------  PCIE
	pcie0: pcie@33800000 {
		///-xx compatible = "fsl,imx8mq-pcie", "snps,dw-pcie","fsl,imx7d-pcie-phy";
		compatible = "fsl,imx8mm-pcie", "snps,dw-pcie";
		reg = &amp;lt;0x0 0x33800000 0x0 0x400000&amp;gt;,	// host config space 4M 
			  &amp;lt;0x0 0x32f00000 0x0 0x10000&amp;gt;,		// IMX_REFERENCE_MANUAL page 109*/
			  &amp;lt;0x0 0x1ff00000 0x0 0x80000&amp;gt;;			
		reg-names = "dbi", "config";
		#address-cells = &amp;lt;3&amp;gt;; // was 3
		#size-cells = &amp;lt;2&amp;gt;;
		device_type = "pci";
		///-xx bus-range = &amp;lt;0x00 0xff&amp;gt;;
		
		ranges = &amp;lt;0x81000000 0 0x00000000 0x1ff80000 0 0x00010000 /* downstream I/O 64KB */
				  0x82000000 0 0x18000000 0x18000000 0 0x07f00000&amp;gt;; /* non-prefetchable memory */
		
		num-lanes = &amp;lt;1&amp;gt;;
		num-viewport = &amp;lt;4&amp;gt;;
		interrupts = &amp;lt;GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH&amp;gt;,
					 &amp;lt;GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH&amp;gt;; /* eDMA */
		interrupt-names = "msi"; ///-xx, "dma";
		#interrupt-cells = &amp;lt;1&amp;gt;;
		interrupt-map-mask = &amp;lt;0 0 0 0x7&amp;gt;;
		interrupt-map = &amp;lt;0 0 0 1 &amp;amp;gic GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH&amp;gt;,
						&amp;lt;0 0 0 2 &amp;amp;gic GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH&amp;gt;,
						&amp;lt;0 0 0 3 &amp;amp;gic GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH&amp;gt;,
						&amp;lt;0 0 0 4 &amp;amp;gic GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
		fsl,max-link-speed = &amp;lt;2&amp;gt;;
		ctrl-id = &amp;lt;0&amp;gt;;
		// --x power-domains = &amp;lt;&amp;amp;pcie_pd&amp;gt;;
		power-domains = &amp;lt;&amp;amp;pgc_pcie&amp;gt;;  // my power domain
		
		resets = &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIEPHY&amp;gt;,//&amp;lt;&amp;amp;gpio_expander_out 8 0&amp;gt;
				 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_EN&amp;gt;,
				 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_EN&amp;gt;, //IMX8MQ_RESET_PCIE_CTRL_APPS_CLK_REQ&amp;gt;,
				 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF&amp;gt;;
		reset-names = "pciephy", "apps", "clkreq", "turnoff";
		
        clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_PCIE1_ROOT&amp;gt;,
                 &amp;lt;&amp;amp;clk IMX8MM_CLK_PCIE1_AUX&amp;gt;,
                 &amp;lt;&amp;amp;clk IMX8MM_CLK_PCIE1_PHY&amp;gt;,
                 &amp;lt;&amp;amp;pcie0_refclk&amp;gt;;
        clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";  

		//fsl,imx7d-pcie-phy = &amp;lt;&amp;amp;pcie_phy&amp;gt;;
		status = "okay";
	};	
    
    /* ...  */
};
	
&amp;amp;nmb {
	/* ...  */
    // -----------------------  PCIE
	export-names =
		"reset-pcie",
		"enable-pcie";							
	export-gpios =
		&amp;lt;&amp;amp;gpio_expander_out 8 0&amp;gt;,
		&amp;lt;&amp;amp;gpio_expander_out 5 0&amp;gt;;
	export-flags =
		&amp;lt;NMB_GPIO_OUT_LOW&amp;gt;,
		&amp;lt;NMB_GPIO_OUT_LOW&amp;gt;;
    /* ...  */    
};

&amp;amp;iomuxc {

    // -----------------------  PCIE
	pcie0_refclk: pcie0-refclk {
		compatible = "fixed-clock";
		#clock-cells = &amp;lt;0&amp;gt;;
		clock-frequency = &amp;lt;100000000&amp;gt;;
	};
		
    // -----------------------  PCIE
	pinctrl_pcie0: pcie0grp {
		fsl,pins = &amp;lt;
			#define GP_PCIE0_RESET &amp;lt;&amp;amp;gpio_expander_out 8 0&amp;gt;
			//MX8MMN(IOMUXC_SAI3_TXFS_GPIO4_IO31, 0x100)
			#define GP_PCIE0_DISABLE &amp;lt;&amp;amp;gpio_expander_out 5 0&amp;gt;
			//MX8MMN(IOMUXC_GPIO1_IO04_GPIO1_IO4, 0x100)	
		&amp;gt;;
	};
};

// -----------------------  PCIE
&amp;amp;pcie0 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pcie0&amp;gt;;
	disable-gpio = GP_PCIE0_DISABLE;
	reset-gpio = GP_PCIE0_RESET;
	ext_osc = &amp;lt;0&amp;gt;;
	status = "okay";
    
  
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 17:55:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1299228#M176125</guid>
      <dc:creator>mariusoctavian</dc:creator>
      <dc:date>2021-06-28T17:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1299299#M176133</link>
      <description>&lt;P&gt;Hi Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for enabling PCIe on i.MX8M Mini one can look at NXP implementation in EVK, p.9&lt;/P&gt;
&lt;P&gt;SCH-31407 schematic (seems it does not use PCIE_RST# signal)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A id="docsAndSoftware_designResultTitle1_4" class="dtmcustomrulelink" href="https://www.nxp.com/webapp/Download?colCode=8MMINILPD4-EVK-DESIGNFILES" data-dtmaction="Documents and Software Results - Software Link click" data-dtmsubaction="i.MX 8M Mini Evaluation Kit LPDDR4 Design Files" target="_blank"&gt;i.MX 8M Mini Evaluation Kit LPDDR4 Design Files&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A id="docsAndSoftware_designResultTitle1_1" class="dtmcustomrulelink" href="https://www.nxp.com/webapp/Download?colCode=8MMINI-BB-DESIGNFILES" data-dtmaction="Documents and Software Results - Software Link click" data-dtmsubaction="i.MX 8M Mini LPDDR4 EVKB Base Board Design Files" target="_blank"&gt;&lt;/A&gt;and sect.3.8. PCIE connectivity&amp;nbsp; &lt;A id="relatedDocsClick_3" href="https://www.nxp.com/webapp/Download?colCode=IMX8MMHDG" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;i.MX 8M Mini Hardware Developer’s Guide&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;dts file :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 00:28:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1299299#M176133</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-06-29T00:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1310735#M177232</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I merged the code from &lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/pci/controller/dwc/pci-imx6.c?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/pci/controller/dwc/pci-imx6.c?h=lf-5.10.y&lt;/A&gt; to our pci which lacked support for internal clock.&lt;BR /&gt;&lt;BR /&gt;Now we pass the Phy registers setup but we end up with the message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[    6.452989] imx6q-pcie 33800000.pcie: Phy link never came up&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We also debunked the DEBUG0 and DEBUG1 registers before as in (see next excerpt )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static int imx6_pcie_establish_link(struct imx6_pcie *imx6_pcie)
{
	/*..removed for clarity..*/
	
	uint32_t debug0 = readl(pci-&amp;gt;dbi_base + PCIE_PORT_DEBUG0); /// 728
	uint32_t debug1 = readl(pci-&amp;gt;dbi_base + PCIE_PORT_DEBUG1); /// 72
	printk(" zzzzzz.pci  dbg regs %x %x \n",debug0,debug1 );
	
	/* Start LTSSM. */
	imx6_pcie_ltssm_enable(dev);
	
	ret = dw_pcie_wait_for_link(pci);
	if (ret){
		dev_err(dev, "Failed to wait for LINK.\n");
		debug0 = readl(pci-&amp;gt;dbi_base + PCIE_PORT_DEBUG0); /// 728
		debug1 = readl(pci-&amp;gt;dbi_base + PCIE_PORT_DEBUG1); /// 72
		
		printk(" zzzzzz.pci  dbg regs %x %x \n",debug0,debug1 );
		goto err_reset_phy;
	}
	/*..removed for clarity..*/
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The prints we get and the register interpretation are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[    1.490492] imx6q-pcie 33800000.pcie: PLL REF_CLK is used!.
[    2.014537] imx6q-pcie 33800000.pcie: PCIe PLL locked after 0 us.
[    2.020644] xxxx.pcie dw_pcie_dbi_ro_wr_en DONE
[    2.025358] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[    2.032779] xxxx.pcie dw_pcie_dbi_ro_wr_en DONE
[    2.037419] imx6q-pcie 33800000.pcie: invalid resource  									&amp;lt;&amp;lt;&amp;lt;&amp;lt; the "atu"   entry
[    2.042567] imx6q-pcie 33800000.pcie: Resource bypassed: pci-&amp;gt;atu_base=ffff800011f00000  &amp;lt;&amp;lt;&amp;lt; using reg offset for atu
[    2.057330] xxxx.pcie dw_pcie_setup_rc one
[    2.061520] xxxx.pcie dw_pcie_dbi_ro_wr_en DONE
[    2.066154] xxxx.pcie Establishing LINK link
[    2.070517] xxxx.pcie dw_pcie_dbi_ro_wr_en DONE
[    2.087074]  zzzzzz.pci  dbg regs ee8105 8200000                                         &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; before loop
[    2.102213] xxx.pcie Waiting for link
[    6.304896] zzzz.pcie-deb LTSSM current state: 0x5 (S_PRE_DETECT_QUIET)
[    6.311520] zzzz.pcie-deb PIPE transmit K indication: 0
[    6.316764] zzzz.pcie-deb PIPE Transmit data: 0x16ac
[    6.321735] zzzz.pcie-deb Receiver is receiving logical idle: 0
[    6.327671] zzzz.pcie-deb Second symbol is also idle (16-bit PHY interface only): 0
[    6.335343] zzzz.pcie-deb Currently receiving k237 (PAD) in place of link number: 0
[    6.343010] zzzz.pcie-deb Currently receiving k237 (PAD) in place of lane number: 0
[    6.350683] zzzz.pcie-deb Link control bits advertised by link partner: 0x0
[    6.357659] zzzz.pcie-deb Receiver detected lane reversal: 0
[    6.363325] zzzz.pcie-deb TS2 training sequence received: 0
[    6.368913] zzzz.pcie-deb TS1 training sequence received: 0
[    6.374492] zzzz.pcie-deb Receiver reports skip reception: 0
[    6.380165] zzzz.pcie-deb LTSSM reports PHY link up: 0
[    6.385315] zzzz.pcie-deb A skip ordered set has been transmitted: 0
[    6.391677] zzzz.pcie-deb Link number advertised/confirmed by link partner: 0
[    6.398827] zzzz.pcie-deb Application request to initiate training reset: 0
[    6.405803] zzzz.pcie-deb PIPE transmit compliance request: 0
[    6.411556] zzzz.pcie-deb PIPE transmit electrical idle request: 1
[    6.417750] zzzz.pcie-deb PIPE receiver detect/loopback request: 0
[    6.423938] zzzz.pcie-deb LTSSM-negotiated link reset: 1
[    6.429263] zzzz.pcie-deb LTSSM testing for polarity reversal: 0
[    6.435287] zzzz.pcie-deb LTSSM performing link training: 0
[    6.440866] zzzz.pcie-deb LTSSM in DISABLE state; link inoperable: 0
[    6.447234] zzzz.pcie-deb Scrambling disabled for the link: 0
[    6.452989] imx6q-pcie 33800000.pcie: Phy link never came up
[    6.458663] imx6q-pcie 33800000.pcie: Failed to wait for LINK.
[    6.464505]  zzzzzz.pci  dbg regs 12a205 8200000                            &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;  after loop
[    6.469303] imx6q-pcie 33800000.pcie: failed to initialize host
[    6.475243] imx6q-pcie 33800000.pcie: unable to add pcie port.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A suggestion where to look would be appreciated. I am wondering if LTSSM is used to test the link up in the imx8mm&lt;BR /&gt;because in the imx6_pcie_ltssm_enable() function for IMX8MM&amp;nbsp; all it does is a reset, and regmap_update_bits is used for other&lt;BR /&gt;models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 22:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1310735#M177232</guid>
      <dc:creator>mariusoctavian</dc:creator>
      <dc:date>2021-07-20T22:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1310799#M177239</link>
      <description>&lt;P&gt;for "pcie: Phy link never came up" one can try several pcie cards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 01:17:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1310799#M177239</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-21T01:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1311576#M177302</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We found out that in the code we had couple of errors regarding the PHY reset controllers.&lt;BR /&gt;We have 100%&amp;nbsp; the dts-es for the PCIE0 as from the links mentioned above for imx8mm.&lt;BR /&gt;&lt;BR /&gt;We get:&lt;/P&gt;&lt;PRE&gt;Failed to get PCIEPHY reset control&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y&lt;/A&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi?h=lf-5.10.y&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;We just reconfigured the power domain accordingly.&lt;BR /&gt;&lt;BR /&gt;Out power domain:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;gpc: gpc@303a0000 {
				compatible = "fsl,imx8mm-gpc";
				reg = &amp;lt;0x303a0000 0x10000&amp;gt;;
				interrupts = &amp;lt;GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
				interrupt-parent = &amp;lt;&amp;amp;gic&amp;gt;;
				interrupt-controller;
				#interrupt-cells = &amp;lt;3&amp;gt;;

				pgc {
					#address-cells = &amp;lt;1&amp;gt;;
					#size-cells = &amp;lt;0&amp;gt;;

					pgc_hsiomix: power-domain@0 {
						#power-domain-cells = &amp;lt;0&amp;gt;;
						reg = &amp;lt;IMX8MM_POWER_DOMAIN_HSIOMIX&amp;gt;;
						clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_USB_BUS&amp;gt;;
					};

                     pgc_pcie: power-domain@1 {
                            #power-domain-cells = &amp;lt;0&amp;gt;;
                            reg = &amp;lt;IMX8MM_POWER_DOMAIN_PCIE&amp;gt;;
                            power-domains = &amp;lt;&amp;amp;pgc_hsiomix&amp;gt;;
                            clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_PCIE1_ROOT&amp;gt;;
                     };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the change:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;			power-domains = &amp;lt;&amp;amp;pgc_pcie&amp;gt;;
		
			// #define IMX8MQ_RESET_PCIEPHY			26
			resets = &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIEPHY&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_EN&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_CLK_REQ&amp;gt;,
					 &amp;lt;&amp;amp;src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF&amp;gt;;
			reset-names = "pciephy", "apps", "clkreq", "turnoff";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now all the calls to the reset controller fails as (we let the error go trough):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[    1.793909] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2404
[    1.800640] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    1.812090] imx6q-pcie 33800000.pcie: Failed to get PCIEPHY reset control
[    1.830531] imx6q-pcie 33800000.pcie: Failed to get PCIE APPS reset control
[    1.840459] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2649
[    1.840472] imx6q-pcie 33800000.pcie: Failed to get TURNOFF reset control
[    1.849718] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2658
[    1.863540] imx6q-pcie 33800000.pcie: Failed to get CLKREQ reset control
[    1.888080] imx6q-pcie 33800000.pcie: xxxx.pcie imx6_pcie_probe 2666&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 22:36:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1311576#M177302</guid>
      <dc:creator>mariusoctavian</dc:creator>
      <dc:date>2021-07-21T22:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1312761#M177413</link>
      <description>&lt;P&gt;&lt;STRONG&gt;RESOLVED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The project I was working was using kernel 5.10.0-01182 as a base&lt;BR /&gt;and the implementation for internal clock for PCIe was missing.&lt;BR /&gt;Thanks to Igor we found that in 5.10-y branch; see above answers .&amp;nbsp;&lt;BR /&gt;We merged (customer wanted to stick with 011.. kernel) the missing&lt;BR /&gt;code from imx6_pcie.c to our imx6_pcie.c.&lt;BR /&gt;We ran in&lt;/P&gt;&lt;PRE&gt;Failed to get PCIEPHY reset control&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Later on we found that the 011.. kernel did not have the reset controller up to date&lt;BR /&gt;so we brought in few files from the /drivers/reset/* and some required headers from dt-binding&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Viewing (22/30): 'drivers/reset/gpio-reset.c'
Viewing (23/30): 'drivers/reset/reset-dispmix.c'
Viewing (24/30): 'drivers/reset/reset-imx7.c'
Viewing (26/30): 'include/dt-bindings/reset/imx8mm-dispmix.h'
Viewing (27/30): 'include/dt-bindings/reset/imx8mn-dispmix.h'
Viewing (28/30): 'include/dt-bindings/reset/imx8mp-reset.h'
Viewing (29/30): 'include/dt-bindings/reset/imx8mq-reset.h'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then we've also grabbed the Kconfig and makefile for the reset controller an enable it in the&lt;BR /&gt;kernel config.&lt;BR /&gt;&lt;BR /&gt;Now I have the PCI up and working fine with internal clock config.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 22:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1312761#M177413</guid>
      <dc:creator>mariusoctavian</dc:creator>
      <dc:date>2021-07-23T22:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm PCI enabling issues.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1542660#M196767</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Can I ask you a question ? How about the I210 function on your platform now ?&lt;/P&gt;&lt;P&gt;I have a big trouble here.&amp;nbsp;&amp;nbsp;&lt;A href="https://www.youtube.com/shorts/3jO6BhMUrl8" target="_blank"&gt;https://www.youtube.com/shorts/3jO6BhMUrl8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The attach file is error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 11:01:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-PCI-enabling-issues/m-p/1542660#M196767</guid>
      <dc:creator>tzeng015</dc:creator>
      <dc:date>2022-10-24T11:01:45Z</dc:date>
    </item>
  </channel>
</rss>

