board-rx51-video.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * linux/arch/arm/mach-omap2/board-rx51-video.c
  3. *
  4. * Copyright (C) 2010 Nokia
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/gpio.h>
  14. #include <linux/spi/spi.h>
  15. #include <linux/mm.h>
  16. #include <asm/mach-types.h>
  17. #include <video/omapdss.h>
  18. #include <video/omap-panel-data.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include "soc.h"
  21. #include "board-rx51.h"
  22. #include "mux.h"
  23. #define RX51_LCD_RESET_GPIO 90
  24. #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
  25. static struct panel_acx565akm_data lcd_data = {
  26. .reset_gpio = RX51_LCD_RESET_GPIO,
  27. };
  28. static struct omap_dss_device rx51_lcd_device = {
  29. .name = "lcd",
  30. .driver_name = "panel-acx565akm",
  31. .type = OMAP_DISPLAY_TYPE_SDI,
  32. .phy.sdi.datapairs = 2,
  33. .data = &lcd_data,
  34. };
  35. static struct omap_dss_device rx51_tv_device = {
  36. .name = "tv",
  37. .type = OMAP_DISPLAY_TYPE_VENC,
  38. .driver_name = "venc",
  39. .phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
  40. };
  41. static struct omap_dss_device *rx51_dss_devices[] = {
  42. &rx51_lcd_device,
  43. &rx51_tv_device,
  44. };
  45. static struct omap_dss_board_info rx51_dss_board_info = {
  46. .num_devices = ARRAY_SIZE(rx51_dss_devices),
  47. .devices = rx51_dss_devices,
  48. .default_device = &rx51_lcd_device,
  49. };
  50. static int __init rx51_video_init(void)
  51. {
  52. if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
  53. return 0;
  54. if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
  55. pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
  56. return 0;
  57. }
  58. omap_display_init(&rx51_dss_board_info);
  59. return 0;
  60. }
  61. omap_subsys_initcall(rx51_video_init);
  62. #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */