1 /******************************************************************************
2 ** File Name: sc8810_i2c_cfg.c *
5 ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. *
6 ** Description: This file define the hal layer of I2C device. *
7 ******************************************************************************
9 ******************************************************************************
11 ** ------------------------------------------------------------------------- *
12 ** DATE NAME DESCRIPTION *
13 ** 06/28/2010 liuhao Create. *
14 ******************************************************************************/
16 /**---------------------------------------------------------------------------*
18 **---------------------------------------------------------------------------*/
19 //#include "v0/i2c_reg_v0.h"
20 #include "sc8830_i2c_cfg.h"
21 #include "asm/arch/sci_types.h"
23 /**---------------------------------------------------------------------------*
25 **---------------------------------------------------------------------------*/
31 /**---------------------------------------------------------------------------*
33 **---------------------------------------------------------------------------*/
35 /**---------------------------------------------------------------------------*
37 **---------------------------------------------------------------------------*/
39 /**---------------------------------------------------------------------------*
41 **---------------------------------------------------------------------------*/
42 extern I2C_PHY_FUN phy_fun_v0;
43 //extern I2C_PHY_FUN phy_fun_v1;
45 const I2C_PHY_CFG __i2c_phy_cfg[I2C_ID_MAX] =
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*/
58 const I2C_BASE_INFO __i2c_base_info[I2C_BUS_MAX] =
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*/
68 //{1, 0} /*sw i2c controller1, no register base*/
71 //const I2C_GPIO_INFO __i2c_gpio_info[I2C_BUS_MAX] =
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*/
78 /**---------------------------------------------------------------------------*
79 ** Function Definitions
80 **---------------------------------------------------------------------------*/
83 /**---------------------------------------------------------------------------*
85 **---------------------------------------------------------------------------*/