Forum Discussion

Scotty2's avatar
Scotty2
Icon for Occasional Contributor rankOccasional Contributor
3 years ago
Solved

HPS access to SDM for internal TDS readings

Hi, I am trying to read the Stratix 10 internal TDS from HPS, but I want to do this without loading a bitstream that contains the Mailbox IP block or the Temperature Sensor IP block. I am booting...
  • Scotty2's avatar
    Scotty2
    3 years ago

    Hi,

    yes I got it to work on stratix 10 with linux 5.15.30-lts and uboot 2022.01, ATF 2.6.1

    The process is to enable the HWMON in the defconfig of the kernel (CONFIG_SENSORS_SOC64=y) and add a new node to the device tree that contains the labels and register address of the ADC channels that is then readout by the SDM.

    look at 5.15.70-lts for some documentation and an example of adding these nodes to the device tree. You may also look at the patches made to this tag for the HWMON and apply them yourself if needed.

    After doing that, booting into HPS in HPS first mode without loading any bitstreams, you can read the voltages and the die temperature with a system call at " /sys/class/hwmon/hwmon0/[<name>_label or <name>_input> "

    the values are already multiplied by 1000 in the driver.

    Thanks