Advertisement
Guest User

Untitled

a guest
Aug 1st, 2011
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. /*
  2. * arch/arm/mach-tegra/board-shuttle.h
  3. *
  4. * Copyright (C) 2011 Eduardo José Tagle <ejtagle@tutopia.com>
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16.  
  17. #ifndef _MACH_TEGRA_BOARD_SHUTTLE_H
  18. #define _MACH_TEGRA_BOARD_SHUTTLE_H
  19.  
  20.  
  21. #define SHUTTLE_BT_RESET TEGRA_GPIO_PU0 /* 0= reset asserted */
  22.  
  23. /* GPS and 3G cards share the same enabling IO line */
  24. #define SHUTTLE_3GGPS_DISABLE TEGRA_GPIO_PJ7 /* 1= disabled*/
  25.  
  26. #define SHUTTLE_KEY_VOLUMEUP TEGRA_GPIO_PB1 /* 0=pressed */
  27. #define SHUTTLE_KEY_VOLUMEDOWN TEGRA_GPIO_PK7 /* 0=pressed */
  28. #define SHUTTLE_KEY_POWER TEGRA_GPIO_PV2 /* 0=pressed */
  29. #define SHUTTLE_KEY_RESUME TEGRA_GPIO_PV6 /* 0=pressed */
  30. #define SHUTTLE_KEY_SUSPEND TEGRA_GPIO_PAA4 /* 0=pressed */
  31. #define SHUTTLE_KEY_BACK TEGRA_GPIO_PH0 /* 0=pressed */
  32.  
  33. /* #define SHUTTLE_EMC_SAMSUNG */
  34. /* #define SHUTTLE_EMC_ELPIDA50NM */
  35. /* #define SHUTTLE_EMC_ELPIDA40NM */
  36.  
  37. #define SHUTTLE_CAMERA_POWER TEGRA_GPIO_PD4 /* 1=powered on */
  38.  
  39. #define SHUTTLE_NAND_WPN TEGRA_GPIO_PC7 /* NAND flash write protect: 0=writeprotected */
  40.  
  41. #define SHUTTLE_BL_ENB TEGRA_GPIO_PB5
  42. #define SHUTTLE_LVDS_SHUTDOWN TEGRA_GPIO_PB2
  43. #define SHUTTLE_EN_VDD_PANEL TEGRA_GPIO_PC6
  44. #define SHUTTLE_BL_VDD TEGRA_GPIO_PW0
  45. #define SHUTTLE_BL_PWM TEGRA_GPIO_PB4 /* PWM */
  46. #define SHUTTLE_HDMI_ENB TEGRA_GPIO_PV5 /* unconfirmed */
  47. #define SHUTTLE_HDMI_HPD TEGRA_GPIO_PN7 /* 1=HDMI plug detected */
  48.  
  49. #define SHUTTLE_BL_PWM_ID 0 /* PWM0 controls backlight */
  50.  
  51. #define SHUTTLE_FB_PAGES 2 /* At least, 2 video pages */
  52. #define SHUTTLE_FB_HDMI_PAGES 2 /* At least, 2 video pages for HDMI */
  53.  
  54. #define SHUTTLE_MEM_SIZE SZ_512M /* Total memory */
  55.  
  56. #define SHUTTLE_GPU_MEM_SIZE 3 * SZ_32M /* Memory reserved for GPU */
  57. /*#define SHUTTLE_GPU_MEM_SIZE SZ_64M*/ /* Memory reserved for GPU */
  58.  
  59. #define SHUTTLE_1024x600PANEL1 1
  60.  
  61. #define SHUTTLE_FB1_MEM_SIZE 0 /* Memory reserved for Framebuffer 1: LCD */
  62. #define SHUTTLE_FB2_MEM_SIZE 0 /* Memory reserved for Framebuffer 2: HDMI out */
  63.  
  64. #define DYNAMIC_GPU_MEM 1 /* use dynamic memory for GPU */
  65.  
  66.  
  67. /*#define SHUTTLE_48KHZ_AUDIO*/ /* <- define this if you want 48khz audio sampling rate instead of 44100Hz */
  68.  
  69. // TPS6586x GPIOs as registered
  70. #define PMU_GPIO_BASE (TEGRA_NR_GPIOS)
  71. #define PMU_GPIO0 (PMU_GPIO_BASE)
  72. #define PMU_GPIO1 (PMU_GPIO_BASE + 1)
  73. #define PMU_GPIO2 (PMU_GPIO_BASE + 2)
  74. #define PMU_GPIO3 (PMU_GPIO_BASE + 3)
  75.  
  76. #define PMU_IRQ_BASE (TEGRA_NR_IRQS)
  77. #define PMU_IRQ_RTC_ALM1 (PMU_IRQ_BASE + TPS6586X_INT_RTC_ALM1)
  78.  
  79. #define SHUTTLE_ENABLE_VDD_VID TEGRA_GPIO_PT2 /* 1=enabled. Powers HDMI. Wait 500uS to let it stabilize before returning */
  80.  
  81. #define SHUTTLE_SDIO2_CD TEGRA_GPIO_PI5
  82. #define SHUTTLE_SDIO2_POWER TEGRA_GPIO_PT3 /* SDIO0 and SDIO2 power */
  83.  
  84. #define SHUTTLE_SDHC_CD TEGRA_GPIO_PH2
  85. #define SHUTTLE_SDHC_WP TEGRA_GPIO_PH3 /*1=Write Protected */
  86. #define SHUTTLE_SDHC_POWER TEGRA_GPIO_PI6
  87.  
  88. #define SHUTTLE_TS_IRQ TEGRA_GPIO_PB6
  89. #define SHUTTLE_TS_DISABLE TEGRA_GPIO_PAA6 /* 0=enabled */
  90.  
  91. #define SHUTTLE_FB_NONROTATE TEGRA_GPIO_PH1 /*1 = screen rotation locked */
  92.  
  93. #define SHUTTLE_WLAN_POWER TEGRA_GPIO_PK5
  94. #define SHUTTLE_WLAN_RESET TEGRA_GPIO_PK6
  95.  
  96. #define SHUTTLE_LOW_BATT TEGRA_GPIO_PW3 /*(0=low battery)*/
  97. #define SHUTTLE_IN_S3 TEGRA_GPIO_PAA7 /*1 = in S3 */
  98.  
  99. #define SHUTTLE_USB0_VBUS TEGRA_GPIO_PB0 /* 1= VBUS usb0 */
  100. #define SHUTTLE_USB1_RESET TEGRA_GPIO_PV1 /* 0= reset */
  101.  
  102. #define SHUTTLE_HP_DETECT TEGRA_GPIO_PW2 /* HeadPhone detect for audio codec: 1=Hedphone plugged */
  103.  
  104. #define SHUTTLE_NVEC_REQ TEGRA_GPIO_PD0 /* Set to 0 to send a command to the NVidia Embedded controller */
  105. #define SHUTTLE_NVEC_I2C_ADDR 0x8a /* I2C address of Tegra, when acting as I2C slave */
  106.  
  107. #define SHUTTLE_WAKE_KEY_POWER TEGRA_WAKE_GPIO_PV2
  108. #define SHUTTLE_WAKE_KEY_RESUME TEGRA_WAKE_GPIO_PV6
  109.  
  110. /* The switch used to indicate rotation lock */
  111. #define SW_ROTATION_LOCK (SW_MAX-1)
  112.  
  113. extern void shuttle_3g_gps_poweron(void);
  114. extern void shuttle_3g_gps_poweroff(void);
  115. extern void shuttle_3g_gps_init(void);
  116.  
  117. extern void shuttle_wifi_set_cd(int val);
  118.  
  119. extern void shuttle_init_emc(void);
  120. extern void shuttle_pinmux_init(void);
  121. extern void shuttle_clks_init(void);
  122.  
  123. extern int shuttle_usb_register_devices(void);
  124. extern int shuttle_audio_register_devices(void);
  125. extern int shuttle_gpu_register_devices(void);
  126. extern int shuttle_uart_register_devices(void);
  127. extern int shuttle_spi_register_devices(void);
  128. extern int shuttle_aes_register_devices(void);
  129. extern int shuttle_wdt_register_devices(void);
  130. extern int shuttle_i2c_register_devices(void);
  131. extern int shuttle_power_register_devices(void);
  132. extern int shuttle_keyboard_register_devices(void);
  133. extern int shuttle_touch_register_devices(void);
  134. extern int shuttle_sdhci_register_devices(void);
  135. extern int shuttle_sensors_register_devices(void);
  136. extern int shuttle_wlan_pm_register_devices(void);
  137. extern int shuttle_gps_pm_register_devices(void);
  138. extern int shuttle_gsm_pm_register_devices(void);
  139. extern int shuttle_bt_pm_register_devices(void);
  140. extern int shuttle_nand_register_devices(void);
  141. extern int shuttle_camera_pm_register_devices(void);
  142.  
  143. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement