| 1 | /** @file\r |
| 2 | \r |
| 3 | Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r |
| 4 | \r |
| 5 | This program and the accompanying materials\r |
| 6 | are licensed and made available under the terms and conditions of the BSD License\r |
| 7 | which accompanies this distribution. The full text of the license may be found at\r |
| 8 | http://opensource.org/licenses/bsd-license.php\r |
| 9 | \r |
| 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
| 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
| 12 | \r |
| 13 | **/\r |
| 14 | \r |
| 15 | #ifndef __TPS65950_H__\r |
| 16 | #define __TPS65950_H__\r |
| 17 | \r |
| 18 | #define EXTERNAL_DEVICE_REGISTER_TO_SLAVE_ADDRESS(x) (((x) >> 8) & 0xFF)\r |
| 19 | #define EXTERNAL_DEVICE_REGISTER_TO_REGISTER(x) ((x) & 0xFF)\r |
| 20 | #define EXTERNAL_DEVICE_REGISTER(SlaveAddress, Register) (((SlaveAddress) & 0xFF) << 8 | ((Register) & 0xFF))\r |
| 21 | \r |
| 22 | // I2C Address group\r |
| 23 | #define I2C_ADDR_GRP_ID1 0x48\r |
| 24 | #define I2C_ADDR_GRP_ID2 0x49\r |
| 25 | #define I2C_ADDR_GRP_ID3 0x4A\r |
| 26 | #define I2C_ADDR_GRP_ID4 0x4B\r |
| 27 | #define I2C_ADDR_GRP_ID5 0x12\r |
| 28 | \r |
| 29 | // MMC definitions.\r |
| 30 | #define VMMC1_DEV_GRP 0x82\r |
| 31 | #define DEV_GRP_P1 BIT5\r |
| 32 | \r |
| 33 | #define VMMC1_DEDICATED_REG 0x85\r |
| 34 | #define VSEL_1_85V 0x0\r |
| 35 | #define VSEL_2_85V 0x1\r |
| 36 | #define VSEL_3_00V 0x2\r |
| 37 | #define VSEL_3_15V 0x3\r |
| 38 | \r |
| 39 | #define TPS65950_GPIO_CTRL 0xaa //I2C_ADDR_GRP_ID2\r |
| 40 | #define CARD_DETECT_ENABLE (BIT2 | BIT0) // GPIO ON + GPIO CD1 enabled\r |
| 41 | \r |
| 42 | \r |
| 43 | #define GPIODATAIN1 0x98 //I2C_ADDR_GRP_ID2\r |
| 44 | #define CARD_DETECT_BIT BIT0\r |
| 45 | \r |
| 46 | // LEDEN register\r |
| 47 | #define LEDEN 0xEE\r |
| 48 | #define LEDAON BIT0\r |
| 49 | #define LEDBON BIT1\r |
| 50 | #define LEDAPWM BIT4\r |
| 51 | #define LEDBPWM BIT5\r |
| 52 | \r |
| 53 | // RTC registers\r |
| 54 | #define SECONDS_REG 0x1C\r |
| 55 | #define MINUTES_REG 0x1D\r |
| 56 | #define HOURS_REG 0x1E\r |
| 57 | #define DAYS_REG 0x1F\r |
| 58 | #define MONTHS_REG 0x20\r |
| 59 | #define YEARS_REG 0x21\r |
| 60 | #define WEEKS_REG 0x22\r |
| 61 | #define RTC_CTRL_REG 0x29\r |
| 62 | \r |
| 63 | // USB PHY power\r |
| 64 | #define VAUX2_DEDICATED 0x79\r |
| 65 | #define VAUX2_DEV_GRP 0x76\r |
| 66 | \r |
| 67 | #define VAUX_DEV_GRP_NONE 0x00\r |
| 68 | #define VAUX_DEV_GRP_P1 0x20\r |
| 69 | #define VAUX_DEV_GRP_P2 0x40\r |
| 70 | #define VAUX_DEV_GRP_P3 0x80\r |
| 71 | #define VAUX_DEDICATED_18V 0x05\r |
| 72 | \r |
| 73 | // Display subsystem\r |
| 74 | #define VPLL2_DEDICATED 0x91\r |
| 75 | #define VPLL2_DEV_GRP 0x8E\r |
| 76 | \r |
| 77 | #define GPIODATADIR1 0x9B\r |
| 78 | #define SETGPIODATAOUT1 0xA4\r |
| 79 | \r |
| 80 | #endif //__TPS65950_H__\r |