i2c: Enable QMSI driver for Quark D2000

This patch fixes the QMSI I2C shim driver so we are able to use it in
Quark D2000 based platforms. The only change required to enable this
driver is an #if guard in i2c_qmsi_init() because the macro QM_I2C_1
is not defined in QMSI headers from Quark D2000.

Since this drivers is now properly tested with Quark D2000, this patch
sets the QMSI driver default options in arch/x86/soc/quark_d2000/Kconfig.
It also adds the wiring information required to test the i2c_lsm9ds0
sample app in the Quark D2000 CRB.

Change-Id: I4be03c09304da5a66ac663e48b1d72225eb5651d
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
Andre Guedes 2016-02-17 12:55:35 -02:00 committed by Anas Nashif
parent fa1e56520b
commit ec7c6a80fc
3 changed files with 23 additions and 11 deletions

View file

@ -207,6 +207,14 @@ config I2C_CLOCK_SPEED
endif
if I2C_QMSI
config I2C_QMSI_0
def_bool y
config I2C_QMSI_0_IRQ
default 4
config I2C_QMSI_0_INT_PRIORITY
default 0
endif # I2C_QMSI
endif # I2C
endif # SOC_QUARK_D2000

View file

@ -218,6 +218,8 @@ static int i2c_qmsi_init(struct device *dev)
clk_periph_enable(CLK_PERIPH_I2C_M0_REGISTER);
break;
#ifdef CONFIG_I2C_QMSI_1
case QM_I2C_1:
IRQ_CONNECT(CONFIG_I2C_QMSI_1_IRQ,
CONFIG_I2C_QMSI_1_INT_PRIORITY, qm_i2c_1_isr, NULL,
@ -227,6 +229,8 @@ static int i2c_qmsi_init(struct device *dev)
clk_periph_enable(CLK_PERIPH_I2C_M1_REGISTER);
break;
#endif /* CONFIG_I2C_QMSI_1 */
default:
return DEV_FAIL;
}

View file

@ -13,14 +13,14 @@ the datasheet.
Below follows the wiring information for each board this samples has been
tested.
--------------+--------------------
| LSM9DS0 pin | Quark SE Devboard |
| | pin |
|-------------+-------------------|
| VIN | P4 pin 1 |
| GND | P4 pin 43 |
| SCL | P4 pin 31 |
| SDA | P4 pin 33 |
| CSG | P4 pin 29 |
| SDOG | P4 pin 17 |
--------------+--------------------
--------------+-------------------+------------------
| LSM9DS0 pin | Quark SE Devboard | Quark D2000 CRB |
| | pin | pin |
|-------------+-------------------+-----------------|
| VIN | P4 pin 1 | J25 pin 1 |
| GND | P4 pin 43 | J25 pin 2 |
| SCL | P4 pin 31 | J21 pin 6 |
| SDA | P4 pin 33 | J21 pin 5 |
| CSG | P4 pin 29 | J25 pin 1 |
| SDOG | P4 pin 17 | J25 pin 2 |
--------------+-------------------+------------------