waterPressureMemoryDefinition.c 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2010
  3. *
  4. * License Terms: GNU General Public License v2
  5. *
  6. * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
  7. * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
  8. *
  9. * MOP500 board specific initialization for regulators
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/regulator/machine.h>
  13. #include <linux/regulator/ab8500.h>
  14. #include "board-mop500-regulators.h"
  15. static struct regulator_consumer_supply gpio_en_3v3_consumers[] = {
  16. REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
  17. };
  18. struct regulator_init_data gpio_en_3v3_regulator = {
  19. .constraints = {
  20. .name = "EN-3V3",
  21. .min_uV = 3300000,
  22. .max_uV = 3300000,
  23. .valid_ops_mask = REGULATOR_CHANGE_STATUS,
  24. },
  25. .num_consumer_supplies = ARRAY_SIZE(gpio_en_3v3_consumers),
  26. .consumer_supplies = gpio_en_3v3_consumers,
  27. };
  28. /*
  29. * TPS61052 regulator
  30. */
  31. static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
  32. /*
  33. * Boost converter supply to raise voltage on audio speaker, this
  34. * is actually connected to three pins, VInVhfL (left amplifier)
  35. * VInVhfR (right amplifier) and VIntDClassInt - all three must
  36. * be connected to the same voltage.
  37. */
  38. REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"),
  39. };
  40. struct regulator_init_data tps61052_regulator = {
  41. .constraints = {
  42. .name = "vaudio-hf",
  43. .min_uV = 4500000,
  44. .max_uV = 4500000,
  45. .valid_ops_mask = REGULATOR_CHANGE_STATUS,
  46. },
  47. .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers),
  48. .consumer_supplies = tps61052_vaudio_consumers,
  49. };
  50. static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
  51. /* External displays, connector on board 2v5 power supply */
  52. REGULATOR_SUPPLY("vaux12v5", "mcde.0"),
  53. /* SFH7741 proximity sensor */
  54. REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
  55. /* BH1780GLS ambient light sensor */
  56. REGULATOR_SUPPLY("vcc", "2-0029"),
  57. /* lsm303dlh accelerometer */
  58. REGULATOR_SUPPLY("vdd", "3-0018"),
  59. /* lsm303dlh magnetometer */
  60. REGULATOR_SUPPLY("vdd", "3-001e"),
  61. /* Rohm BU21013 Touchscreen devices */
  62. REGULATOR_SUPPLY("avdd", "3-005c"),
  63. REGULATOR_SUPPLY("avdd", "3-005d"),
  64. /* Synaptics RMI4 Touchscreen device */
  65. REGULATOR_SUPPLY("vdd", "3-004b"),
  66. };
  67. static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
  68. /* On-board eMMC power */
  69. REGULATOR_SUPPLY("vmmc", "sdi4"),
  70. /* AB8500 audio codec */
  71. REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
  72. };
  73. static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
  74. /* External MMC slot power */
  75. REGULATOR_SUPPLY("vmmc", "sdi0"),
  76. };
  77. static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
  78. /* TV-out DENC supply */
  79. REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
  80. /* Internal general-purpose ADC */
  81. REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
  82. };
  83. static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
  84. /* AB8500 audio-codec main supply */
  85. REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
  86. };
  87. static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
  88. /* AB8500 audio-codec Mic1 supply */
  89. REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
  90. };
  91. static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
  92. /* AB8500 audio-codec Mic2 supply */
  93. REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
  94. };
  95. static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
  96. /* AB8500 audio-codec DMic supply */
  97. REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
  98. };
  99. static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
  100. /* SoC core supply, no device */
  101. REGULATOR_SUPPLY("v-intcore", NULL),
  102. /* USB Transceiver */
  103. REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
  104. };
  105. static struct regulator_consumer_supply ab8500_vana_consumers[] = {
  106. /* External displays, connector on board, 1v8 power supply */
  107. REGULATOR_SUPPLY("vsmps2", "mcde.0"),
  108. };
  109. /* ab8500 regulator register initialization */
  110. struct ab8500_regulator_reg_init
  111. ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
  112. /*
  113. * VanaRequestCtrl = HP/LP depending on VxRequest
  114. * VextSupply1RequestCtrl = HP/LP depending on VxRequest
  115. */
  116. INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00),
  117. /*
  118. * VextSupply2RequestCtrl = HP/LP depending on VxRequest
  119. * VextSupply3RequestCtrl = HP/LP depending on VxRequest
  120. * Vaux1RequestCtrl = HP/LP depending on VxRequest
  121. * Vaux2RequestCtrl = HP/LP depending on VxRequest
  122. */
  123. INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00),
  124. /*
  125. * Vaux3RequestCtrl = HP/LP depending on VxRequest
  126. * SwHPReq = Control through SWValid disabled