2023-01-07 20:05:04

by Tim Zimmermann

[permalink] [raw]
Subject: [PATCH] thermal: intel: pch: Add support for Wellsburg PCH

This adds the PCI ID for the Wellsburg C610 series chipset PCH. The
driver can read the temperature from the Wellsburg PCH with only the PCI
ID added and no other modifications.

Signed-off-by: Tim Zimmermann <[email protected]>
---
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 dabf11a687a1..9e27f430e034 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -29,6 +29,7 @@
#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 */
+#define PCH_THERMAL_DID_WBG 0x8D24 /* Wellsburg PCH */

/* Wildcat Point-LP PCH Thermal registers */
#define WPT_TEMP 0x0000 /* Temperature */
@@ -350,6 +351,7 @@ enum board_ids {
board_cnl,
board_cml,
board_lwb,
+ board_wbg,
};

static const struct board_info {
@@ -380,6 +382,10 @@ static const struct board_info {
.name = "pch_lewisburg",
.ops = &pch_dev_ops_wpt,
},
+ [board_wbg] = {
+ .name = "pch_wellsburg",
+ .ops = &pch_dev_ops_wpt,
+ },
};

static int intel_pch_thermal_probe(struct pci_dev *pdev,
@@ -495,6 +501,8 @@ static const struct pci_device_id intel_pch_thermal_id[] = {
.driver_data = board_cml, },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
.driver_data = board_lwb, },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WBG),
+ .driver_data = board_wbg, },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
--
2.39.0


2023-01-20 17:49:21

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] thermal: intel: pch: Add support for Wellsburg PCH

On Sat, Jan 7, 2023 at 8:42 PM Tim Zimmermann <[email protected]> wrote:
>
> This adds the PCI ID for the Wellsburg C610 series chipset PCH. The
> driver can read the temperature from the Wellsburg PCH with only the PCI
> ID added and no other modifications.
>
> Signed-off-by: Tim Zimmermann <[email protected]>

Rui, Srinivas, any objections to this one?

> ---
> 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 dabf11a687a1..9e27f430e034 100644
> --- a/drivers/thermal/intel/intel_pch_thermal.c
> +++ b/drivers/thermal/intel/intel_pch_thermal.c
> @@ -29,6 +29,7 @@
> #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 */
> +#define PCH_THERMAL_DID_WBG 0x8D24 /* Wellsburg PCH */
>
> /* Wildcat Point-LP PCH Thermal registers */
> #define WPT_TEMP 0x0000 /* Temperature */
> @@ -350,6 +351,7 @@ enum board_ids {
> board_cnl,
> board_cml,
> board_lwb,
> + board_wbg,
> };
>
> static const struct board_info {
> @@ -380,6 +382,10 @@ static const struct board_info {
> .name = "pch_lewisburg",
> .ops = &pch_dev_ops_wpt,
> },
> + [board_wbg] = {
> + .name = "pch_wellsburg",
> + .ops = &pch_dev_ops_wpt,
> + },
> };
>
> static int intel_pch_thermal_probe(struct pci_dev *pdev,
> @@ -495,6 +501,8 @@ static const struct pci_device_id intel_pch_thermal_id[] = {
> .driver_data = board_cml, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> .driver_data = board_lwb, },
> + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WBG),
> + .driver_data = board_wbg, },
> { 0, },
> };
> MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
> --
> 2.39.0
>

2023-01-20 19:17:49

by srinivas pandruvada

[permalink] [raw]
Subject: Re: [PATCH] thermal: intel: pch: Add support for Wellsburg PCH

On Fri, 2023-01-20 at 17:40 +0100, Rafael J. Wysocki wrote:
> On Sat, Jan 7, 2023 at 8:42 PM Tim Zimmermann <[email protected]> wrote:
> >
> > This adds the PCI ID for the Wellsburg C610 series chipset PCH. The
> > driver can read the temperature from the Wellsburg PCH with only
> > the PCI
> > ID added and no other modifications.
> >
> > Signed-off-by: Tim Zimmermann <[email protected]>
>
> Rui, Srinivas, any objections to this one?
No objection.

Thanks,
Srinivas

>
> > ---
> >  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 dabf11a687a1..9e27f430e034 100644
> > --- a/drivers/thermal/intel/intel_pch_thermal.c
> > +++ b/drivers/thermal/intel/intel_pch_thermal.c
> > @@ -29,6 +29,7 @@
> >  #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 */
> > +#define PCH_THERMAL_DID_WBG    0x8D24 /* Wellsburg PCH */
> >
> >  /* Wildcat Point-LP  PCH Thermal registers */
> >  #define WPT_TEMP       0x0000  /* Temperature */
> > @@ -350,6 +351,7 @@ enum board_ids {
> >         board_cnl,
> >         board_cml,
> >         board_lwb,
> > +       board_wbg,
> >  };
> >
> >  static const struct board_info {
> > @@ -380,6 +382,10 @@ static const struct board_info {
> >                 .name = "pch_lewisburg",
> >                 .ops = &pch_dev_ops_wpt,
> >         },
> > +       [board_wbg] = {
> > +               .name = "pch_wellsburg",
> > +               .ops = &pch_dev_ops_wpt,
> > +       },
> >  };
> >
> >  static int intel_pch_thermal_probe(struct pci_dev *pdev,
> > @@ -495,6 +501,8 @@ static const struct pci_device_id
> > intel_pch_thermal_id[] = {
> >                 .driver_data = board_cml, },
> >         { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> >                 .driver_data = board_lwb, },
> > +       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WBG),
> > +               .driver_data = board_wbg, },
> >         { 0, },
> >  };
> >  MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
> > --
> > 2.39.0
> >

2023-01-21 06:23:04

by Zhang, Rui

[permalink] [raw]
Subject: Re: [PATCH] thermal: intel: pch: Add support for Wellsburg PCH

On Fri, 2023-01-20 at 09:50 -0800, srinivas pandruvada wrote:
> On Fri, 2023-01-20 at 17:40 +0100, Rafael J. Wysocki wrote:
> > On Sat, Jan 7, 2023 at 8:42 PM Tim Zimmermann <[email protected]>
> > wrote:
> > > This adds the PCI ID for the Wellsburg C610 series chipset PCH.
> > > The
> > > driver can read the temperature from the Wellsburg PCH with only
> > > the PCI
> > > ID added and no other modifications.
> > >
> > > Signed-off-by: Tim Zimmermann <[email protected]>
> >
> > Rui, Srinivas, any objections to this one?
> No objection.
>
And no objections from me.

thanks,
rui

> Thanks,
> Srinivas
>
> > > ---
> > > 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 dabf11a687a1..9e27f430e034 100644
> > > --- a/drivers/thermal/intel/intel_pch_thermal.c
> > > +++ b/drivers/thermal/intel/intel_pch_thermal.c
> > > @@ -29,6 +29,7 @@
> > > #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 */
> > > +#define PCH_THERMAL_DID_WBG 0x8D24 /* Wellsburg PCH */
> > >
> > > /* Wildcat Point-LP PCH Thermal registers */
> > > #define WPT_TEMP 0x0000 /* Temperature */
> > > @@ -350,6 +351,7 @@ enum board_ids {
> > > board_cnl,
> > > board_cml,
> > > board_lwb,
> > > + board_wbg,
> > > };
> > >
> > > static const struct board_info {
> > > @@ -380,6 +382,10 @@ static const struct board_info {
> > > .name = "pch_lewisburg",
> > > .ops = &pch_dev_ops_wpt,
> > > },
> > > + [board_wbg] = {
> > > + .name = "pch_wellsburg",
> > > + .ops = &pch_dev_ops_wpt,
> > > + },
> > > };
> > >
> > > static int intel_pch_thermal_probe(struct pci_dev *pdev,
> > > @@ -495,6 +501,8 @@ static const struct pci_device_id
> > > intel_pch_thermal_id[] = {
> > > .driver_data = board_cml, },
> > > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> > > .driver_data = board_lwb, },
> > > + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WBG),
> > > + .driver_data = board_wbg, },
> > > { 0, },
> > > };
> > > MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
> > > --
> > > 2.39.0
> > >

2023-01-24 14:47:39

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] thermal: intel: pch: Add support for Wellsburg PCH

On Sat, Jan 21, 2023 at 6:01 AM Zhang, Rui <[email protected]> wrote:
>
> On Fri, 2023-01-20 at 09:50 -0800, srinivas pandruvada wrote:
> > On Fri, 2023-01-20 at 17:40 +0100, Rafael J. Wysocki wrote:
> > > On Sat, Jan 7, 2023 at 8:42 PM Tim Zimmermann <[email protected]>
> > > wrote:
> > > > This adds the PCI ID for the Wellsburg C610 series chipset PCH.
> > > > The
> > > > driver can read the temperature from the Wellsburg PCH with only
> > > > the PCI
> > > > ID added and no other modifications.
> > > >
> > > > Signed-off-by: Tim Zimmermann <[email protected]>
> > >
> > > Rui, Srinivas, any objections to this one?
> > No objection.
> >
> And no objections from me.

OK

Applied as 6.3 material, thanks!