SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
The CSI2 PHY converts the bitstream, divided into 1 up to 4 serial data lanes, and one clock lane, into a bitstream compatible with the CSI2 low level protocol within the CAL module .
The CSI2 low level protocol engine only provides the SCP clock when CSI2 PHY registers are accessed and CAL_CTRL[21] PWRSCPCLK = 0. However, the CSI2 PHY needs at least 3 SCP clock cycles to come out of the reset state. Therefore, SW must perform a dummy read of a CSI2 PHY register (32 SCP clock pulses) to complete the CSI2 PHY reset sequence. Alternatively, the SCP clock can be programmed to be free-runnig by setting CAL_CTRL[21] PWRSCPCLK = 1 (not prefered).
The CAL_CSI2_COMPLEXIO_IRQSTATUS_l register logs complex I/O events of the following types:
Some complex I/O parameters can be configured through the following registers:
The Complex I/O FSM has three power states: ON, OFF, and Ultralow Power (ULP). Two operation modes are available:.
Another register, CAL_CSI2_TIMING_l, is used to control the power state of the complex I/O modules with regard to the differential line state. This register controls the mode of the three complex I/Os (RxMode and NoRxMode) and the delay between the differential lanes in STOP state and the complex I/O on NoRxMode. The CAL_CSI2_TIMING_l[15] FORCE_RX_MODE_IO1 bit sets the complex I/O in RxMode or NoRxMode (stopped mode). The FORCE_RX_MODE_IO1 bit is automatically reset to 0 by hardware when the counter ends and the FSM returns to NoRxMode. Three bits (CAL_CSI2_TIMING_l[14] STOP_STATE_X16_IO1, CAL_CSI2_TIMING_l[13] STOP_STATE_X4_IO1, and the CAL_CSI2_TIMING_l[12:0] STOP_STATE_COUNTER_IO1 bit field) configure the delay between line stop mode and complex I/O stop mode. The delay represents the number of functional clock cycles and can be calculated as follows:
Total delay in functional clock cycles = CAL_CSI2_TIMING_l.STOP_STATE_COUNTER_IO1 x (1 + CAL_CSI2_TIMING_l.STOP_STATE_X16_IO1 x 15) x (1 + CAL_CSI2_TIMING_l.STOP_STATE_X4_IO1 x 3).
Table 10-11 lists the possible values of the delay, in terms of the functional clock cycles, depending on the values of the STOP_STATE_X16_IO1 and STOP_STATE_X4_IO1 bits.
STOP_STATE_X16_IO1 | STOP_STATE_X4_IO1 | Possible Delay Value (in Functional Clock Cycles) |
---|---|---|
0x0 | 0x0 | 8191 (with step of 1) |
0x0 | 0x1 | 32764 (with step of 4) |
0x1 | 0x0 | 131056 (with step of 16) |
0x1 | 0x1 | 524224 (with step of 64) |
The FORCERXMODE signal is used at initialization time (complex I/O). Figure 10-7 describes the ForceRxMode and StopState FSM to assert and deassert the FORCERXMODE signal and to monitor STOPSTATE from the complex I/O.
CAL asserts FORCERXMODE signal when the bit-field CAL_CSI2_TIMING_l[15] FORCE_RX_MODE_IO1 is set by the SW. It can be reset by SW or automatically by HW when the time out occurs. At the same time the signal is asserted, the logic starts monitoring the StopState[0:4] signals corresponding only to the enabled lanes. When all of StopState signals for only the enabled lanes are asserted by the complex IO, the timer starts. When one of the signals, for the enabled lanes only, is not in StopState, the timer is reloaded and the logic re-starts monitoring the stop state signals. When the timer period is finished, the ForceRxMode signal is de-asserted.