Forum Discussion
HPS access to SDM for internal TDS readings
- 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
Hi,
The 'C' example is clear however, from my understanding, you still need to have the mailbox IP BLOCK instantiated into the design and the Bitstream programmed into the FPGA because this IP would not be part of the minimum setup you need to boot into HPS. Is this correct?!
I am looking for a way to communicate with the mailbox (more directly the SDM) for the purpose of reading the core temperature without loading a bitstream, aside from the parts needed to boot in "HPS first" mode (EMIF and some of the I/O ring); before using the FPGA_MANAGER to configure the bitstream through a device tree overlay.
For example by directly writing into the HPS memory mapped registers.
Thank you for the help!