aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/panel/panel-simple.c')
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c134
1 files changed, 117 insertions, 17 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 23de22f8c820..e95385bf8356 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -247,21 +247,14 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
247 if (IS_ERR(panel->supply)) 247 if (IS_ERR(panel->supply))
248 return PTR_ERR(panel->supply); 248 return PTR_ERR(panel->supply);
249 249
250 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable"); 250 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
251 GPIOD_OUT_LOW);
251 if (IS_ERR(panel->enable_gpio)) { 252 if (IS_ERR(panel->enable_gpio)) {
252 err = PTR_ERR(panel->enable_gpio); 253 err = PTR_ERR(panel->enable_gpio);
253 dev_err(dev, "failed to request GPIO: %d\n", err); 254 dev_err(dev, "failed to request GPIO: %d\n", err);
254 return err; 255 return err;
255 } 256 }
256 257
257 if (panel->enable_gpio) {
258 err = gpiod_direction_output(panel->enable_gpio, 0);
259 if (err < 0) {
260 dev_err(dev, "failed to setup GPIO: %d\n", err);
261 return err;
262 }
263 }
264
265 backlight = of_parse_phandle(dev->of_node, "backlight", 0); 258 backlight = of_parse_phandle(dev->of_node, "backlight", 0);
266 if (backlight) { 259 if (backlight) {
267 panel->backlight = of_find_backlight_by_node(backlight); 260 panel->backlight = of_find_backlight_by_node(backlight);
@@ -376,6 +369,29 @@ static const struct panel_desc auo_b101xtn01 = {
376 }, 369 },
377}; 370};
378 371
372static const struct drm_display_mode auo_b116xw03_mode = {
373 .clock = 70589,
374 .hdisplay = 1366,
375 .hsync_start = 1366 + 40,
376 .hsync_end = 1366 + 40 + 40,
377 .htotal = 1366 + 40 + 40 + 32,
378 .vdisplay = 768,
379 .vsync_start = 768 + 10,
380 .vsync_end = 768 + 10 + 12,
381 .vtotal = 768 + 10 + 12 + 6,
382 .vrefresh = 60,
383};
384
385static const struct panel_desc auo_b116xw03 = {
386 .modes = &auo_b116xw03_mode,
387 .num_modes = 1,
388 .bpc = 6,
389 .size = {
390 .width = 256,
391 .height = 144,
392 },
393};
394
379static const struct drm_display_mode auo_b133xtn01_mode = { 395static const struct drm_display_mode auo_b133xtn01_mode = {
380 .clock = 69500, 396 .clock = 69500,
381 .hdisplay = 1366, 397 .hdisplay = 1366,
@@ -415,6 +431,7 @@ static const struct drm_display_mode auo_b133htn01_mode = {
415static const struct panel_desc auo_b133htn01 = { 431static const struct panel_desc auo_b133htn01 = {
416 .modes = &auo_b133htn01_mode, 432 .modes = &auo_b133htn01_mode,
417 .num_modes = 1, 433 .num_modes = 1,
434 .bpc = 6,
418 .size = { 435 .size = {
419 .width = 293, 436 .width = 293,
420 .height = 165, 437 .height = 165,
@@ -536,22 +553,92 @@ static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
536static const struct panel_desc foxlink_fl500wvr00_a0t = { 553static const struct panel_desc foxlink_fl500wvr00_a0t = {
537 .modes = &foxlink_fl500wvr00_a0t_mode, 554 .modes = &foxlink_fl500wvr00_a0t_mode,
538 .num_modes = 1, 555 .num_modes = 1,
556 .bpc = 8,
539 .size = { 557 .size = {
540 .width = 108, 558 .width = 108,
541 .height = 65, 559 .height = 65,
542 }, 560 },
543}; 561};
544 562
545static const struct drm_display_mode innolux_n116bge_mode = { 563static const struct drm_display_mode hannstar_hsd070pww1_mode = {
564 .clock = 71100,
565 .hdisplay = 1280,
566 .hsync_start = 1280 + 1,
567 .hsync_end = 1280 + 1 + 158,
568 .htotal = 1280 + 1 + 158 + 1,
569 .vdisplay = 800,
570 .vsync_start = 800 + 1,
571 .vsync_end = 800 + 1 + 21,
572 .vtotal = 800 + 1 + 21 + 1,
573 .vrefresh = 60,
574};
575
576static const struct panel_desc hannstar_hsd070pww1 = {
577 .modes = &hannstar_hsd070pww1_mode,
578 .num_modes = 1,
579 .bpc = 6,
580 .size = {
581 .width = 151,
582 .height = 94,
583 },
584};
585
586static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
587 .clock = 33333,
588 .hdisplay = 800,
589 .hsync_start = 800 + 85,
590 .hsync_end = 800 + 85 + 86,
591 .htotal = 800 + 85 + 86 + 85,
592 .vdisplay = 480,
593 .vsync_start = 480 + 16,
594 .vsync_end = 480 + 16 + 13,
595 .vtotal = 480 + 16 + 13 + 16,
596 .vrefresh = 60,
597};
598
599static const struct panel_desc hitachi_tx23d38vm0caa = {
600 .modes = &hitachi_tx23d38vm0caa_mode,
601 .num_modes = 1,
602 .bpc = 6,
603 .size = {
604 .width = 195,
605 .height = 117,
606 },
607};
608
609static const struct drm_display_mode innolux_g121i1_l01_mode = {
546 .clock = 71000, 610 .clock = 71000,
611 .hdisplay = 1280,
612 .hsync_start = 1280 + 64,
613 .hsync_end = 1280 + 64 + 32,
614 .htotal = 1280 + 64 + 32 + 64,
615 .vdisplay = 800,
616 .vsync_start = 800 + 9,
617 .vsync_end = 800 + 9 + 6,
618 .vtotal = 800 + 9 + 6 + 9,
619 .vrefresh = 60,
620};
621
622static const struct panel_desc innolux_g121i1_l01 = {
623 .modes = &innolux_g121i1_l01_mode,
624 .num_modes = 1,
625 .bpc = 6,
626 .size = {
627 .width = 261,
628 .height = 163,
629 },
630};
631
632static const struct drm_display_mode innolux_n116bge_mode = {
633 .clock = 76420,
547 .hdisplay = 1366, 634 .hdisplay = 1366,
548 .hsync_start = 1366 + 64, 635 .hsync_start = 1366 + 136,
549 .hsync_end = 1366 + 64 + 6, 636 .hsync_end = 1366 + 136 + 30,
550 .htotal = 1366 + 64 + 6 + 64, 637 .htotal = 1366 + 136 + 30 + 60,
551 .vdisplay = 768, 638 .vdisplay = 768,
552 .vsync_start = 768 + 8, 639 .vsync_start = 768 + 8,
553 .vsync_end = 768 + 8 + 4, 640 .vsync_end = 768 + 8 + 12,
554 .vtotal = 768 + 8 + 4 + 8, 641 .vtotal = 768 + 8 + 12 + 12,
555 .vrefresh = 60, 642 .vrefresh = 60,
556 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 643 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
557}; 644};
@@ -643,6 +730,9 @@ static const struct of_device_id platform_of_match[] = {
643 .compatible = "auo,b101xtn01", 730 .compatible = "auo,b101xtn01",
644 .data = &auo_b101xtn01, 731 .data = &auo_b101xtn01,
645 }, { 732 }, {
733 .compatible = "auo,b116xw03",
734 .data = &auo_b116xw03,
735 }, {
646 .compatible = "auo,b133htn01", 736 .compatible = "auo,b133htn01",
647 .data = &auo_b133htn01, 737 .data = &auo_b133htn01,
648 }, { 738 }, {
@@ -667,6 +757,15 @@ static const struct of_device_id platform_of_match[] = {
667 .compatible = "foxlink,fl500wvr00-a0t", 757 .compatible = "foxlink,fl500wvr00-a0t",
668 .data = &foxlink_fl500wvr00_a0t, 758 .data = &foxlink_fl500wvr00_a0t,
669 }, { 759 }, {
760 .compatible = "hannstar,hsd070pww1",
761 .data = &hannstar_hsd070pww1,
762 }, {
763 .compatible = "hit,tx23d38vm0caa",
764 .data = &hitachi_tx23d38vm0caa
765 }, {
766 .compatible ="innolux,g121i1-l01",
767 .data = &innolux_g121i1_l01
768 }, {
670 .compatible = "innolux,n116bge", 769 .compatible = "innolux,n116bge",
671 .data = &innolux_n116bge, 770 .data = &innolux_n116bge,
672 }, { 771 }, {
@@ -708,7 +807,6 @@ static void panel_simple_platform_shutdown(struct platform_device *pdev)
708static struct platform_driver panel_simple_platform_driver = { 807static struct platform_driver panel_simple_platform_driver = {
709 .driver = { 808 .driver = {
710 .name = "panel-simple", 809 .name = "panel-simple",
711 .owner = THIS_MODULE,
712 .of_match_table = platform_of_match, 810 .of_match_table = platform_of_match,
713 }, 811 },
714 .probe = panel_simple_platform_probe, 812 .probe = panel_simple_platform_probe,
@@ -741,6 +839,7 @@ static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
741 .desc = { 839 .desc = {
742 .modes = &lg_ld070wx3_sl01_mode, 840 .modes = &lg_ld070wx3_sl01_mode,
743 .num_modes = 1, 841 .num_modes = 1,
842 .bpc = 8,
744 .size = { 843 .size = {
745 .width = 94, 844 .width = 94,
746 .height = 151, 845 .height = 151,
@@ -768,6 +867,7 @@ static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
768 .desc = { 867 .desc = {
769 .modes = &lg_lh500wx1_sd03_mode, 868 .modes = &lg_lh500wx1_sd03_mode,
770 .num_modes = 1, 869 .num_modes = 1,
870 .bpc = 8,
771 .size = { 871 .size = {
772 .width = 62, 872 .width = 62,
773 .height = 110, 873 .height = 110,
@@ -795,6 +895,7 @@ static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
795 .desc = { 895 .desc = {
796 .modes = &panasonic_vvx10f004b00_mode, 896 .modes = &panasonic_vvx10f004b00_mode,
797 .num_modes = 1, 897 .num_modes = 1,
898 .bpc = 8,
798 .size = { 899 .size = {
799 .width = 217, 900 .width = 217,
800 .height = 136, 901 .height = 136,
@@ -864,7 +965,6 @@ static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
864static struct mipi_dsi_driver panel_simple_dsi_driver = { 965static struct mipi_dsi_driver panel_simple_dsi_driver = {
865 .driver = { 966 .driver = {
866 .name = "panel-simple-dsi", 967 .name = "panel-simple-dsi",
867 .owner = THIS_MODULE,
868 .of_match_table = dsi_of_match, 968 .of_match_table = dsi_of_match,
869 }, 969 },
870 .probe = panel_simple_dsi_probe, 970 .probe = panel_simple_dsi_probe,