saarb.c 2.5 KB

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