From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B7C4C433FE for ; Wed, 9 Feb 2022 22:30:54 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JvF2h2S2zz3bbH for ; Thu, 10 Feb 2022 09:30:52 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=WHwENzjz; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::232; helo=mail-oi1-x232.google.com; envelope-from=proclivis@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=WHwENzjz; dkim-atps=neutral Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JvF1t55Rfz2yLK for ; Thu, 10 Feb 2022 09:30:08 +1100 (AEDT) Received: by mail-oi1-x232.google.com with SMTP id r27so4080063oiw.4 for ; Wed, 09 Feb 2022 14:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=4NFAeFncs237KxPLPg0ntFRivPTL8/uR1HW7y2krhZ0=; b=WHwENzjzNEFQ3vOqD6uVTUCNP07sdZ1lX1bCEYfS1mhH+uAazdDL+ty1/PH9z2se0x 2HWbFs4yt7KyOD0UrGFrkhCdQZKink00jqy5DIlj4ukQiiujSFhM6HCNESVq/okBnTrm l5KclWHLP0w8EtD/0gknxhLENb2SNrgIKZNlRM8HZSo90mWpIL6JDjiTBpsgX0jW6rTL XoNplqVEwxGNlPbrW+aAbz5uW3AYKm4GoXTizWvBbXbWat8XP4NGyDzYPrhOQOicCPZy +X5CDvXXi3BNqlX677/K0D13iPoQJYAFylc6pzlIio3MnxfvQua+/Q7+F6jFCtOHm8pX yPDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=4NFAeFncs237KxPLPg0ntFRivPTL8/uR1HW7y2krhZ0=; b=GwYlT9mBGmdNq7EDnH0og/Ejc6qxoxS2rJ8zhD0hDDqYwHLE2jQ+zywNrCJtAhzvHF kEtEP20YoT4iri2oOSWpXpYICr2gGT6qelIxSaOZDJNUAiMEir4dfwytsy+ulElXDAFI WbUSkeXrg5JN9mgeNnDo1mwFrSBY4Z8ga4fO1GG0xCNVfy7HtVOJ/w79K1dUCY27fDDV KtNUu1dwydHj31BSOwZb1kjbGqlMC+83T0ZUaep5eXfjkzcGxKO/P/xBhYNrkglTbo3T /hkPMg0fpMUH9boHJBu90VRRVFnW28qlylHhb6VEtUlrrDZBiqAxulTVUgNLa2V6U3x+ ui/g== X-Gm-Message-State: AOAM533wU17SigZ7VlphMFJ6/syshSoiHOxGx8LMVQUOAAxVgWIWkeTU 9QsCBqhhFe2j80J4ygQEC9HlHX/K6C/ozw== X-Google-Smtp-Source: ABdhPJwRRpSQMrYIixboQoxT+4xoYIsG0zN2LQZNWFCvRhe3I+3UA9Vro1ET8FHRycuyiiDybLFMIA== X-Received: by 2002:a05:6808:159d:: with SMTP id t29mr1983920oiw.271.1644445805111; Wed, 09 Feb 2022 14:30:05 -0800 (PST) Received: from smtpclient.apple ([2600:100e:b034:e017:8b9:7079:c0c1:de57]) by smtp.gmail.com with ESMTPSA id j6sm2949648oil.36.2022.02.09.14.30.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Feb 2022 14:30:04 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-3490A66B-E2D0-4799-8A7D-87AEA4DDBC53 Content-Transfer-Encoding: 7bit From: Mike Jones Mime-Version: 1.0 (1.0) Subject: Re: No dbus objects for phosphor-regulators Date: Wed, 9 Feb 2022 15:30:03 -0700 Message-Id: <6D1561E1-59FC-4126-9271-A7C8BFDB0B11@gmail.com> References: <9aaceaed-1a8a-6a13-d650-8f4678d267d4@linux.ibm.com> In-Reply-To: <9aaceaed-1a8a-6a13-d650-8f4678d267d4@linux.ibm.com> To: Shawn McCarney X-Mailer: iPad Mail (19C56) X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: OpenBMC Maillist Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --Apple-Mail-3490A66B-E2D0-4799-8A7D-87AEA4DDBC53 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The journal shows an I2C error: Device or resource busy. Does hwmon lock out phosphor-regulators if it uses the same address? Sent from my iPad > On Feb 1, 2022, at 10:38 AM, Shawn McCarney wrote:= >=20 > =EF=BB=BF=20 >>>> When the target boots, using a I2C spy tool, the 0xDD command is being r= ead periodically, suggesting that this service is processing the read comman= d, 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 pow= er at standby or report invalid sensor readings. >>>=20 >>=20 >> I am using the SDK, so I have not worked on chassis power, so I don=E2=80= =99t know if it is powered or not, but this gives me a good hint about the p= roblem. Even so, the read command in config.json is getting polled. The othe= r config item to modify the voltage did not occur. > It sounds like at least part of the problem might be the systemd service f= iles not running. The regulators service files are located in https://githu= b.com/openbmc/phosphor-power/tree/master/services. >=20 > * phosphor-regulators.service: This one launches the regulators app. Thi= s must be happening since you are a getting journal message about it loading= the JSON config file. >=20 > * phosphor-regulators-config.service: This is what causes the configurati= on entries to be executed in the JSON file. This should happen early in the= process of powering on the chassis before the regulators have received powe= r (been enabled). >=20 > * phosphor-regulators-monitor-enable.service: This enables sensor and pha= se fault monitoring. This should happen during the chassis power on after t= he regulators have received power (been enabled). >=20 > * phosphor-regulators-monitor-disable.service: This disables sensor and p= hase fault monitoring. This should happen early when the chassis is being p= owered off. >=20 > Sounds like maybe the last 3 service files are being run? You can tell fo= r sure by looking in the journal (e.g. 'journalctl | grep -i regulator'). T= he Wants/Before/After dependencies in the files determine when they are run.= Perhaps the systemd targets they are dependent on aren't running on your s= ystem? >=20 > You can manually cause the regulators application to perform configuration= and sensor monitoring using the 'regsctl' program. Look at the service fil= es to see the proper regsctl command to use. This is an implementation deta= il and could change in the future, but it may help with debugging right now.= >=20 > Regarding the fact the 0xDD is being read, is it possibly being read by an= other application like hwmon? >=20 > Note that the phosphor-regulators application does direct I2C reads and wr= ites using the i2c-dev subsystem. This is the same code path as i2cget/i2cs= et. This means it should not be used in conjunction with a device driver on= the regulator. Otherwise there may be interleaved I2C commands going to th= e device, which can be problematic. >=20 >>=20 >> Given I am using an Aspeed EVK, is there an example for how to turn on a c= hassis with a GPIO, or a dbus operation, or an automatic turn on at boot? >>=20 > Sorry, I'm not very familiar with that. Others on this list could help mo= re with that as a separate question thread. I use the 'obmcutil chassison' c= ommand. Since that is a script, you could check out what it is doing and se= e if that would help. >=20 >>=20 >>> The phosphor-regulators application creates those associations automatic= ally based on information in your JSON file. The "fru" property of the regu= lator "device" provides the first inventory object path. The "inventory_pat= h" property of the "chassis" provides the second inventory path. Both of th= ose are relative to the "/xyz/openbmc_project/inventory" root path. >>>=20 >>> Do the "fru" and "inventory_path" properties in your JSON file match the= correct inventory object paths on your system? >>>=20 >> I have a psu.json with fruConfigs, and this has >>=20 >> =E2=80=9CPsuDevices=E2=80=9D: { >> =E2=80=9C/xyz/openbmc-project/inventory/system/chassis/motherboard/powe= rsupply0=E2=80=9D : =E2=80=9C/sys/bus/i2c/devices/11-004f=E2=80=9D, >> } >>=20 >> Which is the same i2c address as used by phosphor-regulators. >>=20 >> And a power-supply-monitor-0.conf to match. >>=20 > It sounds like you are using a power supply application from the same repo= sitory. That is no problem, but they are completely separate applications t= hat do no share any data/functionality. So I don't think the work you've do= ne with the PSU app would impact the regulators app. >=20 > It may be a typo above, but a voltage regulator would not normally be at t= he same I2C address as a power supply. The term 'power supply' in that repo= means the device that converts AC/DC wall power to 12V DC to the system (e.= g. the big brick). The term 'voltage regulator' means the devices that step= 12V DC from the power supply down to the levels needed by system components= (like 3.3V, 1.1V, etc.). --Apple-Mail-3490A66B-E2D0-4799-8A7D-87AEA4DDBC53 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable The journal shows an I2C error: Device or r= esource busy.

Does hwmon lock out phosphor-regulators if i= t uses the same address?

Sent from my iPad

On Feb 1, 2022, at 10:38 AM, Shaw= n McCarney <shawnmm@linux.ibm.com> wrote:

=EF=BB=BF =20 =20 =20

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=E2=80=99t 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.

It sounds like at least part of the problem might be the systemd service files not running.  The regulators service files are located in https://github.com/openbmc/phosphor-pow= er/tree/master/services.

* phosphor-regulators.service:  This one launches the regulators= app.  This must be happening since you are a getting journal message about it loading the JSON config file.

* phosphor-regulators-config.service:  This is what causes the configuration entries to be executed in the JSON file.  This should happen early in the process of powering on the chassis before the regulators have received power (been enabled).

* phosphor-regulators-monitor-enable.service:  This enables sensor and phase fault monitoring.  This should happen during the= chassis power on after the regulators have received power (been enabled).

* phosphor-regulators-monitor-disable.service:  This disables sensor and phase fault monitoring.  This should happen early when= the chassis is being powered off.

Sounds like maybe the last 3 service files are being run?  You can tell for sure by looking in the journal (e.g. 'journalctl | grep -i regulator').  The Wants/Before/After dependencies in the files determine when they are run.  Perhaps the systemd targets they are dependent on aren't running on your system?

You can manually cause the regulators application to perform configuration and sensor monitoring using the 'regsctl' program. = Look at the service files to see the proper regsctl command to use.  This is an implementation detail and could change in the future, but it may help with debugging right now.

Regarding the fact the 0xDD is being read, is it possibly being read by another application like hwmon?

Note that the phosphor-regulators application does direct I2C reads and writes using the i2c-dev subsystem.  This is the same code path as i2cget/i2cset.  This means it should not be used in conjunction with a device driver on the regulator.  Otherwise there may be interleaved I2C commands going to the device, which can be problematic.


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?

Sorry, I'm not very familiar with that.  Others on this list could help more with that as a separate question thread.  I use the 'obmcutil chassison' command.  Since that is a script, you could check out what it is doing and see if that would help.


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

=E2=80=9CPsuDevices=E2=80=9D: {
  =E2=80=9C/xyz/openbmc-project/inventory/system/chassis/motherboard= /powersupply0=E2=80=9D : =E2=80=9C/sys/bus/i2c/devices/11-004f=E2=80=9D,
}

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

And a power-supply-monitor-0.conf to match.

It sounds like you are using a power supply application from the same repository.  That is no problem, but they are completely separate applications that do no share any data/functionality.  S= o I don't think the work you've done with the PSU app would impact the regulators app.

It may be a typo above, but a voltage regulator would not normally be at the same I2C address as a power supply.  The term 'power supply' in that repo means the device that converts AC/DC wall power to 12V DC to the system (e.g. the big brick).  The ter= m 'voltage regulator' means the devices that step 12V DC from the power supply down to the levels needed by system components (like 3.3V, 1.1V, etc.).

=20
= --Apple-Mail-3490A66B-E2D0-4799-8A7D-87AEA4DDBC53--