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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EED2C43334 for ; Tue, 5 Jul 2022 15:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vAx66vX+2k4bu1+Cks8lwnkSe6ZKYhLN5/0uGDKCb+M=; b=z+cftlxkMh8B9p jinWOVcwi29hKLngSw5wBIVJrAGtfQ2PsVimObxZ9Ba1Lb5GUETbDVxdqh0khMfIFwSI0MwHVZC4S HPenvO50U3/yvCi8xqO2MuM2d1ea3ZWP7GsnV3c+B/2xRGcj1ocC9iTP/LZDg1w+S/5LLQB8X7Gjw XlQVKXsQg+S4Bx57vJpt2PuU/K1x3UdEKLIQcynL7UaSmM++FmikS8dFsSNwwBxSAyqaE4vKJzAEH nkKJyB8lIFzXU3UGoWPyx4EnhkDtTViC1NV/QKWsVgV8y2be8joNdE8/OYg0y0hAYJqPYCVZYR4Tx AuJIMCoyFWMLfVI3iZuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8kdI-001Cf7-9o; Tue, 05 Jul 2022 15:38:36 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8kdB-001Cai-QQ for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 15:38:31 +0000 Received: by mail-lf1-x131.google.com with SMTP id y16so21174893lfb.9 for ; Tue, 05 Jul 2022 08:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=5lac26hSsxq2bqnIIbfo8iISJEnKW0GSTyf9EVWeE/Q=; b=fQ22/amhPh/I/Xg9BYSELh7tZekP3MwvTy0jBXI7Rb8+FG2nRtPqMPqIHrO6WVwZIU lTv93pXJqRsza/X+5D34Cd/zOn6u6V5ksIiRnP1qwUgBY0uPPU8hP1+EAZLJAnD7Pyma Zk7HKsXc+Ql4z0/CA3osKYg3Z+PcTp65hZLDhsyw2SK0Bw8uR6+84F4vHVEszweSCXMP mi82fIrrjPFiaKbhBNDYhLDbK2OsDOUThTAaU0vb4MM3xHtG9QkCpRrzezOR2RNm6WnL Al8WFMIioAyE+5TIGbCNNzTl7rPsxHt1VYiUEexZuJxMctYm6XcTk159GzZPhpT8rAl3 TmhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5lac26hSsxq2bqnIIbfo8iISJEnKW0GSTyf9EVWeE/Q=; b=ohTtivEDfuoz8otErWuzQWkywx2H3Yg0ucqbE0yWrWMeHdiCgnWoM+SxOyu8Iv/bBm 94jL+l0f7x8SxpwNf7q4VUjssAvbM2XLaIAyRuNhrWBpI8VCE+Z9OXNzXG3FmSax5kVA yGb5/xWco/BTRNFW6SzYPBd3GXznVdKMZibwPE1q6EI2JvqQ+VQjAQHE0pUxcDTWuz4Z Gzg4vFSJd9RHwz9KPP2oNZzTIc003r3JpSfdj9CE7Ol//7t3kYawfelyueWWAZChooVv V8rcQFuVf+AYDiXWkpjgJHvO9utJfXEeHNCbn7P5kgTL/oKsMehbW8JZJsPzFhJoF03T V9uA== X-Gm-Message-State: AJIora/lGULSkSYmssQTGvKcMlIdn7Yldt5mWIjSQ//KrlhR25I68dM+ g1M8PG08MfR7DscQKchvXonaRw== X-Google-Smtp-Source: AGRyM1tmXLh3z47oCGKtYz2FIn0NiD6p981KwThQufhF/Jz38GQV4qLcO+NFEqfJnt590d8d+yj6eQ== X-Received: by 2002:a05:6512:6d4:b0:47f:74b4:4ec4 with SMTP id u20-20020a05651206d400b0047f74b44ec4mr22043767lff.654.1657035507235; Tue, 05 Jul 2022 08:38:27 -0700 (PDT) Received: from [192.168.1.52] ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id a9-20020a19ca09000000b00477a6c86f17sm5746920lfg.8.2022.07.05.08.38.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Jul 2022 08:38:26 -0700 (PDT) Message-ID: <0bd271e9-8d9b-7388-2d9b-65cc39a54f8c@linaro.org> Date: Tue, 5 Jul 2022 17:38:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 07/11] dt-bindings: spi: spi-nxp-fspi: add a new property nxp,fspi-dll-slvdly Content-Language: en-US To: Han Xu Cc: Michael Walle , Bough Chen , ashish.kumar@nxp.com, yogeshgaur.83@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, singh.kuldeep87k@gmail.com, tudor.ambarus@microchip.com, p.yadav@ti.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, festevam@gmail.com, dl-linux-imx , linux-arm-kernel@lists.infradead.org, zhengxunli@mxic.com.tw References: <1657012303-6464-1-git-send-email-haibo.chen@nxp.com> <1657012303-6464-7-git-send-email-haibo.chen@nxp.com> <59d360ef-5374-c7a7-2995-854ab3715b25@linaro.org> <62f113a0cdb0d58bf04ab0b274912eb7@walle.cc> <20220705145226.tarpvub6bh67tj63@umbrella> From: Krzysztof Kozlowski In-Reply-To: <20220705145226.tarpvub6bh67tj63@umbrella> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_083829_894337_0A6A3C05 X-CRM114-Status: GOOD ( 18.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 05/07/2022 16:52, Han Xu wrote: > On 22/07/05 04:12PM, Krzysztof Kozlowski wrote: >> On 05/07/2022 16:06, Michael Walle wrote: >>> >>>>> >>>>> I think you could use here clock cycles or clock phase, but then it >>>>> has to be obvious >>>>> it is that unit. >>>> >>>> Hi Krzysztof, >>>> >>>> Let me clarify it, in the document a term "delay cell" was used to >>>> descript this register bit. Each delay cell equals "1/32 clock phase", >>>> so the unit of delay cell is clock phase. The value user need set in >>>> DT just number to define how many delay cells needed. >>> >>> Then should the unit be "-degrees" and the possible range 0-180? >> >> Thanks. We don't have it documented currently, but the unit seems >> reasonable. > > IMO, use the unit "-degrees" makes it more complicate. Personaly I would > calculate how many clock cycle delay needed, such as 1/4 clock cycle or half > clock cycle. Using degree brings extra calculation. And what if the next device uses a bit different divider? Like 1/16? This is why we have standard units so people won't push register values into the bindings. > > The granularity of the clock phase change is 1/32 of 180 degree, but the range > 0-180 make people feel it can be set in any degree in range. Yes, because that's how the bindings are being written - allowing any reasonable value, not register-specific value, to be used because it is the most flexible, hardware-independent and allows further customization of bindings (e.g. new devices). Embedding device programming model into the bindings contradicts it. Second, nothing stops you from narrowing the acceptable values with an enum. This still allows extension. Your 1/32 does not. > > If I describe all details of the relation between "nxp,fspi-dll-slvdly" and > "delay cell" in patch v2, do you think it's clear for users? 1/32 could be a nice unit, but degrees is better. Just like uV is better than 1/32 of V. Like 1 us is better than 1/32 of ms. Do you see in the bindings many other values like time, potential, current or power described in 1/32 units? Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel