/ {
/* about mipi */
disp_mipi_init: mipi_dsi_init{
+ compatible = "rockchip,mipi_dsi_init";
rockchip,screen_init = <0>;
rockchip,dsi_lane = <4>;
- rockchip,dsi_hs_clk = <1020>;
+ rockchip,dsi_hs_clk = <1000>;
rockchip,mipi_dsi_num = <1>;
};
disp_mipi_power_ctr: mipi_power_ctr {
+ compatible = "rockchip,mipi_power_ctr";
/*mipi_lcd_rst:mipi_lcd_rst{
+ compatible = "rockchip,lcd_rst";
rockchip,gpios = <&gpio2 GPIO_B7 GPIO_ACTIVE_LOW>;
rockchip,delay = <100>;
};
mipi_lcd_en:mipi_lcd_en {
+ compatible = "rockchip,lcd_en";
rockchip,gpios = <&gpio0 GPIO_C1 GPIO_ACTIVE_HIGH>;
rockchip,delay = <100>;
};*/
};
disp_mipi_init_cmds: screen-on-cmds {
+ compatible = "rockchip,screen-on-cmds";
/*rockchip,cmd_debug = <1>;
rockchip,on-cmds1 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <HSDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0xb0 0x02>;
disp_timings: display-timings {
native-mode = <&timing0>;
+ compatible = "rockchip,display-timings";
timing0: timing0 {
screen-type = <SCREEN_MIPI>;
lvds-format = <LVDS_8BIT_2>;
/ {
/* about mipi */
disp_mipi_init: mipi_dsi_init{
+ compatible = "rockchip,mipi_dsi_init";
rockchip,screen_init = <1>;
rockchip,dsi_lane = <2>;
rockchip,dsi_hs_clk = <1000>;
rockchip,mipi_dsi_num = <2>;
};
disp_mipi_power_ctr: mipi_power_ctr {
+ compatible = "rockchip,mipi_power_ctr";
mipi_lcd_rst:mipi_lcd_rst{
+ compatible = "rockchip,lcd_rst";
rockchip,gpios = <&gpio2 GPIO_B7 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};
mipi_lcd_en:mipi_lcd_en {
+ compatible = "rockchip,lcd_en";
rockchip,gpios = <&gpio0 GPIO_C1 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};
};
disp_mipi_init_cmds: screen-on-cmds {
rockchip,cmd_debug = <0>;
+ compatible = "rockchip,screen-on-cmds";
rockchip,on-cmds1 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb0 0x02>;
};
rockchip,on-cmds2 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb1 0x21>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds3 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb0 0x06>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds4 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb1 0x21>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds5 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb4 0x15>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds6 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb9 0x40>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds7 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0xb0 0x00>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds8 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x05 dcs_set_display_on>;
rockchip,cmd_delay = <10>;
};
rockchip,on-cmds9 {
+ compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,data_type = <DATA_TYPE_DCS>;
rockchip,dsi_id = <2>;
disp_timings: display-timings {
native-mode = <&timing0>;
+ compatible = "rockchip,display-timings";
timing0: timing0 {
screen-type = <SCREEN_DUAL_MIPI>;
lvds-format = <LVDS_8BIT_2>;
compatible = "rockchip,mipi_dsi_init";
rockchip,screen_init = <1>;
rockchip,dsi_lane = <4>;
- rockchip,dsi_hs_clk = <970>;
+ rockchip,dsi_hs_clk = <940>;
rockchip,mipi_dsi_num = <2>;
};
disp_mipi_power_ctr: mipi_power_ctr {
mipi_lcd_rst:mipi_lcd_rst{
compatible = "rockchip,lcd_rst";
rockchip,gpios = <&gpio7 GPIO_B2 GPIO_ACTIVE_HIGH>;
- rockchip,delay = <20>;
+ rockchip,delay = <10>;
};
- /*mipi_lcd_en:mipi_lcd_en {
+ mipi_lcd_en:mipi_lcd_en {
compatible = "rockchip,lcd_en";
rockchip,gpios = <&gpio6 GPIO_A7 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
- };*/
+ };
};
disp_mipi_init_cmds: screen-on-cmds {
rockchip,cmd_debug = <0>;
compatible = "rockchip,screen-on-cmds";
- rockchip,on-cmds1 {
+ rockchip,on-cmds1 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd_delay = <10>;
};
- rockchip,on-cmds2 {
+ rockchip,on-cmds2 {
+ compatible = "rockchip,on-cmds";
+ rockchip,cmd_type = <LPDT>;
+ rockchip,dsi_id = <2>;
+ rockchip,cmd = <0x05 0x01>; //set soft reset
+ rockchip,cmd_delay = <10>;
+ };
+ rockchip,on-cmds3 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x3a 0x77>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds3 {
+ rockchip,on-cmds4 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x39 0x2a 0x00 0x00 0x04 0xff>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds4 {
+ rockchip,on-cmds5 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x39 0x2b 0x00 0x00 0x06 0x3f>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds5 {
+ rockchip,on-cmds6 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
- rockchip,dsi_id = <1>;
+ rockchip,dsi_id = <0>;
rockchip,cmd = <0x15 0x35 0x00>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds6 {
+ rockchip,on-cmds7 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
- rockchip,dsi_id = <1>;
+ rockchip,dsi_id = <0>;
rockchip,cmd = <0x39 0x44 0x00 0x00>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds7 {
+ rockchip,on-cmds8 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x51 0xff>; //0xff
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds8 {
+ rockchip,on-cmds9 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
- rockchip,cmd = <0x15 0x53 0x24>;
+ rockchip,cmd = <0x15 0x53 0x04>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds9 {
+ rockchip,on-cmds10 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x51 0xff>; //0xff
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds10 {
+ rockchip,on-cmds11 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
- rockchip,cmd = <0x15 0x53 0x24>;
+ rockchip,cmd = <0x15 0x53 0x04>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds11 {
+ rockchip,on-cmds12 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
- rockchip,cmd = <0x15 0x55 0x03>;
+ rockchip,cmd = <0x15 0x55 0x00>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds12 {
+ rockchip,on-cmds13 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd_delay = <120>;
};
- rockchip,on-cmds13 {
+ rockchip,on-cmds14 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds14 { //video
+ rockchip,on-cmds15 { //video
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds15 {
+ rockchip,on-cmds16 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x29 0xce 0x7d 0x40 0x48 0x56 0x67 0x78 0x88 0x98 0xa7 0xb5 0xc3 0xd1 0xde 0xe9 0xf2 0xfa 0xff 0x04 0x00>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds16 {
+ rockchip,on-cmds17 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x23 0xb0 0x03>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds17 {
+ rockchip,on-cmds18 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd_delay = <0>;
};
- rockchip,on-cmds18 {
+ rockchip,on-cmds19 {
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
screen-type = <SCREEN_DUAL_MIPI>;
lvds-format = <LVDS_8BIT_2>;
out-face = <OUT_P888>;
- clock-frequency = <285000000>;
+ clock-frequency = <265000000>;
hactive = <2560>;
vactive = <1600>;
hsync-len = <38>;//19
- hback-porch = <80>;//40
- hfront-porch = <246>;//123
+ hback-porch = <40>;//40
+ hfront-porch = <108>;//123
vsync-len = <4>;
vback-porch = <4>;
static void rk_mipi_screen_pwr_enable(struct mipi_screen *screen)
{
if(screen->lcd_en_gpio != INVALID_GPIO){
+ gpio_direction_output(screen->lcd_en_gpio, !screen->lcd_en_atv_val);
+ msleep(screen->lcd_en_delay);
gpio_direction_output(screen->lcd_en_gpio, screen->lcd_en_atv_val);
msleep(screen->lcd_en_delay);
}
return 0;
}
-
+#if 0
static int rk32_dwc_phy_test_rd(struct dsi *dsi, unsigned char test_code)
{
int val = 0;
return val;
}
-
+#endif
static int rk32_dwc_phy_test_wr(struct dsi *dsi, unsigned char test_code, unsigned char *test_data, unsigned char size)
{
int i = 0;
MIPI_TRACE("payload entry is larger than 32\n");
break;
}
- sscanf(data, "%x,", str + i); //-c 1,29,02,03,05,06,> pro
+ sscanf(data, "%x,", (unsigned int *)(str + i)); //-c 1,29,02,03,05,06,> pro
data = strstr(data, ",");
if(data == NULL)
break;
MIPI_TRACE("payload entry is larger than 32\n");
break;
}
- sscanf(data, "%x,", str + i); //-c 1,29,02,03,05,06,> pro
+ sscanf(data, "%x,", (unsigned int *)(str + i)); //-c 1,29,02,03,05,06,> pro
data = strstr(data, ",");
if(data == NULL)
break;
.read = reg_proc_read1,
};
#endif
-#ifdef CONFIG_MIPI_DSI_LINUX
+#if 0//def CONFIG_MIPI_DSI_LINUX
static irqreturn_t rk32_mipi_dsi_irq_handler(int irq, void *data)
{
printk("-------rk32_mipi_dsi_irq_handler-------\n");
}
#endif
+#if 0
static int dwc_phy_test_rd(struct dsi *dsi, unsigned char test_code)
{
int val = 0;
-
-
-
rk32_dsi_set_bits(dsi, 0x10000 | test_code, PHY_TEST_CTRL1);
rk32_dsi_set_bits(dsi, 0x2, PHY_TEST_CTRL0);
rk32_dsi_set_bits(dsi, 0x0, PHY_TEST_CTRL0);
return val;
}
-
+#endif
static int rk32_dsi_enable(void)
{
MIPI_DBG("rk32_dsi_enable-------\n");
}
#endif
-int rk32_mipi_power_down_DDR()
+int rk32_mipi_power_down_DDR(void)
{
dsi_is_enable(0, 0);
if (rk_mipi_get_dsi_num() ==2)
return 0;
}
EXPORT_SYMBOL(rk32_mipi_power_down_DDR);
-int rk32_mipi_power_up_DDR()
+int rk32_mipi_power_up_DDR(void)
{
dsi_is_enable(0, 0);
if (rk_mipi_get_dsi_num() ==2)
int rk_mipi_get_dsi_clk(void);
int rk_mipi_get_dsi_num(void);
int rk_mipi_get_dsi_lane(void);
+int rk32_mipi_power_down_DDR(void);
+int rk32_mipi_power_up_DDR(void);
#endif /* end of RK32_MIPI_DSI_H */