hardware.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2009
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  20. * MA 02110-1301 USA
  21. */
  22. #ifndef __ASM_ARCH_HARDWARE_H
  23. #define __ASM_ARCH_HARDWARE_H
  24. /* Peripheral clusters */
  25. #define U8500_PER3_BASE 0x80000000
  26. #define U8500_PER2_BASE 0x80110000
  27. #define U8500_PER1_BASE 0x80120000
  28. #define U8500_PER4_BASE 0x80150000
  29. #define U8500_PER6_BASE 0xa03c0000
  30. #define U8500_PER7_BASE 0xa03d0000
  31. #define U8500_PER5_BASE 0xa03e0000
  32. /* GPIO */
  33. #define U8500_GPIO0_BASE (U8500_PER1_BASE + 0xE000)
  34. #define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xE000 + 0x80)
  35. #define U8500_GPIO2_BASE (U8500_PER3_BASE + 0xE000)
  36. #define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xE000 + 0x80)
  37. #define U8500_GPIO4_BASE (U8500_PER3_BASE + 0xE000 + 0x100)
  38. #define U8500_GPIO5_BASE (U8500_PER3_BASE + 0xE000 + 0x180)
  39. #define U8500_GPIO6_BASE (U8500_PER2_BASE + 0xE000)
  40. #define U8500_GPIO7_BASE (U8500_PER2_BASE + 0xE000 + 0x80)
  41. #define U8500_GPIO8_BASE (U8500_PER5_BASE + 0x1E000)
  42. /* Per7 */
  43. #define U8500_CLKRST7_BASE (U8500_PER7_BASE + 0xf000)
  44. /* Per6 */
  45. #define U8500_MTU0_BASE_V1 (U8500_PER6_BASE + 0x6000)
  46. #define U8500_MTU1_BASE_V1 (U8500_PER6_BASE + 0x7000)
  47. #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000)
  48. /* Per5 */
  49. #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000)
  50. /* Per4 */
  51. #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000)
  52. #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000)
  53. /* Per3 */
  54. #define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000)
  55. #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000)
  56. /* Per2 */
  57. #define U8500_CLKRST2_BASE (U8500_PER2_BASE + 0xf000)
  58. /* Per1 */
  59. #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000)
  60. #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000)
  61. #define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000)
  62. /* Last page of Boot ROM */
  63. #define U8500_BOOTROM_BASE 0x90000000
  64. #define U8500_ASIC_ID_LOC_ED_V1 (U8500_BOOTROM_BASE + 0x1FFF4)
  65. #define U8500_ASIC_ID_LOC_V2 (U8500_BOOTROM_BASE + 0x1DBF4)
  66. /* AB8500 specifics */
  67. /* address bank */
  68. #define AB8500_REGU_CTRL2 0x0004
  69. #define AB8500_MISC 0x0010
  70. /* registers */
  71. #define AB8500_REGU_VRF1VAUX3_REGU_REG 0x040A
  72. #define AB8500_REGU_VRF1VAUX3_SEL_REG 0x0421
  73. #define AB8500_REV_REG 0x1080
  74. #define AB8500_GPIO_SEL2_REG 0x1001
  75. #define AB8500_GPIO_DIR2_REG 0x1011
  76. #define AB8500_GPIO_DIR4_REG 0x1013
  77. #define AB8500_GPIO_SEL4_REG 0x1003
  78. #define AB8500_GPIO_OUT2_REG 0x1021
  79. #define AB8500_GPIO_OUT4_REG 0x1023
  80. #define LDO_VAUX3_ENABLE_MASK 0x3
  81. #define LDO_VAUX3_ENABLE_VAL 0x1
  82. #define LDO_VAUX3_SEL_MASK 0xf
  83. #define LDO_VAUX3_SEL_2V9 0xd
  84. #define LDO_VAUX3_V2_SEL_MASK 0x7
  85. #define LDO_VAUX3_V2_SEL_2V91 0x7
  86. #endif /* __ASM_ARCH_HARDWARE_H */