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 7D63ACCA47F for ; Tue, 5 Jul 2022 14:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231917AbiGEOM6 (ORCPT ); Tue, 5 Jul 2022 10:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233417AbiGEOMf (ORCPT ); Tue, 5 Jul 2022 10:12:35 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4287243; Tue, 5 Jul 2022 07:06:04 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id DFACE2223E; Tue, 5 Jul 2022 16:06:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1657029962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j7NwS041H2A7Av1dAuyz4ev4klbMrMlMS8fdSFJVby0=; b=rYoDNOwUzIU0r4i6jlRs02msbQ4lBYNejXJBFtTH49c+8b2klkF80wDkuYBDt6KJSdka// 5mLtI5ihr7pLQX2MNAxj1/OO9avk4/GLuPyEYiAB++2/50uxK1jeqV53JZS+nql24KlWza lnmEtVGmJo3ZGK3Kzsx6PY2eJ7e1Byw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 05 Jul 2022 16:06:02 +0200 From: Michael Walle To: Han Xu Cc: Krzysztof Kozlowski , 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 Subject: Re: [PATCH 07/11] dt-bindings: spi: spi-nxp-fspi: add a new property nxp,fspi-dll-slvdly In-Reply-To: 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> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <62f113a0cdb0d58bf04ab0b274912eb7@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2022-07-05 16:00, schrieb Han Xu: >> -----Original Message----- >> From: Krzysztof Kozlowski >> Sent: Tuesday, July 5, 2022 8:29 AM >> To: Han Xu ; 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; >> michael@walle.cc; miquel.raynal@bootlin.com; richard@nod.at; >> vigneshr@ti.com; >> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de >> Cc: 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 >> Subject: Re: [PATCH 07/11] dt-bindings: spi: spi-nxp-fspi: add a new >> property >> nxp,fspi-dll-slvdly >> >> On 05/07/2022 15:19, Han Xu wrote: >>>>>>> + nxp,fspi-dll-slvdly: >>>>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>>>> + description: | >>>>>>> + Specify the DLL slave line delay value. >>>>>> >>>>>> What are the units? >>>>> >>>>> Do you mean here need to give more detail explain about this >>>>> properity? >>>>> >>>>> How about change like this? >>>>> Specify the DLL slave line delay value. The delay target for >>>>> slave delay line is: >>>> ((nxp,fspi-dll-slvdly+1) * 1/32 * clock cycle of reference clock >>>> (serial root clock). >>>> >>>> This would be good. >>>> >>>>> The range of this value is 0~16. >>>> >>>> This needs to go to schema instead as "maximum: 16". >>>> >>>> But still the question is - what are the units used in this "delay"? >>>> ms? us? >>> >>> HI Krzysztof, >>> >>> According to the formula, the range should be 0~15, 16 should do >>> nothing or no >> delay. >> >> Sure, just add some constraint. >> >>> >>> The unit should be clock phase. In other words, the delay can be in >>> range of >> 1/32~1/2 clock cycle. >> >> So we probably misunderstood each other... looking at the driver it >> also explains >> the confusing. You encoded here register value which is pretty often >> wrong >> approach. >> >> This should be instead meaningful value for the user of the bindings, >> so usually >> using one of property units: >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com >> %2Fdevicetree-org%2Fdt- >> schema%2Fblob%2Fmain%2Fdtschema%2Fschemas%2Fproperty- >> units.yaml&data=05%7C01%7Chan.xu%40nxp.com%7C0ffe3d706e064f14382 >> 108da5e8a5add%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6379262 >> 45564450475%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV >> 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q4 >> SfVnBN%2BQ0vYKJzRf%2FXZkCA1WGyPV9doFcb%2BLSKx4w%3D&reserved=0 Hm, you should fix your mail server. >> >> 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? -michael