[PATCH] arm64: zynqmp: Sync DTs with Linux v6.13-rc1

Michal Simek michal.simek at amd.com
Tue Dec 17 12:06:14 CET 2024



On 12/12/24 10:41, Michal Simek wrote:
> Sync zynqmp* DTS files with v6.13-rc1 Linux kernel including three patches
> from Sean:
> arm64: zynqmp: Enable AMS for all boards
> arm64: zynqmp: Expose AMS to userspace as HWMON
> arm64: zynqmp: Add thermal zones
> 
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> ---
> 
>   arch/arm/dts/zynqmp-sm-k26-revA.dts |  18 -----
>   arch/arm/dts/zynqmp-zcu100-revC.dts |   4 --
>   arch/arm/dts/zynqmp-zcu102-revA.dts |   4 --
>   arch/arm/dts/zynqmp-zcu104-revA.dts |   4 --
>   arch/arm/dts/zynqmp-zcu104-revC.dts |   4 --
>   arch/arm/dts/zynqmp.dtsi            | 101 +++++++++++++++++++++++++++-
>   6 files changed, 100 insertions(+), 35 deletions(-)
> 
> diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts
> index 620f5185cc46..b514dc27f710 100644
> --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts
> +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts
> @@ -90,20 +90,6 @@
>   		};
>   	};
>   
> -	ams {
> -		compatible = "iio-hwmon";
> -		io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>,
> -			<&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>,
> -			<&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>,
> -			<&xilinx_ams 9>, <&xilinx_ams 10>, <&xilinx_ams 11>,
> -			<&xilinx_ams 12>, <&xilinx_ams 13>, <&xilinx_ams 14>,
> -			<&xilinx_ams 15>, <&xilinx_ams 16>, <&xilinx_ams 17>,
> -			<&xilinx_ams 18>, <&xilinx_ams 19>, <&xilinx_ams 20>,
> -			<&xilinx_ams 21>, <&xilinx_ams 22>, <&xilinx_ams 23>,
> -			<&xilinx_ams 24>, <&xilinx_ams 25>, <&xilinx_ams 26>,
> -			<&xilinx_ams 27>, <&xilinx_ams 28>, <&xilinx_ams 29>;
> -	};
> -
>   	pwm-fan {
>   		compatible = "pwm-fan";
>   		status = "okay";
> @@ -369,10 +355,6 @@
>   			  "", "", "", ""; /* 170 - 173 */
>   };
>   
> -&xilinx_ams {
> -	status = "okay";
> -};
> -
>   &ams_ps {
>   	status = "okay";
>   };
> diff --git a/arch/arm/dts/zynqmp-zcu100-revC.dts b/arch/arm/dts/zynqmp-zcu100-revC.dts
> index c9051360931b..3542844e6977 100644
> --- a/arch/arm/dts/zynqmp-zcu100-revC.dts
> +++ b/arch/arm/dts/zynqmp-zcu100-revC.dts
> @@ -593,10 +593,6 @@
>   	status = "okay";
>   };
>   
> -&xilinx_ams {
> -	status = "okay";
> -};
> -
>   &ams_ps {
>   	status = "okay";
>   };
> diff --git a/arch/arm/dts/zynqmp-zcu102-revA.dts b/arch/arm/dts/zynqmp-zcu102-revA.dts
> index dd63d22f45e7..955810ae7178 100644
> --- a/arch/arm/dts/zynqmp-zcu102-revA.dts
> +++ b/arch/arm/dts/zynqmp-zcu102-revA.dts
> @@ -1065,10 +1065,6 @@
>   	status = "okay";
>   };
>   
> -&xilinx_ams {
> -	status = "okay";
> -};
> -
>   &ams_ps {
>   	status = "okay";
>   };
> diff --git a/arch/arm/dts/zynqmp-zcu104-revA.dts b/arch/arm/dts/zynqmp-zcu104-revA.dts
> index 31effbf27a8e..64d822255ec5 100644
> --- a/arch/arm/dts/zynqmp-zcu104-revA.dts
> +++ b/arch/arm/dts/zynqmp-zcu104-revA.dts
> @@ -527,10 +527,6 @@
>   	status = "okay";
>   };
>   
> -&xilinx_ams {
> -	status = "okay";
> -};
> -
>   &ams_ps {
>   	status = "okay";
>   };
> diff --git a/arch/arm/dts/zynqmp-zcu104-revC.dts b/arch/arm/dts/zynqmp-zcu104-revC.dts
> index 999b2431bdf2..3e883d717c2f 100644
> --- a/arch/arm/dts/zynqmp-zcu104-revC.dts
> +++ b/arch/arm/dts/zynqmp-zcu104-revC.dts
> @@ -539,10 +539,6 @@
>   	status = "okay";
>   };
>   
> -&xilinx_ams {
> -	status = "okay";
> -};
> -
>   &ams_ps {
>   	status = "okay";
>   };
> diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi
> index 70ca5e6379fc..e8750b08162d 100644
> --- a/arch/arm/dts/zynqmp.dtsi
> +++ b/arch/arm/dts/zynqmp.dtsi
> @@ -18,6 +18,7 @@
>   #include <dt-bindings/interrupt-controller/irq.h>
>   #include <dt-bindings/power/xlnx-zynqmp-power.h>
>   #include <dt-bindings/reset/xlnx-zynqmp-resets.h>
> +#include <dt-bindings/thermal/thermal.h>
>   
>   / {
>   	compatible = "xlnx,zynqmp";
> @@ -36,6 +37,7 @@
>   		#size-cells = <0>;
>   
>   		cpu0: cpu at 0 {
> +			#cooling-cells = <2>;
>   			compatible = "arm,cortex-a53";
>   			device_type = "cpu";
>   			enable-method = "psci";
> @@ -46,6 +48,7 @@
>   		};
>   
>   		cpu1: cpu at 1 {
> +			#cooling-cells = <2>;
>   			compatible = "arm,cortex-a53";
>   			device_type = "cpu";
>   			enable-method = "psci";
> @@ -56,6 +59,7 @@
>   		};
>   
>   		cpu2: cpu at 2 {
> +			#cooling-cells = <2>;
>   			compatible = "arm,cortex-a53";
>   			device_type = "cpu";
>   			enable-method = "psci";
> @@ -66,6 +70,7 @@
>   		};
>   
>   		cpu3: cpu at 3 {
> +			#cooling-cells = <2>;
>   			compatible = "arm,cortex-a53";
>   			device_type = "cpu";
>   			enable-method = "psci";
> @@ -388,6 +393,101 @@
>   		};
>   	};
>   
> +	ams {
> +		compatible = "iio-hwmon";
> +		io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>,
> +			<&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>,
> +			<&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>,
> +			<&xilinx_ams 9>, <&xilinx_ams 10>, <&xilinx_ams 11>,
> +			<&xilinx_ams 12>, <&xilinx_ams 13>, <&xilinx_ams 14>,
> +			<&xilinx_ams 15>, <&xilinx_ams 16>, <&xilinx_ams 17>,
> +			<&xilinx_ams 18>, <&xilinx_ams 19>, <&xilinx_ams 20>,
> +			<&xilinx_ams 21>, <&xilinx_ams 22>, <&xilinx_ams 23>,
> +			<&xilinx_ams 24>, <&xilinx_ams 25>, <&xilinx_ams 26>,
> +			<&xilinx_ams 27>, <&xilinx_ams 28>, <&xilinx_ams 29>;
> +	};
> +
> +
> +	tsens_apu: thermal-sensor-apu {
> +		compatible = "generic-adc-thermal";
> +		#thermal-sensor-cells = <0>;
> +		io-channels = <&xilinx_ams 7>;
> +		io-channel-names = "sensor-channel";
> +	};
> +
> +	tsens_rpu: thermal-sensor-rpu {
> +		compatible = "generic-adc-thermal";
> +		#thermal-sensor-cells = <0>;
> +		io-channels = <&xilinx_ams 8>;
> +		io-channel-names = "sensor-channel";
> +	};
> +
> +	tsens_pl: thermal-sensor-pl {
> +		compatible = "generic-adc-thermal";
> +		#thermal-sensor-cells = <0>;
> +		io-channels = <&xilinx_ams 20>;
> +		io-channel-names = "sensor-channel";
> +	};
> +
> +	thermal-zones {
> +		apu-thermal {
> +			polling-delay-passive = <1000>;
> +			polling-delay = <5000>;
> +			thermal-sensors = <&tsens_apu>;
> +
> +			trips {
> +				apu_passive: passive {
> +					temperature = <93000>;
> +					hysteresis = <3500>;
> +					type = "passive";
> +				};
> +
> +				apu_critical: critical {
> +					temperature = <96500>;
> +					hysteresis = <3500>;
> +					type = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +				map {
> +					trip = <&apu_passive>;
> +					cooling-device =
> +						<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> +						<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> +						<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> +						<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> +				};
> +			};
> +		};
> +
> +		rpu-thermal {
> +			polling-delay = <10000>;
> +			thermal-sensors = <&tsens_rpu>;
> +
> +			trips {
> +				critical {
> +					temperature = <96500>;
> +					hysteresis = <3500>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		pl-thermal {
> +			polling-delay = <10000>;
> +			thermal-sensors = <&tsens_pl>;
> +
> +			trips {
> +				critical {
> +					temperature = <96500>;
> +					hysteresis = <3500>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +	};
> +
>   	amba: axi {
>   		compatible = "simple-bus";
>   		bootph-all;
> @@ -1153,7 +1253,6 @@
>   
>   		xilinx_ams: ams at ffa50000 {
>   			compatible = "xlnx,zynqmp-ams";
> -			status = "disabled";
>   			interrupt-parent = <&gic>;
>   			interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
>   			reg = <0x0 0xffa50000 0x0 0x800>;

Applied.
M


More information about the U-Boot mailing list