openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kun Yi <kunyi@google.com>
To: akashgj91@gmail.com
Cc: leetroy@gmail.com, Emily Shaffer <emilyshaffer@google.com>,
	 Patrick Venture <venture@google.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Temperature Sensor Reading not showing up.
Date: Tue, 6 Nov 2018 11:22:50 -0800	[thread overview]
Message-ID: <CAGMNF6Wz8JzTB5XGKLii9wzPi=9YruKaYqHBPn0giym8RdQJ7Q@mail.gmail.com> (raw)
In-Reply-To: <CAE33tLEuF0DXJvdPxA1xfVTq4YuHZppOSShP71_vEBt_nsKxyw@mail.gmail.com>

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

Well the temp1_input not showing in sysfs is related to linux kernel, not
with userspace. Please double check your device tree node matches physical
bus, and the corresponding kernel configs are enabled. Attach dmesg and
bootlog would be  helpful for people to help debug.

On Tue, Nov 6, 2018 at 1:53 AM AKASH G J <akashgj91@gmail.com> wrote:

> I corrected the path of the environment file to be
> meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwon/ahb/apb/i2c@1e78a000
> /i2c-bus@440/tmp75@48.conf.
>
> Still temp1_input is not coming on the sysfs (/sys/class/hwmon/hwmon0)
>
> On Tue, Nov 6, 2018 at 12:01 PM Kun Yi <kunyi@google.com> wrote:
>
>>
>> On Mon, Nov 5, 2018 at 10:17 PM Troy Lee <leetroy@gmail.com> wrote:
>>
>>> The *service* here doesn't relate to systemd service.
>>>
>>> It is the name on D-Bus.
>>> https://github.com/openbmc/phosphor-hwmon#d-bus-bus-names
>>>
>>> Try this command to list all the services related to hwmon:
>>> # busctl --no-page list | grep -E "Hwmon1|PID"
>>>
>>> First column will be the service name.
>>>
>>> Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com>
>>> AKASH G J <akashgj91@gmail.com> 於 2018年11月5日 週一 下午4:40寫道:
>>> >
>>> > No such service is available in root file system. The output of the
>>> command ls / -R | grep Hwmon  is
>>> >
>>> > root@zaius:~# ls / -R | grep Hwmon
>>> > xyz.openbmc_project.Hwmon@.service
>>> > system-xyz.openbmc_project.Hwmon.slice
>>> >
>>> /sys/fs/cgroup/systemd/system.slice/system-xyz.openbmc_project.Hwmon.slice:
>>> > system-xyz.openbmc_project.Hwmon.slice
>>> >
>>> /sys/fs/cgroup/unified/system.slice/system-xyz.openbmc_project.Hwmon.slice:
>>> > root@zaius:~#
>>> >
>>> > On Mon, Nov 5, 2018 at 1:20 PM Troy Lee <leetroy@gmail.com> wrote:
>>> >>
>>> >> Your service path doesn't look right.
>>> >>
>>> >> According to:
>>> >>
>>> https://github.com/openbmc/docs/blob/master/sensor-architecture.md#d-bus
>>> >>
>>> >> It should be something like this:
>>> >>   xyz.openbmc_project.Hwmon-<hash>.Hwmon1
>>> >>
>>> >>
>>> >>
>>> >> Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com>
>>> >> AKASH G J <akashgj91@gmail.com> 於 2018年11月5日 週一 下午2:55寫道:
>>> >> >
>>> >> > I tried the command busctl --system introspect
>>> xyz.openbmc_project.Hwmon@.service
>>> /xyz/openbmc_project/Sensors/temperature/ambient
>>> xyz.openbmc_project.sensor.Threshold.Warning | grep property and it outputs
>>> >> >
>>> >> > Failed to introspect object
>>> /xyz/openbmc_project/Sensors/temperature/ambient of service
>>> xyz.openbmc_project.Hwmon@.service: Invalid argument.
>>> >> >
>>> >> > I added the file
>>> meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e6e2000
>>> /i2c-bus@90/tmp75@48.conf in machine configuration directory with the
>>> following contents for dbus mapping.
>>> >> >
>>> >> > LABEL_temp1 = ambient
>>> >> > WARNLO_temp1=-40
>>> >> > WARNHI_temp1=125
>>> >> >
>>> >> > Whether this is correct or not?
>>> >> >
>>> >> > On Fri, Nov 2, 2018 at 8:57 PM Emily Shaffer <
>>> emilyshaffer@google.com> wrote:
>>> >> >>
>>> >> >> Have you tried a dbus introspect to see if the sensor is coming
>>> across dbus correctly? There is a sample introspect command on the sensor
>>> howto, check out the busctl usage.
>>> https://github.com/openbmc/docs/blob/master/sensor-architecture.md
>>> >> >>
>>> >> >> On Fri, Nov 2, 2018, 3:21 AM AKASH G J <akashgj91@gmail.com>
>>> wrote:
>>> >> >>>
>>> >> >>> I added the sensor configuration to phosphor-host-ipmid's sensor
>>> configuration like.
>>> >> >>>
>>> >> >>> 0x12: &temperature
>>> >> >>>   sensorType: 0x01
>>> >> >>>   path: /xyz/openbmc_project/sensors/temperature/ambient
>>> >> >>>   sensorReadingType: 0x01
>>> >> >>>   multiplierM: 235
>>> >> >>>   offsetB: 0
>>> >> >>>   bExp: 0
>>> >> >>>   unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
>>> >> >>>   scale: -3
>>> >> >>>   rExp: -3
>>> >> >>>   serviceInterface: org.freedesktop.DBus.Properties
>>> >> >>>   readingType: readingData
>>> >> >>>   interfaces:
>>> >> >>>     xyz.openbmc_project.Sensor.Value:
>>> >> >>>       Value:
>>> >> >>>         Offsets:
>>> >> >>>           0xFF:
>>> >> >>>             type: int64_t
>>> >> >>>
>>> >> >>>
>>> >> >>> When I run the command ipmitool -I dbus sdr elist full, it gives
>>> the following.
>>> >> >>>
>>> >> >>> ambient          | 12h | ns  |  0.0 | Disabled
>>> >> >>>
>>> >> >>> It is not giving the sensor reading and it is showing the sensor
>>> device is disabled.
>>> >> >>>
>>> >> >>> On Thu, Nov 1, 2018 at 11:28 PM Patrick Venture <
>>> venture@google.com> wrote:
>>> >> >>>>
>>> >> >>>> On Tue, Oct 30, 2018 at 10:13 PM AKASH G J <akashgj91@gmail.com>
>>> wrote:
>>> >> >>>> >
>>> >> >>>> > Hi All,
>>> >> >>>> >
>>> >> >>>> > I built OpenBMC Linux using Zaius configuration and booted on
>>> BMC Aspeed AST-2500. The board we are using have one temperature sensor
>>> (Texas Instruments TMP75) on I2C-12 interface.
>>> >> >>>> >
>>> >> >>>> > I added the file
>>> meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e6e2000
>>> /i2c-bus@90/tmp75@48.conf in machine configuration directory with the
>>> following contents.
>>> >> >>>> >
>>> >> >>>> > LABEL_temp1 = ambient
>>> >> >>>> > WARNLO_temp1=-40
>>> >> >>>> > WARNHI_temp1=125
>>> >> >>>> >
>>> >> >>>> > I added the following patch to the kernel file
>>> linux/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts.
>>> >> >>>> >
>>> >> >>>> >  &i2c12 {
>>> >> >>>> > -    status = "disabled";
>>> >> >>>> > +    status = "okay";
>>> >> >>>> > +
>>> >> >>>> > +    tmp75@48 {
>>> >> >>>> > +        compatible = "ti,tmp75";
>>> >> >>>> > +        reg = <0x48>;
>>> >> >>>> > +    };
>>> >> >>>> > +
>>> >> >>>> >  };
>>> >> >>>> >
>>> >> >>>> > After booting Linux, the changes are reflected in
>>> /sys/firmware/devicetree/base/ahb/apb/i2c@1e78a000/i2c-bus@440/tmp75@48.
>>> Also,
>>> >> >>>> > tmp78.conf is showing in
>>> /etc/default/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@90.
>>>
>>
>> Besides what others suggested looks like you have a mismatch between your
>> device path and the path for the environment file. They need to have the
>> same path.
>>
>> Steps to try:
>> 1. Fix the path of your environment file to be
>> meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwon/ahb/apb/i2c@1e78a000
>> /i2c-bus@440/tmp75@48.conf
>> 2. Make sure the hwmon sysfs interface shows up and temp1_input reads a
>> valid value
>> 3. Play with busctl as others suggested and make sure the sensor value is
>> reported over DBus
>>
>>
>>> >> >>>> >
>>> >> >>>> > when I am running the ipmitool command: ipmitool -I dbus sdr
>>> elist full it is not showing the temperature sensor and its reading.
>>> >> >>>> >
>>> >> >>>> > Please someone help to resolve the problem.
>>> >> >>>>
>>> >> >>>> You'll need to add the sensor configuration to the
>>> >> >>>> phosphor-host-ipmid's sensor configuration, see:
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/openbmc/openbmc/blob/master/meta-ingrasys/meta-zaius/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%25/config.yaml
>>> >> >>>>
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> > Thanks and Regards,
>>> >> >>>> >
>>> >> >>>> > Akash
>>> >> >>>> >
>>>
>>
>>
>> --
>> Regards,
>> Kun
>>
>

-- 
Regards,
Kun

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

  reply	other threads:[~2018-11-06 19:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  5:13 Temperature Sensor Reading not showing up AKASH G J
2018-11-01 17:57 ` Patrick Venture
2018-11-02 10:19   ` AKASH G J
2018-11-02 15:27     ` Emily Shaffer
2018-11-05  6:54       ` AKASH G J
2018-11-05  7:50         ` Troy Lee
2018-11-05  8:40           ` AKASH G J
2018-11-06  6:16             ` Troy Lee
2018-11-06  6:30               ` Kun Yi
2018-11-06  9:53                 ` AKASH G J
2018-11-06 19:22                   ` Kun Yi [this message]
2018-11-08  6:26                     ` AKASH G J
2018-11-06  6:39               ` AKASH G J

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='CAGMNF6Wz8JzTB5XGKLii9wzPi=9YruKaYqHBPn0giym8RdQJ7Q@mail.gmail.com' \
    --to=kunyi@google.com \
    --cc=akashgj91@gmail.com \
    --cc=emilyshaffer@google.com \
    --cc=leetroy@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=venture@google.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).