1. 程式人生 > >開發板部分總結

開發板部分總結

Android開發板

Android開發板主要有Qualcomm, MTK, HiSilicon, Samsung SOC平臺.

96boards開發板

開發板 DragonBoard 410C Mediatek X20 Hikey 960
SOC平臺 Snapdragon 410C, MSM8916 Helio X20, MT6797 Hisi Kirin 960
Kernel Linux 3.18 Linux 3.18 Linux 4.4
Android Lollipop/Marshmallow Marshmallow Oreo

詳情請見:

Intrinsyc開發板

開發板 Open Q820 Development Kit
SOC Snapdragon 820, MSM8996, APQ8096
Kernel Linux 3.18
Android Oreo

詳情請見:

FriendlyARM友善之臂開發板

開發板 Tiny4412
SOC Samsung Exynos 4412
Kernel Linux 3.0
Android Lollipop

詳情請見:

主要檔案路徑

開發板 Dragonboard 410C
LK bootable\bootloader\lk\target\msm8916
DSI kernel\drivers\video\msm\mdss
DTS kernel\arch\arm64\boot\dts\qcom\apq8016-sbc.dtsi
TP kernel\drivers\input\touchscreen
開發板 Mediatek X20
LK vendor\mediatek\proprietary\bootable\bootloader\lk\dev\lcm
vendor\mediatek\proprietary\bootable\bootloader\lk\project\amt6797_64_open.mk
LCM kernel-3.18\drivers\misc\mediatek\lcm
kernel-3.18\drivers\misc\mediatek\video\mt6797
DTS kernel-3.18\arch\arm64\boot\dts\amt6797_64_open.dts
kernel-3.18\drivers\misc\mediatek\dws\mt6797\amt6797_64_open.dws
TP kernel-3.18\drivers\input\touchscreen\mediatek
開發板 Open Q820 Development Kit
LK LOCKED!
DSI kernel\msm-3.18\drivers\video\msm\mdss
DTS kernel\msm-3.18\arch\arm64\boot\dts\qcom\apq8096-dragonboard.dtsi
TP kernel\msm-3.18\drivers\input\touchscreen
開發板 Hikey 960
DTS hikey-linaro\arch\arm64\boot\dts\hisilicon\hi3660.dtsi
TP hikey-linaro\drivers\input\touchscreen
Android LCD點亮
開機: LK點亮 LCD
  • 如果失敗, Kernel點亮LCD
  • 成功,則直到下一次滅屏
開機後滅亮屏: Kernel點亮
LCD手動亮滅屏
1.Qualcomm手動亮滅屏

mdss_fb.c:

void mdss_fb_my_blank(void)
{
    struct fb_info *fbi = fbi_list[0];
    pr_info("[FB]%s called\n", __func__);
    mdss_fb_blank_sub(FB_BLANK_POWERDOWN, fbi, 1);
}

void mdss_fb_my_unblank(void) 
{
    struct fb_info *fbi = fbi_list[0];
    pr_info("[FB]%s called\n", __func__);
    mdss_fb_blank_sub(FB_BLANK_UNBLANK, fbi, 1);
}

mdss_dsi_panel.c:

void mdss_fb_my_blank(void);
void mdss_fb_my_unblank(void);

int mdss_dsi_panel_my_init_(void *dir)
{
    mdelay(1000);
    while (1) {
        if (!mdss_fb_panel_registered(0)) {
            mdelay(500);
            continue;
        }
        mdss_fb_my_blank();
        mdelay(100);
        mdss_fb_my_unblank();
        return 0;
    }
    return 0;
}

void mdss_dsi_panel_my_init(void)
{

    struct task_struct *thread = NULL;
    thread = kthread_run(mdss_dsi_panel_my_init_, (void*)NULL, "my_init");
    if (IS_ERR(thread)) {
        pr_err("failed to create thread for my_init init\n");
        return;
    }    
}

mdss_mdp_intf_video.c

void mdss_dsi_panel_my_init(void);
int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl,
    bool handoff)
{
    //...
    mdss_dsi_panel_my_init();
}
2. MTK開機kernel點屏

disp_lcm.c:

int disp_lcm_init(disp_lcm_handle *plcm, int force)
{
    LCM_DRIVER *lcm_drv = NULL;

    DISPFUNC();
    if (_is_lcm_inited(plcm)) {
        lcm_drv = plcm->drv;

        if (lcm_drv->init_power) {
            if (!disp_lcm_is_inited(plcm) || force) {
                pr_debug("lcm init power()\n");
                lcm_drv->init_power();
            }
        }

        if (lcm_drv->init) {
            if (!disp_lcm_is_inited(plcm) || force) {
                pr_debug("lcm init()\n");
                lcm_drv->init();
            }
        } else {
            DISPERR("FATAL ERROR, lcm_drv->init is null\n");
            return -1;
        }
    }
    //...
}

lk LCM驅動 lcm_driver.c

LCM_DRIVER my_lcm_drv = {
    //.init = lcm_init,
    //.init_power = lcm_init_power,
};

kernel primary_display.c:

force: 0 -> 1

int primary_display_init(char *lcm_name, unsigned int lcm_fps, int is_lcm_inited)
{
    // ...
    if (is_lcm_inited) {
        ret = disp_lcm_init(pgc->plcm, /*0*/1); /* no need lcm power on,because lk power on lcm */
    } else {
        ret = disp_lcm_init(pgc->plcm, 1);

        if (primary_display_is_video_mode())
            dpmgr_path_trigger(pgc->dpmgr_handle, NULL, 0);
    }
    // ...
}