Zynq UltraScale+ MPSoC AMS
Table of Contents
Introduction
A Zynq® UltraScale+™ MPSoC has one system monitoring (SYSMON) block in both the PS and the PL. The SYSMON block has a register interface that can be used to configure theblock and provide the capability to monitor on and off-chip voltages as well as junction temperature. The SYSMON block also has built-in alarm generation logic that is used to
interrupt the processor based on certain alarm conditions. For example, it can shut down the system based on an over-temperature (OT) alarm generated from the SYSMON block.
The PL-SYSMON block has DRP, JTAG, and I2C interfaces to enable monitoring from the external master and the capability to interface with an external power management bus
(PMBus) device. The PS-SYSMON block is memory mapped to the PS. In comparison to JTAG and I2C transfers, this interface is more efficient at transferring data from software. The
PS-SYSMON block has an internal reference option.
HW/IP features
PL block
- 10-bit resolution
- 0.2 MSPS sample rate
- Support external analog input
- External mux supports
- 16 auxiliary channels
- 16 alarm output
- Interface supported JTAG, DRP or dedicated PS DRP, I2C and PMBus
- 2 temperature sensors
- VCCINT, VCCAUX, VCCBRAM, VCC_PSINTLP, VCC_PSINTFP, VCC_PSAUX system supply sensors
- 4 USER supply channels
PS block
- 10-bit resolution
- 1.0 MSPS sample rate
- 16 alarm output
- Interface supported JTAG or APB
- 1 temperature sensors
- VCCINT, VCCAUX, VCCBRAM, VCC_PSINTLP, VCC_PSINTFP, VCC_PSAUX system supply sensors
Missing features, known Issues, limitations
- Single pass sequence mode
- Bipolar channel modes
- External mux mode
- System Lockup can happen if the PL temperature is queried during PL Initialization
Kernel configurations
To compile a kernel with a driver for the AMS enable the following kernel config option:CONFIG_XILINX_AMS
Device Tree Settings
Device Tree Bindings Doc: https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/iio/adc/xlnx%2Czynqmp-ams.yaml
- 2022.2 and prior: https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/iio/adc/xilinx-ams.txt
The above doc will provide details into what full configuration will look like.
The following Device Tree shows minimal configuration.
xilinx_ams: ams@ffa50000 { compatible = "xlnx,zynqmp-ams"; interrupt-parent = <&&gic>; interrupts = <0 56 4>; interrupt-names = "ams-irq"; reg = <0x0 0xffa50000 0x0 0x800>; reg-names = "ams-base"; #address-cells = <2>; #size-cells = <2>; ranges; ams_ps: ams_ps@ffa50800 { compatible = "xlnx,zynqmp-ams-ps"; reg = <0x0 0xffa50800 0x0 0x400>; }; ams_pl: ams_pl@ffa50c00 { compatible = "xlnx,zynqmp-ams-pl"; reg = <0x0 0xffa50c00 0x0 0x400>; }; };
Sysmon IIO Sysfs File Naming Changes
Sysfs File Naming Change
With 2023.1 release, Sysmon IIO Sysfs naming changed as below table.
Block Name | Channel Number | Channel Details | Measurement Type | Releated IIO Sysfs File Names 2023.1 and After under iio:device0/ | Releated IIO Sysfs File Names 2022.2 and Before under iio:device0/ | ||
files prefix | "*_label" file output | files prefix | "*_label" file output | ||||
AMS CTRL | 0 | System PLLs voltage measurement, VCC_PSPLL | Voltage | in_voltage0_* | Not available | in_voltage0_vcc_pspll0_* | vcc_pspll0 |
1 | Battery voltage measurement, VCC_PSBATT | Voltage | in_voltage1_* | Not available | in_voltage1_vcc_psbatt_* | vcc_psbatt | |
2 | PL Internal voltage measurement, VCCINT | Voltage | in_voltage2_* | Not available | in_voltage2_vccint_* | vccint | |
3 | Block RAM voltage measurement, VCCAUX | Voltage | in_voltage3_* | Not available | in_voltage3_vccbram_* | vccbram | |
4 | PL Aux voltage measurement, VCCAUX | Voltage | in_voltage4_* | Not available | in_voltage4_vccaux_* | vccaux | |
5 | Voltage measurement for six DDR I/O PLLs, VCC_PSDDR_PLL | Voltage | in_voltage5_* | Not available | in_voltage5_vcc_psddrpll_* | vcc_psddrpll | |
6 | VCC_PSINTFP_DDR voltage measurement | Voltage | in_voltage6_* | Not available | in_voltage6_vccpsintfpddr_* | vccpsintfpddr | |
AMS PS SYSMON | 7 | LPD temperature measurement | Temperature | in_temp7_* | Not available | in_temp0_ps_temp_* | ps_temp |
8 | FPD temperature measurement (REMOTE) | Temperature | in_temp8_* | Not available | in_temp1_remote_temp_* | remote_temp | |
9 | VCC PS LPD voltage measurement (supply1) | Voltage | in_voltage9_* | Not available | in_voltage7_vccpsintlp_* | vccpsintlp | |
10 | VCC PS FPD voltage measurement (supply2) | Voltage | in_voltage10_* | Not available | in_voltage8_vccpsintfp_* | vccpsintfp | |
11 | PS Aux voltage reference (supply3) | Voltage | in_voltage11_* | Not available | in_voltage9_vccpsaux_* | vccpsaux | |
12 | DDR I/O VCC voltage measurement | Voltage | in_voltage12_* | Not available | in_voltage10_vccpsddr_* | vccpsddr | |
13 | PS IO Bank 503 voltage measurement (supply5) | Voltage | in_voltage13_* | Not available | in_voltage11_vccpsio3_* | vccpsio3 | |
14 | PS IO Bank 500 voltage measurement (supply6) | Voltage | in_voltage14_* | Not available | in_voltage12_vccpsio0_* | vccpsio0 | |
15 | VCCO_PSIO1 voltage measurement | Voltage | in_voltage15_* | Not available | in_voltage13_vccpsio1_* | vccpsio1 | |
16 | VCCO_PSIO2 voltage measurement | Voltage | in_voltage16_* | Not available | in_voltage14_vccpsio2_* | vccpsio2 | |
17 | VCC_PS_GTR voltage measurement, VPS_MGTRAVCC | Voltage | in_voltage17_* | Not available | in_voltage15_psmgtravcc_* | psmgtravcc | |
18 | VTT_PS_GTR voltage measurement, VPS_MGTRAVTT | Voltage | in_voltage18_* | Not available | in_voltage16_psmgtravtt_* | psmgtravtt | |
19 | VCC_PSADC voltage measurement | Voltage | in_voltage19_* | Not available | in_voltage17_vccams_* | vccams | |
AMS PL SYSMON | 20 | PL temperature measurement | Temperature | in_temp20_* | Not available | in_temp2_pl_temp_* | pl_temp |
21 | PL Internal voltage measurement, VCCINT | Voltage | in_voltage21_* | Not available | in_voltage18_vccint_* | vccint | |
22 | PL Auxiliary voltage measurement, VCCAUX | Voltage | in_voltage22_* | Not available | in_voltage19_vccaux_* | vccaux | |
23 | ADC Reference P+ voltage measurement | Voltage | in_voltage22_* | Not available | in_voltage20_vccvrefp_* | vccvrefp | |
24 | ADC Reference N- voltage measurement | Voltage | in_voltage24_* | Not available | in_voltage21_vccvrefn_* | vccvrefn | |
25 | PL Block RAM voltage measuremen, VCCBRAM | Voltage | in_voltage25_* | Not available | in_voltage22_vccbram_* | vccbram | |
26 | LPD Internal voltage measurement, VCC_PSINTLP (supply4) | Voltage | in_voltage26_* | Not available | in_voltage23_vccplintlp_* | vccplintlp | |
27 | FPD Internal voltage measurement, VCC_PSINTFP (supply5) | Voltage | in_voltage27_* | Not available | in_voltage24_vccplintfp_* | vccplintfp | |
28 | PS Auxiliary voltage measurement (supply6) | Voltage | in_voltage28_* | Not available | in_voltage25_vccplaux_* | vccplaux | |
29 | PL VCCADC voltage measurement (VCCAMS) | Voltage | in_voltage29_* | Not available | in_voltage26_vccams_* | vccams | |
30~50 | Diff. analog input signal voltage measurement Vuser* voltage measurement Auxiliary ch* voltage measurement | Voltage | Not Enabled by default design | Not Enabled by default design |
Test Procedure
Test Case 1: Read channel value via sysfs
The above example is calculating the temperature in millidegrees C the calculation as prescribed in sysfs-bus-iio.
Test Case 2: Get rising event for channel using sample application
iio_event_monitor is a program that is located in tools/iio/iio_event_monitor.c inside the linux kernel source.
This application is being used here for monitoring sysmon events.
Test Case 3: Rising event – negative test using sample application
Test Case 4: Get falling event for voltage channel using sample application
Test Case 5: Falling event for voltage channel – negative test using sample application
Change Log
2023.2
- Add Over temperature interrupts
This new functionality allows the user to enable and set thresholds for OT interrupts. This new functionality will disable the OT interrupt and max out the the thresholds by default (as it does with other alarms). The user should manually set the enable and thresholds through sysfs.
Commit Id: f6e3323a5d71d1f893ed20fdecc6b21d784d6683
2023.1
- Added MiliCelsius File
Commit Id: b2c34939a13b135d088ec0bc15711c8db4a38a6d
2022.2
- Various bug fixes and enhancements
Commit Ids: 40c0c1312c1b558463ddbf494d1f4569449cf11e, 3b4a1bd83908b05b8ddf5c0d73c11cd53d23a7b0, f8ef475aa069cd72e9e7bdb2d60dc6a89e2bafad
2022.1
- New up-steamed driver
Commit Id: d5c70627a79455154f5f636096abe6fe57510605
- Various bug fixes and enhancements
Commit Ids: 0bf126163c3e7e6d722622073046aed567a5551e, d5d786fb531697be74c567b3844c6897ddf1ffdd, 1f21a41578062d439cc485bce2d8b664f9a6170e,2c43265516b5a507a2bc646453aafea8aaa304e7
- Add Xilinx AMS driver
- Enable the clock through CCF
- fix temperature offset
- fix false alarm event
- Fix error handling
- Disable interrupts at boot up
- fix module unload crash
- enable clock before device initialization
2017.2
- None
- add missing break in AMS_SUPPLY[78] cases.
- Add suspend resume support.
- reset [ps|pl]-sysmon before channel config
- None
- Add support to read voltages from AMS control block
- Modify driver to match AMS standard sequence
- None
- Resolved scale conflicts in AMS CTRL and PL blocks
- None
2019.2
- None
2020.1
- None
Mainline status
Driver is not in mainline kernel.Related Links
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/iio/adc/xilinx-ams.chttps://github.com/Xilinx/linux-xlnx/blob/master/drivers/iio/adc/xilinx-ams.h
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy