[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f33ad190-f5c7-d9fa-088b-5538ab1f4d59@linaro.org>
Date: Tue, 5 Jul 2022 15:29:11 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Han Xu <han.xu@....com>, Bough Chen <haibo.chen@....com>,
"ashish.kumar@....com" <ashish.kumar@....com>,
"yogeshgaur.83@...il.com" <yogeshgaur.83@...il.com>,
"broonie@...nel.org" <broonie@...nel.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"singh.kuldeep87k@...il.com" <singh.kuldeep87k@...il.com>,
"tudor.ambarus@...rochip.com" <tudor.ambarus@...rochip.com>,
"p.yadav@...com" <p.yadav@...com>,
"michael@...le.cc" <michael@...le.cc>,
"miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
"richard@....at" <richard@....at>,
"vigneshr@...com" <vigneshr@...com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"kernel@...gutronix.de" <kernel@...gutronix.de>
Cc: "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"festevam@...il.com" <festevam@...il.com>,
dl-linux-imx <linux-imx@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"zhengxunli@...c.com.tw" <zhengxunli@...c.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://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
I think you could use here clock cycles or clock phase, but then it has
to be obvious it is that unit.
Best regards,
Krzysztof
Powered by blists - more mailing lists