Aspeed2600 EVB Hwmon problem

Andrew Jeffery andrew at aj.id.au
Fri May 14 11:50:06 AEST 2021



On Fri, 14 May 2021, at 07:12, Eric.Wetterlind at gd-ms.com wrote:
>  
> Hello,
> 
>  
> 
> I am currently trying to add a simple temp sensor to my image, which is 
> based off of the evb-ast2600 image.  I have successfully been able to 
> add this sensor to a ast2500-based image, but the 2600 is not 
> cooperating.  Any pointers would be greatly appreciated (and 
> sanity-saving), as I am near the end of all paths I know of.
> 
>  
> 
> Project bblayers.conf.sample contains the following:
> 
> ==========
> 
>   ##OEROOT##/meta \
> 
>   ##OEROOT##/meta-poky \
> 
>   ##OEROOT##/meta-openembedded/meta-oe \
> 
>   ##OEROOT##/meta-openembedded/meta-networking \
> 
>   ##OEROOT##/meta-openembedded/meta-python \
> 
>   ##OEROOT##/meta-phosphor \
> 
>   ##OEROOT##/meta-aspeed \
> 
>   ##OEROOT##/meta-ourproject \
> 
> ===========
> 
>  
> 
> The device tree has this (and using the standard aspeed_g6_dtsi):
> 
> ===========
> 
> &i2c1 {
> 
>         status = "okay";
> 
>  
> 
>         tmp423 at 4c {
> 
>                 compatible = "ti,tmp423";
> 
>                 reg = <0x4c>;
> 
>         };
> 
> };

Are you actually using an AST2600 EVB? Or is this for your own board 
design? Or are you using the EVB and adding some additional sensors via 
e.g. the SATA connector?

There's no such sensor on the 2600 EVB, though there is an LM75 at 
0x4d. Then there's the additional complexity of the groups and jumpers 
to select the I2C buses.

> 
> ===========
> 
>  
> 
> Recipes-phosphor/sensors contains the directory structure 
> phosphor-hwmon/obmc/hwmon/ahb/apb/bus at 1e78a000/i2c-bus at 100, with 
> tmp423.conf in it.
> 
>  
> 
> The phosphor-hwmon_%.bbappend file contains this:
> 
>  
> 
> ===========
> 
> FILESEXTRAPATHS_prepend_ourproject := "${THISDIR}/${PN}:"
> 
> EXTRA_OECONF_append_ourproject = " --enable-negative-errno-on-fail"
> 
> CHIPS = " \
> 
>         bus at 1e78a000/i2c-bus at 100/tmp423 at 4c \
> 
>         "
> 
> ITEMSFMT = "ahb/apb/{0}.conf"
> 
> ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
> 
> ENVS = "obmc/hwmon/{0}"
> 
> SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ourproject = " ${@compose_list(d, 
> 'ENVS', 'ITEMS')}"
> 
> ===========
> 
>  
> 
> When booting up in Qemu, the device is recognized:

Is this the only way you're testing? Or are you also testing on 
appropriate hardware?

How did you invoke qemu? Does the machine you chose model a sensor at 
the appropriate address?

> 
> ===========
> 
> #cat 
> /sys/firmware/devicetree/base/ahb/apb/bus at 1e78a000/i2c-bus at 100/tmp423 at 4c/compatible
> 
> ti,tmp423
> 
>  
> 
> # cat 
> /sys/devices/platform/ahb/ahb\:apb/ahb\:apb\:bus\@1e78a000/1e78a100.i2c-bus/i2c-1/1-004c/name
> 
> tmp423
> 
> ===========
> 
>  
> 
> There is even a link in /sys/bus/i2c/devices/1-004c to 
> /sys/devices/platform/ahb/ahb\:apb/ahb\:apb\:bus\@1e78a000/1e78a100.i2c-bus/i2c-1/1-004c.
> 
>  
> 
> The .conf file shows up in 
> /etc/default/obmc/hwmon/ahb/apb/bus at 1e78a000/i2c-bus at 100.
> 
>  
> 
> The problem is that nothing ever gets populated into /sys/class/hwmon.  
> It is an empty directory.  On our ast2400 and ast2500 images, this same 
> procedure, stripped down to almost the exact same specs as I’ve 
> mentioned above, produces a link as /sys/class/hwmon/hwmon0.  

All the paths you've expressed above are for the device, not the 
driver. The devicetree is essentially an assertion that these devices 
are present, so if you describe them there then they will always appear 
at the paths you've listed above.

It seems an appropriate driver is not bound to the device. This could 
be because the driver didn't find the device present and bailed out, or 
the kernel is not configured with the appropriate driver.

What's in your kernel config? Do you have CONFIG_SENSORS_TMP421=y?

Is there any output in dmesg about the driver failing to probe?

Andrew


More information about the openbmc mailing list