Skip to content

Commit 5a2d27c

Browse files
andy-shevLee Jones
authored andcommitted
mfd: intel-lpss: Provide an SSP type to the driver
The SPI driver wants to know the exact type of the controller. Provide this information to it, hence it allows to fix the Intel Cannon Lake and others in the future. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220301205056.79810-1-andriy.shevchenko@linux.intel.com
1 parent e7391b0 commit 5a2d27c

1 file changed

Lines changed: 38 additions & 3 deletions

File tree

drivers/mfd/intel-lpss-acpi.c

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,22 @@
1515
#include <linux/pm_runtime.h>
1616
#include <linux/platform_device.h>
1717
#include <linux/property.h>
18+
#include <linux/pxa2xx_ssp.h>
1819

1920
#include "intel-lpss.h"
2021

22+
static const struct property_entry spt_spi_properties[] = {
23+
PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_SPT_SSP),
24+
{ }
25+
};
26+
27+
static const struct software_node spt_spi_node = {
28+
.properties = spt_spi_properties,
29+
};
30+
2131
static const struct intel_lpss_platform_info spt_info = {
2232
.clk_rate = 120000000,
33+
.swnode = &spt_spi_node,
2334
};
2435

2536
static const struct property_entry spt_i2c_properties[] = {
@@ -53,8 +64,18 @@ static const struct intel_lpss_platform_info spt_uart_info = {
5364
.swnode = &uart_node,
5465
};
5566

67+
static const struct property_entry bxt_spi_properties[] = {
68+
PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_BXT_SSP),
69+
{ }
70+
};
71+
72+
static const struct software_node bxt_spi_node = {
73+
.properties = bxt_spi_properties,
74+
};
75+
5676
static const struct intel_lpss_platform_info bxt_info = {
5777
.clk_rate = 100000000,
78+
.swnode = &bxt_spi_node,
5879
};
5980

6081
static const struct property_entry bxt_i2c_properties[] = {
@@ -89,6 +110,20 @@ static const struct intel_lpss_platform_info apl_i2c_info = {
89110
.swnode = &apl_i2c_node,
90111
};
91112

113+
static const struct property_entry cnl_spi_properties[] = {
114+
PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_CNL_SSP),
115+
{ }
116+
};
117+
118+
static const struct software_node cnl_spi_node = {
119+
.properties = cnl_spi_properties,
120+
};
121+
122+
static const struct intel_lpss_platform_info cnl_info = {
123+
.clk_rate = 120000000,
124+
.swnode = &cnl_spi_node,
125+
};
126+
92127
static const struct intel_lpss_platform_info cnl_i2c_info = {
93128
.clk_rate = 216000000,
94129
.swnode = &spt_i2c_node,
@@ -108,8 +143,8 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
108143
{ "INT3449", (kernel_ulong_t)&spt_uart_info },
109144
{ "INT344A", (kernel_ulong_t)&spt_uart_info },
110145
/* CNL */
111-
{ "INT34B0", (kernel_ulong_t)&spt_info },
112-
{ "INT34B1", (kernel_ulong_t)&spt_info },
146+
{ "INT34B0", (kernel_ulong_t)&cnl_info },
147+
{ "INT34B1", (kernel_ulong_t)&cnl_info },
113148
{ "INT34B2", (kernel_ulong_t)&cnl_i2c_info },
114149
{ "INT34B3", (kernel_ulong_t)&cnl_i2c_info },
115150
{ "INT34B4", (kernel_ulong_t)&cnl_i2c_info },
@@ -119,7 +154,7 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
119154
{ "INT34B8", (kernel_ulong_t)&spt_uart_info },
120155
{ "INT34B9", (kernel_ulong_t)&spt_uart_info },
121156
{ "INT34BA", (kernel_ulong_t)&spt_uart_info },
122-
{ "INT34BC", (kernel_ulong_t)&spt_info },
157+
{ "INT34BC", (kernel_ulong_t)&cnl_info },
123158
/* BXT */
124159
{ "80860AAC", (kernel_ulong_t)&bxt_i2c_info },
125160
{ "80860ABC", (kernel_ulong_t)&bxt_info },

0 commit comments

Comments
 (0)