Dear team,
My customer faces the issue that i.MX6D SATA negotiation could fail on the customer’s board.
I recommended checking the SATA signal integrity on the boards.
On the SATA signal checking, the customer needs to use test program for i.MX6.
Do you have any sample software for SATA signal check or SATA compliance test?
Thanks,
Miyamoto
Hi,
Maybe you can try to use some eyediagram software to measure SATA singnal quality. For example, N5411B SATA Compliance Test Software on the link N5411B SATA Compliance Test Software | Keysight (Agilent).
What I can share for imx sata test is as follows:
# TXO mode, SSOP
./unit_tests/memtool -32 022000a4=00041700
# TXO mode, HTDP
./unit_tests/memtool -32 022000a4=00041701
# TXO mode, LTDP
./unit_tests/memtool -32 022000a4=00041702
# TXO mode, LFSCP
./unit_tests/memtool -32 022000a4=00041703
# TXO mode, COMP
./unit_tests/memtool -32 022000a4=00041704
# TXO mode, LBP
./unit_tests/memtool -32 022000a4=00041705
# TXO mode, MFTP
./unit_tests/memtool -32 022000a4=00041706
# TXO mode, HFTP
./unit_tests/memtool -32 022000a4=00041707
# TXO mode, LFTP
./unit_tests/memtool -32 022000a4=00041708
Field | Description |
26–24 SATA_PHY_8 | SATA 000 001 010 011 100 101 110 111 |
23–19 SATA_PHY_7 | SATA 10000 10000 11010 10010 10010 11010 |
18–16 SATA_PHY_6 | SATA For |
15 SATA_SPEED | Indicates 0 1 |
14 SATA_PHY_5 | SATA already 0 1 |
13–11 SATA_PHY_4 | SATA 000 001 010 011 100 101 110 111 |
10–7 SATA_PHY_3 | SATA 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 |
6–2 SATA_PHY_2 | SATA 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100 10101 10110 10111 11000 11001 11010 11011 11100 11101 11110 11111 |
1 SATA_PHY_1 | SATA 0 1 |
0 SATA_PHY_0 | SATA variants 0 1 |
Hi Tao,
Thanks so much for your support!
The customer tried to use the memtool for measuring SATA signal, but following problem was found.
They monitored SATA TXP signal with their own measure equipment (the capability of the equipment is not so high).
From the measured signal and the linux log, they think as follows.
On the bad boards, SATA communication seems to keep on re-trying OOB(Out-of-band) negotiation after boot-up. SATA communication seems not to reach to speed negotiation.
And on good boards, SATA speed negotiation seems to succeed and the following Linux console log appears.
They are about to measure SATA signal quality by using the facility which can measure SATA signal quality.
To measure SATA signal quality, it is needed that SATA keeps sending a fixed pattern.
And on the bad boards, the memtool command does not work due to the re-trying of OOB signal negotiation. They believe stopping the OOB negotiation retry is needed before using the memtool.
Could you show me the way to stop the OOB negotiation retry?
BestRegards,
Miyamoto
Hi, Miyamoto
Sorry to reply to you so late for Chinese New Year. Where are your Linux console logs? I can't find it.
I don't think the reason that memtool doesn't work is due to the re-trying of OOB signal negotiation.
Can you check that 53.3.5.14:
Software must ensure that the Port is in idle state and there are no outstanding commands
by checking SATA_P0CI and SATA_P0SACT registers are both cleared, SATA_P 0TFD[STS] register BSY,
DRQ and ERR bits are all cleared.
Hi Tao,
Sorry for late.
The following is the log from good board.
> ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> ata1.00: ATA-8: HGST HTS545050A7E680, GR2OA230, max UDMA/133
> ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
> ata1.00: configured for UDMA/133
BR,
Miyamoto
Hi Tao,
The customer saw SATA_P0CMD= 7Fh by using memtool.
Please look at the attached file.
These files show the two waveforms of TXP of i.MX6 SATA at when i.MX6 is powered-up.
One is measured on bad board and another is measured on OK board.
For the OK board;(linkOK.TIF)
We can see something changed on the waveform at 600mS after the start. And they saw the messages(console log) which indicate speed negotiation succeeded.
> ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> ata1.00: ATA-8: HGST HTS545050A7E680, GR2OA230, max UDMA/133
> ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
> ata1.00: configured for UDMA/133
For the bad board;(linkdown.TIF)
The waveform keeps same pattern from the start. And they cannot find the similar messages on log as above. After Linux boot up, they saw SATA_P0CMD register is 7Fh(default value).
From the above they believe that OOB signaling cannot complete and OOB signaling keeps on forever. I think that the SATA initialization does not complete.
Is it possible for the OOB signaling not to complete and to keep on?
If so, I think SATA initialization should be done manually by using SDK sample program.
Could you tell me your opinion?
BR,
Miyamoto
Some other advices:
Please check your SATA power line.
According to SATA protocol, When a COMRESET is sent to the device in response to an unsolicited COMINIT, the host shall set the Status register to 7Fh and shall set all other Shadow Command Block Registers to FFh. The unsolicited COMINIT will interrupt normal OOB sequences and let state machine loops back and restart from PHY Reset infinitely.
When the Phy voltage threshold falls below the minimum valuethe, SATA device will issue an unsolicited COMINIT, so the normal OOB sequences is interrupted and Link Layer initialzation failed.
Hi Tao,
Sorry for my delay.
The customer measured the voltage of the power lines as you said.
But they did not find problems on the voltage.
SATA_VPH:2.52V
SATA_VP:1.22V→1.11V (in allowed range)
From the fact that they cannot measure the signals in the situation of HDD connected.
And memtool cannot be used in the case of SATA link failure.
So, they think they should execute SATA BIST operation from uboot with HDD not connected.
Is it possible?
If so, please let me know the procedure to execute SATA BIST from u-boot.
Thanks,
Miyamoto
Hi, Miyamoto
Please refer to How to generate SATA test pattern on i.mx6?
You can try to use JTAG to set rigister instead of memtool. Also, you can try to use mw command in uboot to set rigister.
Hi Tao,
The customer tried to set SATA_BISTCR register from uboot as below, but no BIST pattern output was seen.
# TXO mode, LFTP
mw 022000a4 00041708
before setting the BISTCR register, are there any operations needed on other register setting?
Best Regards,
Miyamoto
Please ensure the SATA device is connected and phy link is established.
Hello Tao,
My customer says SATA BIST compliance test is OK except the tests which require to be "Loopback Responder".
In the RM "53.3.5.14 Loopback Responder", they need to set SATA_TESTR[PSEL].
However i.MX6Q only supports one port (Port0: Default) so they don't need to set anything, correct?
Are there any considerations?
BR,
N.S
Hi, Miyamoto
It seems that the Link Layer initializes failed. I'm not familiar with SATA IC, but in my opinion, there is no way to stop OOB signals and speed negotiation, because this initialization senquence is defined by SATA protocol. Maybe it is your PHY hardware problems. If possible, you can ask hardware AE for help first and then software.
Dear Tao,
Sorry for hurrying you up but I am still waiting for your comment.
BR,
Miyamoto