From patchwork Mon Jul 15 12:55:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13733500 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 04596C3DA4B for ; Mon, 15 Jul 2024 12:58:02 +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=8XYGMuF1Px9oyTqZPSe/yTfw7ie0wV1T6OCEdpBxL0w=; b=T5oyhFW6ZVbiJsTbINz7hvqf9A ReJmtBdm/Nx2CW0aXIUwuke7P338DzQHWGnJgLj+0hG1o4CuEq+sOoViHdttq8K5/OA3FtMTXxcDq AbmzTsJ+0iJeOhw+GgzZS4PVzwcc8e6la0d9kaSKs4LxdKwtIP7RvFA3v897GRo/O8BIjTOWggbav TwRvJ1DW442T98rN1ge4QMeA+rkxy6Mixzd/kDXnl34A5l/jZwmAmFhUZIxa6N1yAlbsyS+us+ppj Bxj+lv7W8jk1wQQFz7+by4Np1ErvBmxPWreT8A5U0vwbiPTbDBHyUO2579reIxGZXsOBo3JI3sBiQ 63oz6ohA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTLH3-000000077Qw-0JYQ; Mon, 15 Jul 2024 12:57:49 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTLEn-000000076Xl-1HT0 for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 12:55:30 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-58b447c519eso5690989a12.3 for ; Mon, 15 Jul 2024 05:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721048127; x=1721652927; 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=8XYGMuF1Px9oyTqZPSe/yTfw7ie0wV1T6OCEdpBxL0w=; b=INy34MWM9XZGq8r8BFBMlnPMA4BmdJScdcd9mVhmcpQzI84/IjbT4g/mNszpmHUW4J rDg4j77AJzjqIFZK1pTLQzjznqGcR7eocKrGgrhdTFqjH5PAb0dzbLMXKmysWspFM6vM tt3b+qckscwfXdG7lm3dgg8dk4Wyzr/fXrvH+b9Q2Cmn/9zI77fQp8xhZDy/l94aH2EZ x/vCqTOKAkYISx/30x2qsaNxAaEFmDFL6KC6dRyCv3wQjYIeG4xNr/pHUrYU2ky1UQLE PaDKe8GbE0kLWK6xsKyFPhEAlDhIPMiXUNn1Ag5d9YxQiLm7WBO0dEHvWx2z4C79hwtV PIRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721048127; x=1721652927; 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=8XYGMuF1Px9oyTqZPSe/yTfw7ie0wV1T6OCEdpBxL0w=; b=nTD9SB1scujeRtT6azQy/Da8l0BDp/NAuQiGRThbjqFgcI3kJSPCP9zL6e5WWHkjXC nJu7j8276YrO/SLLWLBuKJiB5V9b1BhZJ2WSkzUwba1pyRmj9BLEVTjKJyJHQHUreTFY zkka6eCaILyVLFE6FwjImtBnnVpuPISUz4eRs4IdCGnvSfj63hvu643G9yUlpjl/1BJO kCIEzqk2vYfttuaE4vHP6WCfSH5Tty2sBERtcZgCYxVq5j27z9gTOS0kfH5jYPb1bDqM JKXsE5pHGK4fGrprNT6I30Ky05qfvMyreo/c2aZ//zB5jW1eOIbQ/NiSvLpPS92ayqQr /oBw== X-Forwarded-Encrypted: i=1; AJvYcCUhItjl01umigen1ma9SC8LzWK/G9S1hr/nj8IQSG4S6rhiGOs/n97AQYGcw/pRG6uus35tl0Te1J76hYOcwsqOpS6duYu/1uVV21nyu/lWdiUccpA= X-Gm-Message-State: AOJu0Yy7odCHMPKfPjKrSGPuzaTPanI/PhDbLZj638LeSZ5y4QJdqj9P Bvq5jkR0WGfoM2SH6TAc9VsI5B3WVX8IHR0sQ30h7CegqdShI0W1 X-Google-Smtp-Source: AGHT+IFmHSVvcKYIfet4Vd+j7mQCt11AG4ZGYcRC6ZqhWGgENzJ92CnMf6jnirVTsXjCdmjb0Rdetg== X-Received: by 2002:a05:6402:2353:b0:58b:1737:1143 with SMTP id 4fb4d7f45d1cf-594b9b047d4mr16175281a12.9.1721048127126; Mon, 15 Jul 2024 05:55:27 -0700 (PDT) Received: from tablet.my.domain (ip-37-248-157-210.multi.internet.cyfrowypolsat.pl. [37.248.157.210]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-59b26f62165sm3333307a12.87.2024.07.15.05.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 05:55:26 -0700 (PDT) From: Artur Weber Date: Mon, 15 Jul 2024 14:55:10 +0200 Subject: [PATCH v2 8/9] ARM: dts: samsung: exynos4212-tab3: Add battery node with charge current value MIME-Version: 1.0 Message-Id: <20240715-max77693-charger-extcon-v2-8-0838ffbb18c3@gmail.com> References: <20240715-max77693-charger-extcon-v2-0-0838ffbb18c3@gmail.com> In-Reply-To: <20240715-max77693-charger-extcon-v2-0-0838ffbb18c3@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.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1385; i=aweber.kernel@gmail.com; h=from:subject:message-id; bh=qWV+h/xYbFz0ncn8qK2kKImU9+PgmBKdHlR1+5460gc=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmlRwqz/mNBhtmHMjP9x0SegLgvHeyjSasKP4io /Ot65+rEcWJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZpUcKgAKCRCzu/ihE6BR aE2xD/0XcYfzNUnxcW31v4agx+YsQLMSCJvVejsHdSOgFuf+5W50fQwce8+oElnO+jms5rNOAxr bkU3c5zJOd7nuM695tJTUJ+1Kh0v3Gf57jhb86dHgiYq0fXIteWyGyX2jRGU2pSNg9gH/Zz1eCH IWXUV/eoXvZk75f+O17QgoX2W/noowMHOwwlNFM9CukLbCoE7t1a8pTRvIlgKg7l+5HQRe3JghA GJVfHucjWQx9+4KjOolKOJg/Vozo6ansJrmD0vsEPGD8E16Ob7vXk9aDt4xuvyqELKEqB2J6zHm 3528VHJ8tYBV/U/tQ+fV0jXveYUJdRQxi6sCWMtXSdOWka8M3cfjQfuyqO0tljBa3R3ZAdnRS/v d+7ZwyEkv1g5XtdfxfYCXq9qbOFvf15BBZ9BCMtHWYwI0qhTiHUinnxw5flSLJgmXprV26JPLyf LjR2IfOUoLqN6SW1NouTOfIn9uUw+3YdUs6obQgu39FhnUva16GL/2xVevNf7wlrlvflFPfJRKY ZdK8ZaeUTcW37nwNBvKqs7ZEZXRGYovByT2w3SLe2ASEwRdbbEsxOtvW45G5V1HjJi+ydpiPKQ3 Spw14yinRB1wu/6zmMBDWgfUXT3UdS022XroseU6wIENBoebyHjSIv+zeNyDt07Gkf9+/tzWdET Wcg0439UjsJcHEA== 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-20240715_055529_380235_C39A5701 X-CRM114-Status: GOOD ( 12.81 ) 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 e5254e32aa8f..7905e33234f2 100644 --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi @@ -153,6 +153,7 @@ charger_reg: CHARGER { charger { compatible = "maxim,max77693-charger"; + monitored-battery = <&battery>; maxim,constant-microvolt = <4350000>; maxim,min-system-microvolt = <3600000>; @@ -294,6 +295,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";