Openbmc archive at lore.kernel.org
 help / color / Atom feed
* Enable/Disable some sensors when Host On/Off
@ 2020-10-18 13:58 Thu Ba Nguyen
  2020-10-19 14:16 ` Matt Spinler
  2020-10-19 17:31 ` Ed Tanous
  0 siblings, 2 replies; 6+ messages in thread
From: Thu Ba Nguyen @ 2020-10-18 13:58 UTC (permalink / raw)
  To: openbmc


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

Dear,

I'm supporting the host sensors for Ampere Computing LLC platform.
We are using phosphor-hwmon to update values of sensors and monitoring
sensors warning/errors base on threshold setting.

There are some sensors which are turned off when host Off. It can be the
sensors reported by host or voltage/temperature/power sensors  which use
the same power source with host.

I researched in openBmc sensor-architecture documents but can't find any
option to enable/disable sensors base on one status or GPIO pins. I can't
use REMOVERCS.

Research in phosphor-hwmon code, I don't see the answer too.

Do we have any options/solution to Enable/Disable some sensors when Host
On/Off?

Thanks.
Thu Nguyen.

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

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

* Re: Enable/Disable some sensors when Host On/Off
  2020-10-18 13:58 Enable/Disable some sensors when Host On/Off Thu Ba Nguyen
@ 2020-10-19 14:16 ` Matt Spinler
  2020-10-19 15:23   ` Thu Ba Nguyen
  2020-10-19 17:31 ` Ed Tanous
  1 sibling, 1 reply; 6+ messages in thread
From: Matt Spinler @ 2020-10-19 14:16 UTC (permalink / raw)
  To: Thu Ba Nguyen, openbmc



On 10/18/2020 8:58 AM, Thu Ba Nguyen wrote:
> Dear, I'm supporting the host sensors for Ampere Computing LLC 
> platform. We are...
> This Message Is From an External Sender
> This message came from outside your organization.
>
> Dear,
>
> I'm supporting the host sensors for Ampere Computing LLC platform.
> We are using phosphor-hwmon to update values of sensors and monitoring 
> sensors warning/errors base on threshold setting.
>
> There are some sensors which are turned off when host Off. It can be 
> the sensors reported by host or voltage/temperature/power sensors 
>  which use the same power source with host.
>
> I researched in openBmc sensor-architecture documents but can't find 
> any option to enable/disable sensors base on one status or GPIO pins. 
> I can't use REMOVERCS.
>
> Research in phosphor-hwmon code, I don't see the answer too.
>
> Do we have any options/solution to Enable/Disable some sensors when 
> Host On/Off?

Hi,
The phosphor-hwmon code doesn't support that yet.  It has been discussed 
before but nobody
has implemented it.

>
> Thanks.
> Thu Nguyen.


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

* Re: Enable/Disable some sensors when Host On/Off
  2020-10-19 14:16 ` Matt Spinler
@ 2020-10-19 15:23   ` Thu Ba Nguyen
  0 siblings, 0 replies; 6+ messages in thread
From: Thu Ba Nguyen @ 2020-10-19 15:23 UTC (permalink / raw)
  To: Matt Spinler; +Cc: openbmc


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

Thanks for your reply Matt Spinler,

Can you show me the discussion threads?

I also thought about the solution for that features:
In the current hwmon we support GPIOCHIP + GPIO option which used to enable
sensors to read. In the hwmon code, we just set that pin and wait before
reading.
I think we can support a similar option named GPIOENABLE + GPIOV. When the
status of Gpio pin defind in GPIOEANBLE match with GPIOV.
That sensors will be read and update to Dbus.
If not it will be removed from DBus until the GPIO pin math GPIOV.
Maybe we can have many different solutions.

If you don't mind, can you tell me how IBM supports that features?

Regards.
Thu Nguyen.

On Mon, Oct 19, 2020 at 9:16 PM Matt Spinler <mspinler@linux.ibm.com> wrote:

>
>
> On 10/18/2020 8:58 AM, Thu Ba Nguyen wrote:
> > Dear, I'm supporting the host sensors for Ampere Computing LLC
> > platform. We are...
> > This Message Is From an External Sender
> > This message came from outside your organization.
> >
> > Dear,
> >
> > I'm supporting the host sensors for Ampere Computing LLC platform.
> > We are using phosphor-hwmon to update values of sensors and monitoring
> > sensors warning/errors base on threshold setting.
> >
> > There are some sensors which are turned off when host Off. It can be
> > the sensors reported by host or voltage/temperature/power sensors
> >  which use the same power source with host.
> >
> > I researched in openBmc sensor-architecture documents but can't find
> > any option to enable/disable sensors base on one status or GPIO pins.
> > I can't use REMOVERCS.
> >
> > Research in phosphor-hwmon code, I don't see the answer too.
> >
> > Do we have any options/solution to Enable/Disable some sensors when
> > Host On/Off?
>
> Hi,
> The phosphor-hwmon code doesn't support that yet.  It has been discussed
> before but nobody
> has implemented it.
>
> >
> > Thanks.
> > Thu Nguyen.
>
>

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

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

* Re: Enable/Disable some sensors when Host On/Off
  2020-10-18 13:58 Enable/Disable some sensors when Host On/Off Thu Ba Nguyen
  2020-10-19 14:16 ` Matt Spinler
@ 2020-10-19 17:31 ` Ed Tanous
  2020-10-19 18:22   ` Thu Ba Nguyen
  1 sibling, 1 reply; 6+ messages in thread
From: Ed Tanous @ 2020-10-19 17:31 UTC (permalink / raw)
  To: Thu Ba Nguyen; +Cc: OpenBMC Maillist

On Sun, Oct 18, 2020 at 7:00 AM Thu Ba Nguyen <tbnguyen1985@gmail.com> wrote:
>
> Do we have any options/solution to Enable/Disable some sensors when Host On/Off?

I believe this is already supported in the entity-manager/dbus-sensors
stack, with the "PowerState" parameter in the EM configuration;

example:
https://github.com/openbmc/entity-manager/blob/def29274907ef77187b02ae19d55bb9888413892/configurations/WFT%20Baseboard.json#L6

There's also mitigations for the common thresholding issues, like a
power state change coming in during the sensor read.

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

* Re: Enable/Disable some sensors when Host On/Off
  2020-10-19 17:31 ` Ed Tanous
@ 2020-10-19 18:22   ` Thu Ba Nguyen
  2020-10-19 18:31     ` Ed Tanous
  0 siblings, 1 reply; 6+ messages in thread
From: Thu Ba Nguyen @ 2020-10-19 18:22 UTC (permalink / raw)
  To: Ed Tanous; +Cc: OpenBMC Maillist


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

Hi Ed Tanous,

Thanks for your info,
But in your platform we are using phosphor-hwmon to manage sensors.
We don't use entity-manager.
As I knew we can't use both entity-manager and phosphor-hwmon for one
project.

Regards
Thu Nguyen.

On Tue, Oct 20, 2020 at 12:31 AM Ed Tanous <ed@tanous.net> wrote:

> On Sun, Oct 18, 2020 at 7:00 AM Thu Ba Nguyen <tbnguyen1985@gmail.com>
> wrote:
> >
> > Do we have any options/solution to Enable/Disable some sensors when Host
> On/Off?
>
> I believe this is already supported in the entity-manager/dbus-sensors
> stack, with the "PowerState" parameter in the EM configuration;
>
> example:
>
> https://github.com/openbmc/entity-manager/blob/def29274907ef77187b02ae19d55bb9888413892/configurations/WFT%20Baseboard.json#L6
>
> There's also mitigations for the common thresholding issues, like a
> power state change coming in during the sensor read.
>

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

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

* Re: Enable/Disable some sensors when Host On/Off
  2020-10-19 18:22   ` Thu Ba Nguyen
@ 2020-10-19 18:31     ` Ed Tanous
  0 siblings, 0 replies; 6+ messages in thread
From: Ed Tanous @ 2020-10-19 18:31 UTC (permalink / raw)
  To: Thu Ba Nguyen; +Cc: OpenBMC Maillist

On Mon, Oct 19, 2020 at 11:22 AM Thu Ba Nguyen <tbnguyen1985@gmail.com> wrote:
>
> Hi Ed Tanous,
>
> Thanks for your info,
> But in your platform we are using phosphor-hwmon to manage sensors.
> We don't use entity-manager.
> As I knew we can't use both entity-manager and phosphor-hwmon for one project.

Understood.  i was mostly just pointing out that there might be
logic/implementation details you can pull over into phosphor-hwmon.

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-18 13:58 Enable/Disable some sensors when Host On/Off Thu Ba Nguyen
2020-10-19 14:16 ` Matt Spinler
2020-10-19 15:23   ` Thu Ba Nguyen
2020-10-19 17:31 ` Ed Tanous
2020-10-19 18:22   ` Thu Ba Nguyen
2020-10-19 18:31     ` Ed Tanous

Openbmc archive at lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/openbmc/0 openbmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 openbmc openbmc/ https://lore.kernel.org/openbmc \
		openbmc@lists.ozlabs.org openbmc@ozlabs.org
	public-inbox-index openbmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.openbmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git