Commit 514d1b91 authored by Mika Westerberg's avatar Mika Westerberg Committed by Tim Gardner

mfd: intel-lpss: Pass I2C configuration via properties on BXT

BugLink: http://bugs.launchpad.net/bugs/1520139

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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
(cherry picked from commit 0343b2f4)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 4cee9f36
...@@ -44,8 +44,20 @@ static const struct intel_lpss_platform_info bxt_info = { ...@@ -44,8 +44,20 @@ static const struct intel_lpss_platform_info bxt_info = {
.clk_rate = 100000000, .clk_rate = 100000000,
}; };
static struct property_entry bxt_i2c_properties[] = {
PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
{ },
};
static struct property_set bxt_i2c_pset = {
.properties = bxt_i2c_properties,
};
static const struct intel_lpss_platform_info bxt_i2c_info = { static const struct intel_lpss_platform_info bxt_i2c_info = {
.clk_rate = 133000000, .clk_rate = 133000000,
.pset = &bxt_i2c_pset,
}; };
static const struct acpi_device_id intel_lpss_acpi_ids[] = { static const struct acpi_device_id intel_lpss_acpi_ids[] = {
......
...@@ -107,8 +107,20 @@ static const struct intel_lpss_platform_info bxt_uart_info = { ...@@ -107,8 +107,20 @@ static const struct intel_lpss_platform_info bxt_uart_info = {
.pset = &uart_pset, .pset = &uart_pset,
}; };
static struct property_entry bxt_i2c_properties[] = {
PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
{ },
};
static struct property_set bxt_i2c_pset = {
.properties = bxt_i2c_properties,
};
static const struct intel_lpss_platform_info bxt_i2c_info = { static const struct intel_lpss_platform_info bxt_i2c_info = {
.clk_rate = 133000000, .clk_rate = 133000000,
.pset = &bxt_i2c_pset,
}; };
static const struct pci_device_id intel_lpss_pci_ids[] = { static const struct pci_device_id intel_lpss_pci_ids[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment