tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8810 / sc8810_i2c_cfg.h
1 /******************************************************************************
2  ** File Name:      sc8810_i2c_cfg.h                                                 *
3  ** Author:         liuhao                                                   *
4  ** DATE:           06/28/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the basic hw interfaces of I2C device.      *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 06/28/2010     liuhao     Create.                                   *
14  ******************************************************************************/
15
16 #ifndef _SC8810_I2C_CFG_H_
17 #define _SC8810_I2C_CFG_H_
18 /*----------------------------------------------------------------------------*
19  **                         Dependencies                                      *
20  **------------------------------------------------------------------------- */
21 #include "i2c_phy.h"
22
23 /**---------------------------------------------------------------------------*
24  **                             Compiler Flag                                 *
25  **--------------------------------------------------------------------------*/
26 #ifdef   __cplusplus
27 extern   "C"
28 {
29 #endif
30
31 /**---------------------------------------------------------------------------*
32  **                         Debugging Flag                                    *
33  **---------------------------------------------------------------------------*/
34 //#define DEBUG_IIC
35 #ifdef DEBUG_IIC
36 #define IIC_PRINT   SCI_TRACE_LOW
37 #else
38 #define IIC_PRINT
39 #endif
40
41 /**---------------------------------------------------------------------------*
42 **                               Micro Define                                **
43 **---------------------------------------------------------------------------*/
44 #ifndef I2C_DEV_MAX
45 #define I2C_DEV_MAX 8
46 #endif
47 #define I2C_BUS_MAX 2
48 #define I2C_ID_MAX 3
49
50 typedef struct
51 {
52     uint32 phy_id;
53     uint32 base_addr;
54 } I2C_BASE_INFO;
55
56 typedef struct
57 {
58     uint32 phy_id;
59     uint32 sda_pin;
60     uint32 scl_pin;
61 } I2C_GPIO_INFO;
62
63 typedef struct
64 {
65     uint32 logic_id;
66     uint32 phy_id;
67     uint32 port_id;
68     I2C_PHY_FUN *phy_fun;
69 } I2C_PHY_CFG;
70 /**----------------------------------------------------------------------------*
71 **                         Local Function Prototype                           **
72 **----------------------------------------------------------------------------*/
73
74
75 /**----------------------------------------------------------------------------*
76 **                           Function Prototype                               **
77 **----------------------------------------------------------------------------*/
78
79 /**----------------------------------------------------------------------------*
80 **                         Compiler Flag                                      **
81 **----------------------------------------------------------------------------*/
82 #ifdef   __cplusplus
83 }
84 #endif
85 /**---------------------------------------------------------------------------*/
86 #endif
87 // End