arm64: versal-net: Add SysMon and thermal zone
Subsystems (2)
PATCH v2 1/1 arm64: versal-net: Add SysMon and thermal zone
Describe the System Monitor (SysMon) block in the PMC, which provides on-chip voltage and temperature monitoring, and use its device temperature channel as the sensor for a thermal zone.
SysMon channel 0 is the current maximum temperature across all active satellites.
The thermal zone has a critical trip at 125C. Passive trips and cooling maps, voltage channels and per-satellite temperature channels depend on the design and are left to board files.
SysMon availability depends on the design configuration, and it may not be accessible over MMIO, so the SysMon node is disabled by default. Boards that use it enable it.
---
Changes in v2:
- Split out of the versal-sysmon series and sent separately, as there is no dependency on it (Michal).
- Add status = "disabled" to the sysmon0 node (Michal).
v1: https://lore.kernel.org/all/[email protected]/
arch/arm64/boot/dts/xilinx/versal-net.dtsi | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/xilinx/versal-net.dtsi +30 -0
@@ -706,6 +706,28 @@ versal_fpga: versal-fpga { compatible = "xlnx,versal-fpga"; }; + sysmon_temp: thermal-sensor { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&sysmon0 0>; + io-channel-names = "sensor-channel"; + }; + + thermal-zones { + versal_thermal: versal-thermal { + polling-delay = <1000>; /* milliseconds */ + thermal-sensors = <&sysmon_temp>; + + trips { + ot_crit: ot-crit { + temperature = <125000>; /* millicelsius */ + hysteresis = <0>; /* millicelsius */ + type = "critical"; + }; + }; + }; + }; + amba: axi { compatible = "simple-bus"; bootph-all;
@@ -1004,6 +1026,14 @@ spi1: spi@f1970000 { clock-names = "ref_clk", "pclk"; }; + sysmon0: sysmon@f1270000 { + compatible = "xlnx,versal-sysmon"; + status = "disabled"; + reg = <0 0xf1270000 0 0x4000>; + interrupts = <0 202 4>; + #io-channel-cells = <1>; + }; + ttc0: timer@f1dc0000 { compatible = "cdns,ttc"; status = "disabled";
Signature · 1 line
2.44.4
Quoted 65 lines · Amit Kumar Mahapatra
Describe the System Monitor (SysMon) block in the PMC, which provides on-chip voltage and temperature monitoring, and use its device temperature channel as the sensor for a thermal zone.
SysMon channel 0 is the current maximum temperature across all active satellites.
The thermal zone has a critical trip at 125C. Passive trips and cooling maps, voltage channels and per-satellite temperature channels depend on the design and are left to board files.
SysMon availability depends on the design configuration, and it may not be accessible over MMIO, so the SysMon node is disabled by default. Boards that use it enable it.
Signed-off-by Amit Kumar Mahapatra <[email protected]>---
Changes in v2:
- Split out of the versal-sysmon series and sent separately, as there is no dependency on it (Michal).
- Add status = "disabled" to the sysmon0 node (Michal).v1: https://lore.kernel.org/all/[email protected]/
arch/arm64/boot/dts/xilinx/versal-net.dtsi | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm64/boot/dts/xilinx/versal-net.dtsi +23
-0@@ -706,6 +706,28 @@ versal_fpga: versal-fpga { compatible = "xlnx,versal-fpga"; }; + sysmon_temp: thermal-sensor { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&sysmon0 0>; + io-channel-names = "sensor-channel"; + }; + + thermal-zones { + versal_thermal: versal-thermal { + polling-delay = <1000>; /* milliseconds */ + thermal-sensors = <&sysmon_temp>; + + trips { + ot_crit: ot-crit { + temperature = <125000>; /* millicelsius */ + hysteresis = <0>; /* millicelsius */ + type = "critical"; + }; + }; + }; + }; + amba: axi { compatible = "simple-bus"; bootph-all;@@ -1004,6 +1026,14 @@ spi1: spi@f1970000 { clock-names = "ref_clk", "pclk"; }; + sysmon0: sysmon@f1270000 {
arch/arm64/boot/dts/xilinx/versal-net.dtsi spi1: spi@f1970000 { · line 1039
Quoted 10 lines
arch/arm64/boot/dts/xilinx/versal-net.dtsi +7
-0+ compatible = "xlnx,versal-sysmon"; + status = "disabled"; + reg = <0 0xf1270000 0 0x4000>; + interrupts = <0 202 4>; + #io-channel-cells = <1>; + }; + ttc0: timer@f1dc0000 { compatible = "cdns,ttc"; status = "disabled";
Applied.
M