board-rx51-video.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 connector_atv_platform_data rx51_tv_pdata = {
  26. .name = "tv",
  27. .source = "venc.0",
  28. .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
  29. .invert_polarity = false,
  30. };
  31. static struct platform_device rx51_tv_connector_device = {
  32. .name = "connector-analog-tv",
  33. .id = 0,
  34. .dev.platform_data = &rx51_tv_pdata,
  35. };
  36. static struct omap_dss_board_info rx51_dss_board_info = {
  37. .default_display_name = "lcd",
  38. };
  39. static int __init rx51_video_init(void)
  40. {
  41. if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
  42. return 0;
  43. if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
  44. pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
  45. return 0;
  46. }
  47. omap_display_init(&rx51_dss_board_info);
  48. platform_device_register(&rx51_tv_connector_device);
  49. return 0;
  50. }
  51. omap_subsys_initcall(rx51_video_init);
  52. #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */