[21/23] arm64: zynqmp: Enable AMS on SOM and other zcu10x boards
Commit Message
AMS is used for monitoring system. Used for measuring voltages and
especially temperatures. Origin interface is IIO but via iio-hwmon it can
be moved to hwmon framework too (done for SOM and zcu100).
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
.../boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 26 +++++++++++++++++++
.../boot/dts/xilinx/zynqmp-zcu100-revC.dts | 17 ++++++++++++
.../boot/dts/xilinx/zynqmp-zcu102-revA.dts | 12 +++++++++
.../boot/dts/xilinx/zynqmp-zcu104-revA.dts | 12 +++++++++
.../boot/dts/xilinx/zynqmp-zcu104-revC.dts | 12 +++++++++
5 files changed, 79 insertions(+)
Comments
On 5/2/23 15:35, Michal Simek wrote:
> AMS is used for monitoring system. Used for measuring voltages and
> especially temperatures. Origin interface is IIO but via iio-hwmon it can
> be moved to hwmon framework too (done for SOM and zcu100).
>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
>
> .../boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 26 +++++++++++++++++++
> .../boot/dts/xilinx/zynqmp-zcu100-revC.dts | 17 ++++++++++++
> .../boot/dts/xilinx/zynqmp-zcu102-revA.dts | 12 +++++++++
> .../boot/dts/xilinx/zynqmp-zcu104-revA.dts | 12 +++++++++
> .../boot/dts/xilinx/zynqmp-zcu104-revC.dts | 12 +++++++++
> 5 files changed, 79 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> index e284979fd7b1..78ff6a9b3144 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> @@ -76,6 +76,20 @@ ds36-led {
> default-state = "on";
> };
> };
> +
> + 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>;
> + };
> };
>
> &modepin_gpio {
> @@ -327,6 +341,18 @@ &gpio {
> "", "", "", ""; /* 170 - 173 */
> };
>
> +&xilinx_ams {
> + status = "okay";
> +};
> +
> +&ams_ps {
> + status = "okay";
> +};
> +
> +&ams_pl {
> + status = "okay";
> +};
> +
> &zynqmp_dpsub {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> index c99abb99efcb..c8be41d77cb9 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> @@ -59,6 +59,15 @@ switch-4 {
> };
> };
>
> + iio-hwmon {
> + 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>;
> + };
> +
> leds {
> compatible = "gpio-leds";
> led-ds2 {
> @@ -581,6 +590,14 @@ &watchdog0 {
> status = "okay";
> };
>
> +&xilinx_ams {
> + status = "okay";
> +};
> +
> +&ams_ps {
> + status = "okay";
> +};
> +
> &zynqmp_dpdma {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> index 5b6403865541..b2e1f3581f6b 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> @@ -1027,6 +1027,18 @@ &watchdog0 {
> status = "okay";
> };
>
> +&xilinx_ams {
> + status = "okay";
> +};
> +
> +&ams_ps {
> + status = "okay";
> +};
> +
> +&ams_pl {
> + status = "okay";
> +};
> +
> &zynqmp_dpdma {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> index a74a2061431a..1f30c37c2e03 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> @@ -511,6 +511,18 @@ &watchdog0 {
> status = "okay";
> };
>
> +&xilinx_ams {
> + status = "okay";
> +};
> +
> +&ams_ps {
> + status = "okay";
> +};
> +
> +&ams_pl {
> + status = "okay";
> +};
> +
> &zynqmp_dpdma {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> index 73972d83ed4d..474744278b97 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> @@ -523,6 +523,18 @@ &watchdog0 {
> status = "okay";
> };
>
> +&xilinx_ams {
> + status = "okay";
> +};
> +
> +&ams_ps {
> + status = "okay";
> +};
> +
> +&ams_pl {
> + status = "okay";
> +};
> +
> &zynqmp_dpdma {
> status = "okay";
> };
Applied.
M
@@ -76,6 +76,20 @@ ds36-led {
default-state = "on";
};
};
+
+ 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>;
+ };
};
&modepin_gpio {
@@ -327,6 +341,18 @@ &gpio {
"", "", "", ""; /* 170 - 173 */
};
+&xilinx_ams {
+ status = "okay";
+};
+
+&ams_ps {
+ status = "okay";
+};
+
+&ams_pl {
+ status = "okay";
+};
+
&zynqmp_dpsub {
status = "okay";
};
@@ -59,6 +59,15 @@ switch-4 {
};
};
+ iio-hwmon {
+ 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>;
+ };
+
leds {
compatible = "gpio-leds";
led-ds2 {
@@ -581,6 +590,14 @@ &watchdog0 {
status = "okay";
};
+&xilinx_ams {
+ status = "okay";
+};
+
+&ams_ps {
+ status = "okay";
+};
+
&zynqmp_dpdma {
status = "okay";
};
@@ -1027,6 +1027,18 @@ &watchdog0 {
status = "okay";
};
+&xilinx_ams {
+ status = "okay";
+};
+
+&ams_ps {
+ status = "okay";
+};
+
+&ams_pl {
+ status = "okay";
+};
+
&zynqmp_dpdma {
status = "okay";
};
@@ -511,6 +511,18 @@ &watchdog0 {
status = "okay";
};
+&xilinx_ams {
+ status = "okay";
+};
+
+&ams_ps {
+ status = "okay";
+};
+
+&ams_pl {
+ status = "okay";
+};
+
&zynqmp_dpdma {
status = "okay";
};
@@ -523,6 +523,18 @@ &watchdog0 {
status = "okay";
};
+&xilinx_ams {
+ status = "okay";
+};
+
+&ams_ps {
+ status = "okay";
+};
+
+&ams_pl {
+ status = "okay";
+};
+
&zynqmp_dpdma {
status = "okay";
};