Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - SATA on AM572x - QNX7: (7 Items)
   
SATA on AM572x - QNX7  
Hi,

I have a CFast connecter in SATA Controller of AM572x. I am using QNX 7. 
Enabling the driver with the default parameters as given in the startup script

devb-ahci-omap5 ahci ioport=0x4a140000,irq=86 blk cache=2M cam cache

During startup, driver  reports Path=0 - AHCI (generic) but usable No logical devices are found under /dev/

Meanwhile, 
Uboot is able to read the CFast card and reports the following.
SCSI:  Target spinup took 0 ms.
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: Delkin Devices B Rev: 1308
            Type: Hard Disk
            Capacity: 3913.8 MB = 3.8 GB (8015616 x 512)
Found 1 device(s).

Am I missing any initialization parameters? 

AJR
Re: SATA on AM572x - QNX7  
Which board are you using?

Which BSP did you use as a base?

-Al
Re: SATA on AM572x - QNX7  
> Which board are you using?
> 

AJR: Custom Board designed based on Beaglebone - x15.

> Which BSP did you use as a base?
>
AJR: BSP for DRA74x EVM from QNX Software Center - STABLE (7.0.0 GA 201702151736 ) 
( QNX Neutrino 7.0 on the Texas Instruments AM572x EVM Board)

As an experiment,  I ported the BSP on to BeagleBoard x15 with e-SATA connector. The QNX driver fails to recognize the 
SATA device, while U-Boot is able to detect the External Hard disk.


AJR


Re: SATA on AM572x - QNX7  
Are you using u-boot to launch QNX, or are you just boot using IPL + IFS supplied in the BSP?

In both cases, what I would do is check if the pinmux settings are correct, and if all clocks that make the path to the 
S-ATA controller are turned on, and if they run at the speed that the driver expects.

Regards,
Albrecht
Re: SATA on AM572x - QNX7  
Sorry for the delayed response.
I have verified the PINMUX and clock paths. Everything looks in order. Furthermore, I ported Linux on the custom board 
and the SATA port is recognized as expected. 

Since the same u-boot is used to load QNX, the above-mentioned step proves that Pinmux in U-Boot and the hardware is 
good. 

Moreover, I had a brief look into the errata of AM572x and found that section i818, 
************************************************************************************************************************
***
i818 SATA PHY Reset Required Following SATA PLL Unlock
DESCRIPTION If SATA controller is in slumber or partial low-power mode, SATA PHY is in low-power
mode, and SATA 1.5 GHz PLL is relocked for any reason, the PHY receiver looses lock.
In result the receiver / de-serializer is unable to produce parallel data from a correct
serial source, and will not detect the attached SATA drive.

WORKAROUND Workaround is to disable and re-enable both analog LDO of the transceiver, using the
corresponding SW programmable bits of power control MMR: The
CTRL_CORE_PHY_POWER_SATA[21:14] SATA_PWRCTL_CLK_CMD must be set to
0x0 to power down the SATA PHY TX and RX modules.
The rest of the workaround sequence is the same as upon initial SATA PHY power-up,
and includes setting above bits back to 0x2.

 ***********************************************************************************************************************
***

In init_sata.c::50  init_sata_phy(), I see that this function was implemented as per TRM, what  I don't see is that the 
i818 workaround implemented. Maybe this is the issue!?

Abilash
Re: SATA on AM572x - QNX7  
It may or may not be the cause of the issue, it might be *one* of the causes. So I recommend to implement the mentioned 
workaround and see if it helps.

-Al
Re: SATA on AM572x - QNX7  
Upon further Investigation, in slogger output, I can see that ahci doesn't take the IRQ parameter passed along with the 
driver

devb-ahci-omap5 ahci ioport=0x4a140000,irq=86 blk cache=2M cam cache

slogger output
eide_identify_devices: AHCI (generic) vid 0x0000, did 0x0000, class 0x000000, rev 0x00, BDF B0:D0:F0, base 0x4a140000, 
irq 0x0
eide_identify:  IDENTIFY failed: port 0, status d0, error 1

IRQ is reported as 0 even if its passed along with the driver. Any thoughts on this?
devb-ahci-omap5 is a precompiled binary with the BSP there is no way I could debug this!