From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 0AC2F302164 for ; Wed, 29 Oct 2025 06:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761718973; cv=none; b=ecLVwQ8xMZ2VlF1915X8eieu+T98ZsjKwp1PFxNkhdCJat6ll4VCy5H8uBL19x+suIMIkz7DiJBMgi0PO19wmEeZOzzrAvFT7/GfInPlGHK3kb718XwmU8EYE/Gxcp8Nf88Ke+ukq0mvqsHIn4RYvdDuAcnUNEBkFe026M0zOeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761718973; c=relaxed/simple; bh=4O+7pwhIGGS1RUIpdH+/fPlWfKqvKw0rWPYTnh4gGvE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OPYM0Zkr8nTAxRIYFeGQuXKO8w4Kcy6l35asZqRGF9rVNTkKFNi2cHMVOLlW+3YCyuNpjY0XWqHxsPMUpbACeCekyjxcljZCwTQKlK5jftl6wzo8ACaST4vrPGnAyQ6G1bpCDFE4ng2Xk67euJAA1u4z8JIwkwtzRl87TRB/Ty4= 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.167.47 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-lf1-f47.google.com with SMTP id 2adb3069b0e04-591eb980286so7197817e87.2 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=DUQt3xZZk4jQD2UsCyALjebPE5gATQXb6h4Y4H45Q+VuVG7cZez2zeNQ70bv58sF2R SHW74x208YC5X6zjO199fIbHv3gEPeceYT4s7Tgx33swIQqenNWJTuW/73XU2evbUsPR IlLI2lhGT3mDPOJOZXJaRZRSDi9mrMMMAQHiOM+xi7fDtY5WleD/rgTLkfBaNvYRTqcr l6P3c7aPuvCxUbG9MDJ7ey339kvCU77qJx+Nljb5E0D+GvUAfR68U8vpOTozsp9FfKW+ /SKg6i0BkaavkbcnCqxbsCDqfQFYN9vAr+Wz9moNI7yrUh07iscE2d9uFenY4wHuBGUR baYQ== X-Forwarded-Encrypted: i=1; AJvYcCV9JLVW7FWZOKvhkvhlKc2f0wtbCbwH+x2b++S8cBFaRUXhQoyGxugBkPl+3nyLyE0Wy6iLGKXjP04=@vger.kernel.org X-Gm-Message-State: AOJu0Yw224majOrtC0Via0LLuB/Trb4Y83Ihf+Y0v5HubLs1E+zYC20U KvShpdhVvQ7TBrdDtyG+ph7yNpmsWKHQ2DTuMYZUUvUxOsG+wRflduDu X-Gm-Gg: ASbGncvT+PEd2RkElQzu/P5tL1JMkpXOOXWiFH/zrfO+l4ZVk2wlViCjkyymQYm/Sjm FnVUwq6MRWLbUXUuqDI1ywzAtYMKJlA51n+IE0PWjjTbz95HwQocunk/nX2m3IBzae+MZqmudGv zMspJcvnsng7VyZGNfmUyx8YFQghKqoSdZ7oDFSo5wjeBEmyOzg8fmckWx5IMiFQWq/vx18aX/R hB38225k2wHp1DcGLrSgQkl/z+alQO7VcOWUh4tvTLnuciZzYXMK3k0DN+bdRBfLsyJ0V3KY/lu DfTtJNBNaatvTSPqxjcwAzokBz80uYesgkI/hEAX4+zE2dAjAY87wb+nQNZN8cbF8N/oNEbllQx vqu5jZsKdYDXU3EcfE/dKjgC7uUSLeFpKrFG6AndLYgFSUsxsXOINKPXfmLc6ntl01JcdpUd7/0 ymBLOduDseGuIChuH1DRBips4TaPLjoNmnyBTfyN0aPTpEAHFZ71xYvfWGbA== 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-rtc@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