背光调试_backligt debug

Backlight debug

下面是背光驱动芯片原理图:

 

1. Set the VSYS output from 8606. 

The 8606 is controlled though i2c bus. The i2c address is 0x20, it's really not sure about the chip because the address can be changed. Sometimes is 0x22. It works at last , I read the register value out of the chip. And so that can make sure the value is right. 

2.  Set the V_buck2 and V_buck3 .

 the v_buck2 is the VDDIO =1.8v, and the v_buck3 is the I2C bus pull-up power source. So I think they all need to be set.

3. Set the lm3535.

At first , the chip should be reset. We use the GPIO58 to reset the lm3535.

Then need set 2 control regs , 0x10 and 0x20. And the brightness is conrtolled by the group A, 0xA0.

int lm3535_initchip(void)
{
//set v_buck3 = 1.8v

        sanremo_write(0x26, 0x64);
//set VDDIO = 1.8v

        sanremo_write(0x25, 0x24);
//set vsys

        portofino_write(0x15, 0x02);
        portofino_write(0x16, 0x10);
        portofino_write(0x00, 0x0f);
        portofino_write(0x10, 0x0e);
//reset lm3535

        writel(0xd0c1,0xd401e2fc);//config gpio58 to fun1(gpio use)

        gpio_direction_output(mfp_to_gpio(MFP_PIN_GPIO58),1);//LCD BACKLIGHT CONTROL

        Delay(10000);
// set the lm3535 regs

        lm3535_write(LM3535_DIOD_EN, 0x3f);
        lm3535_write(LM3535_CONFIG, 0x0c);

        return 0;
}
4. the brightness setting as follows.

void lm3535_brightness_setting(u8 val)
{

        AddMessage((UINT8_T*) ("lm3535 set brightness !\0"));

        lm3535_write(LM3535_A_LUM, val&0x7f);
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值