new drm panel driver

cancel
Showing results for 
Search instead for 
Did you mean: 

new drm panel driver

Jump to solution
91 Views
Contributor III

Hi,

I must write a driver for a new MIPI DSI panel (HX8394-A01) and I'm not sure about which headers files I must include and which function must be called from them. How do I tell to the uppers layers which function must be called to initialize the panel, or to shut down it, etc?

Is there any documentation about the MIPI DSI API I can consult?

Best regards, 

Gonzalo.

 

0 Kudos
1 Solution
20 Views
Contributor III

I found some answers to my question in this post:

https://community.nxp.com/t5/i-MX-Processors/how-to-add-a-new-panel-with-imx8mm-evk-I-got-some-probl...

Also analyzing the panel-raydium-rm67191.c driver I understood that any drm panel driver must contain the these structures and all the functions defined inside them

static const struct backlight_ops my_bl_ops = {
       .update_status = my_bl_update_status,
       .get_brightness = my_bl_get_brightness,
};

static const struct drm_panel_funcs my_panel_funcs = {
    .prepare = my_panel_prepare,
    .unprepare = my_panel_unprepare,
    .enable = my_panel_enable,
    .disable = my_panel_disable,
    .get_modes = my_panel_get_modes,
};

static const struct of_device_id my_of_match[] = {
    { .compatible = "xxxxxx,xxxxxx", }, //must be the same as compatible node in device tree
    { }
};
MODULE_DEVICE_TABLE(of, my_of_match);

static struct mipi_dsi_driver my_panel_driver = {
    .driver = {
         .name = "panel-my-panel-driver", 
         .of_match_table = my_of_match,
     },
    .probe = my_panel_probe, // this is the entry point of the driver
    .remove = my_panel_remove,
    .shutdown = my_panel_shutdown,
};
module_mipi_dsi_driver(my_panel_driver);

 

I was able to add my driver to the AOSP image and configure the device tree files. Although the driver seems to be working well (the MIPI interface is sending the DCS commands properly) the display is still not working so I guess it might be a timing issue. I will keep trying and if I succeed I will share the solution.

View solution in original post

0 Kudos
3 Replies
21 Views
Contributor III

I found some answers to my question in this post:

https://community.nxp.com/t5/i-MX-Processors/how-to-add-a-new-panel-with-imx8mm-evk-I-got-some-probl...

Also analyzing the panel-raydium-rm67191.c driver I understood that any drm panel driver must contain the these structures and all the functions defined inside them

static const struct backlight_ops my_bl_ops = {
       .update_status = my_bl_update_status,
       .get_brightness = my_bl_get_brightness,
};

static const struct drm_panel_funcs my_panel_funcs = {
    .prepare = my_panel_prepare,
    .unprepare = my_panel_unprepare,
    .enable = my_panel_enable,
    .disable = my_panel_disable,
    .get_modes = my_panel_get_modes,
};

static const struct of_device_id my_of_match[] = {
    { .compatible = "xxxxxx,xxxxxx", }, //must be the same as compatible node in device tree
    { }
};
MODULE_DEVICE_TABLE(of, my_of_match);

static struct mipi_dsi_driver my_panel_driver = {
    .driver = {
         .name = "panel-my-panel-driver", 
         .of_match_table = my_of_match,
     },
    .probe = my_panel_probe, // this is the entry point of the driver
    .remove = my_panel_remove,
    .shutdown = my_panel_shutdown,
};
module_mipi_dsi_driver(my_panel_driver);

 

I was able to add my driver to the AOSP image and configure the device tree files. Although the driver seems to be working well (the MIPI interface is sending the DCS commands properly) the display is still not working so I guess it might be a timing issue. I will keep trying and if I succeed I will share the solution.

View solution in original post

0 Kudos
79 Views
NXP TechSupport
NXP TechSupport

Can you please clarify which device are you using? or planning to use? is an i.MX RT?  are you using LINUX or Android?

 

0 Kudos
76 Views
Contributor III

Hi James,

Yes sure, I completely forgot that information. We are using a SOM from variscite based on the imx8 mini processor running Android 9.

Regards,

Gonzalo.

0 Kudos