Skip to content

Commit 0343b2f

Browse files
westeriLee Jones
authored andcommitted
mfd: intel-lpss: Pass I2C configuration via properties on BXT
I2C host controller need to be configured properly in order to meet I2C timings specified in the I2C protocol specification. Some Intel Broxton based machines do not have this information in the ACPI namespace (or the boot firmware does not support ACPI at all) so we use build-in device properties instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 2609e4d commit 0343b2f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

drivers/mfd/intel-lpss-acpi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,20 @@ static const struct intel_lpss_platform_info bxt_info = {
4444
.clk_rate = 100000000,
4545
};
4646

47+
static struct property_entry bxt_i2c_properties[] = {
48+
PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
49+
PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
50+
PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
51+
{ },
52+
};
53+
54+
static struct property_set bxt_i2c_pset = {
55+
.properties = bxt_i2c_properties,
56+
};
57+
4758
static const struct intel_lpss_platform_info bxt_i2c_info = {
4859
.clk_rate = 133000000,
60+
.pset = &bxt_i2c_pset,
4961
};
5062

5163
static const struct acpi_device_id intel_lpss_acpi_ids[] = {

drivers/mfd/intel-lpss-pci.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,20 @@ static const struct intel_lpss_platform_info bxt_uart_info = {
107107
.pset = &uart_pset,
108108
};
109109

110+
static struct property_entry bxt_i2c_properties[] = {
111+
PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
112+
PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
113+
PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
114+
{ },
115+
};
116+
117+
static struct property_set bxt_i2c_pset = {
118+
.properties = bxt_i2c_properties,
119+
};
120+
110121
static const struct intel_lpss_platform_info bxt_i2c_info = {
111122
.clk_rate = 133000000,
123+
.pset = &bxt_i2c_pset,
112124
};
113125

114126
static const struct pci_device_id intel_lpss_pci_ids[] = {

0 commit comments

Comments
 (0)