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;
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;
}
#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
struct ssd2828_t {
u32 id;
struct reset_t reset;
+ struct power_t shut;
struct power_t vddio;
struct power_t vdd_mipi;