From patchwork Mon Sep 23 06:49:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 13809318 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 134C2CF9C6F for ; Mon, 23 Sep 2024 06:55:13 +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-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cyYo2mWiopJO7rMENXLJaUBMvjEmxAMvCQWROckg9dU=; b=2Fkjcv0WY7p3fsLS6bCzH4G8w2 /D3K/ejV9DRhzGFfof0pUQHy2KCNjo434ZCbuBOYJFc8PgZEWB/lHAtd7/mmbBfdabg6DqHL3UZuA qRZoIp+tl0/oR/0DNfs3jFS/pRO7n/JcABUnz+Hh9Cwt52nvsVlJkzs53smb2I+BC2FGHna/svJLk /ZvlSNXj1EnQFAE/HmuV0Hgx4f7SfZJ8VeykC/urHGKxXe7jtyy5T9HmakZC083IEQL2H9EcB1P6l V3x3rX5v06GiRSn+0ndl9qAWY6rveVNlAGWtuE5YFDO3Ch8rze6pqRCWEuiq997TCaH6f8kDmzwZa 0YiayKGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sscyN-0000000GSZH-1KdG; Mon, 23 Sep 2024 06:55:03 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sscuK-0000000GRy9-2HSN for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 06:50:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1727074253; x=1758610253; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wb2GBC7wQUH3F1JQWlhvXnNwMTYmGLZmlzIgJkKpLjg=; b=Xogev/wrgOpcmgrCM3BgcyIHrzTy+BsL/XLC/YnXUYLWliiNct1EWHgI PgGFvwNJux/94K1ANhkeFOlW2y2qpW02NCIo9JCIBevYYVDZA+Yksh/bi +DH8rK6XY5UZiqVXklIm1tIeIKTMyoST2TZKjowIXKqrhEIq39wjtttJ6 ABuWFTwNjb+JRaU2pZF/SkbyMN4VYiPsbb6KmuMK8ximCSKH+NuDQrV3D X23od2QKrO7sNNyKgz0PoFO2jmI1JNMpNGitj02Kqd0V5hTY3xTLadlb/ i21yi4d13Sd7abaSP6rs2FUUK6W++aj/8iJ1ylVBuXQdvMySD/tp9QeQJ g==; X-CSE-ConnectionGUID: nbowMA2OSLiJEr3vdSwxZA== X-CSE-MsgGUID: Semz+/50SQeuWkVqHzFr8w== X-IronPort-AV: E=Sophos;i="6.10,250,1719903600"; d="scan'208";a="263115658" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Sep 2024 23:50:51 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 22 Sep 2024 23:50:12 -0700 Received: from archlinux.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Sun, 22 Sep 2024 23:50:09 -0700 From: Mihai Sain To: , , , , , , , , , CC: Mihai Sain Subject: [PATCH 2/5] ARM: dts: microchip: sama5d2_icp: Add power monitor support Date: Mon, 23 Sep 2024 09:49:29 +0300 Message-ID: <20240923064932.5797-3-mihai.sain@microchip.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923064932.5797-1-mihai.sain@microchip.com> References: <20240923064932.5797-1-mihai.sain@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240922_235052_691127_13FCBA79 X-CRM114-Status: UNSURE ( 9.05 ) 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 Add PAC1934 support in order to monitor the board power consumption. Signed-off-by: Mihai Sain --- .../boot/dts/microchip/at91-sama5d2_icp.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sama5d2_icp.dts b/arch/arm/boot/dts/microchip/at91-sama5d2_icp.dts index 5e2bb517a480..8f617cb29d36 100644 --- a/arch/arm/boot/dts/microchip/at91-sama5d2_icp.dts +++ b/arch/arm/boot/dts/microchip/at91-sama5d2_icp.dts @@ -195,6 +195,37 @@ i2c6: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@10 { + compatible = "microchip,pac1934"; + reg = <0x10>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_1"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_2"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIODDR"; + }; + }; + mcp16502@5b { compatible = "microchip,mcp16502"; reg = <0x5b>;