board-mop500.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * Copyright (C) 2008-2012 ST-Ericsson
  3. *
  4. * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
  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. */
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/clk.h>
  16. #include <linux/io.h>
  17. #include <linux/platform_data/db8500_thermal.h>
  18. #include <linux/amba/bus.h>
  19. #include <linux/amba/pl022.h>
  20. #include <linux/mfd/abx500/ab8500.h>
  21. #include <linux/regulator/ab8500.h>
  22. #include <linux/regulator/fixed.h>
  23. #include <linux/regulator/driver.h>
  24. #include <linux/mfd/tps6105x.h>
  25. #include <linux/platform_data/leds-lp55xx.h>
  26. #include <linux/input.h>
  27. #include <linux/delay.h>
  28. #include <linux/leds.h>
  29. #include <linux/pinctrl/consumer.h>
  30. #include <linux/platform_data/pinctrl-nomadik.h>
  31. #include <linux/platform_data/dma-ste-dma40.h>
  32. #include <asm/mach-types.h>
  33. #include "setup.h"
  34. #include "devices.h"
  35. #include "irqs.h"
  36. #include "ste-dma40-db8500.h"
  37. #include "db8500-regs.h"
  38. #include "devices-db8500.h"
  39. #include "board-mop500.h"
  40. #include "board-mop500-regulators.h"
  41. struct ab8500_platform_data ab8500_platdata = {
  42. .irq_base = MOP500_AB8500_IRQ_BASE,
  43. .regulator = &ab8500_regulator_plat_data,
  44. };
  45. #ifdef CONFIG_STE_DMA40
  46. static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
  47. .mode = STEDMA40_MODE_LOGICAL,
  48. .dir = DMA_DEV_TO_MEM,
  49. .dev_type = DB8500_DMA_DEV8_SSP0,
  50. };
  51. static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
  52. .mode = STEDMA40_MODE_LOGICAL,
  53. .dir = DMA_MEM_TO_DEV,
  54. .dev_type = DB8500_DMA_DEV8_SSP0,
  55. };
  56. #endif
  57. struct pl022_ssp_controller ssp0_plat = {
  58. .bus_id = 0,
  59. #ifdef CONFIG_STE_DMA40
  60. .enable_dma = 1,
  61. .dma_filter = stedma40_filter,
  62. .dma_rx_param = &ssp0_dma_cfg_rx,
  63. .dma_tx_param = &ssp0_dma_cfg_tx,
  64. #else
  65. .enable_dma = 0,
  66. #endif
  67. /* on this platform, gpio 31,142,144,214 &
  68. * 224 are connected as chip selects
  69. */
  70. .num_chipselect = 5,
  71. };
  72. static void __init mop500_init_machine(void)
  73. {
  74. /* This board has full regulator constraints */
  75. regulator_has_full_constraints();
  76. }
  77. static void __init snowball_init_machine(void)
  78. {
  79. /* This board has full regulator constraints */
  80. regulator_has_full_constraints();
  81. }
  82. static void __init hrefv60_init_machine(void)
  83. {
  84. /* This board has full regulator constraints */
  85. regulator_has_full_constraints();
  86. }
  87. MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
  88. /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
  89. .atag_offset = 0x100,
  90. .smp = smp_ops(ux500_smp_ops),
  91. .map_io = u8500_map_io,
  92. .init_irq = ux500_init_irq,
  93. /* we re-use nomadik timer here */
  94. .init_time = ux500_timer_init,
  95. .init_machine = mop500_init_machine,
  96. .restart = ux500_restart,
  97. .init_late = NULL,
  98. MACHINE_END
  99. MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
  100. .atag_offset = 0x100,
  101. .map_io = u8500_map_io,
  102. .init_irq = ux500_init_irq,
  103. .init_time = ux500_timer_init,
  104. .init_machine = mop500_init_machine,
  105. .restart = ux500_restart,
  106. .init_late = NULL,
  107. MACHINE_END
  108. MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
  109. .atag_offset = 0x100,
  110. .smp = smp_ops(ux500_smp_ops),
  111. .map_io = u8500_map_io,
  112. .init_irq = ux500_init_irq,
  113. .init_time = ux500_timer_init,
  114. .init_machine = hrefv60_init_machine,
  115. .restart = ux500_restart,
  116. .init_late = NULL,
  117. MACHINE_END
  118. MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
  119. .atag_offset = 0x100,
  120. .smp = smp_ops(ux500_smp_ops),
  121. .map_io = u8500_map_io,
  122. .init_irq = ux500_init_irq,
  123. /* we re-use nomadik timer here */
  124. .init_time = ux500_timer_init,
  125. .init_machine = snowball_init_machine,
  126. .restart = ux500_restart,
  127. .init_late = NULL,
  128. MACHINE_END