/ {
/* about mipi */
disp_mipi_init: mipi_dsi_init{
- compatible = "rockchip,mipi_dsi_init";
rockchip,screen_init = <1>;
rockchip,dsi_lane = <4>;
rockchip,dsi_hs_clk = <950>;
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 = <&gpio7 GPIO_B2 GPIO_ACTIVE_HIGH>;
rockchip,delay = <100>;
};
/*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 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x05 0x01>; //set soft reset
};
rockchip,on-cmds2 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x3a 0x77>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds3 {
- 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 {
- 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 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <1>;
rockchip,cmd = <0x15 0x35 0x00>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds6 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <1>;
rockchip,cmd = <0x39 0x44 0x00 0x00>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds7 {
- 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 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x53 0x24>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds9 {
- 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 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x53 0x24>;
};
rockchip,on-cmds11 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x15 0x55 0x03>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds12 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x05 dcs_exit_sleep_mode>;
};
rockchip,on-cmds13 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x23 0xb0 0x00>;
};
rockchip,on-cmds14 { //video
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x29 0xb3 0x1c>;
};
rockchip,on-cmds15 {
- 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 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x23 0xb0 0x03>;
rockchip,cmd_delay = <0>;
};
rockchip,on-cmds17 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x39 0x2c >;
};
rockchip,on-cmds18 {
- compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>;
rockchip,dsi_id = <2>;
rockchip,cmd = <0x05 dcs_set_display_on>;
disp_timings: display-timings {
native-mode = <&timing0>;
- compatible = "rockchip,display-timings";
timing0: timing0 {
screen-type = <SCREEN_DUAL_MIPI>;
lvds-format = <LVDS_8BIT_2>;
out-face = <OUT_P888>;
- clock-frequency = <120000000>;
+ clock-frequency = <280000000>;
hactive = <2560>;
vactive = <1600>;
if (pending & SDMMC_INT_CD) {
mci_writel(host, RINTSTS, SDMMC_INT_CD);
- rk_send_wakeup_key();
queue_work(host->card_workqueue, &host->card_work);
}
static void dw_mci_of_get_cd_gpio(struct device *dev, u8 slot,
struct mmc_host *mmc)
{
- struct device_node *np = dev->of_node;//dw_mci_of_find_slot_node(dev, slot);
+ struct device_node *np = dw_mci_of_find_slot_node(dev, slot);
int gpio;
if (!np)
}
slot->wp_gpio = dw_mci_of_get_wp_gpio(host->dev, slot->id);
- //dw_mci_of_get_cd_gpio(host->dev, slot->id,mmc);
+ dw_mci_of_get_cd_gpio(host->dev, slot->id, mmc);
+
if (mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO)
clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
printk("%s: Warning : No pinctrl used!\n",mmc_hostname(host->mmc));
else
{
- host->pins_idle= pinctrl_lookup_state(host->pinctrl,PINCTRL_STATE_IDLE);
- if(IS_ERR(host->pins_default))
- printk("%s: Warning : No IDLE pinctrl matched!\n", mmc_hostname(host->mmc));
- else
- {
- if(pinctrl_select_state(host->pinctrl, host->pins_idle) < 0)
- printk("%s: Warning : Idle pinctrl setting failed!\n", mmc_hostname(host->mmc));
- }
-
host->pins_default = pinctrl_lookup_state(host->pinctrl,PINCTRL_STATE_DEFAULT);
if(IS_ERR(host->pins_default))
printk("%s: Warning : No default pinctrl matched!\n", mmc_hostname(host->mmc));
if (host->vmmc)
regulator_disable(host->vmmc);
- /* Clear the interrupts for the host controller */
- mci_writel(host, RINTSTS, 0xFFFFFFFF);
- mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */
- mci_writel(host, CTRL, 0);
-
- /*only for sdmmc controller*/
- if(host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) {
- disable_irq(host->irq);
- if(pinctrl_select_state(host->pinctrl, host->pins_idle) < 0)
- printk("%s: Warning : Idle pinctrl setting failed!\n", mmc_hostname(host->mmc));
- dw_mci_of_get_cd_gpio(host->dev,0,host->mmc);
- enable_irq_wake(host->mmc->slot.cd_irq);
- }
return 0;
}
EXPORT_SYMBOL(dw_mci_suspend);
dw_mci_setup_bus(slot, true);
}
}
-
- /*only for sdmmc controller*/
- if(host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) {
- disable_irq_wake(host->mmc->slot.cd_irq);
- mmc_gpio_free_cd(host->mmc);
- if(pinctrl_select_state(host->pinctrl, host->pins_default) < 0)
- printk("%s: Warning : Default pinctrl setting failed!\n", mmc_hostname(host->mmc));
- enable_irq(host->irq);
-
- }
-
return 0;
}
EXPORT_SYMBOL(dw_mci_resume);