Support Nuvoton pmw/tach fans

Support pwm/tach fans on the Nuvoton NPCM7xx BMC. They work similarly to
the already implemented Aspeed fans and can be detected by looking for
the device f0103000.pwm-fan-controller.

Tested: pwm and tach published to dbus when configured in
entity-manager json:

{
    "Name": "System fan connector 0",
    "Pwm": 0,
    "Status": "disabled",
    "Tachs": [0],
    "Type": "FanConnector"
},
{
    "Index": 0,
    "BindConnector": "System fan connector 0",
    "Name": "fan0",
    "Type": "NuvotonFan"
},

$ busctl --no-page tree xyz.openbmc_project.FanSensor
`-/xyz
  `-/xyz/openbmc_project
    |-/xyz/openbmc_project/control
    | `-/xyz/openbmc_project/control/fanpwm
    |   |-/xyz/openbmc_project/control/fanpwm/Pwm_1
    |   |-/xyz/openbmc_project/control/fanpwm/Pwm_2
    |   |-/xyz/openbmc_project/control/fanpwm/Pwm_3
    |   |-/xyz/openbmc_project/control/fanpwm/Pwm_4
    |   `-/xyz/openbmc_project/control/fanpwm/Pwm_5
    `-/xyz/openbmc_project/sensors
      |-/xyz/openbmc_project/sensors/fan_pwm
      | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_1
      | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_2
      | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_3
      | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_4
      | `-/xyz/openbmc_project/sensors/fan_pwm/Pwm_5
      `-/xyz/openbmc_project/sensors/fan_tach
        |-/xyz/openbmc_project/sensors/fan_tach/fan0
        |-/xyz/openbmc_project/sensors/fan_tach/fan1
        |-/xyz/openbmc_project/sensors/fan_tach/fan2
        |-/xyz/openbmc_project/sensors/fan_tach/fan3
        `-/xyz/openbmc_project/sensors/fan_tach/fan4

Signed-off-by: Peter Lundgren <peterlundgren@google.com>
Change-Id: Icf6cba1b8d4d33ccdd9b2dc9ba91209e4a5b2478
1 file changed
tree: a6e91b0378ed712afd892cf6b8e37919b0ec3d69
  1. cmake/
  2. include/
  3. service_files/
  4. src/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. Jenkinsfile
  12. LICENSE
  13. MAINTAINERS
  14. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access