From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15C5C30506A for ; Wed, 29 Oct 2025 06:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761718974; cv=none; b=KRSA2Y3K/65ntEnrSCb8+XkzRqN3dHVbMtslrh9agZt/oCTW+cmYiHIFxcNFLbSFVNFjsFian6kgW6qs8gQy/jNI7lOjfrwA8Jc5/8qSUjjtji+12R/5MySO1Mt7wnjsq1CYYhShQ9O2+PynCCf36zzO32bndj5hC4SD+VaDkKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761718974; c=relaxed/simple; bh=4O+7pwhIGGS1RUIpdH+/fPlWfKqvKw0rWPYTnh4gGvE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bHomJPmbeL7PF9lzNRCyCI4PSXOfI35ZTBF/LV6hFlFuZZLdq6l5FnyduByigH9MnofLHMR22jDiDQU9BXQZfpvz+2EZJKuLEJLK01K50VJPvhzbwkg0w+P7CinAOdF8ZNpeGluzBBtTUZBl9V3lVDwSjVB3jpqEtDW2W2x1PeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RmPWOHLN; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RmPWOHLN" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-378e603f7e4so62814151fa.0 for ; Tue, 28 Oct 2025 23:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761718969; x=1762323769; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0VW27OesVv2Xc3xIV1cd4ruvQQ3oOkSUpb7LoylGMQM=; b=RmPWOHLN/k1SZE1C1pzZaUFRLoYJ/eZhIZUMYc49u01SncpgT8mOtQNsL2gQDEedfo 5CpJnOpxZBO7380lAf+Ol3agJ06sFj6TWqJGxuwGZdZmJsQVcoVByeVKGGcxwbo8uVZX crZ4jmXLSkmGIDznrxFbm0jGmEghzPr/XI4jUmW+ncHaO6lbdFpexiOy7GnQ0Ne1uGko 9RhRxUshJQGhSe7JVXD0YRz16Gd7N5SQU6rrhSm7Eaoj4I7aABKqlmQUu5IeQbJrFpPD kXyO7yX2Q7KFZm1ljoQFqLkr7O6kwkJNOasXDZHPJp7nt3tftK9IegqVacOecORCL9rx Ogmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761718969; x=1762323769; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0VW27OesVv2Xc3xIV1cd4ruvQQ3oOkSUpb7LoylGMQM=; b=HLhNVf4L285Zj3XzDP6osjZtz+3p33OULz1Z0UhZsSU3dnQWJlSx+Eny5mW9mgwGeU zdY39GbXvwTANakgbc9LC+Y7TtAob7VnIQtWcunYUPzuTG6MXFx50Mt/cCuE0wKgeycE NOMcLkkOiXWHet0wZEQRTl+a1yndwIKBiRin6vpcyNVcH7HhNjkqNmvMhA4Ie2iFVPDO znqgpIVNdJx8PSq8Let1mCf6nR66a1tOrQMw9/PqciKdzKuShmttextWWiCtz7Cw9wyO tVR6u2UBf6Tj5fH9geSLY03EMXJvz5wRaMZEeGfhfUcUZkrvs2QJxAO/M5Wz7ydvgQuP YiRw== X-Forwarded-Encrypted: i=1; AJvYcCUwEfSYhbk5rzmZbYfX1cpjmqeIIH6j6U+jAWt7o/QFopo0WaoPeO2aa6GjCkxQ0RHJpgz9+cOHiwsr@vger.kernel.org X-Gm-Message-State: AOJu0YzkRWHP7OcgwCSp+S7BPy7EcPQPWHTHpWIBTkszIcVQBrVRHUAs SZnU2huZn9jbcvmXNZg50iKclRcRdaOo8uycN4eKqbNLoIDgJuugK52C X-Gm-Gg: ASbGnctIQKOa/IHRkCh01FMgDcWlABkYQacOEHcqMTFY4EwmqJKoO3cm9QwwbDdBSBn kk7AoLe9o8Y3WRIYIrSpcpxF0GCbgybDNOYx6V/gwkAv644yw5WZ6zi6vo13Ci6qEVt9XxoXDCS GCktvo3JcSYo/OEN+Prshw9QpPHdgT5RTg0gT6Mh3hiAn/jh+bjROdiUaEoRVplJE+OQRcpEjhb 6AgwUAch0YJdhVUjL/xfIQoBWri4u70sSL3TvP9pMTlTopte7RyrR9F7KnwpYwXNAfAP5X7HSWa K2Gr6KpNLlVwxDUZzvalhw56itmsNPxTxv0GM38flz1ttqnDmuAl3UnCU/F9LI6lpLLR9kkZgx8 W6b59//rfRBs7KjYxw/7oVisi+0G0pbztRQdPA0a1gAnKlRu0fRvUGmLLzTKHOwpcOnZPVCeDtN fyYtuWBnN4ULzISh6hg9GHcLuEpQg08tJ105g+YGIl1hIdz2vgvDOrxOjXAw== X-Google-Smtp-Source: AGHT+IGanoJgPw6WF2DjE1gIdmQz7mXfEW+doSVsuxKGJlYO+QYEE07542eS5+8tipXltZ0hgrDYBA== X-Received: by 2002:a05:6512:3a8b:b0:591:ce58:1def with SMTP id 2adb3069b0e04-5941286524emr697925e87.2.1761718968884; Tue, 28 Oct 2025 23:22:48 -0700 (PDT) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-593041884c9sm3239104e87.96.2025.10.28.23.22.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Oct 2025 23:22:47 -0700 (PDT) Message-ID: Date: Wed, 29 Oct 2025 08:22:45 +0200 Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/15] dt-bindings: Add trickle-charge upper limit To: Krzysztof Kozlowski Cc: Matti Vaittinen , Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Andreas Kemnade , Alexandre Belloni , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org References: <20251029-adamant-mamba-of-patience-cddb65@kuoka> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: <20251029-adamant-mamba-of-patience-cddb65@kuoka> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 29/10/2025 08:03, Krzysztof Kozlowski wrote: > On Mon, Oct 27, 2025 at 01:45:05PM +0200, Matti Vaittinen wrote: >> Some of the chargers for lithium-ion batteries use a trickle-charging as >> a first charging phase for very empty batteries, to "wake-up" the battery. > > In the few cases I was dealing with charging circuits, trickle charging > was used in context of top-off charging, so when battery is 100%. It's > also documented at Wiki like that: > https://en.wikipedia.org/wiki/Trickle_charging > >> Trickle-charging is a low current, constant current phase. After the >> voltage of the very empty battery has reached an upper limit for >> trickle charging, the pre-charge phase is started with a higher current. >> >> Allow defining the upper limit for trickle charging voltage, after which >> the charging should be changed to the pre-charging. > pre-charging is the trickle charging, no? Or you want to say that > trickle-charging is pre-pre-charging? But then what is pre-charging in > this binding? There are the (usual?) pre-charging and fast-charging phases in the Rohm devices. Furthermore, the fast-charging is divided to constant current and constant voltage phases. In addition to this, there is a 'trickle-charging' -phase for a very empty battery. This is already reflected by existing bindings: trickle-charge-current-microamp, Please, see: bbcecd1b9335 ("dt-bindings: Add trickle-charge upper limit") I also did do some ASCII art for my very first charger driver binding: https://elixir.bootlin.com/linux/v6.18-rc1/source/Documentation/devicetree/bindings/power/supply/rohm,bd99954.yaml Do you think a comment linking to this drawing would help? > >> >> Signed-off-by: Matti Vaittinen >> Reviewed-by: Linus Walleij >> >> --- >> Revision history: >> RFCv1 =>: >> - No changes >> --- >> Documentation/devicetree/bindings/power/supply/battery.yaml | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/power/supply/battery.yaml b/Documentation/devicetree/bindings/power/supply/battery.yaml >> index 491488e7b970..66bed24b3dee 100644 >> --- a/Documentation/devicetree/bindings/power/supply/battery.yaml >> +++ b/Documentation/devicetree/bindings/power/supply/battery.yaml >> @@ -66,6 +66,9 @@ properties: >> trickle-charge-current-microamp: >> description: current for trickle-charge phase >> >> + tricklecharge-upper-limit-microvolt: > > Please keep existing format, look three lines above. trickle-charge-.... > > But I believe this is wrong. Trickle charging does not switch to > anything more, there is no fast charging after trickle. You have some > sort of pre-pre-charging, which is just pre-charging. There is trickle, pre and fast-charge phases. Furthermore, the fast-charge is further divided to CC and CV. Finally, if my memory serves me well, Linus W did explain me that some chargers use 'trickle-charging' as a _last_ charging phase for a full battery. Thus the term 'trickle-charging' is slightly confusing - but it is already used by the existing bindings... https://lore.kernel.org/all/20211116001755.2132036-1-linus.walleij@linaro.org/ Yours, -- Matti