saarb.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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/init.h>
  13. #include <linux/kernel.h>
  14. #include <linux/i2c.h>
  15. #include <linux/i2c/pxa-i2c.h>
  16. #include <linux/mfd/88pm860x.h>
  17. #include <asm/mach-types.h>
  18. #include <asm/mach/arch.h>
  19. #include <mach/irqs.h>
  20. #include <mach/hardware.h>
  21. #include <mach/gpio.h>
  22. #include <mach/pxa95x.h>
  23. #include "generic.h"
  24. #define SAARB_NR_IRQS (IRQ_BOARD_START + 40)
  25. static struct pm860x_touch_pdata saarb_touch = {
  26. .gpadc_prebias = 1,
  27. .slot_cycle = 1,
  28. .tsi_prebias = 6,
  29. .pen_prebias = 16,
  30. .pen_prechg = 2,
  31. .res_x = 300,
  32. };
  33. static struct pm860x_backlight_pdata saarb_backlight[] = {
  34. {
  35. .id = PM8606_ID_BACKLIGHT,
  36. .iset = PM8606_WLED_CURRENT(24),
  37. .flags = PM8606_BACKLIGHT1,
  38. },
  39. {},
  40. };
  41. static struct pm860x_led_pdata saarb_led[] = {
  42. {
  43. .id = PM8606_ID_LED,
  44. .iset = PM8606_LED_CURRENT(12),
  45. .flags = PM8606_LED1_RED,
  46. }, {
  47. .id = PM8606_ID_LED,
  48. .iset = PM8606_LED_CURRENT(12),
  49. .flags = PM8606_LED1_GREEN,
  50. }, {
  51. .id = PM8606_ID_LED,
  52. .iset = PM8606_LED_CURRENT(12),
  53. .flags = PM8606_LED1_BLUE,
  54. }, {
  55. .id = PM8606_ID_LED,
  56. .iset = PM8606_LED_CURRENT(12),
  57. .flags = PM8606_LED2_RED,
  58. }, {
  59. .id = PM8606_ID_LED,
  60. .iset = PM8606_LED_CURRENT(12),
  61. .flags = PM8606_LED2_GREEN,
  62. }, {
  63. .id = PM8606_ID_LED,
  64. .iset = PM8606_LED_CURRENT(12),
  65. .flags = PM8606_LED2_BLUE,
  66. },
  67. };
  68. static struct pm860x_platform_data saarb_pm8607_info = {
  69. .touch = &saarb_touch,
  70. .backlight = &saarb_backlight[0],
  71. .led = &saarb_led[0],
  72. .companion_addr = 0x10,
  73. .irq_mode = 0,
  74. .irq_base = IRQ_BOARD_START,
  75. .i2c_port = GI2C_PORT,
  76. };
  77. static struct i2c_board_info saarb_i2c_info[] = {
  78. {
  79. .type = "88PM860x",
  80. .addr = 0x34,
  81. .platform_data = &saarb_pm8607_info,
  82. .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
  83. },
  84. };
  85. static void __init saarb_init(void)
  86. {
  87. pxa_set_ffuart_info(NULL);
  88. pxa_set_i2c_info(NULL);
  89. i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info));
  90. }
  91. MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
  92. .boot_params = 0xa0000100,
  93. .map_io = pxa3xx_map_io,
  94. .nr_irqs = SAARB_NR_IRQS,
  95. .init_irq = pxa95x_init_irq,
  96. .handle_irq = pxa3xx_handle_irq,
  97. .timer = &pxa_timer,
  98. .init_machine = saarb_init,
  99. MACHINE_END