From patchwork Thu Mar 9 20:46:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 13168301 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 44627C64EC4 for ; Thu, 9 Mar 2023 20:48: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=XlwWRBJB+yUdMFbV4RyFmsHQ+XYZQHQ15KwN0URMTys=; b=IfoF0j4quyOHcA mf/heOyiu+XPWJenAqH5UuuWmsocDGhxN4b1qVSpOQJEny4hkEBY5h3x+eFCXBlK7P/UTTKIGiEE8 HSutd8rP/kvxZghu4KAtp0pVpFt6coFpODIxqgAKGc6pMNKrnU48txDOpQFAcr32zOP5tqr6+5r9a RxniJ3obg1XRsH58hdXfFzLFZPf3ZRRi3aEEpRLXA6s35/WtHoDfFJ77JjFlACuge6nivvizMzLQA bMqnKyErRBNRjiKRvQg4a7nOAbqRgU+J1LbqAYLlpOYG9u6ryAkfFRUODY0vJK2KDIrdzE08kSJnV HWKg2r4YczpcfauzkiNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paNAT-00Bobt-1F; Thu, 09 Mar 2023 20:47:17 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paNA2-00BoQU-0O for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 20:46:51 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id D9C8FE9A20; Thu, 9 Mar 2023 12:46:49 -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 pYsXb085EP6r; Thu, 9 Mar 2023 12:46:49 -0800 (PST) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1678394809; bh=8ae9WzC6o2aQfbxq47hKVQYvaWWmKz7NVcd8S/N/LLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WZjKmjxU1A1iU89EUDNrP7isToZd9NlyqmeDJcSqzmxL5CPztlrFg/s2/rbnLVNNJ +ZSAPNSMjym4SBMl1zPM53cIgnAhCQHHI5Dnuqq0IyD8wCA5GVeVBSGZKtWE+24Obg +1wqcm4Y3IoqYAIO0rnHZd8TKdedCOjHTBZoUSvGSzEiCepOPG4V5EZWVZK6KEHnI3 PY+ZM6BN1QoiCVaw7jR/RzxozG3P0FaaO5BOqJlLtudRsv7MHtLPpDqMWqkuE15PVP dgxeFbJlAACUP8pkhmW5nJoJnZ97cVC9OQGV2V77wM4TuW3KFtCRtj4h86ls8Lv7Un ov5/fqIZn1RCA== To: robh@kernel.org, krzysztof.kozlowski@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: kernel@puri.sm, linux-imx@nxp.com, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Krzyszkowiak , Martin Kepplinger Subject: [PATCH v1 06/14] arm64: dts: imx8mq-librem5: Set charger parameters for each batch Date: Thu, 9 Mar 2023 21:46:00 +0100 Message-Id: <20230309204608.237605-7-martin.kepplinger@puri.sm> In-Reply-To: <20230309204608.237605-1-martin.kepplinger@puri.sm> References: <20230309204608.237605-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_124650_090287_581DC811 X-CRM114-Status: GOOD ( 10.15 ) 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 From: Sebastian Krzyszkowiak Correctly set regulation-voltage, termination-current and charge-current for the different librem 5 board revisions. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts | 10 ++++------ arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi | 2 -- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 +++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts index 73bd431cbd6a8..4f69eb32b1c90 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts @@ -12,18 +12,16 @@ / { compatible = "purism,librem5r2", "purism,librem5", "fsl,imx8mq"; }; -&bq25895 { - ti,battery-regulation-voltage = <4192000>; /* uV */ - ti,charge-current = <1600000>; /* uA */ - ti,termination-current = <66000>; /* uA */ -}; - &accel_gyro { mount-matrix = "1", "0", "0", "0", "-1", "0", "0", "0", "1"; }; +&bq25895 { + ti,charge-current = <1600000>; /* uA */ +}; + &proximity { proximity-near-level = <120>; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi index e4f8b47cce4f5..c1279e96effd7 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi @@ -22,9 +22,7 @@ &accel_gyro { }; &bq25895 { - ti,battery-regulation-voltage = <4200000>; /* uV */ ti,charge-current = <1500000>; /* uA */ - ti,termination-current = <144000>; /* uA */ }; &camera_front { diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index f8698b6995343..509776a63259b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -1147,7 +1147,9 @@ bq25895: charger@6a { interrupt-parent = <&gpio3>; interrupts = <3 IRQ_TYPE_EDGE_FALLING>; phys = <&usb3_phy0>; - ti,precharge-current = <130000>; /* uA */ + ti,battery-regulation-voltage = <4208000>; /* uV */ + ti,termination-current = <128000>; /* uA */ + ti,precharge-current = <128000>; /* uA */ ti,minimum-sys-voltage = <3700000>; /* uV */ ti,boost-voltage = <5000000>; /* uV */ ti,boost-max-current = <1500000>; /* uA */