![Texas Instruments AM1808 Technical Reference Manual Download Page 1351](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581351.webp)
Architecture
1351
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial ATA (SATA) Controller
28.2.8 Phy
The SATASS includes an integrated TI SERDES macro as a phy. The phy handles all of the
serialization/de-serialization, symbol alignment, and Rx OOB signal detection. There is some logic
between the Synopsis core and the SERDES for control and configuration.
28.2.9 Reset
SATA peripheral reset is handled using the power and sleep controller (PSC). For detailed information on
power management procedures using the PSC, see the
Power and Sleep Controller (PSC)
chapter. Other
types of resets supported by the SATA controller are part of the AHCI specification is discussed within the
AHCI specification 1.1. See the standard specification for the details on HBA reset, port rest and software
reset.
28.2.10 Initialization
Proper initialization of the HBA is required after power-up to ensure proper operation of the SATA
controller peripheral. The initialization process starts by performing a write to one-time write-only registers,
this is documented as firmware initialization within the AHCI specification, where the values written
depends on the features that the applications supports followed by software initialization. This part of the
initialization is similar to what a PC BIOS does and allows you to enable/disable some features by
software.
The software can then continue with a normal initialization that is required by the software and the details
and sequence of initialization done here is also documented within the AHCI specification. In general, all
resources that are required by the AHCI controller, PHY initialization, structures and memories for
Command Slots, FIS, and Data Memories are configured and the FIS DMAs is enabled. The software will
then spin-up the device and ensure that a proper Device Detection and Speed Negotiation has completed
prior to enabling the Command DMA.
Note that DMA Configuration/Initialization should take place after Device Detection and Speed
Negotiation. If done earlier, the default value is used (this is the recommended setting) since RESET
removes the initialized value. The only time it is advisable to change the DMA Configuration is if you need
to prioritize System Resource access. It also requires that the Command DMA is not running (P0CMD.ST
= 0) when modifying the value of the DMA Configuration fields.
28.2.10.1 Initialization (Firmware and Software)
Software reads the HBA capabilities register (CAP), ports implemented register (PI), AHCI version register
(VS), global parameter 1 register (GPARAM1R), global parameter 2 register (GPARAM2R), and the port
parameter register (PPARAMR) to obtain information about the subsystems capabilities. The software
should then take the following steps to configure each port for operation:
1. Do all firmware capability writes.
2. Setup all appropriate structures in memory as per the AHCI specification.
3. Configure the PHY using the port PHY control register (P0PHYCR):
(a) Set the MPY bit field for the PLL multiply factor.
(b) Set LOS = 1 (enable loss of signal detection)
(c) Set ENPLL = 1 (enable the PLL)
4. Set the port command list base address register (P0CLB).
5. Set the port FIS base address register (P0FB).
6. Set appropriate bits in the port command register (P0CMD).
7. Program the port serial ATA control register (P0SCTL).
8. Wait for Device Detection and Speed Negotiation to end.
9. Program the port DMA control register (P0DMACR).
10. Enable the appropriate interrupts.
11. Enable FIS reception in P0CMD.
12. Spin-up the device(s), if necessary.