diff mbox series

thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.

Message ID 20200115184415.1726953-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 Jan. 15, 2020, 6:44 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 id's missing. But I hope somebody at
Intel would have an easier time figuring that out than I...

Signed-off-by: Andres Freund <andres@anarazel.de>
---
 drivers/thermal/intel/intel_pch_thermal.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Daniel Lezcano Jan. 16, 2020, 8:08 a.m. UTC | #1
Rui,

are you fine with this patch?


On 15/01/2020 19:44, 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 id's missing. But I hope somebody at
> Intel would have an easier time figuring that out than I...
> 
> Signed-off-by: Andres Freund <andres@anarazel.de>
> ---
>  drivers/thermal/intel/intel_pch_thermal.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
> index 4f0bb8f502e1..1f3ff0d489ef 100644
> --- a/drivers/thermal/intel/intel_pch_thermal.c
> +++ b/drivers/thermal/intel/intel_pch_thermal.c
> @@ -23,6 +23,7 @@
>  #define PCH_THERMAL_DID_SKL_H	0xA131 /* Skylake PCH 100 series */
>  #define PCH_THERMAL_DID_CNL	0x9Df9 /* CNL PCH */
>  #define PCH_THERMAL_DID_CNL_H	0xA379 /* CNL-H PCH */
> +#define PCH_THERMAL_DID_LWB	0xA1B1 /* Lewisburg PCH */
>  
>  /* Wildcat Point-LP  PCH Thermal registers */
>  #define WPT_TEMP	0x0000	/* Temperature */
> @@ -272,6 +273,7 @@ enum board_ids {
>  	board_wpt,
>  	board_skl,
>  	board_cnl,
> +	board_lwb,
>  };
>  
>  static const struct board_info {
> @@ -294,6 +296,10 @@ static const struct board_info {
>  		.name = "pch_cannonlake",
>  		.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,
> @@ -398,6 +404,8 @@ static const struct pci_device_id intel_pch_thermal_id[] = {
>  		.driver_data = board_cnl, },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL_H),
>  		.driver_data = board_cnl, },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> +		.driver_data = board_lwb, },
>  	{ 0, },
>  };
>  MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
>
Srinivas Pandruvada Jan. 16, 2020, 1:53 p.m. UTC | #2
On Wed, 2020-01-15 at 10:44 -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.
Does the temperature reading match with what you read via IPMI?

The patch looks fine to me otherwise.

Thanks,
Srinivas

> 
> I suspect there's some other PCI id's missing. But I hope somebody at
> Intel would have an easier time figuring that out than I...
> 
> Signed-off-by: Andres Freund <andres@anarazel.de>
> ---
>  drivers/thermal/intel/intel_pch_thermal.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/thermal/intel/intel_pch_thermal.c
> b/drivers/thermal/intel/intel_pch_thermal.c
> index 4f0bb8f502e1..1f3ff0d489ef 100644
> --- a/drivers/thermal/intel/intel_pch_thermal.c
> +++ b/drivers/thermal/intel/intel_pch_thermal.c
> @@ -23,6 +23,7 @@
>  #define PCH_THERMAL_DID_SKL_H	0xA131 /* Skylake PCH 100
> series */
>  #define PCH_THERMAL_DID_CNL	0x9Df9 /* CNL PCH */
>  #define PCH_THERMAL_DID_CNL_H	0xA379 /* CNL-H PCH */
> +#define PCH_THERMAL_DID_LWB	0xA1B1 /* Lewisburg PCH */
>  
>  /* Wildcat Point-LP  PCH Thermal registers */
>  #define WPT_TEMP	0x0000	/* Temperature */
> @@ -272,6 +273,7 @@ enum board_ids {
>  	board_wpt,
>  	board_skl,
>  	board_cnl,
> +	board_lwb,
>  };
>  
>  static const struct board_info {
> @@ -294,6 +296,10 @@ static const struct board_info {
>  		.name = "pch_cannonlake",
>  		.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,
> @@ -398,6 +404,8 @@ static const struct pci_device_id
> intel_pch_thermal_id[] = {
>  		.driver_data = board_cnl, },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL_H),
>  		.driver_data = board_cnl, },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> +		.driver_data = board_lwb, },
>  	{ 0, },
>  };
>  MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
Andres Freund Jan. 16, 2020, 6:42 p.m. UTC | #3
Hi,

On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote:
> On Wed, 2020-01-15 at 10:44 -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.
> Does the temperature reading match with what you read via IPMI?

It does:

root@awork3:~# ipmitool sdr|grep ^PCH
PCH Temp         | 58 degrees C      | ok

andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/type
pch_lewisburg
andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
58000

And if I generate some load, it rises for both:
root@awork3:~# ipmitool sdr|grep ^PCH
PCH Temp         | 60 degrees C      | ok
andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
60000

Regards,

Andres
Srinivas Pandruvada Jan. 16, 2020, 7:41 p.m. UTC | #4
On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote:
> Hi,
> 
> On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote:
> > On Wed, 2020-01-15 at 10:44 -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.
> > Does the temperature reading match with what you read via IPMI?
> 
> It does:
> 
> root@awork3:~# ipmitool sdr|grep ^PCH
> PCH Temp         | 58 degrees C      | ok
> 
> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/type
> pch_lewisburg
> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
> 58000
> 
> And if I generate some load, it rises for both:
> root@awork3:~# ipmitool sdr|grep ^PCH
> PCH Temp         | 60 degrees C      | ok
> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
> 60000
> 
Thanks for the test.

Rui can add his ACK.


Thanks,
Srinivas
Andres Freund Oct. 28, 2020, 8:21 p.m. UTC | #5
Hi,

On 2020-01-16 11:41:34 -0800, Srinivas Pandruvada wrote:
> On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote:
> > Hi,
> > 
> > On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote:
> > > On Wed, 2020-01-15 at 10:44 -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.
> > > Does the temperature reading match with what you read via IPMI?
> > 
> > It does:
> > 
> > root@awork3:~# ipmitool sdr|grep ^PCH
> > PCH Temp         | 58 degrees C      | ok
> > 
> > andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/type
> > pch_lewisburg
> > andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
> > 58000
> > 
> > And if I generate some load, it rises for both:
> > root@awork3:~# ipmitool sdr|grep ^PCH
> > PCH Temp         | 60 degrees C      | ok
> > andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
> > 60000
> > 
> Thanks for the test.
> 
> Rui can add his ACK.

Ping? Looks like this got lost somewhere?

Greetings,

Andres Freund
Daniel Lezcano Nov. 12, 2020, 11:29 a.m. UTC | #6
On 28/10/2020 21:21, Andres Freund wrote:
> Hi,
> 
> On 2020-01-16 11:41:34 -0800, Srinivas Pandruvada wrote:
>> On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote:
>>> Hi,
>>>
>>> On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote:
>>>> On Wed, 2020-01-15 at 10:44 -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.
>>>> Does the temperature reading match with what you read via IPMI?
>>>
>>> It does:
>>>
>>> root@awork3:~# ipmitool sdr|grep ^PCH
>>> PCH Temp         | 58 degrees C      | ok
>>>
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/type
>>> pch_lewisburg
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
>>> 58000
>>>
>>> And if I generate some load, it rises for both:
>>> root@awork3:~# ipmitool sdr|grep ^PCH
>>> PCH Temp         | 60 degrees C      | ok
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
>>> 60000
>>>
>> Thanks for the test.
>>
>> Rui can add his ACK.
> 
> Ping? Looks like this got lost somewhere?

Waiting for Rui's ack :)
Daniel Lezcano Nov. 12, 2020, 11:34 a.m. UTC | #7
On 28/10/2020 21:21, Andres Freund wrote:
> Hi,
> 
> On 2020-01-16 11:41:34 -0800, Srinivas Pandruvada wrote:
>> On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote:
>>> Hi,
>>>
>>> On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote:
>>>> On Wed, 2020-01-15 at 10:44 -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.
>>>> Does the temperature reading match with what you read via IPMI?
>>>
>>> It does:
>>>
>>> root@awork3:~# ipmitool sdr|grep ^PCH
>>> PCH Temp         | 58 degrees C      | ok
>>>
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/type
>>> pch_lewisburg
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
>>> 58000
>>>
>>> And if I generate some load, it rises for both:
>>> root@awork3:~# ipmitool sdr|grep ^PCH
>>> PCH Temp         | 60 degrees C      | ok
>>> andres@awork3:~$ cat /sys/class/thermal/thermal_zone0/temp
>>> 60000
>>>
>> Thanks for the test.
>>
>> Rui can add his ACK.
> 
> Ping? Looks like this got lost somewhere?

It does no longer apply, is it possible to do a respin ?

Thanks

  -- Daniel
Andres Freund Nov. 13, 2020, 8:50 p.m. UTC | #8
Hi,

On 2020-11-12 12:34:08 +0100, Daniel Lezcano wrote:
> It does no longer apply, is it possible to do a respin ?

Yep, sent.

Thanks,

- Andres
diff mbox series

Patch

diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 4f0bb8f502e1..1f3ff0d489ef 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -23,6 +23,7 @@ 
 #define PCH_THERMAL_DID_SKL_H	0xA131 /* Skylake PCH 100 series */
 #define PCH_THERMAL_DID_CNL	0x9Df9 /* CNL PCH */
 #define PCH_THERMAL_DID_CNL_H	0xA379 /* CNL-H PCH */
+#define PCH_THERMAL_DID_LWB	0xA1B1 /* Lewisburg PCH */
 
 /* Wildcat Point-LP  PCH Thermal registers */
 #define WPT_TEMP	0x0000	/* Temperature */
@@ -272,6 +273,7 @@  enum board_ids {
 	board_wpt,
 	board_skl,
 	board_cnl,
+	board_lwb,
 };
 
 static const struct board_info {
@@ -294,6 +296,10 @@  static const struct board_info {
 		.name = "pch_cannonlake",
 		.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,
@@ -398,6 +404,8 @@  static const struct pci_device_id intel_pch_thermal_id[] = {
 		.driver_data = board_cnl, },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL_H),
 		.driver_data = board_cnl, },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
+		.driver_data = board_lwb, },
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);