From patchwork Mon Aug 12 21:51:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13761068 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DB45C3DA7F for ; Mon, 12 Aug 2024 21:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mF4lpXQ81+wCK5QEf8V7sejg4qABTPRYD7pfCEhu5eM=; b=fuYgVTz8t0Xq3kh8RZm9E9hFuy LpxIG+JNiZx8gcUbcMeJ1YG2Pu+k7JakZ3QxyI/ntjmMDnqonUBBvBBQtgOYdPTBBW5iHBasOUe0J UCLk9F3tmkc648TUy4PX/wheX5zr4SHpdEmOjLh2ykZqnRisVbLH8JukUMBa/eRc6p9zjG3RiCbNy TUhlsFoBKlF0X7VDDOWVUCrettbZDYfPHK8nomlUrWShiyhthuClECM8oaTA8NLSvJyAFtnzRem4w Ip8BM3wJw/h/3wPQsI7y9uQ6F1xV2IB9hDA+SLu/aQz3l82BnV0NUEv2yqZT9B55nnp0eGxBGwWmO atgnoKAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdcyi-00000001ejt-3c6Q; Mon, 12 Aug 2024 21:53:24 +0000 Received: from out-189.mta0.migadu.com ([2001:41d0:1004:224b::bd]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdcx1-00000001ePU-1vk2 for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 21:51:41 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723499497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mF4lpXQ81+wCK5QEf8V7sejg4qABTPRYD7pfCEhu5eM=; b=LaCUyZcGSX2H+fHtvHS1VqS23JBPJG/YT3Z/SFkSYhnx9BPJE47J2G14l55rPOvW5wrWLo 8IRSc9QHncwSJTHgN7fYX7LmwiLjQ2YXedcb3jdS25SgmMLF3P/bmmwBqlX10atOmQNUWI 7olP4HcsV9JkCHraN39DRzo4zGfchqA= From: Sean Anderson To: Michal Simek , linux-arm-kernel@lists.infradead.org Cc: Rob Herring , Conor Dooley , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Sean Anderson Subject: [PATCH 2/3] arm64: zynqmp: Expose AMS to userspace as HWMON Date: Mon, 12 Aug 2024 17:51:27 -0400 Message-Id: <20240812215129.3599832-3-sean.anderson@linux.dev> In-Reply-To: <20240812215129.3599832-1-sean.anderson@linux.dev> References: <20240812215129.3599832-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240812_145139_778165_B4B87440 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Expose the AMS to userspace, allowing monitoring of internal voltages and temperatures. For compatibility, we keep the node name the same as on the SM-K26, and we keep the ZCU100 Rev C. around (since it is named differently). Signed-off-by: Sean Anderson --- arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 14 -------------- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) 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 4e0e7fdf29ca..bfa7ea6b9224 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts @@ -90,20 +90,6 @@ ds36-led { }; }; - 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"; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 256cff250717..21c1adbaf35f 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -392,6 +392,20 @@ r5f@1 { }; }; + 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>; + }; + amba: axi { compatible = "simple-bus"; bootph-all;