展讯驱动入门
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;
+}