help: OpenBMC phosphor-hwmon-readd support for non-hwmon drivers in linux.

Patrick Venture venture at google.com
Sat Nov 10 02:45:40 AEDT 2018


On Fri, Nov 9, 2018 at 2:48 AM A, Maheswari <maheswari.a at atos.net> wrote:
>
> Hi,
>
>
>
> As of my understanding, we need to add chip specific driver support in linux hwmon feature to list the sensors in OpenBMC webUI.
>
>
>
> 1082 root      6388 S    phosphor-hwmon-readd -o /ahb/apb/i2c at 1e78a000/i2c-bus at 140/pxm1310 at XX
>
> 1083 root      6388 S    phosphor-hwmon-readd -o /ahb/apb/i2c at 1e78a000/i2c-bus at 140/ir38163 at XX
>
> 1084 root      6388 S    phosphor-hwmon-readd -o /ahb/apb/i2c at 1e78a000/i2c-bus at 1c0/mpcie_bmc_temp at XX
>
> 1085 root      6388 S    phosphor-hwmon-readd -o /ahb/apb/i2c at 1e78a000/i2c-bus at 140/pxe1610 at XX
>
>
>
> I have added some PMBUS driver to get temp ,input values of VRs and I used exiting lm75 hwmon driver to get temperature sensors.
>
> Added OpenBMC configuration files also.  So, I am able to list some sensors  and its exact values in openbmc WebUI.
>
>
>
> Now,
>
>
>
> I need to add some more temp sensors which is connected to PCA95X chip channel 0,channel 1.
>
> PCA95X driver is already supported in linux/driver/i2c/muxes/.   But NOT listed under hwmon features.  So This chip attributes will NOT be registered as  hwmon sysfs attribute.
>

So if there are temperature sensors beyond an i2c mux, I assume you
need to add the temperature sensors to the device tree as nodes beyond
that mux.

Here's an example of defining nodes behind the mux:

&i2c7 {
    status = "okay";

    /* 0: PSU4
     *    PSU1
     *    PSU3
     *    PSU2
     */
    i2c-switch at 70 {
        compatible = "nxp,pca9546";
        reg = <0x70>;
        #address-cells = <1>;
        #size-cells = <0>;

        i2c_psu4: i2c at 0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0>;

            psu at 59 {
                compatible = "pmbus";
                reg = <0x59>;
            };
        };
    };
};

>
>
> If I want to add this temperature sensor in OpenBMC webUI
>
> Should I add this PCA95X driver code under hwmon?.  ( with hwmon_register and hwmon_unregister).
>
> Please give your concern , is there any other way to add sensor attribute path to  phosphor-hwmon-readd daemon in OBMC.
>
>
>
> Thanks
>
> Maheswari A
>
>
>
>
>
>
>
>
>
>


More information about the openbmc mailing list