From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74912C77B7A for ; Tue, 16 May 2023 11:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232909AbjEPLMq (ORCPT ); Tue, 16 May 2023 07:12:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232904AbjEPLMa (ORCPT ); Tue, 16 May 2023 07:12:30 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E790E8A79 for ; Tue, 16 May 2023 04:11:02 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f49bf0223cso69439455e9.1 for ; Tue, 16 May 2023 04:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20221208.gappssmtp.com; s=20221208; t=1684235412; x=1686827412; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+QDbJK0mn7DubrzqluvREfFk7e2EK90hP2aDsHEEgRU=; b=amodcCNODgCh+4Bzi24ukKAKMXmpv13v3wwGBwoDPCxbXXReeqske9wxoyET8VE0B2 gWB1NBn9kPp4hRwKc7SHzRpqLvTRutkIEcX6KVmcI3OoTtc4G+o9YMtjXUbnDjh5mM/2 CdUDBfM1BHes+2YIrmdjY9EPi5banbTbeTz9iwhU01TamjGi8SLnJVjz373J4GfASyad mWkSpMtnNFYVjRqefnq3HRhWKZqQXKf+9nwYy/Nm5jB8wu+Q8XddemHKhzXKZnDD7aWV A7ezmKFtZibCS9HI69X2NINAtqJBUz1vHYkkNFf25KSUoI55c+rraq1FvyNLeClPWz66 KNNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684235412; x=1686827412; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+QDbJK0mn7DubrzqluvREfFk7e2EK90hP2aDsHEEgRU=; b=A0ZDQYz9zVTFj2pJQbMJbH3qsts3WKvhLYlqINCVBbflAa2NePqeEWR/YPw6ScpbdW uHLI/m/W2F8YTp6x/NS99f6LcBjhzg5+I9d9MtRJumBJinNJRZGj99SwMxQbwDcb8Has XnieSXPPcAPA947zvBV1NuYSNYB3cEQmU/iZTrtpOhX9ioza9HLu8KrJCyNCW1lcHFQj FZC9vqqDDZEqjgjfN417KozFXEatRcouoia4tPnX1qmWuCRgU4EhaxU/K++qmjngQr2W pLRULVg1tKniOue+uREznfDTbyPLngFvLpgnwNnvm0PHyWQ2XzFUyP5v4QSWv+gMD+lh QniA== X-Gm-Message-State: AC+VfDzPcy8nUh0rA5RTlJO6I0yw4TDBtepeiLYSjjFbdCytPRRACoWM j+w5lonl8yBgZVkvQOC4bwy1pg== X-Google-Smtp-Source: ACHHUZ4EM9gTfx0MR1mjuYwNFE8DxzS+CitELUsIQwHC6lAyqhirl5hwO1M9+lkTBFocoG78cioU6g== X-Received: by 2002:a05:600c:2182:b0:3f4:2255:8608 with SMTP id e2-20020a05600c218200b003f422558608mr21806562wme.31.1684235412597; Tue, 16 May 2023 04:10:12 -0700 (PDT) Received: from [192.168.0.105] (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id k20-20020a7bc314000000b003f182cc55c4sm2000673wmj.12.2023.05.16.04.10.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 04:10:12 -0700 (PDT) Message-ID: <0c3b4861-43d9-f1b6-68d8-f55943fdf1d4@monstr.eu> Date: Tue, 16 May 2023 13:10:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 21/23] arm64: zynqmp: Enable AMS on SOM and other zcu10x boards Content-Language: en-US To: Michal Simek , linux-kernel@vger.kernel.org, michal.simek@xilinx.com, git@xilinx.com Cc: Amit Kumar Mahapatra , Ashok Reddy Soma , Krzysztof Kozlowski , Parth Gajjar , Rob Herring , Srinivas Neeli , Vishal Sagar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: From: Michal Simek In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 > --- > > .../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 -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs