From patchwork Mon Jul 29 17:47:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13745519 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 615A0C3DA4A for ; Mon, 29 Jul 2024 17:51:43 +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=WnVUt1AGc9AqCAUSKdpREqmxFC97kSldsuL6yvP0RyA=; b=scXFvuLD1bMXXrzFi296JPE9wF lnWqeYI3IYALCJJBc6nifg1OaGHwQwyjNlsNv7OU1fuuxIkBgUmt3B4/jAHvEe650JPLEaA2HNrAx IIr1hjIJSRXwKr7+amljMnWQBGtoG30751LCWCwvpukhWqoL/Z7s8G1Zj6ObSuSU5RJiok54h+z9H O/TQuQIblluM2iXNKBkG+rnNAyk64u6j9A1ZO6uhYIDkVLrfHkkG2vmDDCeq2EuGj6/wxc8T6sp8X xzny57rarPJaviZep1Umux7GT9KxC2qec0q67/BpWyZOke3mlQwqljLkKAfL5Oj3PV4i8zz0eyZGv NG8c4Ttw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYUX0-0000000CGOb-3XTE; Mon, 29 Jul 2024 17:51:34 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYUTb-0000000CFH1-2hzH for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 17:48:04 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3687f8fcab5so1509839f8f.3 for ; Mon, 29 Jul 2024 10:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722275282; x=1722880082; 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=WnVUt1AGc9AqCAUSKdpREqmxFC97kSldsuL6yvP0RyA=; b=V2FADyIQsNtBH8Tabm2CEW3T6f2snbJqUWjffzFTaZCDOXsDpROtmOsSsPff6/Fo1D HDUkP+7kBQ8T76oZZJxZwGol6NEuqiYYhZ5BZm9PKvU+JzAbyuQTiGLCV8Vp7t+vbE3H NyVnZGvIFA990iB6+kzHr4bZuK9zNirIVSaQjBC+9g/VqnpKkpxvxxaQ45ywit2oUsM6 5kUYITFtggm/ylRPokgmZnJ6FU6ICOtWCjaLlYHf+eTazhacK4ts8swBJX0m89LBzDyV kdk9DBqHpEVFt4NuRrJHgTCxXEEs8lfwrNIIdj2L5ZI3Khk5biXzmE5PYobDNG1CoiLT 5bBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722275282; x=1722880082; 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=WnVUt1AGc9AqCAUSKdpREqmxFC97kSldsuL6yvP0RyA=; b=Q8TOQT5JTI4W0sOqWCojXyeCU9VzEwGk9zZvUddRcIbEWlTCpsjZJDVk75KzcTud+l SI6FQfPxYu8nhtKvvmesluqP2uKUBVNzuiU/YssBEGlkddxNEQX6nbwqMGqjynHx/unS tJm5VRQ/e7KsZMjp6S/WkYaJO2eti9EveSO14ZkdDfECtEe3qSjEWcSJUospZ2FbOWrp sNl6coayD8IcZjHqXLJi9JsJikLh7Y7KxfU+AAWSyDjpAuCE/qpdg35bXZECiEqjYGHs bl04PAFtVZRIuKk5bRSW09saVoAyZi+K3b4rnlnapDw337Rns+dFHV2Dc/mV0kiSApvQ RpcQ== X-Forwarded-Encrypted: i=1; AJvYcCXFjXuIEZLuJfrb4YaQu91zPDW+0GbazY/eZQK+0z15vPrUvGRuelmp3y8DBBe8Qaeg4TEF3X7RPMZVRO/qYYR3U/Q+YBHtnGpMcidfB1qEswsWbOQ= X-Gm-Message-State: AOJu0YxJ2MqF8qorPbEZw1NFLeuraYySzVoi7AOYt/wP5mnDXosZGf8y KZVopLjzPY8gplPmaAf32tKb+48n3Mne8MauztLWnS8v2CItz4aM X-Google-Smtp-Source: AGHT+IHNyFmYhpG/++yMrpkuRc2XYprU40Zz9/3C+49zl/kR3iongSZ4buzWgKt0FzzTDvZcE6BgZg== X-Received: by 2002:a5d:63c1:0:b0:367:9516:ffb4 with SMTP id ffacd0b85a97d-36b5cee21a2mr5812478f8f.19.1722275282210; Mon, 29 Jul 2024 10:48:02 -0700 (PDT) Received: from tablet.my.domain ([37.30.0.99]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367fc8a7sm12716550f8f.59.2024.07.29.10.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 10:48:01 -0700 (PDT) From: Artur Weber Date: Mon, 29 Jul 2024 19:47:42 +0200 Subject: [PATCH v3 08/10] ARM: dts: samsung: exynos4212-tab3: Add battery node with charge current value MIME-Version: 1.0 Message-Id: <20240729-max77693-charger-extcon-v3-8-02315a6869d4@gmail.com> References: <20240729-max77693-charger-extcon-v3-0-02315a6869d4@gmail.com> In-Reply-To: <20240729-max77693-charger-extcon-v3-0-02315a6869d4@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=1385; i=aweber.kernel@gmail.com; h=from:subject:message-id; bh=8B1kt8AWmIpBQPncG9dfhlWKEjLZT84Kr302Znpylas=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmp9W/6MLFXnaSOcMkyzmUQa2TpYwPaa03T2gQd VHEdtI6YyGJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZqfVvwAKCRCzu/ihE6BR aEnXD/9LZurHLtb9yxoipoT46Gc0pSlhbAAFltMTws9gW7PF0xBpQHj+RJUwrIxFxsvts0i6MYc eWRx5cPuJYjwdftPZm7FPa/J99Pie5Ob2TWGQuiAqDITmKPOgaN4tgCwgsKw4Qg5dbNjqwxDfO8 tkEj5wbKjpUOYvBXDB33xzXmtyOOWTcpD5mtQSmM9jYwZT/8TbZyurZj/OCA71fNfstNFWaRYuV YFe4ae/c+g+51J9CSTaOQO1xCQ/igRcu+k3z3vAK66Z5Y6rGG0z3A9+cWLdo/nI+YnnCDX2ArcR kjUFAs/n8+Ku5x54lXivQ6bLvzMxl6AEUczZPoG+2/Lm+yt4Q6GctGxTu+Gk1RitAIxzVrZhLbM w3P8lh+rU6QSzLMJmPhaXc2kMyHhJVof2tO05h1DGb4i4VTjVH5EDLF8Pd0tOAu1KTl2S9BND8L p4TX4DHpI3VNtCU5fnMsLV4UCIVYkuSN1V5gmefHuURBIrw/cfY2z43r3d+w0vAEif9w9WSGxjJ fr8GQU4Rg77Jne4EV74m0OJhxN66zpCZarrG4IeOGUY1aT2UB+vOsGFD5Mm8OfbOUYLfim6h0iO Ao0OO7jFPmkZgEYMC3WbButGbhyVVCO49bGb17Rq61sL0uFnECsntOmjqgmnibxrX1thfk6A1MB sZclK9Q5N2Vb7yA== 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-20240729_104803_723598_E4E5F085 X-CRM114-Status: GOOD ( 12.59 ) 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. 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";