Difference between revisions of "DESK-MX8M-L/Peripherals/PCI express"

From DAVE Developer's Wiki
Jump to: navigation, search
(Updates for DESK-MX8-L 4.0.0 release)
Line 10: Line 10:
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|13/01/2021
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|13/01/2021
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX8M-L release
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX8M-L release
 +
|-
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |{{oldid|17609|17609}}
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |24/02/2023
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-2.0.0 release
 
|-
 
|-
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |{{oldid|17609|17609}}
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |{{oldid|17609|17609}}
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |24/02/2023
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |26/07/2023
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-2.0.0 release
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-4.0.0 release
 
|-
 
|-
 
|}
 
|}
Line 81: Line 85:
 
<&pcie0_refclk>;
 
<&pcie0_refclk>;
 
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
 
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
 +
assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
 +
  <&clk IMX8MM_CLK_PCIE1_PHY>,
 +
  <&clk IMX8MM_CLK_PCIE1_CTRL>;
 +
assigned-clock-rates = <10000000>, <100000000>, <250000000>;
 +
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
 +
<&clk IMX8MM_SYS_PLL2_100M>,
 +
<&clk IMX8MM_SYS_PLL2_250M>;
 
ext_osc = <0>;
 
ext_osc = <0>;
 
status = "okay";
 
status = "okay";
Line 110: Line 121:
 
...
 
...
 
...
 
...
[    0.556894] PCI: CLS 0 bytes, default 64
+
[    1.036587] ehci-pci: EHCI PCI platform driver                                                                    
[    1.047319] ehci-pci: EHCI PCI platform driver
+
[    1.052769] ohci-pci: OHCI PCI platform driver                                                                    
[    1.063520] ohci-pci: OHCI PCI platform driver
+
[    1.998472] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    2.174414] imx6q-pcie 33800000.pcie: 33800000.pcie supply epdev_on not found, using dummy regulator
+
[    2.006801] imx6q-pcie 33800000.pcie: EXT REF_CLK is used!.    
[    2.192615] imx6q-pcie 33800000.pcie: EXT REF_CLK is used!.
+
[    2.012998] imx6q-pcie 33800000.pcie: PCIe PHY PLL clock is locked.    
[    2.205190] imx6q-pcie 33800000.pcie: PCIe PHY PLL clock is locked.
+
[    2.054543] imx6q-pcie 33800000.pcie: PCIe PLL is locked.                
[    2.218503] imx6q-pcie 33800000.pcie: PCIe PLL locked after 0 us.
+
[    2.061522] imx6q-pcie 33800000.pcie: iATU unroll: enabled                   
[    2.232672] imx6q-pcie 33800000.pcie: host bridge /pcie@33800000 ranges:
+
[    2.074094] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    2.246661] imx6q-pcie 33800000.pcie:  No bus range found for /pcie@33800000, using [bus 00-ff]
+
[    2.088808] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[    2.246679] imx6q-pcie 33800000.pcie:   IO 0x1ff80000..0x1ff8ffff -> 0x00000000
+
[    2.102731] imx6q-pcie 33800000.pcie:  No bus range found for /soc@0/pcie@33800000, using [bus 00-ff]
[    2.266200] imx6q-pcie 33800000.pcie:   MEM 0x18000000..0x1fefffff -> 0x18000000
+
[    2.118147] imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
[    2.377981] imx6q-pcie 33800000.pcie: Link up
+
[    2.133976] imx6q-pcie 33800000.pcie:     MEM 0x0018000000..0x001fefffff -> 0x0018000000
 +
[    2.149011] imx6q-pcie 33800000.pcie: iATU unroll: enabled                                                                                                                                                                               
 +
[    2.161122] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound                                                                                                                                                       
 +
[    2.261489] imx6q-pcie 33800000.pcie: Link up
 
...
 
...
 
...
 
...
Line 134: Line 148:
 
...
 
...
 
...
 
...
[    2.492367] imx6q-pcie 33800000.pcie: Link up, Gen2
+
[    2.370224] imx6q-pcie 33800000.pcie: Link up, Gen2
[    2.497366] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
+
[    2.490193] imx6q-pcie 33800000.pcie: Link up
[    2.503751] pci_bus 0000:00: root bus resource [bus 00-ff]
+
[    2.496941] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
[    2.509246] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
+
[    2.503342] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.515444] pci_bus 0000:00: root bus resource [mem 0x18000000-0x1fefffff]
+
[    2.508847] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    2.522347] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
+
[    2.515037] pci_bus 0000:00: root bus resource [mem 0x18000000-0x1fefffff]
[    2.535438] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
+
[    2.528514] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    2.541751] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
+
[    2.534560] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    2.555604] pci 0000:00:00.0: supports D1
+
[    2.540846] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    2.566199] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
+
[    2.547588] pci 0000:00:00.0: supports D1
[    2.568612] pci 0000:01:00.0: [1912:0015] type 00 class 0x0c0330
+
[    2.551605] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    2.579348] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
+
[    2.560332] pci 0000:01:00.0: [1912:0015] type 00 class 0x0c0330
[    2.591671] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
+
[    2.566431] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    2.620851] pci 0000:00:00.0: BAR 0: assigned [mem 0x18000000-0x180fffff]
+
[    2.573586] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    2.634710] pci 0000:00:00.0: BAR 14: assigned [mem 0x18100000-0x181fffff]
+
[    2.592170] pci 0000:00:00.0: BAR 0: assigned [mem 0x18000000-0x180fffff]
[    2.648698] pci 0000:00:00.0: BAR 6: assigned [mem 0x18200000-0x1820ffff pref]
+
[    2.598991] pci 0000:00:00.0: BAR 14: assigned [mem 0x18100000-0x181fffff]
[    2.661946] pci 0000:01:00.0: BAR 0: assigned [mem 0x18100000-0x18101fff 64bit]
+
[    2.605889] pci 0000:00:00.0: BAR 6: assigned [mem 0x18200000-0x1820ffff pref]
[    2.677237] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
+
[    2.613153] pci 0000:01:00.0: BAR 0: assigned [mem 0x18100000-0x18101fff 64bit]
[    2.687111] pci 0000:00:00.0:  bridge window [mem 0x18100000-0x181fffff]
+
[    2.620514] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    2.696130] pcieport 0000:00:00.0: PME: Signaling with IRQ 240
+
[    2.625771] pci 0000:00:00.0:  bridge window [mem 0x18100000-0x181fffff]
[    2.711468] pcieport 0000:00:00.0: AER: enabled with IRQ 240
+
[    2.632899] pcieport 0000:00:00.0: PME: Signaling with IRQ 242
[    2.724342] pci 0000:01:00.0: enabling device (0000 -> 0002)
+
[    2.638881] pci 0000:01:00.0: enabling device (0000 -> 0002)
[    2.739005] pci 0000:01:00.0: quirk_usb_early_handoff+0x0/0x990 took 14330 usecs
+
[    8.404360] input: wch.cn USB2IIC_CTP_CONTROL as /devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb5/5-1/5-1:1.0/0003:222A:0001.0001/input/input0
 +
[    8.560392] input: wch.cn USB2IIC_CTP_CONTROL as /devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb5/5-1/5-1:1.0/0003:222A:0001.0001/input/input1
 
...
 
...
 
...
 
...
Line 165: Line 180:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
root@desk-mx8mp:~# lspci
 
root@desk-mx8mp:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 (rev 01)
+
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
 
01:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
 
01:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
 
root@desk-mx8mp:~#  
 
root@desk-mx8mp:~#  
Line 172: Line 187:
 
and the two additional USB3 ports will be available:
 
and the two additional USB3 ports will be available:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@desk-mx8mp:~# dmesg | grep -i usb | grep xhci
+
root@desk-mx8mp:~# dmesg | grep -i usb | grep xhci                                                                    
[    2.355209] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
+
[    2.192089] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    2.392901] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
+
[    2.221094] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    2.400575] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
+
[    2.228770] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    2.637156] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
+
[    2.510185] usb 1-1: new high-speed USB device number 2 using xhci-hcd                                                                                                                                                                   
[    2.696636] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 4
+
[    2.862133] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.710397] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
+
[    2.996133] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
 +
[    3.025229] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
 +
[    3.032900] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
 +
 
 
root@desk-mx8mp:~#
 
root@desk-mx8mp:~#
 
</pre>
 
</pre>
Line 185: Line 203:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@desk-mx8mp:~# [ 269.531697] usb 4-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
+
root@desk-mx8mp:~# [ 7565.281085] usb 6-2: new SuperSpeed USB device number 2 using xhci_hcd
[ 269.570446] usb-storage 4-2:1.0: USB Mass Storage device detected
+
[ 7565.321526] usb-storage 6-2:1.0: USB Mass Storage device detected
[ 269.577329] usb-storage 4-2:1.0: Quirks match for vid 090c pid 1000: 400
+
[ 7565.329534] scsi host1: usb-storage 6-2:1.0
[  269.584444] scsi host0: usb-storage 4-2:1.0
+
[ 7566.342855] scsi 1:0:0:0: Direct-Access    Wilk    USB DISK 3.0    PMAP PQ: 0 ANSI: 6
[ 270.849828] scsi 0:0:0:0: Direct-Access    Samsung  Flash Drive      1100 PQ: 0 ANSI: 6
+
[ 7566.352069] sd 1:0:0:0: [sdb] 60628992 512-byte logical blocks: (31.0 GB/28.9 GiB)
[ 270.859346] sd 0:0:0:0: [sda] 62656641 512-byte logical blocks: (32.1 GB/29.9 GiB)
+
[ 7566.360342] sd 1:0:0:0: [sdb] Write Protect is off
[ 270.867392] sd 0:0:0:0: [sda] Write Protect is off
+
[ 7566.365788] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 270.872347] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+
[ 7566.555051sdb:
[ 270.899423sda: sda1
+
[ 7566.559628] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[ 270.903519] sd 0:0:0:0: [sda] Attached SCSI removable disk
 
 
root@desk-mx8mp:~#
 
root@desk-mx8mp:~#
 
</pre>
 
</pre>
Line 206: Line 223:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
...
 
...
...
+
...                                                                                
[    2.364397] ehci-pci: EHCI PCI platform driver                                                      
+
[    1.131579] ehci-pci: EHCI PCI platform driver
[    2.380502] ohci-pci: OHCI PCI platform driver  
+
[    1.147680] ohci-pci: OHCI PCI platform driver                                                                    
[    4.461654] imx6q-pcie 33800000.pcie: 33800000.pcie supply epdev_on not found, using dummy regulator
+
[    3.234024] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    4.471168] imx6q-pcie 33800000.pcie: PLL REF_CLK is used!.
+
[    3.242348] imx6q-pcie 33800000.pcie: PLL REF_CLK is used!.            
[    4.506703] imx6q-pcie 33800000.pcie: PCIe PLL locked after 20 us.
+
[    3.276463] imx6q-pcie 33800000.pcie: PCIe PLL is locked.      
[    4.517649] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
+
[    3.284714] imx6q-pcie 33800000.pcie: iATU unroll: enabled             
[    4.531013] imx6q-pcie 33800000.pcie:   IO 0x1ff80000..0x1ff8ffff -> 0x00000000
+
[    3.295015] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    4.543292] imx6q-pcie 33800000.pcie:   MEM 0x18000000..0x1fefffff -> 0x18000000
+
[    3.309648] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[    4.658183] imx6q-pcie 33800000.pcie: Link up
+
[    3.316925] imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
[    4.664394] imx6q-pcie 33800000.pcie: Link up
+
[    3.330476] imx6q-pcie 33800000.pcie:     MEM 0x0018000000..0x001fefffff -> 0x0018000000
[    4.674502] imx6q-pcie 33800000.pcie: Link up, Gen1
+
[    3.342505] imx6q-pcie 33800000.pcie: iATU unroll: enabled             
[    4.679511] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
+
[    3.351821] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    4.873948] pcieport 0000:00:00.0: PME: Signaling with IRQ 225
+
[    3.444200] imx6q-pcie 33800000.pcie: Link up
[    4.880604] pcieport 0000:00:00.0: AER: enabled with IRQ 225
 
 
...
 
...
 
...
 
...
Line 229: Line 245:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
root@desk-mx8mm:~# lspci
 
root@desk-mx8mm:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 (rev 01)
+
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
 
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
 
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
 +
root@desk-mx8mm:~#
 
</pre>
 
</pre>
  

Revision as of 08:00, 26 July 2023

History
ID# Issue Date Notes

15734

13/01/2021 First DESK-MX8M-L release

17609

24/02/2023 DESK-MX8M-L-2.0.0 release

17609

26/07/2023 DESK-MX8M-L-4.0.0 release


Peripheral PCI express[edit | edit source]

Device tree configuration[edit | edit source]

ORCA SOM[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:

From imx8mp-mito8mplus-cb1001.dts:

&pcie {
	status = "okay";
};

&pcie_phy{
	ext_osc = <1>;
	status = "okay";
};

MITO 8M Mini[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini:

From imx8mm-mito8mmini.dts:

...
...
	pcie0_refclk: pcie0-refclk {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <100000000>;
	};
...
...
	regulators {
...
		reg_pcie_pwr: pcie_pwr {
			compatible = "regulator-fixed";
			regulator-name = "PCIe_PWREN";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
			gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
			enable-active-high;
		};
...
...
&pcie0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pcie0>;
	disable-gpio = <&gpio5 20 GPIO_ACTIVE_LOW>;
	reset-gpio = <&gpio5 21 GPIO_ACTIVE_LOW>;
	wake-gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
	clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>,
		 <&clk IMX8MM_CLK_PCIE1_AUX>,
		 <&clk IMX8MM_CLK_PCIE1_PHY>,
		 <&pcie0_refclk>;
	clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
	assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
			  <&clk IMX8MM_CLK_PCIE1_PHY>,
			  <&clk IMX8MM_CLK_PCIE1_CTRL>;
	assigned-clock-rates = <10000000>, <100000000>, <250000000>;
	assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
				 <&clk IMX8MM_SYS_PLL2_100M>,
				 <&clk IMX8MM_SYS_PLL2_250M>;
	ext_osc = <0>;
	status = "okay";
};
...
...
&iomuxc {
...
...
	pinctrl_pcie0: pcie0grp {
		fsl,pins = <
			MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20			   0x19
			MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21			   0x19
			MX8MM_IOMUXC_SD2_WP_GPIO2_IO20				   0x19
			MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20				0x19
		>;
	};
...
...

Accessing the peripheral in ORCA SOM[edit | edit source]

Linux messages at boot time[edit | edit source]

PCIe driver initialized:

...
...
[    1.036587] ehci-pci: EHCI PCI platform driver                                                                      
[    1.052769] ohci-pci: OHCI PCI platform driver                                                                      
[    1.998472] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    2.006801] imx6q-pcie 33800000.pcie: EXT REF_CLK is used!.      
[    2.012998] imx6q-pcie 33800000.pcie: PCIe PHY PLL clock is locked.      
[    2.054543] imx6q-pcie 33800000.pcie: PCIe PLL is locked.                 
[    2.061522] imx6q-pcie 33800000.pcie: iATU unroll: enabled                    
[    2.074094] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    2.088808] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[    2.102731] imx6q-pcie 33800000.pcie:   No bus range found for /soc@0/pcie@33800000, using [bus 00-ff]
[    2.118147] imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
[    2.133976] imx6q-pcie 33800000.pcie:      MEM 0x0018000000..0x001fefffff -> 0x0018000000
[    2.149011] imx6q-pcie 33800000.pcie: iATU unroll: enabled                                                                                                                                                                                 
[    2.161122] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound                                                                                                                                                         
[    2.261489] imx6q-pcie 33800000.pcie: Link up
...
...

The PCIe usage is strictly related to the peripheral type connected to the PCIe slot. Then, the peripheral type defines the linux commands used for the accessing (hiding the PCIe bus commands)

PCIe to USB3 example[edit | edit source]

Using a PCIe to USB card, like the following one:

...
...
[    2.370224] imx6q-pcie 33800000.pcie: Link up, Gen2
[    2.490193] imx6q-pcie 33800000.pcie: Link up
[    2.496941] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
[    2.503342] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.508847] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    2.515037] pci_bus 0000:00: root bus resource [mem 0x18000000-0x1fefffff]
[    2.528514] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    2.534560] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    2.540846] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    2.547588] pci 0000:00:00.0: supports D1
[    2.551605] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    2.560332] pci 0000:01:00.0: [1912:0015] type 00 class 0x0c0330
[    2.566431] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    2.573586] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    2.592170] pci 0000:00:00.0: BAR 0: assigned [mem 0x18000000-0x180fffff]
[    2.598991] pci 0000:00:00.0: BAR 14: assigned [mem 0x18100000-0x181fffff]
[    2.605889] pci 0000:00:00.0: BAR 6: assigned [mem 0x18200000-0x1820ffff pref]
[    2.613153] pci 0000:01:00.0: BAR 0: assigned [mem 0x18100000-0x18101fff 64bit]
[    2.620514] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    2.625771] pci 0000:00:00.0:   bridge window [mem 0x18100000-0x181fffff]
[    2.632899] pcieport 0000:00:00.0: PME: Signaling with IRQ 242
[    2.638881] pci 0000:01:00.0: enabling device (0000 -> 0002)
[    8.404360] input: wch.cn USB2IIC_CTP_CONTROL as /devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb5/5-1/5-1:1.0/0003:222A:0001.0001/input/input0
[    8.560392] input: wch.cn USB2IIC_CTP_CONTROL as /devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb5/5-1/5-1:1.0/0003:222A:0001.0001/input/input1
...
...

the PCIe to USB 3 bridge is detected:

root@desk-mx8mp:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
root@desk-mx8mp:~# 

and the two additional USB3 ports will be available:

root@desk-mx8mp:~# dmesg | grep -i usb | grep xhci                                                                     
[    2.192089] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    2.221094] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    2.228770] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    2.510185] usb 1-1: new high-speed USB device number 2 using xhci-hcd                                                                                                                                                                     
[    2.862133] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.996133] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[    3.025229] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[    3.032900] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed

root@desk-mx8mp:~#

Inserting an USB key in the second USB3 port:

root@desk-mx8mp:~# [ 7565.281085] usb 6-2: new SuperSpeed USB device number 2 using xhci_hcd
[ 7565.321526] usb-storage 6-2:1.0: USB Mass Storage device detected
[ 7565.329534] scsi host1: usb-storage 6-2:1.0
[ 7566.342855] scsi 1:0:0:0: Direct-Access     Wilk     USB DISK 3.0     PMAP PQ: 0 ANSI: 6
[ 7566.352069] sd 1:0:0:0: [sdb] 60628992 512-byte logical blocks: (31.0 GB/28.9 GiB)
[ 7566.360342] sd 1:0:0:0: [sdb] Write Protect is off
[ 7566.365788] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 7566.555051]  sdb:
[ 7566.559628] sd 1:0:0:0: [sdb] Attached SCSI removable disk
root@desk-mx8mp:~#

Accessing the peripheral in MITO 8M Mini[edit | edit source]

Linux messages at boot time[edit | edit source]

PCIe driver initialized:

...
...                                                                                  
[    1.131579] ehci-pci: EHCI PCI platform driver
[    1.147680] ohci-pci: OHCI PCI platform driver                                                                      
[    3.234024] imx6q-pcie 33800000.pcie: supply epdev_on not found, using dummy regulator
[    3.242348] imx6q-pcie 33800000.pcie: PLL REF_CLK is used!.              
[    3.276463] imx6q-pcie 33800000.pcie: PCIe PLL is locked.        
[    3.284714] imx6q-pcie 33800000.pcie: iATU unroll: enabled               
[    3.295015] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    3.309648] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[    3.316925] imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
[    3.330476] imx6q-pcie 33800000.pcie:      MEM 0x0018000000..0x001fefffff -> 0x0018000000
[    3.342505] imx6q-pcie 33800000.pcie: iATU unroll: enabled               
[    3.351821] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    3.444200] imx6q-pcie 33800000.pcie: Link up
...
...

Check which are the devices connected to the PCIe.

root@desk-mx8mm:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
root@desk-mx8mm:~#

Additional information[edit | edit source]