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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96AAFC41513 for ; Tue, 8 Aug 2023 17:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234042AbjHHRWT (ORCPT ); Tue, 8 Aug 2023 13:22:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234496AbjHHRV7 (ORCPT ); Tue, 8 Aug 2023 13:21:59 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C395A1F425; Tue, 8 Aug 2023 09:08:59 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-40fd2de0ddcso45218321cf.2; Tue, 08 Aug 2023 09:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691510905; x=1692115705; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=48Zr0S4HamHQ25B/ZcGiUlOHiVUQn60xnNnJqEoGB1g=; b=JvkLENHhdLHitguTVndQo+Wr6y6smRZatMAMwb6JxbSV7NhD0CVj7kKkWmkzKyzgNa 2PGV+DuFYf0sB0LR0/6M0iXTCJO5mhPDTfzuVQSrfH2k+JmZjh4w2mz6MZ9AV2YWtQUS i8jtN99Yliqz73z8K+g6cibuHQ7yQ/G10eLdBvoDbT2YzdgIkq2FWa9eQzIEIuAz+OYH sk7/q+MrZNNETDrlUVorLTbXBYM8XQ3xMBdtrOJN0AnFk3KtLZsC5dz6yQ/lL8vz+7Ak z6qp+FBNqiW7K046JYgY8orcbx1moP6ZnwdgY5dAEDWvCRnhR7X09OpuPbaLkrabRKwM zUsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691510905; x=1692115705; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=48Zr0S4HamHQ25B/ZcGiUlOHiVUQn60xnNnJqEoGB1g=; b=iMja/yMh/xJHfH5Ixzd7sT4T2VH0bKQgaPWWTCLyzBSHMTOUXDLBdoYOxl6zegAaTl iUcO+Qm9eW7aX/rGheF0Zl5dFDLpN8veU5cQd7zh15zrBt7ntXA83EN/DqRPXVLZOmyB 5cj38DdeVaV2JFYWPegvZPmJfolT256IgUyQbrPAIDRilqTaEpF1cgFRPUTRufBJghrO ULARfEezyXMx8xaPBH1htwMsBk4un01TIN5uKGteDQOEl8Lg9eZ1grItC4Dm1bqr9nbB ZAY9FEhSLJusOWyS6kI558xroJEYZtHuKJe2eOV3/nvBuszC+zCWtu6hBHPhvSTtzaOJ yg7w== X-Gm-Message-State: AOJu0YyaK8aC3kFCG+9v0EZdLsErndg1If7n9TOW0vLH7qzWo+zv2SnB Fz0cFpp93stVclGoiKJk3LhZ9gAUMoU= X-Google-Smtp-Source: AGHT+IESQe9cH3KsW8id9Jt2E6ZI5IOmRvTdvT6o7AOiAAijF/LX8I1T0u+zM/+wGnc7xY7smSLJ0g== X-Received: by 2002:a05:6e02:156c:b0:345:8373:bf68 with SMTP id k12-20020a056e02156c00b003458373bf68mr16083383ilu.25.1691503810854; Tue, 08 Aug 2023 07:10:10 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id gt23-20020a0566382dd700b0042b37dda71asm3097171jab.136.2023.08.08.07.10.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 07:10:10 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Tue, 8 Aug 2023 07:10:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Conor Dooley , Naresh Solanki Cc: Jean Delvare , krzysztof.kozlowski+dt@linaro.org, Rob Herring , Conor Dooley , linux-hwmon@vger.kernel.org, Patrick Rudolph , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230802193155.2170935-1-Naresh.Solanki@9elements.com> <20230808-stand-cheddar-b76b0b7509a0@spud> From: Guenter Roeck Subject: Re: [PATCH v3 1/3] dt-bindings: hwmon: Add Infineon TDA38640 In-Reply-To: <20230808-stand-cheddar-b76b0b7509a0@spud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 8/8/23 04:46, Conor Dooley wrote: > On Wed, Aug 02, 2023 at 09:31:51PM +0200, Naresh Solanki wrote: >> From: Patrick Rudolph >> >> The TDA38640 chip has different output control mechanisms depending on >> its mode of operation. When the chip is in SVID mode, only >> hardware-based output control is supported via ENABLE pin. However, when >> it operates in PMBus mode, software control works perfectly. >> >> To enable software control as a workaround in SVID mode, add the DT >> property 'infineon,en-svid-control'. This property will enable the >> workaround, which utilizes ENABLE pin polarity flipping for output when >> the chip is in SVID mode. > > Why do you need a custom property for this? How come it is not possible > to determine what bus you are on? > That is not the point. Yes, it can be detected if the control method is PMBus or SVID. However, in SVID mode, SVID is supposed to control the output, not PMBUs. This is bypassed by controlling the polarity of the (physical) output enable signal. We do _not_ want this enabled automatically in SVID mode. Its side effects on random boards using this chip are unknown. Thus, this needs a property which specifically enables this functionality for users who _really_ need to use it and (hopefully) know what they are doing. Guenter > Thanks, > Conor. > >> >> Signed-off-by: Patrick Rudolph >> Signed-off-by: Naresh Solanki >> --- >> .../hwmon/pmbus/infineon,tda38640.yaml | 51 +++++++++++++++++++ >> .../devicetree/bindings/trivial-devices.yaml | 2 - >> 2 files changed, 51 insertions(+), 2 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml >> >> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml >> new file mode 100644 >> index 000000000000..c5924ddf1b47 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml >> @@ -0,0 +1,51 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> + >> +$id: http://devicetree.org/schemas/hwmon/pmbus/infineon,tda38640.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Infineon TDA38640 Synchronous Buck Regulator with SVID and I2C >> + >> +maintainers: >> + - Naresh Solanki >> + >> +description: | >> + The Infineon TDA38640 is a 40A Single-voltage Synchronous Buck >> + Regulator with SVID and I2C designed for Industrial use. >> + >> + Datasheet: https://www.infineon.com/dgdl/Infineon-TDA38640-0000-DataSheet-v02_04-EN.pdf?fileId=8ac78c8c80027ecd018042f2337f00c9 >> + >> +properties: >> + compatible: >> + enum: >> + - infineon,tda38640 >> + >> + reg: >> + maxItems: 1 >> + >> + infineon,en-svid-control: >> + description: | >> + When enabled, it allows the chip to utilize workaround for >> + software control of output when operating in SVID mode where >> + hardware-based output control is the default behavior. >> + type: boolean >> + >> +required: >> + - compatible >> + - reg >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + tda38640@40 { >> + compatible = "infineon,tda38640"; >> + reg = <0x40>; >> + }; >> + }; >> + >> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml >> index 40bc475ee7e1..86c7d34f63bf 100644 >> --- a/Documentation/devicetree/bindings/trivial-devices.yaml >> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml >> @@ -151,8 +151,6 @@ properties: >> - infineon,slb9645tt >> # Infineon SLB9673 I2C TPM 2.0 >> - infineon,slb9673 >> - # Infineon TDA38640 Voltage Regulator >> - - infineon,tda38640 >> # Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor >> - infineon,tlv493d-a1b6 >> # Infineon Multi-phase Digital VR Controller xdpe11280 >> >> base-commit: cb7022b8976e3c4d12cea2e7bb820a2944e2fd7b >> -- >> 2.41.0 >>