From patchwork Mon Sep 23 06:49:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 13809320 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 0A652CF9C6F for ; Mon, 23 Sep 2024 06:57:28 +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=oaZC6Fc2o2xMsodr4+KT6vlo8XsahP8cP9tr58dPPCI=; b=um8Z5RKLjAxtV7Rgf2h8lPtQCj 8XVikB5udYCj04ALGG6etQ5xObNRY4sVQfC5bP7j+Z0cv2G/XG7TLmPBEHj10Dg3eYTUpLTn4BqBb S/Hxb6ODeVOiIyLN8hE3Imux44cnnbJ0ihNlYFWQVgRQdguAAwJfJRfx7KDS80XNed4o40AkMcMur Ki4H1NBFKGPpflKW9dUggy1xGx+Zlvd4jQGPw68bz3nzcvX+kSWtjVkSKUYyZV2YxQOf6S0iDpLlf 6fJp1djTmAuq6oUFHHdNi8utLwPMY0hVFMaKb5iLxjg0xApfj6xsCNxNl+3XaIjEQCVpe8M8/1axd xyIrQQHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssd0X-0000000GSun-3wAn; Mon, 23 Sep 2024 06:57:17 +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 1sscuL-0000000GRyO-3EoD for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 06:50:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1727074254; x=1758610254; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I5L8Derw58tSEC47Am0Yn8oNzi6p4Swk4/yxKYbMZEc=; b=2mdbT02Z6pyiQy0f8cAkRO5IoaejyAqMBW3yMkb7vqb84uJZEgO2ZV0h fdWsYypGAhWGiBkXR1HTr4lY8EW6DND8gOZj9dYy93QPVwymucx30VhbB ka7xHgFAVLRFdN/4Ion916ss+pxPtlfh6Usyvvno+7or2GDo9xuUZF2Aq Z0K6X6zzFQafy7veMeaihXUWRohjHN7c9n9SjwljGQigcvxXPJLTD/JHx 2nsnyKqRjbRXbm0vftl4D1VTdB/sPo78eHk+GNiXEvg545SqipCXCgUFy QsfJlxWBWul+JtSBHytOEhNiecINkkkPwiP/PYb21embOaDeGZBO6WqX7 Q==; X-CSE-ConnectionGUID: nbowMA2OSLiJEr3vdSwxZA== X-CSE-MsgGUID: ofM9s08gTE2AfR4IXfdH4A== X-IronPort-AV: E=Sophos;i="6.10,250,1719903600"; d="scan'208";a="263115668" 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:53 -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:17 -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:15 -0700 From: Mihai Sain To: , , , , , , , , , CC: Mihai Sain Subject: [PATCH 4/5] ARM: dts: microchip: sama7g5ek: Add power monitor support Date: Mon, 23 Sep 2024 09:49:31 +0300 Message-ID: <20240923064932.5797-5-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_235053_916696_351C2F32 X-CRM114-Status: UNSURE ( 9.26 ) 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 --- .../arm/boot/dts/microchip/at91-sama7g5ek.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts index ed75d491a246..5fd77abd4201 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts @@ -244,6 +244,37 @@ i2c1: 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"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIODDR"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCPU"; + }; + }; + mcp16502@5b { compatible = "microchip,mcp16502"; reg = <0x5b>;