Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7512531rwd; Tue, 20 Jun 2023 02:12:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5M27b9nzawFzAml5ogCadNXFOMXJXv8Ku6nTUDbtbx7C3BW3g6dLVvIHdw9Saskv2po1PU X-Received: by 2002:a05:622a:190a:b0:3ff:2f27:12ac with SMTP id w10-20020a05622a190a00b003ff2f2712acmr762896qtc.66.1687252377713; Tue, 20 Jun 2023 02:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687252377; cv=none; d=google.com; s=arc-20160816; b=1GMqMHzCoXwlBP20ah9iqFhzkp7iFKxlj27OJ5IPfUpkKBxKqRQOcehcDVujlk1XeD qKsgbl+4klIbdrwGRIE6bHmrsO0lYpwqGjAQ8nSdKDL7ycA7JB5oysk57h19ZqmFUxWX 6hO/qNT6Yll8vun49SFAh7IMHntmEWcuwtBhEnhmyihANL8ctl3CzwD7BjilrS+//wNr qUFzjN63RMNuxLt4448EktyvVT3QzzgSvFR/ATbOi/6EQRcg+RXtrVk5DSs1UDp1MKe+ 7y5kaWr2d8KEA8YMZzu6manzuJuez0myntji+9rL39ZXqoImtvdtyu/F40WtLfess87T pQuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4iS2y1OnqzJKxw2HMxOkBjHX6AOsUPw+JImGbUMIxFg=; b=ZD/2hjFzhIgbHFd8D2fl59YiMfjagAVVTDTEVTBuVI6FSNA3RJQIb5oM4WOgM+Bxqf pSRlrp76XQl3s5DLPTrHK2rEr9QOjjGxKqNNlWTxMJUTORinTCD0h35LGEW3f3hIoAjF 1k7quDYsLUJKxkTREQ92jf+QFps2u2uRVWoOKEqaibcf8ClngizVc4nMFpEPLkS6k0k4 ICeu4ki1/oKrs39fH59IZIfN8dciQ1fAJ5GmTyRDLNm6CxL+EXO9xKRMj3/DULHC2DXV 0NYV9dAVEG0qbbegPGVwNcx5e8n/xpmD9V78zZMghiHLbm0JyEErkbuW3ei7VbCYev4w gZog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f4JsLlCx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020aa79685000000b00666e9830c1csi1209946pfk.381.2023.06.20.02.12.44; Tue, 20 Jun 2023 02:12:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f4JsLlCx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231222AbjFTIzO (ORCPT + 99 others); Tue, 20 Jun 2023 04:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbjFTIzM (ORCPT ); Tue, 20 Jun 2023 04:55:12 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C832E7E for ; Tue, 20 Jun 2023 01:55:11 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f9083d8849so37476195e9.0 for ; Tue, 20 Jun 2023 01:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687251310; x=1689843310; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4iS2y1OnqzJKxw2HMxOkBjHX6AOsUPw+JImGbUMIxFg=; b=f4JsLlCxHec5vVldrlb1HMkH9i7QC2zxrPMaYwzIjp/HDDLN1HRV4NwopXumEmW9C/ xOS/eeLg/uR9ir61is14Ve0SJfuJu3t+W7/nMTrKWjCOOAQ96LZwDvQYMZoFe73ImJgd clCa7NDVHHM6/RGf2ROZIgO/PGPvjq++0F+F8JSPDFXeLszY/Qnw9cVlr7U8srL2ALFo bbMVAkGEwQ6p26WLPXh9kTa8W/qDvZ97c5rEnHDVCJXU55Ud9vmCcss8IGI08NhztPl8 4xZNHlvQHigdA1YalBiEAd0jW36yzTHjQr9U+aazJzXB3+Qp3L2Sa9ygBtokYzT3u0dS TjHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687251310; x=1689843310; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4iS2y1OnqzJKxw2HMxOkBjHX6AOsUPw+JImGbUMIxFg=; b=iipGuyCoFEP25xKlyhiv3l/8lu0fl0mmA8tTapVqQ3wJ+EZ4qut1oKLd4VMcsU5Avc F6xvDLLtKSVfBqsb0Pwnx7gductDQX+2cxKjepFub4eefcj57F7h8ppGImaNsIvblQXf dRepNitjooDopmw9T1Cp/prsnwi8usSeh1iZ+zPbSLUhRO2d1q5j5GX3YCkiQddGP81d KiZ+lArNs6B7cnm8zK/5+P4HauA26ixNvpK9FrVkOcYLsiBUzI8Tlw1ZbJerVYzx3KEe pV5s/VpRP9K1SO5HzK68SNCDClIzD59haqG+OHK3NGp8dVMIGkjBc+2ge2Ys4IAmDVR8 VuWQ== X-Gm-Message-State: AC+VfDz++PnYFTojv49rfiCxvoBjAt8OaFaXUbVgkSwux1OwPtC3ceu8 aQ2ayUyrhFlZp7+YjgVTXzSuVA== X-Received: by 2002:a7b:cc99:0:b0:3f9:b88a:f9aa with SMTP id p25-20020a7bcc99000000b003f9b88af9aamr831636wma.11.1687251310048; Tue, 20 Jun 2023 01:55:10 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id i2-20020a05600c290200b003f42d8dd7d1sm12932116wmd.7.2023.06.20.01.55.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 01:55:09 -0700 (PDT) Message-ID: <1a5c39d8-812f-4a8d-bc65-205695661973@linaro.org> Date: Tue, 20 Jun 2023 10:55:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg To: Conor Dooley , Guo Samin Cc: Andrew Lunn , Conor Dooley , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, Peter Geis , Frank , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Heiner Kallweit , Russell King , Yanhong Wang References: <20230526090502.29835-1-samin.guo@starfivetech.com> <20230526090502.29835-2-samin.guo@starfivetech.com> <20230526-glutinous-pristine-fed571235b80@spud> <1dbf113c-7592-68bd-6aaf-05ff1d8c538c@starfivetech.com> <15eb4ffe-ea12-9a2c-ae9d-c34860384b60@starfivetech.com> <20230620-clicker-antivirus-99e24a06954e@wendy> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: <20230620-clicker-antivirus-99e24a06954e@wendy> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/06/2023 10:26, Conor Dooley wrote: > Hey, > > On Tue, Jun 20, 2023 at 11:09:52AM +0800, Guo Samin wrote: >> From: Guo Samin >>> From: Conor Dooley >>>> On Fri, May 26, 2023 at 05:05:01PM +0800, Samin Guo wrote: >>>>> The motorcomm phy (YT8531) supports the ability to adjust the drive >>>>> strength of the rx_clk/rx_data, the value range of pad driver >>>>> strength is 0 to 7. > >>>>> + motorcomm,rx-clk-driver-strength: >>>>> + description: drive strength of rx_clk pad. >>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] >>>> >>>> I think you should use minimum & maximum instead of these listed out >>>> enums. > >>> You have also had this comment since v1 & were reminded of it on >>>> v2 by Krzysztof: "What do the numbers mean? What are the units? mA?" > >>> The good news is that we just got some data about units from Motorcomm. >>> Maybe I can post the data show of the unit later after I get the complete data. > >> Sorry, haven't updated in a while. > > NW chief. > >> I just got the detailed data of Driver Strength(DS) from Motorcomm , which applies to both rx_clk and rx_data. >> >> |----------------------| >> | ds map table | >> |----------------------| >> | DS(3b) | Current (mA)| >> |--------|-------------| >> | 000 | 1.20 | >> | 001 | 2.10 | >> | 010 | 2.70 | >> | 011 | 2.91 | >> | 100 | 3.11 | >> | 101 | 3.60 | >> | 110 | 3.97 | >> | 111 | 4.35 | >> |--------|-------------| >> >> Since these currents are not integer values and have no regularity, There is no mA unit in DT schema, so I don't see what by "not integer values". 1200 uA is an integer. >> it is not very good to use in the drive/dts in my opinion. > > Who says you have to use mA? What about uA? Yep > >> Therefore, I tend to continue to use DS(0-7) in dts/driver, and adding >> a description of the current value corresponding to DS in dt-bindings. > > I think this goes against not putting register values into the dts & > that the accurate description of the hardware are the currents. For vendor properties register values are often accepted, but logical unit is much more readable in the DTS. Also allows further customization or extending when new variant appears. You cannot do extend a property easily when it holds a register value, without changing the meaning per variant. > >> Like This: >> >> + motorcomm,rx-clk-driver-strength: >> + description: drive strength of rx_clk pad. > > You need "description: |" to preserve the formatting if you add tables, > but I don't think that this is a good idea. Put the values in here that > describe the hardware (IOW the currents) and then you don't need to have > this table. > >> + |----------------------| >> + | rx_clk ds map table | >> + |----------------------| >> + | DS(3b) | Current (mA)| >> + | 000 | 1.20 | >> + | 001 | 2.10 | >> + | 010 | 2.70 | >> + | 011 | 2.91 | >> + | 100 | 3.11 | >> + | 101 | 3.60 | >> + | 110 | 3.97 | >> + | 111 | 4.35 | >> + |--------|-------------| >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] >> + default: 3 >> + > >> Or use minimum & maximum instead of these listed out enums > > With the actual current values, enum rather than min + max. Best regards, Krzysztof