All of lore.kernel.org
 help / color / mirror / Atom feed
* OpenBMC Sensors
@ 2019-01-24  9:03 Aaron Williams
  2019-01-24  9:26 ` Lei YU
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Williams @ 2019-01-24  9:03 UTC (permalink / raw)
  To: openbmc

Hi all,

I have a board with a couple of i2c sensors that I am trying to configure to 
work in OpenBMC but I have a lot of confusion. Do I need to add all the IPMI 
configuration for the sensors? I'm still fairly new to OpenBMC and IPMI and am 
not sure how to go about configuring things. I'm looking at the IBM Romulus 
board as an example.

We have two temperature sensors, a TI TMP421 which monitors the CPU core 
temperature as well as an ADT7462 which monitors several locations around the 
motherboard and controls the fans.

We want to control the speed of the CPU fan based on the temperature measured 
by the tmp421 in order to keep it within our thermal envelope, which shouldn't 
be too difficult to do whereas the chassis fans would be based on the 
motherboard temperature.

I see how to set up the hwmon portion defining the devices based on the device 
tree, but I am unsure how to go about configuring the YAML and other files for 
this.

At some point we should also be able to obtain internal per-core temperature 
information as well which we would also like to report.

Engineering has made this a rather high priority since the CPU fan sounds like 
a jet engine and rarely needs to run anywhere near 100%.

The ADT7462 can also measure the voltage and monitor the fan speeds.

-Aaron

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: OpenBMC Sensors
  2019-01-24  9:03 OpenBMC Sensors Aaron Williams
@ 2019-01-24  9:26 ` Lei YU
  2019-01-30 17:49   ` Emily Shaffer
  0 siblings, 1 reply; 13+ messages in thread
From: Lei YU @ 2019-01-24  9:26 UTC (permalink / raw)
  To: Aaron Williams; +Cc: OpenBMC Maillist

On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <awilliams@marvell.com> wrote:
> I see how to set up the hwmon portion defining the devices based on the device
> tree, but I am unsure how to go about configuring the YAML and other files for
> this.

For sensors' config, please refer to
https://github.com/openbmc/docs/blob/master/sensor-architecture.md
And it looks you are looking for fan controls, then you could refer to:
https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#fans

(I really need to submit my porting guide to openbmc/docs)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: OpenBMC Sensors
  2019-01-24  9:26 ` Lei YU
@ 2019-01-30 17:49   ` Emily Shaffer
  2019-01-30 21:28     ` [EXT] " Aaron Williams
  0 siblings, 1 reply; 13+ messages in thread
From: Emily Shaffer @ 2019-01-30 17:49 UTC (permalink / raw)
  To: Lei YU; +Cc: Aaron Williams, OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

Hi Aaron,

Note that you only really need to worry about sending the temperature via
IPMI if you want to send it somewhere besides the BMC.  If you plan to do
internal thermal control (BMC reads temperature, BMC adjusts fans
accordingly) you probably don't need IPMI config and can get away with
setting it up as far as DBus in the sensor architecture doc Lei sent.

Emily

On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:

> On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <awilliams@marvell.com>
> wrote:
> > I see how to set up the hwmon portion defining the devices based on the
> device
> > tree, but I am unsure how to go about configuring the YAML and other
> files for
> > this.
>
> For sensors' config, please refer to
> https://github.com/openbmc/docs/blob/master/sensor-architecture.md
> And it looks you are looking for fan controls, then you could refer to:
>
> https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#fans
>
> (I really need to submit my porting guide to openbmc/docs)
>

[-- Attachment #2: Type: text/html, Size: 1693 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-30 17:49   ` Emily Shaffer
@ 2019-01-30 21:28     ` Aaron Williams
  2019-01-30 21:42       ` Emily Shaffer
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Williams @ 2019-01-30 21:28 UTC (permalink / raw)
  To: Emily Shaffer; +Cc: Lei YU, OpenBMC Maillist

Hi Emily,

That's what I need the temperature for. We have two controllers, one that 
monitors the core temperature (a TI TMP421) and one that controls the fans 
(ADT7462). In order to maintain the thermal envelope the TMP421 needs to be 
monitored to adjust the fan speed through the ADT7462.

Further complicating things is the fact that these sensors disappear when the 
host is powered down.

-Aaron

On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer wrote:
> External Email
> 
> ----------------------------------------------------------------------
> Hi Aaron,
> 
> Note that you only really need to worry about sending the temperature via
> IPMI if you want to send it somewhere besides the BMC.  If you plan to do
> internal thermal control (BMC reads temperature, BMC adjusts fans
> accordingly) you probably don't need IPMI config and can get away with
> setting it up as far as DBus in the sensor architecture doc Lei sent.
> 
> Emily
> 
> On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:
> > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <awilliams@marvell.com>
> > 
> > wrote:
> > > I see how to set up the hwmon portion defining the devices based on the
> > 
> > device
> > 
> > > tree, but I am unsure how to go about configuring the YAML and other
> > 
> > files for
> > 
> > > this.
> > 
> > For sensors' config, please refer to
> > https://github.com/openbmc/docs/blob/master/sensor-architecture.md
> > And it looks you are looking for fan controls, then you could refer to:
> > 
> > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#f
> > ans
> > 
> > (I really need to submit my porting guide to openbmc/docs)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-30 21:28     ` [EXT] " Aaron Williams
@ 2019-01-30 21:42       ` Emily Shaffer
  2019-01-30 21:47         ` Aaron Williams
  0 siblings, 1 reply; 13+ messages in thread
From: Emily Shaffer @ 2019-01-30 21:42 UTC (permalink / raw)
  To: Aaron Williams; +Cc: Lei YU, OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

Aaron, we use this daemon for local (to BMC) thermal control:
https://github.com/openbmc/phosphor-pid-control
Maybe you'll find it helpful.

Although I'm not sure how to help you with losing sensors when the host
powers down but the BMC is expected to continue to cool the tray.  Sounds
like an issue with the board design, unless I'm not understanding what
you're saying.

On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams <awilliams@marvell.com>
wrote:

> Hi Emily,
>
> That's what I need the temperature for. We have two controllers, one that
> monitors the core temperature (a TI TMP421) and one that controls the fans
> (ADT7462). In order to maintain the thermal envelope the TMP421 needs to
> be
> monitored to adjust the fan speed through the ADT7462.
>
> Further complicating things is the fact that these sensors disappear when
> the
> host is powered down.
>
> -Aaron
>
> On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer wrote:
> > External Email
> >
> > ----------------------------------------------------------------------
> > Hi Aaron,
> >
> > Note that you only really need to worry about sending the temperature via
> > IPMI if you want to send it somewhere besides the BMC.  If you plan to do
> > internal thermal control (BMC reads temperature, BMC adjusts fans
> > accordingly) you probably don't need IPMI config and can get away with
> > setting it up as far as DBus in the sensor architecture doc Lei sent.
> >
> > Emily
> >
> > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:
> > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <awilliams@marvell.com>
> > >
> > > wrote:
> > > > I see how to set up the hwmon portion defining the devices based on
> the
> > >
> > > device
> > >
> > > > tree, but I am unsure how to go about configuring the YAML and other
> > >
> > > files for
> > >
> > > > this.
> > >
> > > For sensors' config, please refer to
> > > https://github.com/openbmc/docs/blob/master/sensor-architecture.md
> > > And it looks you are looking for fan controls, then you could refer to:
> > >
> > >
> https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#f
> > > ans
> > >
> > > (I really need to submit my porting guide to openbmc/docs)
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3323 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-30 21:42       ` Emily Shaffer
@ 2019-01-30 21:47         ` Aaron Williams
  2019-01-30 21:48           ` Emily Shaffer
  0 siblings, 1 reply; 13+ messages in thread
From: Aaron Williams @ 2019-01-30 21:47 UTC (permalink / raw)
  To: Emily Shaffer; +Cc: Lei YU, OpenBMC Maillist

Hi Emily,

Thank you, I will look into it. I don't think losing the sensors when we cut 
power to the host CPU will be much of an issue. I was just notified of a 
change to our CPLD that will allow the BMC to keep the sensors powered. At the 
moment, cutting power shuts of the power from the ATX power supply but now I 
will have more fine-grained power control. Now I just have to figure out how 
to update the Lattice CPLD from the BMC... I found some code in the Facebook 
OpenBMC which hopefully I can port over.

-Aaron

On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
> Aaron, we use this daemon for local (to BMC) thermal control:
> https://github.com/openbmc/phosphor-pid-control
> Maybe you'll find it helpful.
> 
> Although I'm not sure how to help you with losing sensors when the host
> powers down but the BMC is expected to continue to cool the tray.  Sounds
> like an issue with the board design, unless I'm not understanding what
> you're saying.
> 
> On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams <awilliams@marvell.com>
> 
> wrote:
> > Hi Emily,
> > 
> > That's what I need the temperature for. We have two controllers, one that
> > monitors the core temperature (a TI TMP421) and one that controls the fans
> > (ADT7462). In order to maintain the thermal envelope the TMP421 needs to
> > be
> > monitored to adjust the fan speed through the ADT7462.
> > 
> > Further complicating things is the fact that these sensors disappear when
> > the
> > host is powered down.
> > 
> > -Aaron
> > 
> > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer wrote:
> > > External Email
> > > 
> > > ----------------------------------------------------------------------
> > > Hi Aaron,
> > > 
> > > Note that you only really need to worry about sending the temperature
> > > via
> > > IPMI if you want to send it somewhere besides the BMC.  If you plan to
> > > do
> > > internal thermal control (BMC reads temperature, BMC adjusts fans
> > > accordingly) you probably don't need IPMI config and can get away with
> > > setting it up as far as DBus in the sensor architecture doc Lei sent.
> > > 
> > > Emily
> > > 
> > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:
> > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <awilliams@marvell.com>
> > > > 
> > > > wrote:
> > > > > I see how to set up the hwmon portion defining the devices based on
> > 
> > the
> > 
> > > > device
> > > > 
> > > > > tree, but I am unsure how to go about configuring the YAML and other
> > > > 
> > > > files for
> > > > 
> > > > > this.
> > > > 
> > > > For sensors' config, please refer to
> > > > https://github.com/openbmc/docs/blob/master/sensor-architecture.md
> > 
> > > > And it looks you are looking for fan controls, then you could refer 
to:
> > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#f
> > 
> > > > ans
> > > > 
> > > > (I really need to submit my porting guide to openbmc/docs)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-30 21:47         ` Aaron Williams
@ 2019-01-30 21:48           ` Emily Shaffer
       [not found]             ` <2342439.TUI2J960l9@flash>
  0 siblings, 1 reply; 13+ messages in thread
From: Emily Shaffer @ 2019-01-30 21:48 UTC (permalink / raw)
  To: Aaron Williams; +Cc: Lei YU, OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 3252 bytes --]

Great, best luck Aaron. Thanks!

On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com> wrote:

> Hi Emily,
>
> Thank you, I will look into it. I don't think losing the sensors when we
> cut
> power to the host CPU will be much of an issue. I was just notified of a
> change to our CPLD that will allow the BMC to keep the sensors powered. At
> the
> moment, cutting power shuts of the power from the ATX power supply but now
> I
> will have more fine-grained power control. Now I just have to figure out
> how
> to update the Lattice CPLD from the BMC... I found some code in the
> Facebook
> OpenBMC which hopefully I can port over.
>
> -Aaron
>
> On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
> > Aaron, we use this daemon for local (to BMC) thermal control:
> > https://github.com/openbmc/phosphor-pid-control
> > Maybe you'll find it helpful.
> >
> > Although I'm not sure how to help you with losing sensors when the host
> > powers down but the BMC is expected to continue to cool the tray.  Sounds
> > like an issue with the board design, unless I'm not understanding what
> > you're saying.
> >
> > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams <awilliams@marvell.com>
> >
> > wrote:
> > > Hi Emily,
> > >
> > > That's what I need the temperature for. We have two controllers, one
> that
> > > monitors the core temperature (a TI TMP421) and one that controls the
> fans
> > > (ADT7462). In order to maintain the thermal envelope the TMP421 needs
> to
> > > be
> > > monitored to adjust the fan speed through the ADT7462.
> > >
> > > Further complicating things is the fact that these sensors disappear
> when
> > > the
> > > host is powered down.
> > >
> > > -Aaron
> > >
> > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer wrote:
> > > > External Email
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > Hi Aaron,
> > > >
> > > > Note that you only really need to worry about sending the temperature
> > > > via
> > > > IPMI if you want to send it somewhere besides the BMC.  If you plan
> to
> > > > do
> > > > internal thermal control (BMC reads temperature, BMC adjusts fans
> > > > accordingly) you probably don't need IPMI config and can get away
> with
> > > > setting it up as far as DBus in the sensor architecture doc Lei sent.
> > > >
> > > > Emily
> > > >
> > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:
> > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
> awilliams@marvell.com>
> > > > >
> > > > > wrote:
> > > > > > I see how to set up the hwmon portion defining the devices based
> on
> > >
> > > the
> > >
> > > > > device
> > > > >
> > > > > > tree, but I am unsure how to go about configuring the YAML and
> other
> > > > >
> > > > > files for
> > > > >
> > > > > > this.
> > > > >
> > > > > For sensors' config, please refer to
> > > > > https://github.com/openbmc/docs/blob/master/sensor-architecture.md
> > >
> > > > > And it looks you are looking for fan controls, then you could
> refer
> to:
> > >
> https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#f
> > >
> > > > > ans
> > > > >
> > > > > (I really need to submit my porting guide to openbmc/docs)
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 4821 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
       [not found]               ` <CAJoAoZnV+u8kJKV7TkPxU_b1hdmJ3nbFyD6rVMSd9ohPSjDHig@mail.gmail.com>
@ 2019-01-31 15:30                 ` Patrick Venture
  2019-02-01  1:05                   ` Aaron Williams
  2019-02-01  5:17                   ` Aaron Williams
  0 siblings, 2 replies; 13+ messages in thread
From: Patrick Venture @ 2019-01-31 15:30 UTC (permalink / raw)
  To: Emily Shaffer; +Cc: Aaron Williams, OpenBMC Maillist

On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com> wrote:
>
> Aaron,
>
> If it's complaining at build time it's what it says on the box - you probably need to include the recipe which builds phosphor-fans-sensor-inventory.
>
> Emily
>
> On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com> wrote:
>>
>> Hi Emily,
>>
>> I'm still not sure how to go about using this, I'm still fairly new to
>> OpenBMC. It's complaing about nothing providing 'virtual/phosphor-fans-sensor-
>> inventory'.  I included phosphor-pid-control as one of our dependencies.

Per Emily, you'll need to implement a recipe that defines the PID
inputs.  It sounds like you have two PID loops.  One is the
temperature sensor, and that feeds the set-point for the fans, which
are a second PID loop.  The idea being, the temperature pid loop
attempts to maintain the temperature under (or over) some set-point,
and it'll in turn try to get the fans to speed up when necessary.

>>
>> -Aaron
>>
>> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
>> > Great, best luck Aaron. Thanks!
>> >
>> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com> wrote:
>> > > Hi Emily,
>> > >
>> > > Thank you, I will look into it. I don't think losing the sensors when we
>> > > cut
>> > > power to the host CPU will be much of an issue. I was just notified of a
>> > > change to our CPLD that will allow the BMC to keep the sensors powered. At
>> > > the
>> > > moment, cutting power shuts of the power from the ATX power supply but now

As far as the sensors when the try is powered down, that's pretty
common.  The hwmon driver on the BMC will just be unable to read the
values, and you can deal with that in phosphor-hwmon a couple ways.
Phosphor-pid-control will go into fail-safe mode if it doesn't receive
a sensor value frequently enough.  This mode would cause it to drive
the fans to a pre-defined set-point per a configuration.

>> > > I
>> > > will have more fine-grained power control. Now I just have to figure out
>> > > how
>> > > to update the Lattice CPLD from the BMC... I found some code in the
>> > > Facebook
>> > > OpenBMC which hopefully I can port over.
>> > >
>> > > -Aaron
>> > >
>> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
>> > > > Aaron, we use this daemon for local (to BMC) thermal control:
>> > > > https://github.com/openbmc/phosphor-pid-control
>> > > > Maybe you'll find it helpful.
>> > > >
>> > > > Although I'm not sure how to help you with losing sensors when the host
>> > > > powers down but the BMC is expected to continue to cool the tray.
>> > > > Sounds
>> > > > like an issue with the board design, unless I'm not understanding what
>> > > > you're saying.
>> > > >
>> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams <awilliams@marvell.com>
>> > > >
>> > > > wrote:
>> > > > > Hi Emily,
>> > > > >
>> > > > > That's what I need the temperature for. We have two controllers, one
>> > >
>> > > that
>> > >
>> > > > > monitors the core temperature (a TI TMP421) and one that controls the
>> > >
>> > > fans
>> > >
>> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421 needs
>> > >
>> > > to
>> > >
>> > > > > be
>> > > > > monitored to adjust the fan speed through the ADT7462.
>> > > > >
>> > > > > Further complicating things is the fact that these sensors disappear
>> > >
>> > > when
>> > >
>> > > > > the
>> > > > > host is powered down.
>> > > > >
>> > > > > -Aaron
>> > > > >
>> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer wrote:
>> > > > > > External Email
>> > >
>> > > ----------------------------------------------------------------------
>> > >
>> > > > > > Hi Aaron,
>> > > > > >
>> > > > > > Note that you only really need to worry about sending the
>> > > > > > temperature
>> > > > > > via
>> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you plan
>> > >
>> > > to
>> > >
>> > > > > > do
>> > > > > > internal thermal control (BMC reads temperature, BMC adjusts fans
>> > > > > > accordingly) you probably don't need IPMI config and can get away
>> > >
>> > > with
>> > >
>> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
>> > > > > > sent.
>> > > > > >
>> > > > > > Emily
>> > > > > >
>> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> wrote:
>> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
>> > >
>> > > awilliams@marvell.com>
>> > >
>> > > > > > > wrote:
>> > > > > > > > I see how to set up the hwmon portion defining the devices based
>> > >
>> > > on
>> > >
>> > > > > the
>> > > > >
>> > > > > > > device
>> > > > > > >
>> > > > > > > > tree, but I am unsure how to go about configuring the YAML and
>> > >
>> > > other
>> > >
>> > > > > > > files for
>> > > > > > >
>> > > > > > > > this.
>> > > > > > >
>> > > > > > > For sensors' config, please refer to
>> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architecture.md
>> > > > > > >
>> > > > > > > And it looks you are looking for fan controls, then you could
>> > >
>> > > refer
>> > > to:
>> > >
>> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#f
>> > >
>> > > > > > > ans
>> > > > > > >
>> > > > > > > (I really need to submit my porting guide to openbmc/docs)
>>
>>
>>
>>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-31 15:30                 ` Patrick Venture
@ 2019-02-01  1:05                   ` Aaron Williams
  2019-02-01  5:17                   ` Aaron Williams
  1 sibling, 0 replies; 13+ messages in thread
From: Aaron Williams @ 2019-02-01  1:05 UTC (permalink / raw)
  To: Patrick Venture; +Cc: Emily Shaffer, OpenBMC Maillist

Hi Patric, Emily,

Thanks for your help. Are there any examples of this? I've tried looking at 
the other available platforms but I'm not finding anything for this.

-Aaron

On Thursday, January 31, 2019 7:30:04 AM PST Patrick Venture wrote:
> On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com> 
wrote:
> > Aaron,
> > 
> > If it's complaining at build time it's what it says on the box - you
> > probably need to include the recipe which builds
> > phosphor-fans-sensor-inventory.
> > 
> > Emily
> > 
> > On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com> 
wrote:
> >> Hi Emily,
> >> 
> >> I'm still not sure how to go about using this, I'm still fairly new to
> >> OpenBMC. It's complaing about nothing providing
> >> 'virtual/phosphor-fans-sensor- inventory'.  I included
> >> phosphor-pid-control as one of our dependencies.
> Per Emily, you'll need to implement a recipe that defines the PID
> inputs.  It sounds like you have two PID loops.  One is the
> temperature sensor, and that feeds the set-point for the fans, which
> are a second PID loop.  The idea being, the temperature pid loop
> attempts to maintain the temperature under (or over) some set-point,
> and it'll in turn try to get the fans to speed up when necessary.
> 
> >> -Aaron
> >> 
> >> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
> >> > Great, best luck Aaron. Thanks!
> >> > 
> >> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com> 
wrote:
> >> > > Hi Emily,
> >> > > 
> >> > > Thank you, I will look into it. I don't think losing the sensors when
> >> > > we
> >> > > cut
> >> > > power to the host CPU will be much of an issue. I was just notified
> >> > > of a
> >> > > change to our CPLD that will allow the BMC to keep the sensors
> >> > > powered. At
> >> > > the
> >> > > moment, cutting power shuts of the power from the ATX power supply
> >> > > but now
> 
> As far as the sensors when the try is powered down, that's pretty
> common.  The hwmon driver on the BMC will just be unable to read the
> values, and you can deal with that in phosphor-hwmon a couple ways.
> Phosphor-pid-control will go into fail-safe mode if it doesn't receive
> a sensor value frequently enough.  This mode would cause it to drive
> the fans to a pre-defined set-point per a configuration.
> 
> >> > > I
> >> > > will have more fine-grained power control. Now I just have to figure
> >> > > out
> >> > > how
> >> > > to update the Lattice CPLD from the BMC... I found some code in the
> >> > > Facebook
> >> > > OpenBMC which hopefully I can port over.
> >> > > 
> >> > > -Aaron
> >> > > 
> >> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
> >> > > > Aaron, we use this daemon for local (to BMC) thermal control:
> >> > > > https://github.com/openbmc/phosphor-pid-control
> >> > > > Maybe you'll find it helpful.
> >> > > > 
> >> > > > Although I'm not sure how to help you with losing sensors when the
> >> > > > host
> >> > > > powers down but the BMC is expected to continue to cool the tray.
> >> > > > Sounds
> >> > > > like an issue with the board design, unless I'm not understanding
> >> > > > what
> >> > > > you're saying.
> >> > > > 
> >> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams
> >> > > > <awilliams@marvell.com>
> >> > > > 
> >> > > > wrote:
> >> > > > > Hi Emily,
> >> > > > > 
> >> > > > > That's what I need the temperature for. We have two controllers,
> >> > > > > one
> >> > > 
> >> > > that
> >> > > 
> >> > > > > monitors the core temperature (a TI TMP421) and one that controls
> >> > > > > the
> >> > > 
> >> > > fans
> >> > > 
> >> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421
> >> > > > > needs
> >> > > 
> >> > > to
> >> > > 
> >> > > > > be
> >> > > > > monitored to adjust the fan speed through the ADT7462.
> >> > > > > 
> >> > > > > Further complicating things is the fact that these sensors
> >> > > > > disappear
> >> > > 
> >> > > when
> >> > > 
> >> > > > > the
> >> > > > > host is powered down.
> >> > > > > 
> >> > > > > -Aaron
> >> > > > > 
> >> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer 
wrote:
> >> > > > > > External Email
> >> > > 
> >> > > ---------------------------------------------------------------------
> >> > > -
> >> > > 
> >> > > > > > Hi Aaron,
> >> > > > > > 
> >> > > > > > Note that you only really need to worry about sending the
> >> > > > > > temperature
> >> > > > > > via
> >> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you
> >> > > > > > plan
> >> > > 
> >> > > to
> >> > > 
> >> > > > > > do
> >> > > > > > internal thermal control (BMC reads temperature, BMC adjusts
> >> > > > > > fans
> >> > > > > > accordingly) you probably don't need IPMI config and can get
> >> > > > > > away
> >> > > 
> >> > > with
> >> > > 
> >> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
> >> > > > > > sent.
> >> > > > > > 
> >> > > > > > Emily
> >> > > > > > 
> >> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> 
wrote:
> >> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
> >> > > 
> >> > > awilliams@marvell.com>
> >> > > 
> >> > > > > > > wrote:
> >> > > > > > > > I see how to set up the hwmon portion defining the devices
> >> > > > > > > > based
> >> > > 
> >> > > on
> >> > > 
> >> > > > > the
> >> > > > > 
> >> > > > > > > device
> >> > > > > > > 
> >> > > > > > > > tree, but I am unsure how to go about configuring the YAML
> >> > > > > > > > and
> >> > > 
> >> > > other
> >> > > 
> >> > > > > > > files for
> >> > > > > > > 
> >> > > > > > > > this.
> >> > > > > > > 
> >> > > > > > > For sensors' config, please refer to
> >> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architectu
> >> > > > > > > re.md
> >> > > > > > > 
> >> > > > > > > And it looks you are looking for fan controls, then you could
> >> > > 
> >> > > refer
> >> > > to:
> >> > > 
> >> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide
> >> > > .md#f
> >> > > 
> >> > > > > > > ans
> >> > > > > > > 
> >> > > > > > > (I really need to submit my porting guide to openbmc/docs)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-01-31 15:30                 ` Patrick Venture
  2019-02-01  1:05                   ` Aaron Williams
@ 2019-02-01  5:17                   ` Aaron Williams
  2019-02-01 17:07                     ` Patrick Venture
  2019-02-01 18:04                     ` Vijay Khemka
  1 sibling, 2 replies; 13+ messages in thread
From: Aaron Williams @ 2019-02-01  5:17 UTC (permalink / raw)
  To: Patrick Venture; +Cc: Emily Shaffer, OpenBMC Maillist

Thanks,

I think I know what I need to do, after looking at the config example and 
other yaml examples I've found. My problem is I haven't been able to find any 
example recipes and whatnot that use this (or maybe I'm looking at the wrong 
things). I've looked at the various implementations but don't see anything 
using this.

-Aaron

On Thursday, January 31, 2019 7:30:04 AM PST Patrick Venture wrote:
> On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com> 
wrote:
> > Aaron,
> > 
> > If it's complaining at build time it's what it says on the box - you
> > probably need to include the recipe which builds
> > phosphor-fans-sensor-inventory.
> > 
> > Emily
> > 
> > On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com> 
wrote:
> >> Hi Emily,
> >> 
> >> I'm still not sure how to go about using this, I'm still fairly new to
> >> OpenBMC. It's complaing about nothing providing
> >> 'virtual/phosphor-fans-sensor- inventory'.  I included
> >> phosphor-pid-control as one of our dependencies.
> Per Emily, you'll need to implement a recipe that defines the PID
> inputs.  It sounds like you have two PID loops.  One is the
> temperature sensor, and that feeds the set-point for the fans, which
> are a second PID loop.  The idea being, the temperature pid loop
> attempts to maintain the temperature under (or over) some set-point,
> and it'll in turn try to get the fans to speed up when necessary.
> 
> >> -Aaron
> >> 
> >> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
> >> > Great, best luck Aaron. Thanks!
> >> > 
> >> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com> 
wrote:
> >> > > Hi Emily,
> >> > > 
> >> > > Thank you, I will look into it. I don't think losing the sensors when
> >> > > we
> >> > > cut
> >> > > power to the host CPU will be much of an issue. I was just notified
> >> > > of a
> >> > > change to our CPLD that will allow the BMC to keep the sensors
> >> > > powered. At
> >> > > the
> >> > > moment, cutting power shuts of the power from the ATX power supply
> >> > > but now
> 
> As far as the sensors when the try is powered down, that's pretty
> common.  The hwmon driver on the BMC will just be unable to read the
> values, and you can deal with that in phosphor-hwmon a couple ways.
> Phosphor-pid-control will go into fail-safe mode if it doesn't receive
> a sensor value frequently enough.  This mode would cause it to drive
> the fans to a pre-defined set-point per a configuration.
> 
> >> > > I
> >> > > will have more fine-grained power control. Now I just have to figure
> >> > > out
> >> > > how
> >> > > to update the Lattice CPLD from the BMC... I found some code in the
> >> > > Facebook
> >> > > OpenBMC which hopefully I can port over.
> >> > > 
> >> > > -Aaron
> >> > > 
> >> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
> >> > > > Aaron, we use this daemon for local (to BMC) thermal control:
> >> > > > https://github.com/openbmc/phosphor-pid-control
> >> > > > Maybe you'll find it helpful.
> >> > > > 
> >> > > > Although I'm not sure how to help you with losing sensors when the
> >> > > > host
> >> > > > powers down but the BMC is expected to continue to cool the tray.
> >> > > > Sounds
> >> > > > like an issue with the board design, unless I'm not understanding
> >> > > > what
> >> > > > you're saying.
> >> > > > 
> >> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams
> >> > > > <awilliams@marvell.com>
> >> > > > 
> >> > > > wrote:
> >> > > > > Hi Emily,
> >> > > > > 
> >> > > > > That's what I need the temperature for. We have two controllers,
> >> > > > > one
> >> > > 
> >> > > that
> >> > > 
> >> > > > > monitors the core temperature (a TI TMP421) and one that controls
> >> > > > > the
> >> > > 
> >> > > fans
> >> > > 
> >> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421
> >> > > > > needs
> >> > > 
> >> > > to
> >> > > 
> >> > > > > be
> >> > > > > monitored to adjust the fan speed through the ADT7462.
> >> > > > > 
> >> > > > > Further complicating things is the fact that these sensors
> >> > > > > disappear
> >> > > 
> >> > > when
> >> > > 
> >> > > > > the
> >> > > > > host is powered down.
> >> > > > > 
> >> > > > > -Aaron
> >> > > > > 
> >> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer 
wrote:
> >> > > > > > External Email
> >> > > 
> >> > > ---------------------------------------------------------------------
> >> > > -
> >> > > 
> >> > > > > > Hi Aaron,
> >> > > > > > 
> >> > > > > > Note that you only really need to worry about sending the
> >> > > > > > temperature
> >> > > > > > via
> >> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you
> >> > > > > > plan
> >> > > 
> >> > > to
> >> > > 
> >> > > > > > do
> >> > > > > > internal thermal control (BMC reads temperature, BMC adjusts
> >> > > > > > fans
> >> > > > > > accordingly) you probably don't need IPMI config and can get
> >> > > > > > away
> >> > > 
> >> > > with
> >> > > 
> >> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
> >> > > > > > sent.
> >> > > > > > 
> >> > > > > > Emily
> >> > > > > > 
> >> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> 
wrote:
> >> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
> >> > > 
> >> > > awilliams@marvell.com>
> >> > > 
> >> > > > > > > wrote:
> >> > > > > > > > I see how to set up the hwmon portion defining the devices
> >> > > > > > > > based
> >> > > 
> >> > > on
> >> > > 
> >> > > > > the
> >> > > > > 
> >> > > > > > > device
> >> > > > > > > 
> >> > > > > > > > tree, but I am unsure how to go about configuring the YAML
> >> > > > > > > > and
> >> > > 
> >> > > other
> >> > > 
> >> > > > > > > files for
> >> > > > > > > 
> >> > > > > > > > this.
> >> > > > > > > 
> >> > > > > > > For sensors' config, please refer to
> >> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architectu
> >> > > > > > > re.md
> >> > > > > > > 
> >> > > > > > > And it looks you are looking for fan controls, then you could
> >> > > 
> >> > > refer
> >> > > to:
> >> > > 
> >> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide
> >> > > .md#f
> >> > > 
> >> > > > > > > ans
> >> > > > > > > 
> >> > > > > > > (I really need to submit my porting guide to openbmc/docs)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-02-01  5:17                   ` Aaron Williams
@ 2019-02-01 17:07                     ` Patrick Venture
  2019-02-01 18:04                     ` Vijay Khemka
  1 sibling, 0 replies; 13+ messages in thread
From: Patrick Venture @ 2019-02-01 17:07 UTC (permalink / raw)
  To: Aaron Williams; +Cc: Emily Shaffer, OpenBMC Maillist

On Thu, Jan 31, 2019 at 9:17 PM Aaron Williams <awilliams@marvell.com> wrote:
>
> Thanks,
>
> I think I know what I need to do, after looking at the config example and
> other yaml examples I've found. My problem is I haven't been able to find any
> example recipes and whatnot that use this (or maybe I'm looking at the wrong
> things). I've looked at the various implementations but don't see anything
> using this.

I'm looking for an example upstream.  I may end up updating the
quanta-q71l board to use it:
https://github.com/openbmc/meta-quanta/tree/master/meta-q71l
I split off from maintaining that a while ago primarily due to cycles
for regular upstream testing.

>
> -Aaron
>
> On Thursday, January 31, 2019 7:30:04 AM PST Patrick Venture wrote:
> > On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com>
> wrote:
> > > Aaron,
> > >
> > > If it's complaining at build time it's what it says on the box - you
> > > probably need to include the recipe which builds
> > > phosphor-fans-sensor-inventory.
> > >
> > > Emily
> > >
> > > On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com>
> wrote:
> > >> Hi Emily,
> > >>
> > >> I'm still not sure how to go about using this, I'm still fairly new to
> > >> OpenBMC. It's complaing about nothing providing
> > >> 'virtual/phosphor-fans-sensor- inventory'.  I included
> > >> phosphor-pid-control as one of our dependencies.
> > Per Emily, you'll need to implement a recipe that defines the PID
> > inputs.  It sounds like you have two PID loops.  One is the
> > temperature sensor, and that feeds the set-point for the fans, which
> > are a second PID loop.  The idea being, the temperature pid loop
> > attempts to maintain the temperature under (or over) some set-point,
> > and it'll in turn try to get the fans to speed up when necessary.
> >
> > >> -Aaron
> > >>
> > >> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
> > >> > Great, best luck Aaron. Thanks!
> > >> >
> > >> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com>
> wrote:
> > >> > > Hi Emily,
> > >> > >
> > >> > > Thank you, I will look into it. I don't think losing the sensors when
> > >> > > we
> > >> > > cut
> > >> > > power to the host CPU will be much of an issue. I was just notified
> > >> > > of a
> > >> > > change to our CPLD that will allow the BMC to keep the sensors
> > >> > > powered. At
> > >> > > the
> > >> > > moment, cutting power shuts of the power from the ATX power supply
> > >> > > but now
> >
> > As far as the sensors when the try is powered down, that's pretty
> > common.  The hwmon driver on the BMC will just be unable to read the
> > values, and you can deal with that in phosphor-hwmon a couple ways.
> > Phosphor-pid-control will go into fail-safe mode if it doesn't receive
> > a sensor value frequently enough.  This mode would cause it to drive
> > the fans to a pre-defined set-point per a configuration.
> >
> > >> > > I
> > >> > > will have more fine-grained power control. Now I just have to figure
> > >> > > out
> > >> > > how
> > >> > > to update the Lattice CPLD from the BMC... I found some code in the
> > >> > > Facebook
> > >> > > OpenBMC which hopefully I can port over.
> > >> > >
> > >> > > -Aaron
> > >> > >
> > >> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
> > >> > > > Aaron, we use this daemon for local (to BMC) thermal control:
> > >> > > > https://github.com/openbmc/phosphor-pid-control
> > >> > > > Maybe you'll find it helpful.
> > >> > > >
> > >> > > > Although I'm not sure how to help you with losing sensors when the
> > >> > > > host
> > >> > > > powers down but the BMC is expected to continue to cool the tray.
> > >> > > > Sounds
> > >> > > > like an issue with the board design, unless I'm not understanding
> > >> > > > what
> > >> > > > you're saying.
> > >> > > >
> > >> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams
> > >> > > > <awilliams@marvell.com>
> > >> > > >
> > >> > > > wrote:
> > >> > > > > Hi Emily,
> > >> > > > >
> > >> > > > > That's what I need the temperature for. We have two controllers,
> > >> > > > > one
> > >> > >
> > >> > > that
> > >> > >
> > >> > > > > monitors the core temperature (a TI TMP421) and one that controls
> > >> > > > > the
> > >> > >
> > >> > > fans
> > >> > >
> > >> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421
> > >> > > > > needs
> > >> > >
> > >> > > to
> > >> > >
> > >> > > > > be
> > >> > > > > monitored to adjust the fan speed through the ADT7462.
> > >> > > > >
> > >> > > > > Further complicating things is the fact that these sensors
> > >> > > > > disappear
> > >> > >
> > >> > > when
> > >> > >
> > >> > > > > the
> > >> > > > > host is powered down.
> > >> > > > >
> > >> > > > > -Aaron
> > >> > > > >
> > >> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer
> wrote:
> > >> > > > > > External Email
> > >> > >
> > >> > > ---------------------------------------------------------------------
> > >> > > -
> > >> > >
> > >> > > > > > Hi Aaron,
> > >> > > > > >
> > >> > > > > > Note that you only really need to worry about sending the
> > >> > > > > > temperature
> > >> > > > > > via
> > >> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you
> > >> > > > > > plan
> > >> > >
> > >> > > to
> > >> > >
> > >> > > > > > do
> > >> > > > > > internal thermal control (BMC reads temperature, BMC adjusts
> > >> > > > > > fans
> > >> > > > > > accordingly) you probably don't need IPMI config and can get
> > >> > > > > > away
> > >> > >
> > >> > > with
> > >> > >
> > >> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
> > >> > > > > > sent.
> > >> > > > > >
> > >> > > > > > Emily
> > >> > > > > >
> > >> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com>
> wrote:
> > >> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
> > >> > >
> > >> > > awilliams@marvell.com>
> > >> > >
> > >> > > > > > > wrote:
> > >> > > > > > > > I see how to set up the hwmon portion defining the devices
> > >> > > > > > > > based
> > >> > >
> > >> > > on
> > >> > >
> > >> > > > > the
> > >> > > > >
> > >> > > > > > > device
> > >> > > > > > >
> > >> > > > > > > > tree, but I am unsure how to go about configuring the YAML
> > >> > > > > > > > and
> > >> > >
> > >> > > other
> > >> > >
> > >> > > > > > > files for
> > >> > > > > > >
> > >> > > > > > > > this.
> > >> > > > > > >
> > >> > > > > > > For sensors' config, please refer to
> > >> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architectu
> > >> > > > > > > re.md
> > >> > > > > > >
> > >> > > > > > > And it looks you are looking for fan controls, then you could
> > >> > >
> > >> > > refer
> > >> > > to:
> > >> > >
> > >> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide
> > >> > > .md#f
> > >> > >
> > >> > > > > > > ans
> > >> > > > > > >
> > >> > > > > > > (I really need to submit my porting guide to openbmc/docs)
>
>
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-02-01  5:17                   ` Aaron Williams
  2019-02-01 17:07                     ` Patrick Venture
@ 2019-02-01 18:04                     ` Vijay Khemka
  2019-02-01 19:32                       ` Matthew Barth
  1 sibling, 1 reply; 13+ messages in thread
From: Vijay Khemka @ 2019-02-01 18:04 UTC (permalink / raw)
  To: Aaron Williams, Patrick Venture; +Cc: Emily Shaffer, OpenBMC Maillist

Aron,
You may also want to look at dbus-sensors as well. This is another approach for sensors through dbus. You have to include entity manager for this approach.

Regards
-Vijay

On 1/31/19, 9:18 PM, "openbmc on behalf of Aaron Williams" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of awilliams@marvell.com> wrote:

    Thanks,
    
    I think I know what I need to do, after looking at the config example and 
    other yaml examples I've found. My problem is I haven't been able to find any 
    example recipes and whatnot that use this (or maybe I'm looking at the wrong 
    things). I've looked at the various implementations but don't see anything 
    using this.
    
    -Aaron
    
    On Thursday, January 31, 2019 7:30:04 AM PST Patrick Venture wrote:
    > On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com> 
    wrote:
    > > Aaron,
    > > 
    > > If it's complaining at build time it's what it says on the box - you
    > > probably need to include the recipe which builds
    > > phosphor-fans-sensor-inventory.
    > > 
    > > Emily
    > > 
    > > On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com> 
    wrote:
    > >> Hi Emily,
    > >> 
    > >> I'm still not sure how to go about using this, I'm still fairly new to
    > >> OpenBMC. It's complaing about nothing providing
    > >> 'virtual/phosphor-fans-sensor- inventory'.  I included
    > >> phosphor-pid-control as one of our dependencies.
    > Per Emily, you'll need to implement a recipe that defines the PID
    > inputs.  It sounds like you have two PID loops.  One is the
    > temperature sensor, and that feeds the set-point for the fans, which
    > are a second PID loop.  The idea being, the temperature pid loop
    > attempts to maintain the temperature under (or over) some set-point,
    > and it'll in turn try to get the fans to speed up when necessary.
    > 
    > >> -Aaron
    > >> 
    > >> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
    > >> > Great, best luck Aaron. Thanks!
    > >> > 
    > >> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com> 
    wrote:
    > >> > > Hi Emily,
    > >> > > 
    > >> > > Thank you, I will look into it. I don't think losing the sensors when
    > >> > > we
    > >> > > cut
    > >> > > power to the host CPU will be much of an issue. I was just notified
    > >> > > of a
    > >> > > change to our CPLD that will allow the BMC to keep the sensors
    > >> > > powered. At
    > >> > > the
    > >> > > moment, cutting power shuts of the power from the ATX power supply
    > >> > > but now
    > 
    > As far as the sensors when the try is powered down, that's pretty
    > common.  The hwmon driver on the BMC will just be unable to read the
    > values, and you can deal with that in phosphor-hwmon a couple ways.
    > Phosphor-pid-control will go into fail-safe mode if it doesn't receive
    > a sensor value frequently enough.  This mode would cause it to drive
    > the fans to a pre-defined set-point per a configuration.
    > 
    > >> > > I
    > >> > > will have more fine-grained power control. Now I just have to figure
    > >> > > out
    > >> > > how
    > >> > > to update the Lattice CPLD from the BMC... I found some code in the
    > >> > > Facebook
    > >> > > OpenBMC which hopefully I can port over.
    > >> > > 
    > >> > > -Aaron
    > >> > > 
    > >> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
    > >> > > > Aaron, we use this daemon for local (to BMC) thermal control:
    > >> > > > https://github.com/openbmc/phosphor-pid-control
    > >> > > > Maybe you'll find it helpful.
    > >> > > > 
    > >> > > > Although I'm not sure how to help you with losing sensors when the
    > >> > > > host
    > >> > > > powers down but the BMC is expected to continue to cool the tray.
    > >> > > > Sounds
    > >> > > > like an issue with the board design, unless I'm not understanding
    > >> > > > what
    > >> > > > you're saying.
    > >> > > > 
    > >> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams
    > >> > > > <awilliams@marvell.com>
    > >> > > > 
    > >> > > > wrote:
    > >> > > > > Hi Emily,
    > >> > > > > 
    > >> > > > > That's what I need the temperature for. We have two controllers,
    > >> > > > > one
    > >> > > 
    > >> > > that
    > >> > > 
    > >> > > > > monitors the core temperature (a TI TMP421) and one that controls
    > >> > > > > the
    > >> > > 
    > >> > > fans
    > >> > > 
    > >> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421
    > >> > > > > needs
    > >> > > 
    > >> > > to
    > >> > > 
    > >> > > > > be
    > >> > > > > monitored to adjust the fan speed through the ADT7462.
    > >> > > > > 
    > >> > > > > Further complicating things is the fact that these sensors
    > >> > > > > disappear
    > >> > > 
    > >> > > when
    > >> > > 
    > >> > > > > the
    > >> > > > > host is powered down.
    > >> > > > > 
    > >> > > > > -Aaron
    > >> > > > > 
    > >> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer 
    wrote:
    > >> > > > > > External Email
    > >> > > 
    > >> > > ---------------------------------------------------------------------
    > >> > > -
    > >> > > 
    > >> > > > > > Hi Aaron,
    > >> > > > > > 
    > >> > > > > > Note that you only really need to worry about sending the
    > >> > > > > > temperature
    > >> > > > > > via
    > >> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you
    > >> > > > > > plan
    > >> > > 
    > >> > > to
    > >> > > 
    > >> > > > > > do
    > >> > > > > > internal thermal control (BMC reads temperature, BMC adjusts
    > >> > > > > > fans
    > >> > > > > > accordingly) you probably don't need IPMI config and can get
    > >> > > > > > away
    > >> > > 
    > >> > > with
    > >> > > 
    > >> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
    > >> > > > > > sent.
    > >> > > > > > 
    > >> > > > > > Emily
    > >> > > > > > 
    > >> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com> 
    wrote:
    > >> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
    > >> > > 
    > >> > > awilliams@marvell.com>
    > >> > > 
    > >> > > > > > > wrote:
    > >> > > > > > > > I see how to set up the hwmon portion defining the devices
    > >> > > > > > > > based
    > >> > > 
    > >> > > on
    > >> > > 
    > >> > > > > the
    > >> > > > > 
    > >> > > > > > > device
    > >> > > > > > > 
    > >> > > > > > > > tree, but I am unsure how to go about configuring the YAML
    > >> > > > > > > > and
    > >> > > 
    > >> > > other
    > >> > > 
    > >> > > > > > > files for
    > >> > > > > > > 
    > >> > > > > > > > this.
    > >> > > > > > > 
    > >> > > > > > > For sensors' config, please refer to
    > >> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architectu
    > >> > > > > > > re.md
    > >> > > > > > > 
    > >> > > > > > > And it looks you are looking for fan controls, then you could
    > >> > > 
    > >> > > refer
    > >> > > to:
    > >> > > 
    > >> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide
    > >> > > .md#f
    > >> > > 
    > >> > > > > > > ans
    > >> > > > > > > 
    > >> > > > > > > (I really need to submit my porting guide to openbmc/docs)
    
    
    
    
    


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [EXT] Re: OpenBMC Sensors
  2019-02-01 18:04                     ` Vijay Khemka
@ 2019-02-01 19:32                       ` Matthew Barth
  0 siblings, 0 replies; 13+ messages in thread
From: Matthew Barth @ 2019-02-01 19:32 UTC (permalink / raw)
  To: Vijay Khemka, Aaron Williams, Patrick Venture
  Cc: Emily Shaffer, OpenBMC Maillist

Aaron,

Another option would be to look at the use of phosphor-fan-presence. The 
meta-ibm, romulus and witherspoon machines, configure each app (fan 
control, presence, monitoring) and contain the recipes to install them.


On 2/1/19 12:04 PM, Vijay Khemka wrote:
> Aron,
> You may also want to look at dbus-sensors as well. This is another approach for sensors through dbus. You have to include entity manager for this approach.
> 
> Regards
> -Vijay
> 
> On 1/31/19, 9:18 PM, "openbmc on behalf of Aaron Williams" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of awilliams@marvell.com> wrote:
> 
>      Thanks,
>      
>      I think I know what I need to do, after looking at the config example and
>      other yaml examples I've found. My problem is I haven't been able to find any
>      example recipes and whatnot that use this (or maybe I'm looking at the wrong
>      things). I've looked at the various implementations but don't see anything
>      using this.
>      
>      -Aaron
>      
>      On Thursday, January 31, 2019 7:30:04 AM PST Patrick Venture wrote:
>      > On Wed, Jan 30, 2019 at 8:49 PM Emily Shaffer <emilyshaffer@google.com>
>      wrote:
>      > > Aaron,
>      > >
>      > > If it's complaining at build time it's what it says on the box - you
>      > > probably need to include the recipe which builds
>      > > phosphor-fans-sensor-inventory.
>      > >
>      > > Emily
>      > >
>      > > On Wed, Jan 30, 2019, 8:17 PM Aaron Williams <awilliams@marvell.com>
>      wrote:
>      > >> Hi Emily,
>      > >>
>      > >> I'm still not sure how to go about using this, I'm still fairly new to
>      > >> OpenBMC. It's complaing about nothing providing
>      > >> 'virtual/phosphor-fans-sensor- inventory'.  I included
>      > >> phosphor-pid-control as one of our dependencies.
>      > Per Emily, you'll need to implement a recipe that defines the PID
>      > inputs.  It sounds like you have two PID loops.  One is the
>      > temperature sensor, and that feeds the set-point for the fans, which
>      > are a second PID loop.  The idea being, the temperature pid loop
>      > attempts to maintain the temperature under (or over) some set-point,
>      > and it'll in turn try to get the fans to speed up when necessary.
>      >
>      > >> -Aaron
>      > >>
>      > >> On Wednesday, January 30, 2019 1:48:10 PM PST you wrote:
>      > >> > Great, best luck Aaron. Thanks!
>      > >> >
>      > >> > On Wed, Jan 30, 2019, 1:47 PM Aaron Williams <awilliams@marvell.com>
>      wrote:
>      > >> > > Hi Emily,
>      > >> > >
>      > >> > > Thank you, I will look into it. I don't think losing the sensors when
>      > >> > > we
>      > >> > > cut
>      > >> > > power to the host CPU will be much of an issue. I was just notified
>      > >> > > of a
>      > >> > > change to our CPLD that will allow the BMC to keep the sensors
>      > >> > > powered. At
>      > >> > > the
>      > >> > > moment, cutting power shuts of the power from the ATX power supply
>      > >> > > but now
>      >
>      > As far as the sensors when the try is powered down, that's pretty
>      > common.  The hwmon driver on the BMC will just be unable to read the
>      > values, and you can deal with that in phosphor-hwmon a couple ways.
>      > Phosphor-pid-control will go into fail-safe mode if it doesn't receive
>      > a sensor value frequently enough.  This mode would cause it to drive
>      > the fans to a pre-defined set-point per a configuration.
>      >
>      > >> > > I
>      > >> > > will have more fine-grained power control. Now I just have to figure
>      > >> > > out
>      > >> > > how
>      > >> > > to update the Lattice CPLD from the BMC... I found some code in the
>      > >> > > Facebook
>      > >> > > OpenBMC which hopefully I can port over.
>      > >> > >
>      > >> > > -Aaron
>      > >> > >
>      > >> > > On Wednesday, January 30, 2019 1:42:40 PM PST Emily Shaffer wrote:
>      > >> > > > Aaron, we use this daemon for local (to BMC) thermal control:
>      > >> > > > https://github.com/openbmc/phosphor-pid-control
>      > >> > > > Maybe you'll find it helpful.
>      > >> > > >
>      > >> > > > Although I'm not sure how to help you with losing sensors when the
>      > >> > > > host
>      > >> > > > powers down but the BMC is expected to continue to cool the tray.
>      > >> > > > Sounds
>      > >> > > > like an issue with the board design, unless I'm not understanding
>      > >> > > > what
>      > >> > > > you're saying.
>      > >> > > >
>      > >> > > > On Wed, Jan 30, 2019 at 1:28 PM Aaron Williams
>      > >> > > > <awilliams@marvell.com>
>      > >> > > >
>      > >> > > > wrote:
>      > >> > > > > Hi Emily,
>      > >> > > > >
>      > >> > > > > That's what I need the temperature for. We have two controllers,
>      > >> > > > > one
>      > >> > >
>      > >> > > that
>      > >> > >
>      > >> > > > > monitors the core temperature (a TI TMP421) and one that controls
>      > >> > > > > the
>      > >> > >
>      > >> > > fans
>      > >> > >
>      > >> > > > > (ADT7462). In order to maintain the thermal envelope the TMP421
>      > >> > > > > needs
>      > >> > >
>      > >> > > to
>      > >> > >
>      > >> > > > > be
>      > >> > > > > monitored to adjust the fan speed through the ADT7462.
>      > >> > > > >
>      > >> > > > > Further complicating things is the fact that these sensors
>      > >> > > > > disappear
>      > >> > >
>      > >> > > when
>      > >> > >
>      > >> > > > > the
>      > >> > > > > host is powered down.
>      > >> > > > >
>      > >> > > > > -Aaron
>      > >> > > > >
>      > >> > > > > On Wednesday, January 30, 2019 9:49:32 AM PST Emily Shaffer
>      wrote:
>      > >> > > > > > External Email
>      > >> > >
>      > >> > > ---------------------------------------------------------------------
>      > >> > > -
>      > >> > >
>      > >> > > > > > Hi Aaron,
>      > >> > > > > >
>      > >> > > > > > Note that you only really need to worry about sending the
>      > >> > > > > > temperature
>      > >> > > > > > via
>      > >> > > > > > IPMI if you want to send it somewhere besides the BMC.  If you
>      > >> > > > > > plan
>      > >> > >
>      > >> > > to
>      > >> > >
>      > >> > > > > > do
>      > >> > > > > > internal thermal control (BMC reads temperature, BMC adjusts
>      > >> > > > > > fans
>      > >> > > > > > accordingly) you probably don't need IPMI config and can get
>      > >> > > > > > away
>      > >> > >
>      > >> > > with
>      > >> > >
>      > >> > > > > > setting it up as far as DBus in the sensor architecture doc Lei
>      > >> > > > > > sent.
>      > >> > > > > >
>      > >> > > > > > Emily
>      > >> > > > > >
>      > >> > > > > > On Thu, Jan 24, 2019 at 1:27 AM Lei YU <mine260309@gmail.com>
>      wrote:
>      > >> > > > > > > On Thu, Jan 24, 2019 at 5:13 PM Aaron Williams <
>      > >> > >
>      > >> > > awilliams@marvell.com>
>      > >> > >
>      > >> > > > > > > wrote:
>      > >> > > > > > > > I see how to set up the hwmon portion defining the devices
>      > >> > > > > > > > based
>      > >> > >
>      > >> > > on
>      > >> > >
>      > >> > > > > the
>      > >> > > > >
>      > >> > > > > > > device
>      > >> > > > > > >
>      > >> > > > > > > > tree, but I am unsure how to go about configuring the YAML
>      > >> > > > > > > > and
>      > >> > >
>      > >> > > other
>      > >> > >
>      > >> > > > > > > files for
>      > >> > > > > > >
>      > >> > > > > > > > this.
>      > >> > > > > > >
>      > >> > > > > > > For sensors' config, please refer to
>      > >> > > > > > > https://github.com/openbmc/docs/blob/master/sensor-architectu
>      > >> > > > > > > re.md
>      > >> > > > > > >
>      > >> > > > > > > And it looks you are looking for fan controls, then you could
>      > >> > >
>      > >> > > refer
>      > >> > > to:
>      > >> > >
>      > >> > > https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide
>      > >> > > .md#f
>      > >> > >
>      > >> > > > > > > ans
>      > >> > > > > > >
>      > >> > > > > > > (I really need to submit my porting guide to openbmc/docs)
>      
>      
>      
>      
>      
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-01 19:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24  9:03 OpenBMC Sensors Aaron Williams
2019-01-24  9:26 ` Lei YU
2019-01-30 17:49   ` Emily Shaffer
2019-01-30 21:28     ` [EXT] " Aaron Williams
2019-01-30 21:42       ` Emily Shaffer
2019-01-30 21:47         ` Aaron Williams
2019-01-30 21:48           ` Emily Shaffer
     [not found]             ` <2342439.TUI2J960l9@flash>
     [not found]               ` <CAJoAoZnV+u8kJKV7TkPxU_b1hdmJ3nbFyD6rVMSd9ohPSjDHig@mail.gmail.com>
2019-01-31 15:30                 ` Patrick Venture
2019-02-01  1:05                   ` Aaron Williams
2019-02-01  5:17                   ` Aaron Williams
2019-02-01 17:07                     ` Patrick Venture
2019-02-01 18:04                     ` Vijay Khemka
2019-02-01 19:32                       ` Matthew Barth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.