From mboxrd@z Thu Jan 1 00:00:00 1970 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 76619CFD2F6 for ; Tue, 2 Dec 2025 13:00:54 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=huLRk9YHAen/zC5ID5oYfLF16bF6areiY4nWl1q0UZM=; b=t36oqwWnDXPXZf42rrQQhgKsPy SLK/Mwmm19OJFCYJ6LXTDLb8PoG+jkOYhD64SH4Q3Uz88wVFjsclAq3cvf1q8W3aXz4RuyNpryEJp 9fb7Gc/cu4p0u/YlI0YEfvu8GshdKbrJG6D9pnQNiP8ZtA2oIMmnA1MlXyB6TYkDwXfpeZFBafyaH k9TKK8g2bJHFi/zWJjTlIJfUFVuhwpIeuJxBz0/zaoq3VbBN9pb9R/RltE4tLT6h4pTTaBuMJWS2C 2ot6VA/4eFIqeWdX2cFkeLlmyMMnoalwd5gzr+qedV2nkR8JLSjYeYm0CjAkLBF5kJad3Lhb0bYIq 0ABDMFPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQPzr-00000005P6G-3rmq; Tue, 02 Dec 2025 13:00:47 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQPzq-00000005P5v-31Le for linux-arm-kernel@lists.infradead.org; Tue, 02 Dec 2025 13:00:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C912760017; Tue, 2 Dec 2025 13:00:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 385DCC4CEF1; Tue, 2 Dec 2025 13:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764680445; bh=O5dADBbz0/9mG0iK1bzqcE79NAjPo9jdhr65mtDfkmM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VfxAjIPvFyqYqC/XRJRci+Dzk6nWVaa57bdk0arWM2/FfysAB/JJx5zWj+YyHVSYJ STZMh2WsDXmOHEY7/QeaL7yrf+8I0KZedS6d34BlyXtBx+FtNETtX4G14Isn0FuOxC yrnM2NLMXGcqRlG7Pb5HGwxB/J3Ji7ECy30uoHhgsLZ5CTvssuNHlsdZ/jSPCmE9aL YasY9N0op+CMjMDfMgWqIWHBZ99Fkp4sREf024I4MxwQ1r05rLQpZWg6gFMikLg5Y1 EEBjfQ1/vX62DQdxy1/lHym/FLuc4uzih65BOSW1ygX04BK4iQ4eVJ9Th08euKrwOn AdsLHcR8J823A== Message-ID: <076777c3-b238-4d1d-a11b-602027348ee4@kernel.org> Date: Tue, 2 Dec 2025 14:00:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] dt-bindings: power: supply: Add Maxim MAX77759 charger To: Amit Sunil Dhamne Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?Q?Andr=C3=A9_Draszik?= , Lee Jones , Greg Kroah-Hartman , Badhri Jagan Sridharan , Heikki Krogerus , Peter Griffin , Tudor Ambarus , Alim Akhtar , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, RD Babiera , Kyle Tso References: <20251123-max77759-charger-v1-0-6b2e4b8f7f54@google.com> <20251123-max77759-charger-v1-1-6b2e4b8f7f54@google.com> <20251125-amorphous-bobcat-of-whirlwind-afdab1@kuoka> <7ad91325-e881-461d-b39e-6ff15d98b3c5@google.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBC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T2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <7ad91325-e881-461d-b39e-6ff15d98b3c5@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 26/11/2025 00:48, Amit Sunil Dhamne wrote: > > On 11/25/25 1:56 AM, Krzysztof Kozlowski wrote: >> On Sun, Nov 23, 2025 at 06:34:05PM -0800, Amit Sunil Dhamne wrote: >>> Hi Krzysztof, >>> >>> On 11/23/25 1:28 AM, Krzysztof Kozlowski wrote: >>>> On 23/11/2025 09:35, Amit Sunil Dhamne via B4 Relay wrote: >>>>> From: Amit Sunil Dhamne >>>>> >>>>> Add bindings for Maxim max77759 charger device. >>>>> >>>>> Signed-off-by: Amit Sunil Dhamne >>>>> --- >>>>> .../power/supply/maxim,max77759-charger.yaml | 36 ++++++++++++++++++++++ >>>>> 1 file changed, 36 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77759-charger.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77759-charger.yaml >>>>> new file mode 100644 >>>>> index 000000000000..71f866419774 >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max77759-charger.yaml >>>>> @@ -0,0 +1,36 @@ >>>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: http://devicetree.org/schemas/power/supply/maxim,max77759-charger.yaml# >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>> + >>>>> +title: Maxim Integrated MAX77759 Battery charger >>>>> + >>>>> +maintainers: >>>>> + - Amit Sunil Dhamne >>>>> + >>>>> +description: | >>>>> + This module is part of the MAX77759 PMIC. For additional information, see >>>>> + Documentation/devicetree/bindings/mfd/maxim,max77759.yaml. >>>>> + >>>>> + The Maxim MAX77759 is a dual input switch mode battery charger for portable >>>>> + applications. It supports wired and wireless charging and can operate in buck >>>>> + and boost mode. >>>>> + >>>>> +allOf: >>>>> + - $ref: power-supply.yaml# >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + const: maxim,max77759-charger >>>>> + >>>> This should be just folded into parent node, no need for separate >>>> charger device or is just incomplete. >>> Thanks for the review! You are right, the binding is incomplete. This >>> charger block actually listens on its own I2C address, distinct from the >>> main PMIC. >>> >>> I will update v2 to include the reg property. I will also add the >> AFAIK, the main (parent) device schema does not reference children via >> any sort of addressing, so reg here would not be suitable. > > I agree that currently nvmem and gpio devices (which are children of > PMIC device) are not referenced using any address. But I was guessing > that's because they share the i2c client id with the PMIC and sharing > its address space (implied). > > The charger device while being part of the MAX77759 PMIC package has > it's own i2c client id and address space that's why I proposed "reg". > The underlying assumption I made was separate client id implies that a > "reg" property required. But maybe that's incorrect. > > I can understand the argument against having a "reg" property. As the > i2c client id will remain same for a max77759 charger device (as it's a > chip property and not a board property) it will always remain a > constant. I will drop the "reg" proposal. > > >> >>> standard properties `constant-charge-current-max-microamp` and >>> `constant-charge-voltage-max-microvolt` to configure the hardware >>> limits, as this charger device does not manage the battery profile >>> directly (that is handled by a separate fuel gauge). >> Well, still, what's the benefit for the bindings to have it as a >> separate child? Kind of depends on your example, which is quite small - >> one regulator and supply. Grow the example with battery and other >> independent resources (if they are) to justify it. Or show arguments why >> this is re-usable. > > The primary reasons for keeping the charger as a distinct child node are > to model the hardware topology for the power supply subsystem and to You do not need children for that at all. > house the OTG regulator provided by the charger block. > The charger needs to be referenced by the Fuel Gauge (which handles the > battery profile) via power-supplies. Additionally, the charger block > provides a regulator for USB OTG VBUS, which is cleaner to represent as > a child node of the charger rather than mixing it into the top-level > PMIC node. Sorry but argument that you need a child device to be able to construct a phandle is just wrong. You can create phandles on every other way as well. Best regards, Krzysztof