From: hhb Date: Mon, 20 May 2013 07:54:19 +0000 (+0800) Subject: mipi_dsi: update mipi dsi framework driver X-Git-Tag: firefly_0821_release~7069 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30907a6bc2187360bc203d9ce8c27f23dcb553dc;p=firefly-linux-kernel-4.4.55.git mipi_dsi: update mipi dsi framework driver --- diff --git a/drivers/video/display/transmitter/mipi_dsi.c b/drivers/video/display/transmitter/mipi_dsi.c index cc9d538d8a19..e14fd2a1800a 100644 --- a/drivers/video/display/transmitter/mipi_dsi.c +++ b/drivers/video/display/transmitter/mipi_dsi.c @@ -61,7 +61,7 @@ EXPORT_SYMBOL(del_dsi_ops); int dsi_probe_current_chip(void) { - int i = 0, id; + u32 i = 0, id; struct mipi_dsi_ops *ops = NULL; if(cur_dsi_ops) return 0; @@ -71,10 +71,10 @@ int dsi_probe_current_chip(void) { id = ops->get_id(); if(id == ops->id) { cur_dsi_ops = ops; - printk("load mipi dsi chip:%s id:%04x\n", ops->name, ops->id); + printk("load mipi dsi chip:%s id:%08x\n", ops->name, ops->id); break; } else { - printk("mipi dsi chip is not found, read id:%04x, but %04x is correct\n", id, ops->id); + printk("mipi dsi chip is not found, read id:%08x, but %08x is correct\n", id, ops->id); dsi_ops[i] = NULL; cur_dsi_ops = NULL; } diff --git a/drivers/video/display/transmitter/mipi_dsi.h b/drivers/video/display/transmitter/mipi_dsi.h index 831427af94ad..b0d54f803539 100644 --- a/drivers/video/display/transmitter/mipi_dsi.h +++ b/drivers/video/display/transmitter/mipi_dsi.h @@ -20,37 +20,59 @@ #define DTYPE_GEN_SWRITE_1P 0X13 #define DTYPE_GEN_SWRITE_0P 0X03 +//Video Mode +#define VM_NBMWSP 0X00 //Non burst mode with sync pulses +#define VM_NBMWSE 0X01 //Non burst mode with sync events +#define VM_BM 0X02 //Burst mode + +//Video Pixel Format +#define VPF_16BPP 0X00 +#define VPF_18BPP 0X01 //packed +#define VPF_18BPPL 0X02 //loosely packed +#define VPF_24BPP 0X03 //iomux #define OLD_RK_IOMUX 0 struct spi_t { int cs; +#if OLD_RK_IOMUX char* cs_mux_name; +#endif int sck; +#if OLD_RK_IOMUX char* sck_mux_name; +#endif int miso; +#if OLD_RK_IOMUX char* miso_mux_name; +#endif int mosi; +#if OLD_RK_IOMUX char* mosi_mux_name; +#endif }; struct power_t { int enable_pin; //gpio that control power +#if OLD_RK_IOMUX char* mux_name; u32 mux_mode; +#endif u32 effect_value; - u32 min_voltage; - u32 max_voltage; + char *name; + u32 voltage; int (*enable)(void *); int (*disable)(void *); }; struct reset_t { int reset_pin; //gpio that control reset +#if OLD_RK_IOMUX char* mux_name; u32 mux_mode; +#endif u32 effect_value; u32 time_before_reset; //ms @@ -76,6 +98,7 @@ struct tc358768_t { struct ssd2828_t { u32 id; struct reset_t reset; + struct power_t shut; struct power_t vddio; struct power_t vdd_mipi;