From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 2ACB5188920; Wed, 6 Nov 2024 01:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730858144; cv=none; b=D5O9R7GjkN0i3HY90/mvg5+1bguFAREML9UrixegC2ooLMKnhGMriI8R5OkPBKd62umPiaWsGd9ygTsCXZM46JBpDUv8rgl+yIkW6sKkUQ3jn8noMyfkTcaQYTBjxnw3y0HlAhLacOhdjvbncsoWEt5TIIsExWBOEH2NZSDPdH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730858144; c=relaxed/simple; bh=yom5fVc1TdM0VX7YeivKBEf4JA/nOPIA/UpA6hcSE9I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=k9try/RQ9Y4Lb54oxyS5RtxOaofpWi3jR5N1r86vyTUlOjTSDSVCgzYydLMk7YUn/ptbmYjWAsQbxI7f7G9u/CIFvoFr+4SOFUl2+GFvaYF7Ou9m3FkpaIL40yN2MXMa9jX642NpZlMpDsLgfMp4Ru9Dv0pKlyIjfqbmkc102sk= 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=iSLnKI71; arc=none smtp.client-ip=209.85.214.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iSLnKI71" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20cb47387ceso59730695ad.1; Tue, 05 Nov 2024 17:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730858141; x=1731462941; 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=yom5fVc1TdM0VX7YeivKBEf4JA/nOPIA/UpA6hcSE9I=; b=iSLnKI71nCBaIUMpPV5eQmTVIJis/klJhfnEO48z0784Au5nb5GDahJFDcFATF3m1S 1axTFLa3klM9HG61ZhG+cRw0K9a54ZPLoM3ivGGCytKxC5cCdBGKmcFMAekV0Y3CJPdB cHfvhKXNlbJJw3msU2h4rLUNJAjK5AnPbwQhEtLIT5G/xkDYK5MSgEKZaYe//C+DGXT+ FXoXoQPbJ/+lgxEVFDv0YwZ5y3eTLn9ff2UJ93Rs91wvlbDDT9J2GfCZbwujhbWkJmiH McJLSWw5/u/DqhTBPkqKzGTpHjS3umxil6lYcXuhdd5d996AU3tSDtZ+53dDua7ny81n FCjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730858141; x=1731462941; 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=yom5fVc1TdM0VX7YeivKBEf4JA/nOPIA/UpA6hcSE9I=; b=Uw71EPbJtjaerwFMcofxU7hcKWw+ocZFC2oPAuWOlHAa9NMdhwK/EmaI4bWQPLEb12 n87Hx0K6Xo75yVe8Tix1c3VfUVyAbmKqn53loU4bcVeU0brykDGUEq67Q72+LZw3ev/6 WGyAz7qdo5nh1tDV0UxGWbg/nSFJDFtVuT7p9JR39lBgJ8lHhi7zMlWsslsgShus3dCM AbdGyL+m0fWiv7XitPNPIV0yCj6As1X84qMQSMUA2I6qB44XrKDfUcxTDTW/d+Mm7oZT HKjVQtWe6Y238SrVlmdpSQtD3GLe4dnHQseNyuCqURgLiKN8drLhRSK6hJfIyh+Bqxbc uZ7A== X-Forwarded-Encrypted: i=1; AJvYcCUQ7gVl/EiBPKP0dj5nHLWsSVF1KCGkqVK2NU5PdaW6JFwRpgih9yFyhkL0ValDRwmdjRWbGwKX/bpG@vger.kernel.org, AJvYcCV+9Hcs1xxwfZNCTSfYD2+9AIcHZu/lwqSQkt/Qw9h902GqwkBeva+wq3H+3wl7G+O6W4kDZoxWuATmCiU=@vger.kernel.org X-Gm-Message-State: AOJu0YxGpbxLHzzcrKkccXNjQ1Az6Jnfzhb+ISWoQ7QquaSlAkjcMe7g KANDFgWlEcMEfxXrEyZ2Qx5vpNlNk6Ff4HGUIoSB55TTFz3/ocyH X-Google-Smtp-Source: AGHT+IHy1KS3xjCkhbyJy867YDZRNdqS6YyR3EdbsH4CzcMZHpOrs5nIjwDUWitD4tpGoiI+rOnJoA== X-Received: by 2002:a17:902:fc4c:b0:202:26d:146c with SMTP id d9443c01a7336-210c68728f3mr519605205ad.5.1730858141348; Tue, 05 Nov 2024 17:55:41 -0800 (PST) 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-211057087cfsm85277575ad.87.2024.11.05.17.55.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Nov 2024 17:55:40 -0800 (PST) Sender: Guenter Roeck Message-ID: <1107c12b-9d1e-46d8-b356-73077c7a218a@roeck-us.net> Date: Tue, 5 Nov 2024 17:55:39 -0800 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] dt-bindings: hwmon: pwm-fan: Document start from dead stop properties To: Marek Vasut , linux-hwmon@vger.kernel.org Cc: Conor Dooley , Jean Delvare , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org References: <20241105135259.101126-1-marex@denx.de> <189cd4b5-005b-4311-a5de-2b376eb0b9d8@denx.de> <1a8b0024-97db-4c1c-9d04-45057a2ba800@roeck-us.net> <0b32eda6-4071-4707-a8c6-447073638707@denx.de> 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 IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAc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nm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <0b32eda6-4071-4707-a8c6-447073638707@denx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/5/24 17:28, Marek Vasut wrote: > On 11/6/24 1:34 AM, Guenter Roeck wrote: >> On 11/5/24 10:53, Marek Vasut wrote: >>> On 11/5/24 3:11 PM, Guenter Roeck wrote: >>>> On 11/5/24 05:52, Marek Vasut wrote: >>>>> Delta AFC0612DB-F00 fan has to be set to at least 30% PWM duty cycle >>>>> to spin up from a dead stop, and can be afterward throttled down to >>>>> lower PWM duty cycle. Introduce support for operating such fans which >>>> >>>> Doesn't this imply that a minimum pwm value is needed as well ? >>> >>> It depends. For this fan, yes, it does stop at around 8% PWM duty cycle. >>> >>>> Super-IO chips such as the NCT67xx series typically have two separate >>>> registers, one for the pwm start value and one for the minimum pwm value. >>> >>> I use plain SoC PWM output to operate the fan. This one needs to be set to higher PWM duty cycle first, to spin up, and can be reduced to lower PWM duty cycle afterward without stopping. >>> >> >> Yes, exactly. That is what many fans require. >> >>>>> need to start at higher PWM duty cycle first and can slow down next. >>>>> >>>>> Document two new DT properties, "fan-dead-stop-start-percent" and >>>>> "fan-dead-stop-start-usec". The former describes the minimum percent >>>>> of fan RPM at which it will surely spin up from dead stop. This value >>>>> can be found in the fan datasheet and can be converted to PWM duty >>>>> cycle easily. The "fan-dead-stop-start-usec" describes the minimum >>>>> time in microseconds for which the fan has to be set to dead stop >>>>> start RPM for the fan to surely spin up. >>>>> >>>>> Signed-off-by: Marek Vasut >>>>> --- >>>>> Cc: Conor Dooley >>>>> Cc: Guenter Roeck >>>>> Cc: Jean Delvare >>>>> Cc: Krzysztof Kozlowski >>>>> Cc: Rob Herring >>>>> Cc: devicetree@vger.kernel.org >>>>> Cc: linux-hwmon@vger.kernel.org >>>>> --- >>>>>   Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 11 +++++++++++ >>>>>   1 file changed, 11 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/ Documentation/devicetree/bindings/hwmon/pwm-fan.yaml >>>>> index 4e5abf7580cc6..f1042471b5176 100644 >>>>> --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml >>>>> +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml >>>>> @@ -31,6 +31,17 @@ properties: >>>>>         it must be self resetting edge interrupts. >>>>>       maxItems: 1 >>>>> +  fan-dead-stop-start-percent: >>>> >>>> Personally I don't think that "dead-stop" in the property name adds any value. >>>> On the contrary, I think it leads to confusion. I head to read the description >>>> to understand. >>> >>> The documentation refers to this behavior as a "dead stop" , hence the property name. I can change it to fan-stop-to-start-percent ? >> >> I do not understand the need for that much complexity in the property name, >> and I don't think it makes sense to name a property based on a specific >> chip documentation. I have seen that before, where different vendors use >> different names for the same functionality. That doesn't mean that the >> vendor-determined name has to make it into the property name. >> >> As an example, Nuvoton calls the values "Start-Up Value" and "Stop Value". >> ITE calls the start value "start PWM value" (and as far as I can see doesn't >> have a separate stop value). I am sure pretty much every vendor uses a >> different description. >> >> I am personally not a friend of long property names. Having said that, >> I'll let you use whatever DT maintainers accept. They may have a different >> opinion. > Do you have a different suggestion for the property name ? Else I'll just send a V2 . fan-start-percent and fan-stop-percent would be good enough for me. However, the existing cooling-levels property uses duty cycle values from 0 ..255. Using % for the new properties will create an inconsistency. It will be up to DT maintainers to decide how the properties should be defined. Guenter