...
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:Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
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>; }; }; |
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
...