From patchwork Mon Sep 23 06:49:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 13809312 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 5EEDDCF9C6F for ; Mon, 23 Sep 2024 06:54:07 +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=OYXG/xcST0BNoWljpMMKraK9gzu8DCQS5Vb8Zew5oRs=; b=HC3qxi3omGuGwPCSLXgov+yir9 WD5qLmakggZcSKAPOpkfBwtQ3FxpJXZOwB8FaFIr01vAolcVyNSnalxIs76QtpdRPWJ3qfeQWnXpM oS5QOiSg14iiVmNUwixd5JrUr8J9parx6zUNRJIh/si3MqFNRbSXFSenJAOzvjEwKf4Yr0szt8yj5 /Sv7AfK4A2RJgCxmrVfkN74gd+BvA4xmmtB/QDDB3pkPsginRXHhJ+M01Iq15xuzWkqDOnSSjYib6 CHV6Axu6JjeIf/qnILLfpeYIp/JTpsUfybpzyJSplw3wnZVE8s+T2zLUmC/gCARbAyhkSADn/LLub Z2LsXwzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sscxI-0000000GSQm-0AMR; Mon, 23 Sep 2024 06:53:56 +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-0000000GRyO-1nOG for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 06:50:53 +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=ZGx/Y4k1IFA7rZ9omAhAdqPCWvwPb8L8z1U/z1R/QuE=; b=FW3j32Tl12m/3I306glbNCnx1apP9Dty3dbSmajSWQ/3h0euN2qMaPwr 9Her6xHtaH8X136Bxn7TVjynr+m6df6VUwulEdB6MX2IrLb2CgaALiq1x bUGFwJqpqKhrZXzmF7g79Hv5wq/1kX06pwh9jYZpTBX/HwPQpSYt4d0gF 67DdORZwItq01wRW+4BeWqrI7HlNmuhb+YqLpOfMpzi9Hdcel1P1TnKWc MUMTp9mDaDL4AOmzXFA3lY/3+nep0Zyoj4MQLn7s1NeAD2abILFkVFPKf MCIS89Rv45TX0DgIAHYFGQP8P9TjjWwmOjIqfphCDlGc3VZDUWNFzkING g==; X-CSE-ConnectionGUID: nbowMA2OSLiJEr3vdSwxZA== X-CSE-MsgGUID: z58YvuKbRk2Q8qwMkyjySw== X-IronPort-AV: E=Sophos;i="6.10,250,1719903600"; d="scan'208";a="263115656" 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:09 -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:06 -0700 From: Mihai Sain To: , , , , , , , , , CC: Mihai Sain Subject: [PATCH 1/5] ARM: dts: microchip: sam9x60ek: Add power monitor support Date: Mon, 23 Sep 2024 09:49:28 +0300 Message-ID: <20240923064932.5797-2-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_494877_0BC0EBE3 X-CRM114-Status: UNSURE ( 9.09 ) 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-sam9x60ek.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sam9x60ek.dts b/arch/arm/boot/dts/microchip/at91-sam9x60ek.dts index 3b38707d736e..6cf699d9b540 100644 --- a/arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +++ b/arch/arm/boot/dts/microchip/at91-sam9x60ek.dts @@ -260,6 +260,37 @@ i2c6: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@17 { + compatible = "microchip,pac1934"; + reg = <0x17>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIOM"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_MPU"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3"; + }; + }; + gpio_exp: mcp23008@20 { compatible = "microchip,mcp23008"; reg = <0x20>; 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>; From patchwork Mon Sep 23 06:49:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 13809310 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 6F5C7CF9C6F for ; Mon, 23 Sep 2024 06:51:56 +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=V0+QugzSf3xjw1uMi62PTq3idqeYwTA15Zd9PK0HRFU=; b=C8Bh+hpPueb63BhhRYnm+3gsqB WAfdCfjzKz+D1QPNOjn0hLagVALDBD3zILVy6ng7IWDK4pqyMuuNSiFyqk40je1AGdsUQCIoY2Zvw VNCCXQnEMR+eAaiPv4gL400V/ftcOgo9zWInhpMA0555DyDTcuWyvYKYxJA4DAVmlTbBNz+jVRz6D lkzbD3TTfqIeDCipJvyPVbLwapLQOcqGXJECin4BeL4c/gsd4xc/ToF/MQ7Nti+g0agl+wdxCT9H3 xPrAPMqRuFfek0TAyWzPEZ8rEKeWouZg/8hJzAowpkTb1XY46Pl651aUsqfdL/0O0aDIKovp3J53a liR8mmFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sscv8-0000000GSAf-1oPM; Mon, 23 Sep 2024 06:51:42 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ssctz-0000000GRuo-0Ovj for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 06:50:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1727074231; x=1758610231; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4pFe+LKNT/3bDaKjRJ6PORZtjwOBmMGi0IqA1mX80fw=; b=N0ofxnKD170ygoUzy3p6yZbbiMDtgXG9TwuqVO5OTV9XcM0wSAu/tM8O N56zL5dZmXd6o/eOu7HVu9MvBUF6OJiTN0Ea7A6fZGWWxwSSZSzW7R28z 1CGADTL3bq0NV1yIX5hYnbsM38w9+dtO2+cdN/x2MIRFv/x+EVA1cRMSN 1cs7uIBKEGlWCh9sW1vy+5jjpnSmNxLH8IoU5rEJVA0qBmYNUaQTiK+uO dh41eqHui1dQkBVE9JoxpO2r+VR8WeOFLMfRPYRPjJCLfHPjKnyK/p9kn vF6CpQu8J4+uvnar+9YFLoJevIVWTnNtLpsjuYKavo2Zh+XukPfPs3gW6 g==; X-CSE-ConnectionGUID: U10XO7xER1qeFauEdbUvEA== X-CSE-MsgGUID: Mizc+XO8TNqEiqLtdb9EVA== X-IronPort-AV: E=Sophos;i="6.10,250,1719903600"; d="scan'208";a="32721982" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Sep 2024 23:50:28 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) 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:14 -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:12 -0700 From: Mihai Sain To: , , , , , , , , , CC: Mihai Sain Subject: [PATCH 3/5] ARM: dts: microchip: sama7g54_curiosity: Add power monitor support Date: Mon, 23 Sep 2024 09:49:30 +0300 Message-ID: <20240923064932.5797-4-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_235031_279960_29CEE914 X-CRM114-Status: UNSURE ( 9.16 ) 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 --- .../dts/microchip/at91-sama7g54_curiosity.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts index 645e49fdb7fe..2dec2218f32c 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts @@ -186,6 +186,37 @@ i2c10: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@1f { + compatible = "microchip,pac1934"; + reg = <0x1f>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <47000>; + label = "VDD3V3"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDIODDR"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDCPU"; + }; + }; + eeprom@51 { compatible = "atmel,24c02"; reg = <0x51>; 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>; From patchwork Mon Sep 23 06:49:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Sain X-Patchwork-Id: 13809319 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 7309DCF9C5B for ; Mon, 23 Sep 2024 06:56:21 +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=zC6UhWXwZGJKZ7v+G0obXl91R+T6puVOup9F1zu2MIE=; b=qQectHfI39kVdUykTA7eX90MJq 9B9LviarV5gZ2CMJHXuQTyKhQvdQRTt4X1GRugfxoXLTX4Aa1mQxdRJQUNa5q071aUyjlX1pSo2sT HTpOPGa4uXFEtiqBZJyQat5KzrTmLMeA6iwvSkb13YiUEKh1p5Dt46Fs0csxOGL2WdcfYEs460iKO FpQAoGIU5WTrzUlw5X0dvGEsfEC5Ceo8doD4ruY6UH5XxGptP1OtM1FG9hG+S6hYClX9gr0+TBkas 97E03A7J/GaH7I2EGY1sdyNL6v8sCcxF7y3Zp6PBb/CW6tUbKc79pH2VjochVZO6f/yoMe4NKvrx9 HleHJeFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssczS-0000000GSjv-3OXf; Mon, 23 Sep 2024 06:56:10 +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-0000000GRzA-3QsS 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=lckwW4uQvCxylSjsWiEw2aSLtvHoRVEH7N8d1FoLgb0=; b=qeSy+utss6AYjcSXe5G7vYGoNs4ApOrRdkEOYsqnNzFOj2gzSKvBHlT0 WUNWBz/imyZp5FIgxWoX9E4jfBr3xNsdpS9y4InepbvPi0Y8rqVFpUe2a SvB9b2zOldPW2FSJj4WpCtG9UVwZ8FvS1FpNZUZjYi2tYpJd/gGPZ1Wx6 ihyqtforQpSRxGgCrmu1UTRiXUflmTXJJhOExTAPrlK33ohNSJH7KDYnC s8S0HsSyUlvZ4KWmgH2tzXGZpjaBRH8tuaocqlRcvutOpBwxn6/aN02N4 29cw9S8Jo3C8TgQzCAPyIGtsYcG4MNDEv7DniS98VZtq+efnD9i4QLLaT A==; X-CSE-ConnectionGUID: nbowMA2OSLiJEr3vdSwxZA== X-CSE-MsgGUID: CsBhKaC0RT2ob83R12qREw== X-IronPort-AV: E=Sophos;i="6.10,250,1719903600"; d="scan'208";a="263115670" 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:20 -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:17 -0700 From: Mihai Sain To: , , , , , , , , , CC: Mihai Sain Subject: [PATCH 5/5] ARM: configs: at91: enable PAC1934 driver as module Date: Mon, 23 Sep 2024 09:49:32 +0300 Message-ID: <20240923064932.5797-6-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_925579_B0C4BD32 X-CRM114-Status: UNSURE ( 8.25 ) 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 Enable PAC1934 driver and build as module. Signed-off-by: Mihai Sain --- arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/sama5_defconfig | 1 + arch/arm/configs/sama7_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index 2022a7fca0f9..f2596a1b2f7d 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig @@ -201,6 +201,7 @@ CONFIG_AT_XDMAC=y CONFIG_IIO=y CONFIG_AT91_ADC=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_PWM=y CONFIG_PWM_ATMEL=y CONFIG_PWM_ATMEL_HLCDC_PWM=y diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 9096a99b5abd..e447329398d5 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -212,6 +212,7 @@ CONFIG_VIDEO_HANTRO=m CONFIG_IIO=y CONFIG_AT91_ADC=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_ENVELOPE_DETECTOR=m CONFIG_DPOT_DAC=m CONFIG_MCP4531=m diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig index 7fa5d251ced2..1a2e93c8ee71 100644 --- a/arch/arm/configs/sama7_defconfig +++ b/arch/arm/configs/sama7_defconfig @@ -193,6 +193,7 @@ CONFIG_STAGING=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_PWM=y CONFIG_PWM_ATMEL=y CONFIG_MCHP_EIC=y