[2/2] i2c: designware-pci: Add support for Elkhart Lake PSE I2C
diff mbox series

Message ID 20190815142944.18334-2-jarkko.nikula@linux.intel.com
State Accepted
Headers show
Series
  • Untitled series #125392
Related show

Commit Message

Jarkko Nikula Aug. 15, 2019, 2:29 p.m. UTC
Add support for Intel(R) Programmable Services Engine (Intel(R) PSE) I2C
controller in Intel Elkhart Lake when interface is assigned to the host
processor.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Andy Shevchenko Aug. 23, 2019, 12:59 p.m. UTC | #1
On Thu, Aug 15, 2019 at 05:29:44PM +0300, Jarkko Nikula wrote:
> Add support for Intel(R) Programmable Services Engine (Intel(R) PSE) I2C
> controller in Intel Elkhart Lake when interface is assigned to the host
> processor.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-pcidrv.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index 249ee3ee2a09..050adda7c1bd 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -33,6 +33,7 @@ enum dw_pci_ctl_id_t {
>  	baytrail,
>  	cherrytrail,
>  	haswell,
> +	elkhartlake,
>  };
>  
>  struct dw_scl_sda_cfg {
> @@ -168,6 +169,14 @@ static struct dw_pci_controller dw_pci_controllers[] = {
>  		.flags = MODEL_CHERRYTRAIL,
>  		.scl_sda_cfg = &byt_config,
>  	},
> +	[elkhartlake] = {
> +		.bus_num = -1,
> +		.bus_cfg = INTEL_MID_STD_CFG | DW_IC_CON_SPEED_FAST,
> +		.tx_fifo_depth = 32,
> +		.rx_fifo_depth = 32,
> +		.functionality = I2C_FUNC_10BIT_ADDR,
> +		.clk_khz = 100000,
> +	},
>  };
>  
>  #ifdef CONFIG_PM
> @@ -340,6 +349,15 @@ static const struct pci_device_id i2_designware_pci_ids[] = {
>  	{ PCI_VDEVICE(INTEL, 0x22C5), cherrytrail },
>  	{ PCI_VDEVICE(INTEL, 0x22C6), cherrytrail },
>  	{ PCI_VDEVICE(INTEL, 0x22C7), cherrytrail },
> +	/* Elkhart Lake (PSE I2C) */
> +	{ PCI_VDEVICE(INTEL, 0x4bb9), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bba), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bbb), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bbc), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bbd), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bbe), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bbf), elkhartlake },
> +	{ PCI_VDEVICE(INTEL, 0x4bc0), elkhartlake },
>  	{ 0,}
>  };
>  MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids);
> -- 
> 2.23.0.rc1
>
Wolfram Sang Aug. 29, 2019, 8:04 p.m. UTC | #2
On Thu, Aug 15, 2019 at 05:29:44PM +0300, Jarkko Nikula wrote:
> Add support for Intel(R) Programmable Services Engine (Intel(R) PSE) I2C
> controller in Intel Elkhart Lake when interface is assigned to the host
> processor.
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!

Patch
diff mbox series

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 249ee3ee2a09..050adda7c1bd 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -33,6 +33,7 @@  enum dw_pci_ctl_id_t {
 	baytrail,
 	cherrytrail,
 	haswell,
+	elkhartlake,
 };
 
 struct dw_scl_sda_cfg {
@@ -168,6 +169,14 @@  static struct dw_pci_controller dw_pci_controllers[] = {
 		.flags = MODEL_CHERRYTRAIL,
 		.scl_sda_cfg = &byt_config,
 	},
+	[elkhartlake] = {
+		.bus_num = -1,
+		.bus_cfg = INTEL_MID_STD_CFG | DW_IC_CON_SPEED_FAST,
+		.tx_fifo_depth = 32,
+		.rx_fifo_depth = 32,
+		.functionality = I2C_FUNC_10BIT_ADDR,
+		.clk_khz = 100000,
+	},
 };
 
 #ifdef CONFIG_PM
@@ -340,6 +349,15 @@  static const struct pci_device_id i2_designware_pci_ids[] = {
 	{ PCI_VDEVICE(INTEL, 0x22C5), cherrytrail },
 	{ PCI_VDEVICE(INTEL, 0x22C6), cherrytrail },
 	{ PCI_VDEVICE(INTEL, 0x22C7), cherrytrail },
+	/* Elkhart Lake (PSE I2C) */
+	{ PCI_VDEVICE(INTEL, 0x4bb9), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bba), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bbb), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bbc), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bbd), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bbe), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bbf), elkhartlake },
+	{ PCI_VDEVICE(INTEL, 0x4bc0), elkhartlake },
 	{ 0,}
 };
 MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids);