saarb.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * linux/arch/arm/mach-pxa/saarb.c
  3. *
  4. * Support for the Marvell Handheld Platform (aka SAARB)
  5. *
  6. * Copyright (C) 2007-2010 Marvell International Ltd.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * publishhed by the Free Software Foundation.
  11. */
  12. #include <linux/gpio.h>
  13. #include <linux/init.h>
  14. #include <linux/kernel.h>
  15. #include <linux/i2c.h>
  16. #include <linux/i2c/pxa-i2c.h>
  17. #include <linux/mfd/88pm860x.h>
  18. #include <asm/mach-types.h>
  19. #include <asm/mach/arch.h>
  20. #include <mach/irqs.h>
  21. #include <mach/hardware.h>
  22. #include <mach/mfp.h>
  23. #include <mach/mfp-pxa930.h>
  24. #include <mach/pxa95x.h>
  25. #include "generic.h"
  26. #define SAARB_NR_IRQS (IRQ_BOARD_START + 40)
  27. static struct pm860x_touch_pdata saarb_touch = {
  28. .gpadc_prebias = 1,
  29. .slot_cycle = 1,
  30. .tsi_prebias = 6,
  31. .pen_prebias = 16,
  32. .pen_prechg = 2,
  33. .res_x = 300,
  34. };
  35. static struct pm860x_backlight_pdata saarb_backlight[] = {
  36. {
  37. .id = PM8606_ID_BACKLIGHT,
  38. .iset = PM8606_WLED_CURRENT(24),
  39. .flags = PM8606_BACKLIGHT1,
  40. },
  41. {},
  42. };
  43. static struct pm860x_led_pdata saarb_led[] = {
  44. {
  45. .id = PM8606_ID_LED,
  46. .iset = PM8606_LED_CURRENT(12),
  47. .flags = PM8606_LED1_RED,
  48. }, {
  49. .id = PM8606_ID_LED,
  50. .iset = PM8606_LED_CURRENT(12),
  51. .flags = PM8606_LED1_GREEN,
  52. }, {
  53. .id = PM8606_ID_LED,
  54. .iset = PM8606_LED_CURRENT(12),
  55. .flags = PM8606_LED1_BLUE,
  56. }, {
  57. .id = PM8606_ID_LED,
  58. .iset = PM8606_LED_CURRENT(12),
  59. .flags = PM8606_LED2_RED,
  60. }, {
  61. .id = PM8606_ID_LED,
  62. .iset = PM8606_LED_CURRENT(12),
  63. .flags = PM8606_LED2_GREEN,
  64. }, {
  65. .id = PM8606_ID_LED,
  66. .iset = PM8606_LED_CURRENT(12),
  67. .flags = PM8606_LED2_BLUE,
  68. },
  69. };
  70. static struct pm860x_platform_data saarb_pm8607_info = {
  71. .touch = &saarb_touch,
  72. .backlight = &saarb_backlight[0],
  73. .led = &saarb_led[0],
  74. .companion_addr = 0x10,
  75. .irq_mode = 0,
  76. .irq_base = IRQ_BOARD_START,
  77. .i2c_port = GI2C_PORT,
  78. };
  79. static struct i2c_board_info saarb_i2c_info[] = {
  80. {
  81. .type = "88PM860x",
  82. .addr = 0x34,
  83. .platform_data = &saarb_pm8607_info,
  84. .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)),
  85. },
  86. };
  87. static void __init saarb_init(void)
  88. {
  89. pxa_set_ffuart_info(NULL);
  90. pxa_set_i2c_info(NULL);
  91. i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info));
  92. }
  93. MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
  94. .atag_offset = 0x100,
  95. .map_io = pxa3xx_map_io,
  96. .nr_irqs = SAARB_NR_IRQS,
  97. .init_irq = pxa95x_init_irq,
  98. .handle_irq = pxa3xx_handle_irq,
  99. .timer = &pxa_timer,
  100. .init_machine = saarb_init,
  101. .restart = pxa_restart,
  102. MACHINE_END