void LT9611_Dphy_debug(void)
{ //The main thing is to get whether the positive and negative input is connected correctly, whether the sot of each lane is normal, if you can’t read any value, maybe the input A/B Port configuration is wrong // If you can’t extract it to distinguish The rate can be added to print, and the resolution can be extracted so you don’t need to look at the status of this part #ifdef _mipi_Dphy_debug_ u8 temp; HDMI_WriteI2C_Byte(0xff,0x83); temp = HDMI_ReadI2C_Byte(0xbc); if(temp == 0x55) printf("\r\nport A lane PN is right"); else printf("\r\nport A lane PN error 0x83bc = 0x%bx",temp); temp = HDMI_ReadI2C_Byte(0x99); if(temp == 0xb8) printf("\r\ nport A lane 0 sot right "); else printf("\r\nport A lane 0 sot error = 0x%bx",temp);
temp = HDMI_ReadI2C_Byte(0x9b);
if(temp == 0xb8)
printf("\r\nport A lane 1 sot right ");
else
printf("\r\nport A lane 1 sot error = 0x%bx",temp);
temp = HDMI_ReadI2C_Byte(0x9d);
if(temp == 0xb8)
printf("\r\nport A lane 2 sot right ");
else
printf("\r\nport A lane 2 sot error = 0x%bx",temp);
temp = HDMI_ReadI2C_Byte(0x9f);
if(temp == 0xb8)
printf("\r\nport A lane 3 sot right ");
else
printf("\r\nport A lane 3 sot error = 0x%bx",temp);
printf("\r\nport A lane 0 settle = 0x%bx",HDMI_ReadI2C_Byte(0x98));
printf("\r\nport A lane 1 settle = 0x%bx",HDMI_ReadI2C_Byte(0x9a));
printf("\r\nport A lane 2 settle = 0x%bx",HDMI_ReadI2C_Byte(0x9c));
printf("\r\nport A lane 3 settle = 0x%bx",HDMI_ReadI2C_Byte(0x9e));
#endif
}
void LT9611_Video_Check(void)
{ //Mainly to obtain whether the resolution resolved by mipi is normal, if not, you can check the configuration of settle and whether the channel is normal u8 mipi_video_format=0x00; u16 h_act, h_act_a ,h_act_b, v_act, v_tal; u16 h_total_sysclk;
HDMI_WriteI2C_Byte(0xff,0x82); // top video check module
h_total_sysclk = HDMI_ReadI2C_Byte(0x86);
h_total_sysclk = (h_total_sysclk<<8) + HDMI_ReadI2C_Byte(0x87);
printf("\33[32m");
printf("\n-----------------------------------------------------------------------------");
printf("\nLT9611_Video_Check: h_total_sysclk = %d",h_total_sysclk);
v_act=HDMI_ReadI2C_Byte(0x82);
v_act=(v_act<<8)+HDMI_ReadI2C_Byte(0x83);
v_tal=HDMI_ReadI2C_Byte(0x6c);
v_tal=(v_tal<<8)+HDMI_ReadI2C_Byte(0x6d);
HDMI_WriteI2C_Byte(0xff,0x83);
h_act_a = HDMI_ReadI2C_Byte(0x82);
h_act_a = (h_act_a<<8)+HDMI_ReadI2C_Byte(0x83);
h_act_b = HDMI_ReadI2C_Byte(0x86);
h_act_b =(h_act_b<<8)+HDMI_ReadI2C_Byte(0x87);
if(lt9611.input_color_space==YUV422)
{
printf("\nLT9611_Video_Check: lt9611.input_color_space = YUV422");
h_act_a /= 2;
h_act_b /= 2;
}
if(lt9611.input_color_space==RGB565)
{
printf("\nLT9611_Video_Check: lt9611.input_color_space = RGB565");
h_act_a /= 2;
h_act_b /= 2;
}
else if(lt9611.input_color_space==RGB888)
{
printf("\nLT9611_Video_Check: lt9611.input_color_space = RGB888");
h_act_a /= 3;
h_act_b /= 3;
}
mipi_video_format=HDMI_ReadI2C_Byte(0x88);
printf("\nLT9611_Video_Check: h_act_a, h_act_b, v_act, v_tal: %d, %d, %d, %d, ",h_act_a, h_act_b, v_act, v_tal);
printf("\nLT9611_Video_Check: mipi_video_format: 0x%bx",mipi_video_format);
if(lt9611.mipi_port_cnt==dual_port_mipi)//if(0)//(P10 == 0) //dual port.
h_act = h_act_a + h_act_b;
else
h_act = h_act_a;
printf("\r\nLT9611_Video_Check: Video_Format =");