068e4f9e939727fea3fca341563594bcd88b5020
[profile/mobile/platform/kernel/u-boot-tm1.git] / drivers / i2c / sc9630_i2c_cfg .c
1 /******************************************************************************
2  ** File Name:      sc8810_i2c_cfg.c                                                *
3  ** Author:         liuhao                                                   *
4  ** DATE:           06/28/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the hal layer of I2C device.      *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 06/28/2010     liuhao     Create.                                   *
14  ******************************************************************************/
15
16 /**---------------------------------------------------------------------------*
17  **                         Dependencies                                      *
18  **---------------------------------------------------------------------------*/
19 //#include "v0/i2c_reg_v0.h"
20 #include "sc9630_i2c_cfg.h"
21 #include "asm/arch/sci_types.h"
22
23 /**---------------------------------------------------------------------------*
24  **                         Compiler Flag                                     *
25  **---------------------------------------------------------------------------*/
26 #ifdef   __cplusplus
27 extern   "C"
28 {
29 #endif
30
31 /**---------------------------------------------------------------------------*
32  **                            Macro Define
33  **---------------------------------------------------------------------------*/
34
35 /**---------------------------------------------------------------------------*
36  **                            Local Variables
37  **---------------------------------------------------------------------------*/
38
39 /**---------------------------------------------------------------------------*
40  **                            Global Variables
41  **---------------------------------------------------------------------------*/
42 extern I2C_PHY_FUN phy_fun_v0;
43 //extern I2C_PHY_FUN phy_fun_v1;
44
45 const I2C_PHY_CFG __i2c_phy_cfg[I2C_ID_MAX] =
46 {
47     /*Note: Only port 1 is pulled up internal, other port should be pulled up external*/
48     /*logic id, controller id, port id, method*/
49     {0, 0, 1, &phy_fun_v0}, /*hw i2c controller0*/
50     {1, 1, 1, &phy_fun_v0}, /*hw i2c controller1*/
51     {2, 2, 1, &phy_fun_v0}, /*hw i2c controller2*/
52     {3, 3, 1, &phy_fun_v0}, /*hw i2c controller3*/
53     {4, 4, 1, &phy_fun_v0}, /*hw i2c controller4*/
54     {5, 5, 1, &phy_fun_v0}, /*hw i2c controller5*/
55     //{4, 1, 1, &phy_fun_v1} /*sw simulation i2c controller1, port 1*/
56 };
57
58 const I2C_BASE_INFO __i2c_base_info[I2C_BUS_MAX] =
59 {
60     /*hw controller id, base address*/
61     {0, 0x70500000},/*hw i2c controller0, register base*/
62     {1, 0x70600000},/*hw i2c controller1, register base*/
63     {2, 0x70700000},/*hw i2c controller2, register base*/
64     {3, 0x70800000},/*hw i2c controller3, register base*/
65     {4, 0x70900000},/*hw i2c controller4, register base*/
66     {5, 0x40080000},/*hw i2c controller5, register base*/
67
68         //{1, 0} /*sw i2c controller1, no register base*/
69 };
70
71 //const I2C_GPIO_INFO __i2c_gpio_info[I2C_BUS_MAX] =
72 //{
73     /*sw controller id, sda pin, scl pin*/
74     //{0, 0, 0},/*hw i2c controller1, no gpio pin*/
75     //{1, 1, 2} /*sw simulation i2c controller1, gpio pin, should be update*/
76 //};
77
78 /**---------------------------------------------------------------------------*
79  **                      Function  Definitions
80  **---------------------------------------------------------------------------*/
81
82
83 /**---------------------------------------------------------------------------*
84  **                         Compiler Flag                                     *
85  **---------------------------------------------------------------------------*/
86 #ifdef   __cplusplus
87 }
88 #endif
89
90 /*  End Of File */