Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp342066ybv; Wed, 5 Feb 2020 06:32:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzqPZ/JIizYhGGrbfPcfog5S1w9kbhh1Y2bwkzvVsT73zGc31mzdlq63NNmS4hn/bjuRv3o X-Received: by 2002:a9d:7dc9:: with SMTP id k9mr25930186otn.117.1580913170353; Wed, 05 Feb 2020 06:32:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580913170; cv=none; d=google.com; s=arc-20160816; b=Vi919zGFMKSfs+yc9mLSMPNTDZPdGikpbr5LDji7ClClsINB1KwKxX4FGg6K8yx/Pc o9CQrLxwoo/EzGUbA1VXsJVnQs7nJDr8xwSUAMEbIlBlg3xbuubPMMxKll/LIimyCUpO goy8qCvmLTPnB2DiTq8d7dycDLC6VwkN/EVl9OAmFvOKLQ9kv4wZuo/tHx8bOCcqeagZ CnHypk4WKT0Ut3Cq/SQCQVbQxYIlqzyRecBefNjDrw78LQij4np7KhZWcBN1YL3LPatc U+3zINX1pIX9Bch3im1KpuPfN+WpIpsBPp5bqkN4QvPkAzaIHWdFERQ7hLuNNCPqntSo Oz4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from; bh=4TWwv2b4kIW76bCsI4JLnl0nZD+KSF+6hHIh23dr1qY=; b=HdlskRWbL4m8QcC32H9P+ejDtHIemr2Ps+T50820QZ9nugduyqnAwa53ml6uzZ74x4 QbiddfBrS4D40CedSV+yQoATblNFtKFXZeUuU1uCQ8Qc+SG5sLdYKZwxKFv1D5O2EZVi 8O9CDc9cIsYsSgXve2U3TLmr3WfOnuPv+tpnTLnEhRHC3lERh72mG1igawZkpzv+TI25 TnTvTpJKCuxrjx/pbgik/mf1fBzOwp1GGxgiPqpYRumq+r3vYKrTpsTAWC5ULU0AU8k1 EJaKUvt2ojwGSZVsTYcuROyH76aljurN/LNjvrfaocNIriU5FJ4N5o9CytAbkBd9lgei p3Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si16268oie.81.2020.02.05.06.32.37; Wed, 05 Feb 2020 06:32:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbgBEObS (ORCPT + 99 others); Wed, 5 Feb 2020 09:31:18 -0500 Received: from comms.puri.sm ([159.203.221.185]:49016 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbgBEObP (ORCPT ); Wed, 5 Feb 2020 09:31:15 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 9D9F9E0DCB; Wed, 5 Feb 2020 06:31:15 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nPtQJje9XwOq; Wed, 5 Feb 2020 06:31:14 -0800 (PST) From: Martin Kepplinger To: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: linux-imx@nxp.com, Anson.Huang@nxp.com, devicetree@vger.kernel.org, kernel@puri.sm, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Angus Ainslie (Purism)" Subject: [PATCH v1 08/12] arm64: dts: librem5-devkit: add a battery for the bq25896 to monitor Date: Wed, 5 Feb 2020 15:29:59 +0100 Message-Id: <20200205143003.28408-9-martin.kepplinger@puri.sm> In-Reply-To: <20200205143003.28408-1-martin.kepplinger@puri.sm> References: <20200205143003.28408-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Angus Ainslie (Purism)" Add a simple-battery with default power capacity Discharge curve comes from the panasonic NCR18650B datasheet https://www.batteryspace.com/prod-specs/NCR18650B.pdf Signed-off-by: Angus Ainslie (Purism) --- .../dts/freescale/imx8mq-librem5-devkit.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 6a8f6cee96cf..4957acc512d5 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -26,6 +26,22 @@ power-supply = <®_22v4_p>; }; + bat: battery { + compatible = "simple-battery"; + voltage-min-design-microvolt = <3000000>; + voltage-max-design-microvolt = <4192000>; + energy-full-design-microwatt-hours = <11700000>; + charge-full-design-microamp-hours = <3250000>; + precharge-current-microamp = <130000>; + charge-term-current-microamp = <66000>; + constant-charge-current-max-microamp = <1600000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <250000>; + ocv-capacity-celsius = <25>; + ocv-capacity-table-0 = <4192000 100>, <3750000 85>, <3650000 68>, + <3500000 51>, <3400000 34>, <3250000 17>, <3000000 0>; + }; + chosen { stdout-path = &uart1; }; @@ -480,6 +496,7 @@ ti,minimum-sys-voltage = <3000000>; /* 3V */ ti,boost-voltage = <5000000>; /* 5V */ ti,boost-max-current = <50000>; /* 50mA */ + monitored-battery = <&bat>; }; }; -- 2.20.1