From patchwork Fri Aug 16 08:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13765691 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 978A6C531DC for ; Fri, 16 Aug 2024 08:25:22 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EXg+lB1Y9hiiUwuYsdnzVumsOx9EvCzW9KQFQaaXx58=; b=OeFCq1vT4mvX8DTmA7s24LICY1 T74p9wN7bb4RquO1eng8RGjuuMYRU16O1d7qIn95ZqFBWdfWIGxiCyCObxzwK0TCAn9DW2ARo2Nnc TPFY8UIqP6WLvqS2u8GwGW2/oeo9E+sfu4UXcEhl0nGZDlBMZaZJSBf54HDzFK35nyjDbfSaGayQr j17sQd9eIGsVoJOymF1K2WaeK3mevv5Le+/Rdf9TzJ/iIxc8grhlAT2m7s1NMOvZ3920gkzhQOAbR +pINbC0SU580CfdaVb0SiUTmLT+4FvbpMB2wx12eDzZhJonk7LCTkBsgyXFYrwRnGZ5MwvMZK2Ykl dPsFIH9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sesGm-0000000CGeF-0ILg; Fri, 16 Aug 2024 08:25:12 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sesBH-0000000CF3L-2oaY for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 08:19:33 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52efd530a4eso2809902e87.0 for ; Fri, 16 Aug 2024 01:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723796370; x=1724401170; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EXg+lB1Y9hiiUwuYsdnzVumsOx9EvCzW9KQFQaaXx58=; b=e9dAdfLRpe0rpZkJyuivUrzOsIqTGpfdbspdyPoDrQduu69syyOhy/4CjP3Q6T/wy9 Rf22H522WRcfBNcHSkP+a6I1/PpdeCHo1scj3hj/WkSOgMMsLyQscf3VBK6l5AsOTNvO hCbUrfSZvgedxxuk/0H9VK68KCGXhaLSn3yFNg36dc4nSeyySbjunepOexOQlt3cfoey nUyZeWTRQetRSGswq06+9e2KcGkg+7fTcWWSwMoDFw1wMq8i0WV0T1EPCXg5Dr4VJV20 DsLQJj+gO2BQw/qInanjbyAuTjP+7++tE2ao99xqeq2lwD2QpvVvufqvpXr2KDOSH/wQ v3hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796370; x=1724401170; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EXg+lB1Y9hiiUwuYsdnzVumsOx9EvCzW9KQFQaaXx58=; b=kvkeXpoGvLr/cwH6hECl+9DCqwa5JpY63LKAe5Uvbx/ZSbJGMX6S+SClgxElU1U1FA rWnFQ62UCFcyTkNlyXStBVWKnxigT3DIF9zJer/0nBXzVhbCgjG/h3zRCccQJLCQPN3k jnWzQglDW5EFIJYGoUqnORVwg+pfgXB0S6ra/C278suZpaNrT88SVqYqmU4COoyoEupH EO/5jYaZ1HDiTX0kVSkPyvRIZjxQnHZef/jXd+aAEN0AmpFE0mLeplDEhTmN0iRuTJTo FmfLesQlJ5WtbLaQpL6A4gN04okonciBMgNahDgHymo9Ri3XpPVQhoGAxEBfCN7Cmt20 Vw+g== X-Forwarded-Encrypted: i=1; AJvYcCU83+8KN1it3MZdNMmQKXrUy/Wv/UDsZ1P84mrT6HgwV3yc2s3h9LSix6TkNo/zeYBJuZnVJj2dKDQqSqAhOGgMQyr5BIgzTqtrVAIt/dAhu70iO4Q= X-Gm-Message-State: AOJu0YzVgWdp8cm2LDCGHUbSTad07eY5GF/bpyOMpwmMsPCNisWQBqTO LFMS38DfynwyBiq4OdLVN6egPok/krqpB6/9AW3BbG47Ot/AjoW2 X-Google-Smtp-Source: AGHT+IEif3KkPF+pYJhrYQnOK2rzYGUNQn3Fv77PzHZu5B3nVFW9cXf2Uj6+vGaelWOExKB06fZyTg== X-Received: by 2002:a05:6512:31d6:b0:52e:fd53:a251 with SMTP id 2adb3069b0e04-5331c6f599dmr1250098e87.59.1723796369539; Fri, 16 Aug 2024 01:19:29 -0700 (PDT) Received: from tablet.my.domain ([37.30.8.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded35991sm69732645e9.21.2024.08.16.01.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:19:29 -0700 (PDT) From: Artur Weber Date: Fri, 16 Aug 2024 10:19:14 +0200 Subject: [PATCH v4 08/10] ARM: dts: samsung: exynos4212-tab3: Add battery node with charge current value MIME-Version: 1.0 Message-Id: <20240816-max77693-charger-extcon-v4-8-050a0a9bfea0@gmail.com> References: <20240816-max77693-charger-extcon-v4-0-050a0a9bfea0@gmail.com> In-Reply-To: <20240816-max77693-charger-extcon-v4-0-050a0a9bfea0@gmail.com> To: Krzysztof Kozlowski , Chanwoo Choi Cc: Sebastian Reichel , Rob Herring , Conor Dooley , Lee Jones , Krzysztof Kozlowski , Alim Akhtar , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Henrik Grimler , Wolfgang Wiedmeyer , Denis 'GNUtoo' Carikli , Artur Weber X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1432; i=aweber.kernel@gmail.com; h=from:subject:message-id; bh=A37c37izrYWJf0Fe0JOtEKWVSivq+OwwBBfAr+DI200=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmvwt/X4j09SNcjo4JpyDsxm/BTFk7K+YQVfhD7 dCdD5cZu6qJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZr8LfwAKCRCzu/ihE6BR aO13D/9PAHdTYJSu7OeR0eeBISaX0R0zccU3OMZaRAxxL+BZlYNWaxfnTZJNp6M7/Jr0cxK7jw4 qBHqTGjHHfCe3zdIEeiEwXfqMx0HuUbKwl8wxXKtTtkwt8xjERSU6ubzhKojPzKyR/ZBVVB/Eaq cqI0WjhvEtZLbDicYnOyWF2zD8NXPJ2lc4LCDwtTV50WgSXjXjzUNUsqs7y5ve1xKD+kB3DahDE VtwlAK83fpShEvWLowtNDJ+flomZvBkAfrPTzdxwcj34P6upPgo605wd+/HXnwLkF091cVcF9Mj mqVNzySXKKnX9Ic/9cyP6yvspoBvTkwiQ6cjcC7bu7zkyJqRlluTUlpMLVb9fS57YFZaLinT+LZ rl1lzAilD7A/8FJKRsgmZqIKxXGt3vF8bntE2vd6N9AqhOIqPz7D3buRX3peWJ2QcL54f28MlD1 6j734AMwstNQKp1vmuOYzyRr7eGJcYw0JLLKW2bDC7ljZh+uzsY9lNc5ACBqYvbSIfBZznw9ikk 1TJ6v5VQdlBrRNEZdlRdE430NQgJGI5N97cL1v8uOwaPsJAV6lIxyw5IMGPz1nVgX5MJTtyW1nM c3HzeoS1IFFKQtUgqow66VoW8envcrJgf5sk1Uqy4z255g8JoWj8cauV6E3Hkz6GCrg1dIpA5D4 iODH1YT05P9otpw== X-Developer-Key: i=aweber.kernel@gmail.com; a=openpgp; fpr=E663000EAC1DECCD6AD2890DB3BBF8A113A05168 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_011931_750654_9DB4F1AE X-CRM114-Status: GOOD ( 12.28 ) 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 This value was verified by comparing register dumps of the MAX77693 charger with on mainline with a downstream kernel under Android; the value on downstream was set to 1.8 amps when charging with a proper charger. Add it to a new battery node and pass it to the MAX77693 charger so that the fast charge current setting can be used for charging. Tested-by: Henrik Grimler Signed-off-by: Artur Weber --- Changes in v2: - Switched to monitored-battery --- arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi index 9bc05961577d..3c905bfedd96 100644 --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi @@ -159,6 +159,7 @@ charger_reg: CHARGER { charger { compatible = "maxim,max77693-charger"; + monitored-battery = <&battery>; maxim,constant-microvolt = <4350000>; maxim,min-system-microvolt = <3600000>; @@ -300,6 +301,11 @@ submic_bias_reg: voltage-regulator-5 { regulator-max-microvolt = <2800000>; }; + battery: battery { + compatible = "simple-battery"; + constant-charge-current-max-microamp = <1800000>; + }; + sound: sound { compatible = "samsung,midas-audio"; model = "TAB3";