展讯驱动入门

展讯驱动入门

fastboot download cmd:

   fastboot flash uboot u-boot.bin

   fastboot flash boot boot.img

LCM

基础知识:http://blog.chinaunix.net/uid-28454895-id-4216124.html

code path: kernel/drivers/video/sprdfb/lcd

kernel/drivers/video/backlight

u-boot64/drivers/video/sprdfb/lcd

porting:

U-boot:

u-boot64/include/configs/sp7731ceb.h +#define CONFIG_FB_LCD_ILI9806E_MIPI   u已在sprocomm中添加 

 

u-boot64/drivers/video/sprdfb/lcd/Makefile

+obj-$(CONFIG_FB_LCD_ILI9806E_MIPI)  += lcd_ili9806e_mipi.o  u本来就有

 

u-boot64/drivers/video/sprdfb/sprdfb_panel.c u本来就有

加extern struct panel_spec lcd_ili9806e_mipi_spec;

panel_cfg里面加

#ifdef CONFIG_FB_LCD_ILI9806E_MIPI

{

    .lcd_id = 0x4,

    .panel = &lcd_ili9806e_mipi_spec,

},

#endif

panel_info   =================没加

u-boot64/drivers/video/sprdfb/lcd

+lcd_ili9806e_mipi.c     u在sprocomm中添加

 

根据id脚兼容模组:

u-boot64/drivers/video/sprdfb/sprdfb_main.c

+static uint32_t lcd_id_vol_to_kernel = 0;

 

+int get_lcd_id_value(unsigned int gpio)

+{

+    int lcd_id_value; 

+    sprd_gpio_request(NULL,gpio); 

+    sprd_gpio_direction_input(NULL,gpio); 

+    lcd_id_value = sprd_gpio_get(NULL,gpio); 

+

+    return lcd_id_value?1:0; 

+}

+void save_lcd_id_vol_to_kernel(uint32_t id_vol)

+{ 

+    lcd_id_vol_to_kernel = id_vol;

+}

+

+uint32_t load_lcd_id_vol_to_kernel(void)

+{

+    return lcd_id_vol_to_kernel;

+}

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值