openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mike Jones <proclivis@gmail.com>
To: Ed Tanous <edtanous@google.com>
Cc: Peter Lundgren <peterlundgren@google.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	openbmc@lists.ozlabs.org, Shawn McCarney <shawnmm@linux.ibm.com>,
	Justin Ledford <justinledford@google.com>,
	Gunnar Mills <gmills@linux.vnet.ibm.com>,
	Jason Ling <jasonling@google.com>
Subject: Re: No dbus objects for phosphor-regulators
Date: Fri, 11 Feb 2022 15:56:18 -0700	[thread overview]
Message-ID: <875224D5-837F-4538-8128-F5F45808B689@gmail.com> (raw)
In-Reply-To: <CAH2-KxCOOqoXmBLmR+=Jjrea1fouCOYOb4pGwZHwk5c=QJHeJg@mail.gmail.com>



Sent from my iPad

> On Feb 11, 2022, at 1:20 PM, Ed Tanous <edtanous@google.com> wrote:
> 
> On Fri, Feb 11, 2022 at 8:06 AM Shawn McCarney <shawnmm@linux.ibm.com> wrote:
>> 
>> On 2/11/2022 9:42 AM, Mike Jones wrote:
>> 
>> I was mainly surprised because a conversation I had with Guenter, if I remember correctly, suggested that /dev/i2c calls from user space work with hwmon, because hwmon does not lock the i2c except when using it.
>> 
>> So I assumed that in this case, it was the polling of hwmon that was just keeping it locked enough to conflict with phosphor-regulators and then it gives up.
>> 
>> With i2c-dev, you can specify I2C_SLAVE or I2C_SLAVE_FORCE when creating the connection.  I believe I2C_SLAVE will cause communication attempts to fail if a driver is bound.  I2C_SLAVE_FORCE will still try to communicate.
>> 
>> I wanted to take the more conservative approach, because there are scenarios where interleaving communication can cause serious problems.  For example, if one PMBus regulator supports multiple rails, you have to set the PMBus PAGE register to the rail you are interested in.  Subsequent PMBus commands will affect that rail.  If phosphor-regulators and a driver are both communicating with the regulator, they may both be setting PAGE and thus their subsequent commands are going to the wrong rail.
>> 
>> 
>> I could just not use hwmon at all use phosphor-regulators for all telemetry, but this seemed like more work.
>> 
>> Sorry about that.  I think if you have already done the work of defining the regulator and a read sensors rule in your JSON file, adding a few more sensors is not much additional work though.  Let me know if you have questions.
>> 
>> Also, I will need to figure out how to connect phosphor-regulators telemetry to Redfish and the WebUI. Are there examples of how to do that?
>> 
>> It should just work with no additional effort as long as you define the following correctly in your JSON file:
>> 
>> * The "inventory_path" property of your "chassis" object needs to match a real chassis inventory item on D-Bus.
>> 
>> * The "fru" property of your regulator "device" object needs to match a real inventory item on D-Bus.  As I mentioned earlier, normally if the regulator is pluggable then this is the regulator itself.  Otherwise it is the larger hardware item that contains it, such as a motherboard.  FRU is the acronym for Field Replaceable Unit, referring to a pluggable hardware item.
>> 
>> phosphor-regulators will publish your sensors on D-Bus with the standard object paths and properties.  The two JSON properties above are used to define a "chassis" association and an "inventory_item" association on D-Bus that is used by bmcweb.  This will cause your sensors to appear in Redfish and the Web UI.
>> 
>> Thanks,
>> 
>> Shawn
> 
> This same topic is essentially being discussed in a design doc here:
> https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/50509

I will move my discussion to Gerrit.

Note that I work for ADI, my team supports ADM1266, ADM1278, LTC297X, LTC388X, the MAX devices in this category, and I am on the SMIF (PMBus) Board and on the PMBus Technical Committee.

> 
> I've CCed the relevant parties from that review on this thread, and I
> don't have a strong opinion what forum we use to discuss this, but we
> should ideally all be talking together on a common solution.

  reply	other threads:[~2022-02-11 22:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 22:25 No dbus objects for phosphor-regulators Mike
2022-02-01 17:37 ` 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 [this message]
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=875224D5-837F-4538-8128-F5F45808B689@gmail.com \
    --to=proclivis@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=edtanous@google.com \
    --cc=gmills@linux.vnet.ibm.com \
    --cc=jasonling@google.com \
    --cc=justinledford@google.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=peterlundgren@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).