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 05BDFC433FE for ; Thu, 6 Oct 2022 06:30:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbiJFGa5 (ORCPT ); Thu, 6 Oct 2022 02:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiJFGa4 (ORCPT ); Thu, 6 Oct 2022 02:30:56 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A416645F4E for ; Wed, 5 Oct 2022 23:30:54 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id qw20so1691498ejc.8 for ; Wed, 05 Oct 2022 23:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=E5zgckpqsR7kGRebj1WoqapOqCyfPYoLK+0nxo0YmRg=; b=IzdH9hbuhhKVVv/TqcfThDmJToOdCgKHWrCq5xzHeuHiIVrhrNBxWUE3r7XoCcfP6C Tg7DI/aRtBPtd381HQ0NrGuDhm16brD5p+2WKyGGPoTpzk3Iiynnu05VM1jVeQp8JsAa tTMxh6HTCCC+dn11a2zzjkuRhvul/kFstfHAgrzcGCqTzdB5dftaalmr3qw03+jHMUuB Ek+V9yw9vHH2YeBF1aA79blOJT4tDoUnUMumL7j46TWZXvr7LyTkWaTgjYB9k1UqIQyy eHEpcVskNYQxEbaDvA+A+yNu8WpW2j8g6YZqK3nn9Ke5Jdbc9f9r8eIQ58+R8INDkWDm 3bGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=E5zgckpqsR7kGRebj1WoqapOqCyfPYoLK+0nxo0YmRg=; b=FF5x1NIhjonErXjNeYuGz9twCyoOczbw+Bjbnsdyk048o4TLy3ZKETGHA15SX7DxS2 VATpJAYVMP0yVQ2ULB95aL2g+Q9dnAngU62G/v+/YXjigyuEjLVE+QNu+QPuX6s5aWyt FvbMrZvp9Rc31unBjSJM2OaLjukNCfLXm2BEQZVDjAFLJgCXzX9BU0N11jIHCeEfuy+b 9WEHZcHNwp73GJBq9o/BUjKjbUNI0YUrPQuNJ+5yEM1PnvDMbgcr5Jh/U0/n5V2Jc+JA wCpfWcP/Vmgd19ystqn6bmruHsgj5XeDRxawxWbpU0fPMvrhNJjFFsEZN4jsUIedZEkT Fa9Q== X-Gm-Message-State: ACrzQf1pFaivESJx18Zv+yU9945K0qvOHszoC3LxOXFD2ZqfviAcPRQP JIzW8SQtXsWRu4nY9Jot3JHIhzZGAEH1ZBf40U88OQ== X-Google-Smtp-Source: AMsMyM4kgiY7kYzss5XNWBII5NQwLZc9xH4OQDmzGOuyTS+Wtd+QLTUBJEIMjHJRtjlR4xF00eyN+luoNu/FquSYzJ4= X-Received: by 2002:a17:906:db03:b0:741:337e:3600 with SMTP id xj3-20020a170906db0300b00741337e3600mr2700263ejb.343.1665037853179; Wed, 05 Oct 2022 23:30:53 -0700 (PDT) MIME-Version: 1.0 References: <20220922050718.1079651-1-Naresh.Solanki@9elements.com> <20220922050718.1079651-2-Naresh.Solanki@9elements.com> <3003378d-4283-6c05-50bf-29178c97ef8e@linaro.org> In-Reply-To: From: Naresh Solanki Date: Thu, 6 Oct 2022 12:00:42 +0530 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: hwmon: Add binding for max6639 To: Guenter Roeck Cc: Krzysztof Kozlowski , devicetree@vger.kernel.org, Jean Delvare , Rob Herring , Krzysztof Kozlowski , Roland Stigge , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Patrick Rudolph , Marcello Sylvester Bauer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Thanks Guenter, to summarize below properties that can be configured based on input from fan datasheet: pwm controlled fan: 1. max-rpm : Defines maximum rpm the fan supports 2. tach-pulse/pulse-per-revolution( also referred as prescale) : Determines the number of pulses received from the sensor/tach pin of fan per revolution. 3. rpm-init (also ref. as fan-target-rpm): Determines the fan rpm driver needs to configure during probe. 4. pwm-input-polarity(normal or inverse) : Specifies fan pwm input polarity as specified in fan datasheet. a fan controller driver can use this data to configure pwm output polarity accordingly during driver probe. For a DC output controlled fan, voltage across fan is controlled to control= rpm. Below is what I can think of: 5. voltage-range : Specifies valid voltage range for rpm control example for 3V to 5V range: voltage-range=3D<3000 5000>; Above mentioned properties are within the scope of fan. Fan controllers like max6639/max6650 etc can have additional properties specific to the feather supported by the chip. Let me know if I can go ahead with this. Thanks, Naresh Solanki Regards, Naresh Solanki 9elements GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany Email: naresh.solanki@9elements.com Mobile: +91 9538631477 Sitz der Gesellschaft: Bochum Handelsregister: Amtsgericht Bochum, HRB 17519 Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar Datenschutzhinweise nach Art. 13 DSGVO On Thu, 6 Oct 2022 at 00:10, Guenter Roeck wrote: > > On 9/21/22 23:34, Krzysztof Kozlowski wrote: > > On 22/09/2022 07:07, Naresh Solanki wrote: > >> From: Marcello Sylvester Bauer > >> > >> Add Devicetree binding documentation for Maxim MAX6639 temperature > >> monitor with PWM fan-speed controller. > >> > >> Signed-off-by: Marcello Sylvester Bauer > >> Signed-off-by: Naresh Solanki > >> --- > >> .../bindings/hwmon/maxim,max6639.yaml | 112 ++++++++++++++++= ++ > >> 1 file changed, 112 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max= 6639.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max6639.yam= l b/Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml > >> new file mode 100644 > >> index 000000000000..c845fb989af2 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/hwmon/maxim,max6639.yaml > >> @@ -0,0 +1,112 @@ > >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> + > >> +$id: http://devicetree.org/schemas/hwmon/maxim,max6639.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Maxim max6639 > >> + > >> +maintainers: > >> + - Roland Stigge > > > > Ack from Roland is needed here. > > > >> + > >> +description: | > >> + The MAX6639 is a 2-channel temperature monitor with dual, automatic= , PWM > >> + fan-speed controller. It monitors its own temperature and one exte= rnal > >> + diode-connected transistor or the temperatures of two external diod= e-connected > >> + transistors, typically available in CPUs, FPGAs, or GPUs. > >> + > >> + Datasheets: > >> + https://datasheets.maximintegrated.com/en/ds/MAX6639-MAX6639F.pdf > >> + > >> +properties: > >> + compatible: > >> + enum: > >> + - maxim,max6639 > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + '#address-cells': > >> + const: 1 > >> + > >> + '#size-cells': > >> + const: 0 > >> + > >> +required: > >> + - compatible > >> + - reg > >> + - "fan@0" > >> + - "fan@1" > >> + > >> +additionalProperties: false > >> + > >> +patternProperties: > > > > This goes after properties. > > > >> + "^fan@[0-1]$": > >> + type: object > >> + description: | > >> + Represents the two fans and their specific configuration. > >> + > >> + properties: > >> + reg: > >> + description: | > >> + The fan number. > >> + items: > > > > Skip items. > > > >> + minimum: 0 > >> + maximum: 1 > >> + > >> + pwm-polarity: > > > > Why is this property of fan, not of PWM source? > > > > The chip provides pwm output to the fan. That typical for fan > controller chips. Typically they also have options to configure > the pwm frequency and either pwm or DC output (max6639 does not > have the latter option). > > Guenter