How do I make the S32R45 support nvme?

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

How do I make the S32R45 support nvme?

877 Views
CSBoy
Contributor II

I use  "fsl-auto-rsdk-bsp-v33.0.tar.gz" to build fsl-image-auto.

  • How should I modify the device tree to support nvme?

     
     
    Is there a reference document?
  •  

It' my device tree

serdes0: serdes@40480000 {
#phy-cells = <3>;
compatible = "nxp,s32cc-serdes";
clocks = <&clks S32GEN1_SCMI_CLK_SERDES_AXI>,
<&clks S32GEN1_SCMI_CLK_SERDES_AUX>,
<&clks S32GEN1_SCMI_CLK_SERDES_APB>,
<&clks S32GEN1_SCMI_CLK_SERDES_REF>;
clock-names = "axi", "aux", "apb", "ref";
resets = <&reset S32GEN1_SCMI_RST_SERDES0>,
<&reset S32GEN1_SCMI_RST_PCIE0>;
reset-names = "serdes", "pcie";
fsl,sys-mode = <PCIE_GEN3X2_MODE>;
reg = <0x0 0x40480000 0x0 0x108>,
<0x0 0x40483008 0x0 0x10>,
<0x0 0x40482000 0x0 0x800>,
<0x0 0x40482800 0x0 0x800>;
reg-names = "ss_pcie", "pcie_phy", "xpcs0", "xpcs1";
status = "okay";
};

 

but.

[ 1.548300] phy-s32gen1-serdes 40480000.serdes: Using mode 0 for SerDes subsystem
[ 1.548970] phy-s32gen1-serdes 44180000.serdes: Using mode 0 for SerDes subsystem
[ 1.549965] phy_mode = 0 40400000.pcie: Configured as RootComplex
[ 1.549970] sctrl->ext_clk=1
[ 1.549973] start!
[ 1.554963] end!
[ 1.554971] phy-s32gen1-serdes 40480000.serdes: Failed to lock PCIE phy
[ 1.554980] phy phy-40480000.serdes.0: phy poweron failed --> -110

 

 

Tags (1)
0 Kudos
5 Replies

831 Views
nxf46852
NXP Employee
NXP Employee

Hello,

The BSP 33 should support the NVMe via PCIe by default. When booting, U-Boot should detect the device. Please refer to the attached image. In Linux, the device is detected under /dev/nvme0 and /dev/nvme0n1. You can create a partition in /dev/nvme0n1 with fdisk and format it via mkfs.ext3.

NVMeUboot.PNG

 

0 Kudos

806 Views
nxf46852
NXP Employee
NXP Employee

Hi

It seems to me a clock problem. Can you try the below command in Uboot? and check the clock frequencies? On my side I get the next output:

=> verifclk CMU | Monitored | Reference | Expected | Verified

ID CLOCK CLOCK RANGE (MHZ) RANGE (MHZ)

0FXOSCFIRC40.00039.062
1FIRCFXOSC48.00048.146
2SIRCFXOSC0.0320.031
3FTM_0_REFFXOSC40.00039.976
4FTM_1_REFFXOSC40.00039.976
5XBAR_DIV3FIRC133.333125.000
6XBAR_M7_0FIRC400.000375.000
7XBAR_DIV3FXOSC133.333132.812
8XBAR_M7_1FIRC400.000375.000
9XBAR_M7_2FIRC400.000375.000
10PERFIRC80.00078.125
11SERDES_REFFXOSC100.000 - 125.00099.609
12FLEXRAY_PEFXOSC40.0000.000 - 0.015
13CAN_PEFXOSC80.00080.078
14GMAC_0_TXFXOSC125.000125.000
15GMAC_TSFXOSC200.0000.000 - 0.015
16LINFXOSC125.00062.500
17QSPI_1XFXOSC133.333132.812
18SDHCFXOSC400.000398.437
20DDRFIRC800.000750.000
21GMAC_0_RXFXOSC2.500 - 125.00024.902
22SPIFXOSC100.00099.609
27A53_COREFXOSC800.000796.875
28A53_COREFIRC800.000750.000
38ACCEL3FXOSC600.000601.562
39ACCEL4_0FXOSC400.000398.437
40ACCEL4_0FXOSC400.000398.437
46GMAC_1_TXFXOSC125.0000.000 - 0.015
51GMAC_1_RXFXOSC125.00047.851
52MIPICSI2_0FXOSC400.000398.437
53MIPICSI2_0FXOSC400.000398.437
54SERDES_REFFXOSC125.00099.609

After this, you can try to use the internal clock instead: The customer has to modify the next environment variable in Uboot:

=> print hwconfig

hwconfig=pcie0:mode=rc,clock=ext;pcie1:mode=ep,clock=int

=> edit hwconfig

edit: pcie0:mode=rc,clock=int;pcie1:mode=ep,clock=int

=> saveenv

Saving Environment to MMC... Writing to MMC(0)... OK

 

Then reset the board and see if the MPLLs is still unlocked.

Please share the results.

 

0 Kudos

791 Views
CSBoy
Contributor II

Hi

Our board hardware has a power supply problem,Now it can detect nvme。

in addition,we find write speed is too slow in  cache mode(170MB/s)。Direct mode seems to be normal(852MB/s).

root@s32r45evb:/mnt/nvme# dd if=/dev/zero of=test bs=8M count=256
256+0 records in
256+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 12.5997 s, 170 MB/s
root@s32r45evb:/mnt/nvme# dd if=/dev/zero of=test bs=8M count=256 oflag=direct
256+0 records in
256+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 2.52067 s, 852 MB/s

We wrote a test program,The average write speed is around 250MB/s,.here's still a gap in the write speed that we want.

Why is cache mode lower than direct mode?

Can it be optimized?

Thanks

 

 

 

 

 

 

 

 

 

0 Kudos

763 Views
nxf46852
NXP Employee
NXP Employee

Hi,

I heard from Horace Hou, this issue has been discussed through emails last week. So I suggest we can close this case now. Thanks.

0 Kudos

855 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I have contact our RADAR team and ask for help.

I will feedback you ASAP.

Best regards,

Peter

0 Kudos