Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1351069lqt; Fri, 7 Jun 2024 16:14:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUumDvlNT8k05FigGuJh36zfoa85DkcHMQGzcE90bekPmczzVnFox6qeVAkHLfaOpFsqH5j0k++0skruf0Tmo3j7/6ahRSZZdObAg7vdg== X-Google-Smtp-Source: AGHT+IF4kQy728i3e0P9iMooSZKOEB3gAYtqJswKl+TZwgtXdm0yRCjkUjW37AjZnNBTsQwztDxW X-Received: by 2002:a17:90a:734c:b0:2bd:e884:bc72 with SMTP id 98e67ed59e1d1-2c2bcac2e91mr3857815a91.5.1717802076283; Fri, 07 Jun 2024 16:14:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717802076; cv=pass; d=google.com; s=arc-20160816; b=UXYDzzJMIVzgm4ZheB8r1BcOjvvkGjAopmbrIuLgneCgLWEfD3jSED17eGbD3pNIxL xmDmRwMMzFGDHJrOucsf+3ehexxXdHLAxipZzzZjAalYM8vM39rUkwq8wE4B/1TEUowa GDjFbKi7K1ifA2bYedJfEVWfdC1UHOXYe5ATUy01GUHQeq3kcc4R/nPKGD/UxKMinq+2 Ir64Z3pChkn7hHsLPuSkLCnoXh9uE8D6SO3TCI3eHFTCgWUCvV+M3vTaHyIHapgwJ45d cvg/WWM66LkL4Ya53xJhu6MNTsYjjHRRPmPjdiUdJ6xPc+aAweEmOT/vdv7jHlhJOd30 qdjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=ut429QYnMzFMYE4vNPCxgEGWagYzYXbkhS9m82zClgo=; fh=mtvSIo8ah7rTwFNyGPnsDe8v5uty8Xyw/V5lyp07nSs=; b=Rnw1gJSqA5AhnH6VtIQEYL9hhpr/KHIomw5WE16e/ZhFmjuQdg6DqMiKGjJe/bGAjG CGEP6qf2f9v42zFcwlLAOZpa3208qfB4FVWo91S9oKRC92N8GZW3VfJlSxsGMjwSIaC0 AtLJAWn6PbsQHH3L5cctFbF0sxZGFWz4AK3li/i6N+Vc7GqTdioyONfk7JDjAFTrhoBj Wn1UKo6Gsr8VdANYJqWg8oUAYZgNe5VKvu5+ePuHHHKkYbqJeGh7nwUShBJvOmaluj6P ge4acuDSd4tWl9cxT1He5X5PUcCX2NwVE5RttW/iC7RFmIYs4SICfm4aA0slWFguOUAE kehQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mGnohTsI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206830-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c280632a19si186298a91.3.2024.06.07.16.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 16:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mGnohTsI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206830-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2D16DB237B0 for ; Fri, 7 Jun 2024 23:14:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 139BD7345B; Fri, 7 Jun 2024 23:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mGnohTsI" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 241A173455; Fri, 7 Jun 2024 23:14:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717802061; cv=none; b=DSOg9x8nOIZApVo5aN3xpWNLJ/nx+Pyy3IrWCTXglMot5HkZNrlzvBhHaumK71ROOignLz7aZXZnHzHoGZrAdI0rCsYCMWsyGVoVkt65p7JsyJAyqYhrQzQMvO3V1z0Q3JsQ8FZP3VyQdgnIByinYTdMsD6wewBa10LtCHLMUvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717802061; c=relaxed/simple; bh=+RZLlaH4CpDZW6Va4v4s2m/sSutacavNNW2sUTnjiBA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WRhtbqpxTIvsaqoevJ9pyJFONaRDvOZnJljogw24PdOo3DNmy159HmB5iUSw5GEVRGVGQZ7WcKCtg+KW6IvBOqTZveiunurFGrobwZPMAtV4yEH+vQBTtWsqB/mlC9Gl21mhgnw+sNyfHeOq2/CFJMFArgKLV6UiNpKJoVWipaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mGnohTsI; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-6e57506bb2dso534466a12.0; Fri, 07 Jun 2024 16:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717802059; x=1718406859; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=ut429QYnMzFMYE4vNPCxgEGWagYzYXbkhS9m82zClgo=; b=mGnohTsIAzU/OQs9aqOzCUitbucS0oBUI6nBN7+H8or5mkxwwc4bl2E44zIC2bR3gb ssh4zH5/qWpQov4DGLif8LCkyS8yWD0XiZZMnxymobZkvMIztErNXlWs4b2uE5frkitj dMrPaXy6pGHZk6WdaEXY8nUisCbxUjPlOtxQaixhLV32S9TuLyE+HCAtE4iAKiDZZhBE KRh1agKWqIo2KEP/mpRVCeLuJZZs8ZFwZzHMoCIMrTr77TI6WWstkE8xN3W2g/Kml4JN sEyvxOfraZE1mOA5mPLWyRMwvl8gVTQiZu/CLPX2oyni48sg4gK2jej8ieIcAhEFQQHC ijtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717802059; x=1718406859; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ut429QYnMzFMYE4vNPCxgEGWagYzYXbkhS9m82zClgo=; b=R3B0J3Bg9VGThA757GKo2aPILt2+dIlo/GmTjT6y8MxAJ5pit8Q9c14d7XOjBBInJ+ k+j5D+pKIq6A3aqbgI0zwE/nwKTPfajNZGVnsxoqz1AHsmy2pDFOmBKJcA7MY6NLGZcT LtT0qeazave3HddinYCHEDIERUsxIVbAldP6hADKrHEqVDxM/GKSOLLfFdxqwqCuKMfU NtgaRldjqkUV97NEKwBY/PtDRs3Sc4SwD6IuFgpDDlfkkwx91OXH5ta8BBI2kQx4yfB/ PuekiOSprJQoNyKyzfWmOmIynKI1k8Rf2EGmVd/sNDiFD8ohxexLI+kAP6nEMtdtlG/+ kUBQ== X-Forwarded-Encrypted: i=1; AJvYcCXopkGUgd3hw4ICc5Lfnf64K3SfA0lPcRLztNao4LZIvfDzE9sTpQ9sJBindazvCeEtoxMXjZAGDjUwV8IPTc3djQDbBeGmFdQwmJk6bbhAtUSr5pdLb9rMl9cq1470RWjxIhIja5TwojvPV0y+uxJJRHxa84XVnmKtHEwqN1fBZGJwqVgp X-Gm-Message-State: AOJu0YxSnp9LwVDJJlqTm8rFuR+SYBCW5g3YzjEB52yC69fCCV1qLu/a BP2AatJlk85SWls8ucWQMjtqG5YzW63jG171AzNXRpian6VJGQFU X-Received: by 2002:a05:6a20:3949:b0:1a7:5fe0:1c99 with SMTP id adf61e73a8af0-1b2f9c6255dmr4315412637.46.1717802057686; Fri, 07 Jun 2024 16:14:17 -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 d9443c01a7336-1f6bd76bdddsm39954435ad.85.2024.06.07.16.14.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 16:14:16 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Fri, 7 Jun 2024 16:14:14 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] dt-bindings: hwmon: max31790: Add maxim,pwmout-pin-as-tach-input property To: Chanh Nguyen , Conor Dooley Cc: Krzysztof Kozlowski , Chanh Nguyen , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission , Phong Vo , Thang Nguyen , Quan Nguyen References: <20240414042246.8681-4-chanh@os.amperecomputing.com> <13b195e6-cbbd-4f74-a6fa-d874cb4aaa45@linaro.org> <065243cc-09cf-4087-8842-bd4394fb324f@amperemail.onmicrosoft.com> <20240423-gallantly-slurp-24adbfbd6f09@spud> <396b47f5-9604-44ab-881f-94d0664bcab8@roeck-us.net> <0dcc8788-604a-49c1-8c6b-fdbfa9192039@amperemail.onmicrosoft.com> <8fb38eb3-bb94-49cc-b5bc-80989d7876b9@amperemail.onmicrosoft.com> <20240508-onward-sedation-621cc48fa83f@spud> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX Id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K/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/7/24 09:47, Chanh Nguyen wrote: > > > On 08/05/2024 23:47, Conor Dooley wrote: >> On Wed, May 08, 2024 at 10:44:34AM +0700, Chanh Nguyen wrote: >>> On 05/05/2024 22:40, Guenter Roeck wrote: >>>> On 5/5/24 03:08, Chanh Nguyen wrote: >>>>> On 25/04/2024 21:05, Guenter Roeck wrote: >>>>>> On 4/25/24 03:33, Chanh Nguyen wrote: >>>>>> >>>>>> pwm outputs on MAX31790 are always tied to the matching >>>>>> tachometer inputs >>>>>> (pwm1 <--> tach1 etc) and can not be reconfigured, meaning tach-ch for >>>>>> channel X would always be X. >>>>>> >>>>>>> I would like to open a discussion about whether we should >>>>>>> use the tach-ch property on the fan-common.yaml >>>>>>> >>>>>>> I'm looking forward to hearing comments from everyone. For >>>>>>> me, both tach-ch and vendor property are good. >>>>>>> >>>>>> >>>>>> I am not even sure how to define tach-ch to mean "use the pwm output pin >>>>>> associated with this tachometer input channel not as pwm output >>>>>> but as tachometer input". That would be a boolean, not a number. >>>>>> >>>>> >>>>> Thank Guenter, >>>>> >>>>> I reviewed again the "tach-ch" property, which is used in the https://elixir.bootlin.com/linux/v6.9-rc6/source/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml#L68 >>>>> and https://elixir.bootlin.com/linux/v6.9-rc6/source/drivers/hwmon/aspeed-g6-pwm-tach.c#L434 >>>>> >>>>> That is something completely different from my purpose. >>>>> >>>> >>>> Based on its definition, tach-ch is associated with fans, and it looks >>>> like the .yaml file groups multiple sets of fans into a single >>>> fan node. >>>> >>>> In the simple case that would be >>>>       tach-ch = <1> >>>> ... >>>>       tach-ch = <12> >>>> >>>> or, if all fans are controlled by a single pwm >>>>       tach-ch = <1 2 3 4 5 6 8 9 10 11 12> >>>> >>>> The existence of tachometer channel 7..12 implies that pwm channel >>>> (tachometer >>>> channel - 6) is used as tachometer channel. That should be sufficient to >>>> program >>>> the chip for that channel. All you'd have to do is to ensure that pwm >>>> channel >>>> "X" is not listed as tachometer channel "X + 6", and program pwm channel >>>> "X - 6" >>>> for tachometer channels 7..12 as tachometer channels. >>>> >>> >>> Hi Guenter, >>> >>> I applied the patch [2/3] in my patch series (https://lore.kernel.org/lkml/20240414042246.8681-3-chanh@os.amperecomputing.com/) >>> >>> My device tree is configured as below, I would like to configure PWMOUT pins >>> 5 and 6 to become the tachometer input pins. >>> >>>         fan-controller@20 { >>>           compatible = "maxim,max31790"; >>>           reg = <0x20>; >>>           maxim,pwmout-pin-as-tach-input = /bits/ 8 <0 0 0 0 1 1>; >>>         }; >> >> Why are you still operating off a binding that looks like this? I >> thought that both I and Krzysztof told you to go and take a look at how >> the aspeed,g6-pwm-tach.yaml binding looped and do something similar >> here. You'd end up with something like: >> >>          fan-controller@20 { >>            compatible = "maxim,max31790"; >>            reg = <0x20>; >> >>            fan-0 { >>              pwms = <&pwm-provider ...>; >>              tach-ch = 6; >>          }; >> >>            fan-1 { >>              pwms = <&pwm-provider ...>; >>              tach-ch = 7; >>          }; >> }; >> >> You can, as tach-ch or pwms do not need to be unique, set multiple >> channels up as using the same tachs and/or pwms. >> In the case of this particular fan controller, I think that the max31790 >> is actually the pwm provider so you'd modify it something like: >> >>          pwm-provider: fan-controller@20 { >>            compatible = "maxim,max31790"; >>            reg = <0x20>; >>       #pwm-cells = ; >> >>            fan-0 { >>              pwms = <&pwm-provider ...>; >>              tach-ch = <6>; >>          }; >> >>            fan-1 { >>              pwms = <&pwm-provider ...>; >>              tach-ch = <7>; >>          }; >> }; >> >> I just wrote this in my mail client's editor, so it may not be not >> valid, but it is how the fan bindings expect you to represent this kind >> of scenario. >> > > My apologies for the late reply. > > Thank you, Conor, for your recommendation! > > I spend more time checking the aspeed,g6-pwm-tach.yaml . Finally, I'll support the child nodes by having different tach-ch values. My system is designed similar to Figure 6 (8 Tach Monitors, 4PMWs). > > I'm going to push the patch series v3 soon. > > This is a brief binding. > .... > properties: >   compatible: >     const: maxim,max31790 > >   reg: >     maxItems: 1 > >   clocks: >     maxItems: 1 > >   resets: >     maxItems: 1 > > patternProperties: >   "^fan-[0-9]+$": >     $ref: fan-common.yaml# >     unevaluatedProperties: false > > required: >   - compatible >   - reg > > additionalProperties: false > > examples: >   - | >     i2c { >       #address-cells = <1>; >       #size-cells = <0>; > >       pwm_provider: fan-controller@20 { >         compatible = "maxim,max31790"; >         reg = <0x20>; >         clocks = <&sys_clk>; >         resets = <&reset 0>; > >         fan-0 { >           pwms = <&pwm_provider 1>; >           tach-ch = <1 2>; >         }; > >         fan-1 { >           pwms = <&pwm_provider 2>; >           tach-ch = <7 8>; >         }; >       }; >     }; > > > As your example, I saw the #pwm-cells = . Please let me know, what's the purpose of this property? > It is the number of fields in "pwms" after the provider reference. In your case it would be 1 (the index). If the pwm has additional configuration parameters such as the frequency or polarity there would be additional entries. Guenter