All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike <proclivis@gmail.com>
To: Shawn McCarney <shawnmm@linux.ibm.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: No dbus objects for phosphor-regulators
Date: Mon, 31 Jan 2022 15:25:16 -0700	[thread overview]
Message-ID: <FC1C96F9-CA9C-45B8-9FF5-26CF04109852@gmail.com> (raw)

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

Jason,

Sent from my iPhone

> On Jan 26, 2022, at 3:43 PM, Shawn McCarney <shawnmm@linux.ibm.com> wrote:
> 
> Hi Mike,
> 
>> I made a config file below, and verified that it is on the target and loads without error.
> Just to make sure I understand what you are saying, on the BMC your 'config.json' file is installed in the /usr/share/phosphor-regulators directory
> 
Correct

> And when you run 'journalctl -u phosphor-regulators.service', you see a journal message stating that the phosphor-regulators application has loaded your JSON file successfully?  And no error messages?
> 

Correct

>> When the target boots, using a I2C spy tool, the 0xDD command is being read periodically, suggesting that this service is processing the read command, and a query show the service is up.
> Sensor reading should begin when the chassis is powered on and stop when the chassis is powered off.  That is because some regulators don't have power at standby or report invalid sensor readings.
> 

I am using the SDK, so I have not worked on chassis power, so I don’t know if it is powered or not, but this gives me a good hint about the problem. Even so, the read command in config.json is getting polled. The other config item to modify the voltage did not occur.

Given I am using an Aspeed EVK, is there an example for how to turn on a chassis with a GPIO, or a dbus operation, or an automatic turn on at boot?
> Does the 'journalctl | grep -i Regulators' show that the service files are being executed that enable and disable regulator sensor monitoring?
> 
No, only the daemon starting.
>> Using dbus-monitor –system, I do not see any transactions that place these sensor read values on dbus, nor does the normal probing the chassis and inventory show values.
> Since you are reading a vout sensor for the rail named "vdd", the resulting D-Bus object path for the sensor should be
> 
>   /xyz/openbmc_project/sensors/voltage/vdd_vout
> 
> See https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/docs/config_file/pmbus_read_sensor.md#d-bus-sensor for more details.
> 
> Does that object path exist on D-Bus after you've powered on the chassis and sensor monitoring has been enabled?
> 
It does not exist.

> You can see all the properties of the D-Bus sensor using the command
> 
>   busctl introspect xyz.openbmc_project.Power.Regulators /xyz/openbmc_project/sensors/voltage/vdd_vout
> 
> You can see all regulator sensor object paths via the command:
> 
>   busctl tree xyz.openbmc_project.Power.Regulators
> 
> The phosphor-regulators application reads sensors once per second.  However, it only updates D-Bus if the new sensor value has changed more than a hysteresis amount.  This is to avoid generating a bunch of D-Bus traffic for minor value changes.
> 
> You can see the hysteresis values here: https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/dbus_sensor.cpp#L66
> 
>> What else do I need to so that there are dbus objects?
> For bmcweb and Redfish to work, you need associations between the D-Bus sensor and two D-Bus inventory objects:
> 
> * The FRU that contains the regulator.  This is the replaceable hardware item where the regulator is located.  Some regulators are FRUs by themselves (replaceable).  Some are located on larger FRUs like a motherboard.  This is used to get presence, health info, and if applicable VPD.
> 
Ah, it did not occurs to me that a mother board as FRU is wapping regulators inside an FRU. Seems obvious now.
> * The chassis that contains the regulator.  This is required by Redfish since it groups sensors by chassis.
> 
Ok

> The phosphor-regulators application creates those associations automatically based on information in your JSON file.  The "fru" property of the regulator "device" provides the first inventory object path.  The "inventory_path" property of the "chassis" provides the second inventory path.  Both of those are relative to the "/xyz/openbmc_project/inventory" root path.
> 
> Do the "fru" and "inventory_path" properties in your JSON file match the correct inventory object paths on your system?
> 
I have a psu.json with fruConfigs, and this has

“PsuDevices”: {
  “/xyz/openbmc-project/inventory/system/chassis/motherboard/powersupply0” : “/sys/bus/i2c/devices/11-004f”,
}

Which is the same i2c address as used by phosphor-regulators.

And a power-supply-monitor-0.conf to match.
>> Note I have not done anything to intentionally use open_power. My goal is to only use phosphor-regulators to expose some telemetry that hwmon does not support.
> That's fine.  This application does not have any dependencies on open_power.
> 
> Let me know if you need more info.
> 
> Shawn
> 
Mike


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

             reply	other threads:[~2022-01-31 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 22:25 Mike [this message]
2022-02-01 17:37 ` No dbus objects for phosphor-regulators Shawn McCarney
2022-02-09 22:30   ` Mike Jones
2022-02-11 15:32     ` Shawn McCarney
2022-02-11 15:42       ` Mike Jones
2022-02-11 16:06         ` Shawn McCarney
2022-02-11 20:20           ` Ed Tanous
2022-02-11 22:56             ` Mike Jones
2022-02-11 20:53       ` Patrick Williams
  -- strict thread matches above, loose matches on Subject: below --
2022-01-25 22:15 Mike Jones
2022-01-26 22:43 ` Shawn McCarney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FC1C96F9-CA9C-45B8-9FF5-26CF04109852@gmail.com \
    --to=proclivis@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=shawnmm@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.