Hello, I’m trying to enable the msata and for the manual this is possible selecting the correct physicals of sata and pcie.
so this is our device tree block with this devices:
&pciea{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pciea>;
ext_osc = <1>;
clocks = <&clk IMX8QM_HSIO_PCIE_A_MSTR_AXI_CLK>,
<&clk IMX8QM_HSIO_PCIE_A_SLV_AXI_CLK>,
<&clk IMX8QM_HSIO_PHY_X2_PCLK_0>,
<&clk IMX8QM_HSIO_PCIE_X2_PER_CLK>,
<&clk IMX8QM_HSIO_PCIE_A_DBI_AXI_CLK>,
<&pcie_sata_refclk_gate>;
clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_per", "pcie_inbound_axi", "pcie_ext";
reset-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&pcieb{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcieb &pinctrl_wifi>;
ext_osc = <1>;
clocks = <&clk IMX8QM_HSIO_PCIE_B_MSTR_AXI_CLK>,
<&clk IMX8QM_HSIO_PCIE_B_SLV_AXI_CLK>,
<&clk IMX8QM_HSIO_PHY_X2_PCLK_1>,
<&clk IMX8QM_HSIO_PCIE_X2_PER_CLK>,
<&clk IMX8QM_HSIO_PCIE_B_DBI_AXI_CLK>,
<&pcie_sata_refclk_gate>;
clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_per", "pcie_inbound_axi", "pcie_ext";
reset-gpio = <&gpio5 0 GPIO_ACTIVE_HIGH>;
/*clkreq-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>;*/
/*epdev_on-supply = <&epdev_on>;*/
status = "okay";
};
&sata {
compatible = "fsl,imx8qm-ahci";
reg = <0x0 0x5f020000 0x0 0x10000>; /* Controller reg */
interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8QM_HSIO_SATA_CLK>,
<&clk IMX8QM_HSIO_PHY_X1_PCLK>,
<&clk IMX8QM_HSIO_SATA_EPCS_TX_CLK>,
<&clk IMX8QM_HSIO_SATA_EPCS_RX_CLK>,
<&clk IMX8QM_HSIO_PHY_X2_PCLK_0>,
<&clk IMX8QM_HSIO_PHY_X2_PCLK_1>;
clock-names = "sata", "sata_ref", "epcs_tx", "epcs_rx",
"phy_pclk0", "phy_pclk1";
hsio = <&hsio>;
power-domains = <&pd_sata0>;
iommus = <&smmu 0x13 0x7f80>;
status = "okay";
};
Now on the boot DMESG return this:
root@apalis-imx8:~# dmesg | grep pci
[ 1.052016] imx6q-pcie 5f000000.pcie: 5f000000.pcie supply epdev_on not found, using dummy regulator
[ 1.052160] imx6q-pcie 5f000000.pcie: pcie_ext clock source missing or invalid
[ 1.054612] imx6q-pcie 5f010000.pcie: 5f010000.pcie supply epdev_on not found, using dummy regulator
[ 1.054709] imx6q-pcie 5f010000.pcie: pcie_ext clock source missing or invalid
[ 2.177001] ehci-pci: EHCI PCI platform driver
[ 2.178250] ohci-pci: OHCI PCI platform driver
[ 2.739287] imx6q-pcie 5f000000.pcie: 5f000000.pcie supply epdev_on not found, using dummy regulator
[ 2.739530] OF: PCI: host bridge /pcie@0x5f000000 ranges:
[ 2.739537] OF: PCI: No bus range found for /pcie@0x5f000000, using [bus 00-ff]
[ 2.742523] imx6q-pcie 5f000000.pcie: pcie phy pll is locked.
[ 3.067672] imx6q-pcie 5f000000.pcie: phy link never came up
[ 3.067686] imx6q-pcie 5f000000.pcie: failed to initialize host
[ 3.067689] imx6q-pcie 5f000000.pcie: unable to add pcie port.
[ 3.067853] imx6q-pcie: probe of 5f000000.pcie failed with error -110
[ 3.070271] imx6q-pcie 5f010000.pcie: 5f010000.pcie supply epdev_on not found, using dummy regulator
[ 3.070491] OF: PCI: host bridge /pcie@0x5f010000 ranges:
[ 3.070498] OF: PCI: No bus range found for /pcie@0x5f010000, using [bus 00-ff]
[ 3.073457] imx6q-pcie 5f010000.pcie: pcie phy pll is locked.
[ 3.226473] imx6q-pcie 5f010000.pcie: Speed change timeout
[ 3.226476] imx6q-pcie 5f010000.pcie: Roll back to GEN1 link!
[ 3.226480] imx6q-pcie 5f010000.pcie: Link up, Gen1
[ 3.227784] imx6q-pcie 5f010000.pcie: PCI host bridge to bus 0000:00
[ 3.227792] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 3.227798] pci_bus 0000:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
[ 3.227802] pci_bus 0000:00: root bus resource [mem 0x70000000-0x7fefffff]
[ 3.227827] pci 0000:00:00.0: [1957:0000] type 01 class 0x060400
[ 3.227850] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00ffffff 64bit]
[ 3.227857] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x00ffffff pref]
[ 3.227896] pci 0000:00:00.0: supports D1 D2
[ 3.227900] pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
[ 3.228204] pci 0000:01:00.0: [1b4b:2b42] type 00 class 0x020000
[ 3.228363] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[ 3.228427] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000fffff 64bit pref]
[ 3.228885] pci 0000:01:00.0: supports D1 D2
[ 3.228888] pci 0000:01:00.0: PME# supported from D0 D1 D3hot D3cold
[ 3.240274] pci 0000:00:00.0: BAR 0: assigned [mem 0x70000000-0x70ffffff 64bit]
[ 3.240290] pci 0000:00:00.0: BAR 6: assigned [mem 0x71000000-0x71ffffff pref]
[ 3.240302] pci 0000:00:00.0: BAR 15: assigned [mem 0x72000000-0x721fffff 64bit pref]
[ 3.240316] pci 0000:01:00.0: BAR 0: assigned [mem 0x72000000-0x720fffff 64bit pref]
[ 3.240378] pci 0000:01:00.0: BAR 2: assigned [mem 0x72100000-0x721fffff 64bit pref]
[ 3.240437] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 3.240449] pci 0000:00:00.0: bridge window [mem 0x72000000-0x721fffff 64bit pref]
[ 3.241897] pcieport 0000:00:00.0: Signaling PME with IRQ 469
[ 3.242095] pcieport 0000:00:00.0: AER enabled with IRQ 470
[ 5.618916] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[ 5.708584] mwifiex_pcie: try set_consistent_dma_mask(32)
[ 5.708700] mwifiex_pcie: PCI memory map Virt0: ffff00001b400000 PCI memory map Virt2: ffff00001b600000
[ 6.791698] mwifiex_pcie 0000:01:00.0: info: FW download over, size 631012 bytes
[ 7.552298] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[ 7.585753] mwifiex_pcie 0000:01:00.0: Unknown api_id: 3
[ 7.591107] mwifiex_pcie 0000:01:00.0: Unknown api_id: 4
[ 7.596473] mwifiex_pcie 0000:01:00.0: Unknown GET_HW_SPEC TLV type: 0x217
[ 7.619913] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p145)
[ 7.619917] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.1.p145)
The configuration we need is the same as described in the manual → https://docs.toradex.com/private/105526-apalis-imx8-datasheet.pdf page 42 Table 5-27 FIRST LINE.
In the documentation I don’t see anything about how to set up the msata to work with both the pcies.
Thank you for the help.