i2c: qmsi_shim: change some i2c config parameters to SoC specific

Change the signal ramp up/down config parameters in i2c driver
module to SoC specific.

Jira: ZEP-753

Change-Id: Ie01f1d890a7133d30ea53eee07f60354734a8571
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
This commit is contained in:
Baohong Liu 2016-08-31 16:12:41 -07:00 committed by Anas Nashif
commit 20d85fefe9
5 changed files with 26 additions and 14 deletions

View file

@ -133,6 +133,11 @@ config I2C_1_IRQ_PRI
endif # I2C_1 endif # I2C_1
config I2C_SDA_SETUP
default 2
config I2C_SS_SDA_HOLD
default 10
endif # I2C endif # I2C

View file

@ -131,6 +131,16 @@ config I2C_0_IRQ_PRI
config I2C_0_DEFAULT_CFG config I2C_0_DEFAULT_CFG
default 0x12 default 0x12
endif # I2C_QMSI endif # I2C_QMSI
config I2C_SDA_SETUP
default 2
config I2C_SDA_TX_HOLD
default 16
config I2C_SDA_RX_HOLD
default 24
endif # I2C endif # I2C

View file

@ -99,6 +99,15 @@ config I2C_1_DEFAULT_CFG
endif # I2C_1 endif # I2C_1
config I2C_SDA_SETUP
default 2
config I2C_SDA_TX_HOLD
default 16
config I2C_SDA_RX_HOLD
default 24
endif # I2C endif # I2C

View file

@ -201,26 +201,16 @@ config I2C_1_IRQ_PRI
help help
IRQ priority. IRQ priority.
config I2C_SS_SDA_SETUP
int
depends on I2C_QMSI_SS
default 2
help
The delay time of clock rising edge relative to i2c data signal change.
The unit is i2c module base clock.
config I2C_SS_SDA_HOLD config I2C_SS_SDA_HOLD
int int
depends on I2C_QMSI_SS depends on I2C_QMSI_SS
default 10
help help
The hold time on the data signal after a negative edge of i2c clock. The hold time on the data signal after a negative edge of i2c clock.
The unit is i2c module base clock. The unit is i2c module base clock.
config I2C_SDA_SETUP config I2C_SDA_SETUP
int int
depends on I2C_QMSI depends on I2C_QMSI || I2C_QMSI_SS
default 2
help help
The delay time of clock rising edge relative to i2c data signal change. The delay time of clock rising edge relative to i2c data signal change.
The unit is i2c module base clock. The unit is i2c module base clock.
@ -228,7 +218,6 @@ config I2C_SDA_SETUP
config I2C_SDA_TX_HOLD config I2C_SDA_TX_HOLD
int int
depends on I2C_QMSI depends on I2C_QMSI
default 16
help help
The hold time on the data signal after a negative edge of i2c clock The hold time on the data signal after a negative edge of i2c clock
while i2c acts as transmitter. while i2c acts as transmitter.
@ -237,7 +226,6 @@ config I2C_SDA_TX_HOLD
config I2C_SDA_RX_HOLD config I2C_SDA_RX_HOLD
int int
depends on I2C_QMSI depends on I2C_QMSI
default 24
help help
The hold time on the data signal after a negative edge of i2c clock The hold time on the data signal after a negative edge of i2c clock
while i2c acts as receiver. while i2c acts as receiver.

View file

@ -207,7 +207,7 @@ static int i2c_qmsi_ss_configure(struct device *dev, uint32_t config)
i2c_base = QM_SS_I2C_1_BASE; i2c_base = QM_SS_I2C_1_BASE;
} }
__builtin_arc_sr(((CONFIG_I2C_SS_SDA_SETUP << 16) + __builtin_arc_sr(((CONFIG_I2C_SDA_SETUP << 16) +
CONFIG_I2C_SS_SDA_HOLD), CONFIG_I2C_SS_SDA_HOLD),
(i2c_base + QM_SS_I2C_SDA_CONFIG)); (i2c_base + QM_SS_I2C_SDA_CONFIG));