Sata link down in kernel (3.14.28)

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

Sata link down in kernel (3.14.28)

3,728 Views
fang
Contributor I

Sata can't be detected when I tested with kernel 3.10.53 and 3.14.28, but it works in uboot.

 

My test environment and procedures:

Processor: i.MX6Q

Reference board: imx6qsabresd

a) boot with mfg tool using micro usb cable.    

     Boot with mfg tool is only for my testing, in production it boots from flash .

b) kernel and rootfs are in SD card.

 

1. Test with kernel (linux-2.6-imx-rel_imx_3.10.53_1.1.0_ga.zip) & uboot (rel_imx_3.10.53_1.1.1)

     Sata can be detected in uboot and get manufacture, capacity info, but can't be detected in kernel.

    

  Prints in dmesg:

  ...

  Wait for CR ACK error!

  sata phy RX_PLL is stable!

  ahci: SSS flag set, parallel bus scan disabled

  ahci ahci: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode

  ahci ahci: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst

  scsi0 : ahci_platform

  ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 71

  ...

  sdhci: Secure Digital Host Controller Interface driver

  sdhci: Copyright(c) Pierre Ossman

  sdhci-pltfm: SDHCI platform and OF driver helper

  sdhci-esdhc-imx 2190000.usdhc: could not get ultra high speed state, work on normal mode

  ...

  ata1: SATA link down (SStatus 0 SControl 300)

  ata1.00: link offline, clearing class 1 to NONE

 

2. Test with kernel (rel_imx_3.14.28_1.0.0_ga.zip) & uboot (rel_imx_3.14.28_1.0.0_ga)

     Sata still can be detected in uboot, but can't be detected in kernel.

     And after upraged to kernel 3.14.28, I got one more issue is that i2c0 can't be detected which works fine with 3.10.53.

 

     I attached my linux config, device tree and log which I used with 3.14.28.

 

My question is why i2c0 can't be detected any more with the new kernel, i2c0's definition in device tree I didn't change.

I tried several different Sata disks, they are all can be detected in uboot, but not in kernel.

I think there maybe something wrong  in linux config or device tree.

 

I'll really appreciate if someone can help me sort it out.

Original Attachment has been moved to: ag13008_linux_defconfig.zip

Original Attachment has been moved to: imx6q-ag13008b.dts.zip

Original Attachment has been moved to: log.txt.zip

Labels (2)
0 Kudos
7 Replies

2,236 Views
igorpadykov
NXP Employee
NXP Employee

to test if this is caused by noise

one can try to run minimal image or add capacitors to VDDSOC_CAP

~igor

0 Kudos

2,236 Views
igorpadykov
NXP Employee
NXP Employee

Hi jifang

if it is detected in uboot, then seems in linux signal is noisy due to

more power consumption: please check ripples on VDDARM_CAP

and VDDSOC_CAP, should be less than 5%

and SATA Phy strength and sensitivity levels, they are defined in

IOMUX GPR13  in ../driver/ata/ahci_imx.c

one can set them to values used by uboot.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,236 Views
fang
Contributor I

Hi igor,

     I set the Sata configuration parameter the same as in the uboot.

     It still can't be detected.

# dmesg | grep sata

[    1.205555] ahci-imx 2200000.sata: fsl,transmit-level-mV value 1104, using 00000044

[    1.205566] ahci-imx 2200000.sata: fsl,transmit-boost-mdB value 0, using 00000000

[    1.205575] ahci-imx 2200000.sata: fsl,transmit-atten-16ths value 9, using 00002000

[    1.205583] ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000

[    1.208407] ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled

[    1.208439] ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode

[    1.208452] ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst

[    1.593187] ahci-imx 2200000.sata: no device found, disabling link.

[    1.593198] ahci-imx 2200000.sata: pass ahci_imx..hotplug=1 to enable hotplug

     Thank you for your help!

0 Kudos

2,236 Views
igorpadykov
NXP Employee
NXP Employee

Hi jifang

had you tried on Sabre board ?

~igor

0 Kudos

2,236 Views
fang
Contributor I

I fixed i2c-0 issue.

The sata I'm using is SamSung SSD 850 EVO mSata and Intel SSD.

It shares slot with 3G modem, modem works fine in 3.10.53 but failed in 3.14.28.

I created a thread for modem issue.Sierra 3G modem in Linux 3.14.28

For debug sata, I added three prints in function *ata_dev_next in libata-core.c.

1. Uboot3.10.53 + Kernel3.10.53 + prints in libata-core.c

    Sata is detected when warm reset and failed when cold reset.

2. Uboot3.14.28 + Kernel3.14.28 +/- prints in libata-core.c

    Sata isn't detected.

3. Uboot3.10.53 + Kernel3.14.28 + prints in libata-core.c

    Sata is detected in both warm and cold reset, I tested over 10 times.

From the test, I think it's a timing issue.

It's failed when I try to add more or less prints, only works with three prints.

I try to figure out a proper place to add some delay.

I know you have rich expericence in imx platform and your service policy.

Any thoughts about the issue is appreciated.

0 Kudos

2,236 Views
fang
Contributor I

Hi igor,

I tried on our board, it's reference board is imx6qsabresd.

I was told it's nearly the same as the reference board.

I couldn't find VDDARM_CAP in schemetic.

And I just checked VDDSOC_CAP,

Without sata inserted, it's value is about 1.2v, and ripple 4%~8%, most of the time is 5%.

With sata inserted, it's value is about 1.188v, sometimes it jumps to 1.25v (half second).

I'm not hardware engineer, and I don't know it's correct or not.

Thank you very much.

0 Kudos

2,236 Views
fang
Contributor I

Hi igor,

Thank you very much!

I compared SATA parameters in uboot and kernel, found that TXBOOST and TX_LVL is different.

Today is holiday, I'll try it tomorrow.

One more issue is that i2c-0 isn't detected after I upgrade to the new kernel.

Do you know anything conflict in these two version kernels?

I didn't change the i2c-0 definition in device tree.

0 Kudos