diff mbox series

thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.

Message ID 20201113204916.1144907-1-andres@anarazel.de (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show
Series thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH. | expand

Commit Message

Andres Freund Nov. 13, 2020, 8:49 p.m. UTC
I noticed that I couldn't read the PCH temperature on my workstation
(C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to go
through IPMI. Looking at the data sheet, it looks to me like the
existing intel PCH thermal driver should work without changes for
Lewisburg.

I suspect there's some other PCI IDs missing. But I hope somebody at
Intel would have an easier time figuring that out than I...

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Tushar Dave <tushar.n.dave@intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/
Signed-off-by: Andres Freund <andres@anarazel.de>
---
 drivers/thermal/intel/intel_pch_thermal.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Pandruvada, Srinivas Nov. 14, 2020, 6:41 p.m. UTC | #1
On Fri, 2020-11-13 at 12:49 -0800, Andres Freund wrote:
> I noticed that I couldn't read the PCH temperature on my workstation
> (C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to
> go
> through IPMI. Looking at the data sheet, it looks to me like the
> existing intel PCH thermal driver should work without changes for
> Lewisburg.
> 
> I suspect there's some other PCI IDs missing. But I hope somebody at
> Intel would have an easier time figuring that out than I...
> 
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Tushar Dave <tushar.n.dave@intel.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Link: 
> https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/
> Signed-off-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/thermal/intel/intel_pch_thermal.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/intel/intel_pch_thermal.c
> b/drivers/thermal/intel/intel_pch_thermal.c
> index 3b813ebb6ca1..7785e05f46f0 100644
> --- a/drivers/thermal/intel/intel_pch_thermal.c
> +++ b/drivers/thermal/intel/intel_pch_thermal.c
> @@ -26,6 +26,7 @@
>  #define PCH_THERMAL_DID_CNL_H	0xA379 /* CNL-H PCH */
>  #define PCH_THERMAL_DID_CNL_LP	0x02F9 /* CNL-LP PCH */
>  #define PCH_THERMAL_DID_CML_H	0X06F9 /* CML-H PCH */
> +#define PCH_THERMAL_DID_LWB	0xA1B1 /* Lewisburg PCH */
>  
>  /* Wildcat Point-LP  PCH Thermal registers */
>  #define WPT_TEMP	0x0000	/* Temperature */
> @@ -276,6 +277,7 @@ enum board_ids {
>  	board_skl,
>  	board_cnl,
>  	board_cml,
> +	board_lwb,
>  };
>  
>  static const struct board_info {
> @@ -301,7 +303,11 @@ static const struct board_info {
>  	[board_cml] = {
>  		.name = "pch_cometlake",
>  		.ops = &pch_dev_ops_wpt,
> -	}
> +	},
> +	[board_lwb] = {
> +		.name = "pch_lewisburg",
> +		.ops = &pch_dev_ops_wpt,
> +	},
>  };
>  
>  static int intel_pch_thermal_probe(struct pci_dev *pdev,
> @@ -415,6 +421,8 @@ static const struct pci_device_id
> intel_pch_thermal_id[] = {
>  		.driver_data = board_cnl, },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CML_H),
>  		.driver_data = board_cml, },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> +		.driver_data = board_lwb, },
>  	{ 0, },
>  };
>  MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
Daniel Lezcano Nov. 16, 2020, 9:28 a.m. UTC | #2
On 13/11/2020 21:49, Andres Freund wrote:
> I noticed that I couldn't read the PCH temperature on my workstation
> (C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to go
> through IPMI. Looking at the data sheet, it looks to me like the
> existing intel PCH thermal driver should work without changes for
> Lewisburg.
> 
> I suspect there's some other PCI IDs missing. But I hope somebody at
> Intel would have an easier time figuring that out than I...
> 
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Tushar Dave <tushar.n.dave@intel.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Link: https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/
> Signed-off-by: Andres Freund <andres@anarazel.de>
> ---

Applied, thanks
Andres Freund Nov. 21, 2020, 12:46 a.m. UTC | #3
Hi,

On 2020-11-16 10:28:04 +0100, Daniel Lezcano wrote:
> On 13/11/2020 21:49, Andres Freund wrote:
> > I noticed that I couldn't read the PCH temperature on my workstation
> > (C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to go
> > through IPMI. Looking at the data sheet, it looks to me like the
> > existing intel PCH thermal driver should work without changes for
> > Lewisburg.
> > 
> > I suspect there's some other PCI IDs missing. But I hope somebody at
> > Intel would have an easier time figuring that out than I...
> > 
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > Cc: Tushar Dave <tushar.n.dave@intel.com>
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Link: https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/
> > Signed-off-by: Andres Freund <andres@anarazel.de>
> > ---
> 
> Applied, thanks

Thanks for review and applying.

Greetings,

Andres Freund
diff mbox series

Patch

diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 3b813ebb6ca1..7785e05f46f0 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -26,6 +26,7 @@ 
 #define PCH_THERMAL_DID_CNL_H	0xA379 /* CNL-H PCH */
 #define PCH_THERMAL_DID_CNL_LP	0x02F9 /* CNL-LP PCH */
 #define PCH_THERMAL_DID_CML_H	0X06F9 /* CML-H PCH */
+#define PCH_THERMAL_DID_LWB	0xA1B1 /* Lewisburg PCH */
 
 /* Wildcat Point-LP  PCH Thermal registers */
 #define WPT_TEMP	0x0000	/* Temperature */
@@ -276,6 +277,7 @@  enum board_ids {
 	board_skl,
 	board_cnl,
 	board_cml,
+	board_lwb,
 };
 
 static const struct board_info {
@@ -301,7 +303,11 @@  static const struct board_info {
 	[board_cml] = {
 		.name = "pch_cometlake",
 		.ops = &pch_dev_ops_wpt,
-	}
+	},
+	[board_lwb] = {
+		.name = "pch_lewisburg",
+		.ops = &pch_dev_ops_wpt,
+	},
 };
 
 static int intel_pch_thermal_probe(struct pci_dev *pdev,
@@ -415,6 +421,8 @@  static const struct pci_device_id intel_pch_thermal_id[] = {
 		.driver_data = board_cnl, },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CML_H),
 		.driver_data = board_cml, },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
+		.driver_data = board_lwb, },
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);