void sii9234_tpi_init(void)
{
	MHD_HW_Reset();	
  
	//sii9234_initial_registers_set();  //previous setting
	printk("[HDMI]9234 init ++ \n");
#if 0
	/* disable interrupts */
	ReadModifyWriteTPI(TPI_INTERRUPT_ENABLE_REG,
			RECEIVER_SENSE_EVENT_MASK, 0x00);
	//MHD_INT_clear();
#endif
	sii9234_register_init();

	/* start tpi */
	WriteByteTPI(TPI_ENABLE, 0x00);	/* Write "0" to 72:C7 to
					   start HW TPI mode */

	/* enable interrupts */
	WriteIndexedRegister(INDEXED_PAGE_0, 0x78, 0x01);

	/* mhd rx connected */
	WriteIndexedRegister(INDEXED_PAGE_0,
			0xA0, 0x10); /* TX termination enable */
	WriteByteCBUS(0x07, DDC_XLTN_TIMEOUT_MAX_VAL |
		0x0E); 	/* Increase DDC translation layer timer (burst mode) */
	WriteByteCBUS(0x47, 0x03);
	WriteByteCBUS(0x21, 0x01); /* Heartbeat Disable  */

	/* enable mhd tx */
	ReadModifyWriteTPI(TPI_SYSTEM_CONTROL_DATA_REG,
			TMDS_OUTPUT_CONTROL_MASK, TMDS_OUTPUT_CONTROL_ACTIVE);

	/* set mhd power active mode */
	ReadModifyWriteTPI(TPI_DEVICE_POWER_STATE_CTRL_REG,
			TX_POWER_STATE_MASK, 0x00);

	mhd_tx_fifo_stable(); //fifo clear

	printk("[HDMI]9234 init -- \n");
}
Ejemplo n.º 2
0
void MHD_OUT_EN(void)
{
    byte state , int_stat;
    int_stat = ReadIndexedRegister(INDEXED_PAGE_0,0x74);
    printk("[MHD]MHD_OUT_EN INT register value is: 0x%02x \n", int_stat);
    state = ReadIndexedRegister(INDEXED_PAGE_0, 0x81);
    printk("[MHD]MHD_OUT_EN register 0x81 value is: 0x%02x\n", state);

    if((state & 0x02) && (int_stat &0x01))
    {
        printk("[MHD]MHD_OUT_EN :: enable output\n");
        ReadModifyWriteIndexedRegister(INDEXED_PAGE_0,0x80,SI_BIT_4,0x0);
        msleep(20);
        ReadModifyWriteIndexedRegister(INDEXED_PAGE_0,0x80,SI_BIT_4,SI_BIT_4);
        msleep(60);

        set_mhd_power_active_mode();
        mhd_tx_fifo_stable(); //fifo clear
    }
    MHD_INT_clear();
}
Ejemplo n.º 3
0
void sii9234_tpi_init(void)
{
    MHD_HW_Reset();
    if(!MHL_i2c_init)
    {
        TPI_DEBUG_PRINT (("[MHD] I2C not ready\n"));
        return;
    }

    //sii9234_initial_registers_set();  //previous setting
    printk("[MHD]9234 init ++ \n");
    //DisableInterrupts();
    //MHD_INT_clear();
    sii9234_register_init();
    sii9234_start_tpi();
    mhd_rx_connected();
    enable_mhd_tx();
    set_mhd_power_active_mode();
    mhd_tx_fifo_stable(); //fifo clear
    //EnableInterrupts();
    printk("[MHD]9234 init -- \n");
}
void sii9234_tpi_init(void)
{
    MHD_HW_Reset();

    pr_info("[HDMI]9234 init ++\n");

    sii9234_register_init();

    /* start tpi */
    WriteByteTPI(TPI_ENABLE, 0x00);	/* Write "0" to 72:C7 to
					   start HW TPI mode */

    /* enable interrupts */
    WriteIndexedRegister(INDEXED_PAGE_0, 0x78, 0x01);

    /* mhd rx connected */
    WriteIndexedRegister(INDEXED_PAGE_0,
                         0xA0, 0x10); /* TX termination enable */
    WriteByteCBUS(0x07, DDC_XLTN_TIMEOUT_MAX_VAL |
                  0x0E);	/* Increase DDC translation layer timer (burst mode) */
    WriteByteCBUS(0x47, 0x03);
    WriteByteCBUS(0x21, 0x01); /* Heartbeat Disable  */

    /* enable mhd tx */
    ReadModifyWriteTPI(TPI_SYSTEM_CONTROL_DATA_REG,
                       TMDS_OUTPUT_CONTROL_MASK, TMDS_OUTPUT_CONTROL_ACTIVE);

    /* set mhd power active mode */
    ReadModifyWriteTPI(TPI_DEVICE_POWER_STATE_CTRL_REG,
                       TX_POWER_STATE_MASK, 0x00);

    mhd_tx_fifo_stable();		/*fifo clear*/
#ifdef	CONFIG_SAMSUNG_WORKAROUND_HPD_GLANCE
    mhl_hpd_handler(true);
#endif
    pr_info("[HDMI]9234 init --\n");
}
void MHD_OUT_EN(void)
{
    byte state , int_stat;
    int_stat = ReadIndexedRegister(INDEXED_PAGE_0, 0x74);
    pr_info("[HDMI]MHD_OUT_EN INT register value is: 0x%02x\n", int_stat);
    state = ReadIndexedRegister(INDEXED_PAGE_0, 0x81);
    pr_info("[HDMI]MHD_OUT_EN register 0x81 value is: 0x%02x\n", state);

    if ((state & 0x02) && (int_stat & 0x01)) {
        pr_info("[HDMI]MHD_OUT_EN :: enable output\n");
        ReadModifyWriteIndexedRegister(INDEXED_PAGE_0, 0x80, SI_BIT_4,
                                       0x0);
        msleep(20);
        ReadModifyWriteIndexedRegister(INDEXED_PAGE_0, 0x80, SI_BIT_4,
                                       SI_BIT_4);
        msleep(60);
        /* set mhd power active mode */
        ReadModifyWriteTPI(TPI_DEVICE_POWER_STATE_CTRL_REG,
                           TX_POWER_STATE_MASK, 0x00);

        mhd_tx_fifo_stable();  /*fifo clear*/
    }
    MHD_INT_clear();
}