All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Xiangsheng Hou (侯祥胜)" <Xiangsheng.Hou@mediatek.com>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"gch981213@gmail.com" <gch981213@gmail.com>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"richard@nod.at" <richard@nod.at>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Benliang Zhao (赵本亮)" <Benliang.Zhao@mediatek.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Bin Zhang (章斌)" <bin.zhang@mediatek.com>
Subject: Re: [PATCH v2 7/9] dt-bindings: spi: mtk-snfi: Add read latch latency property
Date: Tue, 6 Dec 2022 13:19:51 +0100	[thread overview]
Message-ID: <9992c9a5-059a-9396-32ce-7ed63cd12a96@collabora.com> (raw)
In-Reply-To: <a8f706b37f5decf91bfa9a9ac8cf04be4346dd85.camel@mediatek.com>

Il 06/12/22 10:04, Xiangsheng Hou (侯祥胜) ha scritto:
> Hi Angelo,
> 
> On Mon, 2022-12-05 at 15:21 +0100, AngeloGioacchino Del Regno wrote:
>> Il 05/12/22 07:57, Xiangsheng Hou ha scritto:
>>> Add mediatek,rx-latch-latency property which adjust read delay in
>>> the
>>> unit of clock cycle.
>>>
>>> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>>    .../devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml     | 7
>>> +++++++
>>>    1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml
>>> index bab23f1b11fd..6e6ff8d73fcd 100644
>>> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> @@ -45,6 +45,13 @@ properties:
>>>        description: device-tree node of the accompanying ECC engine.
>>>        $ref: /schemas/types.yaml#/definitions/phandle
>>>    
>>> +  mediatek,rx-latch-latency:
>>> +    description: Rx delay to sample data with this value, the
>>> value
>>> +                 unit is clock cycle.
>>
>> Can't we use nanoseconds or microseconds as a unit here, instead of
>> clock cycles?
> 
> The clock cycle will be various with MediaTek SPI NAND controller which
> clock frequency can support 26/52/68/81/104MHz...
> It`s may be easy to configure and understand with clock cycle in unit.
> 

Yes, but whatever clock frequency we use, the target is to always wait for
X nanoseconds, right?

Waiting for 5 clock cycles at 104MHz is obviously not the same as waiting
for the same 5 clock cycles at 26MHz: in that case, expressing the value
in nanoseconds or microseconds would make that independent from the
controller's clock frequency as the calculation from `time` to `cycles`
would be performed inside of the driver.

Regards,
Angelo



WARNING: multiple messages have this Message-ID (diff)
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Xiangsheng Hou (侯祥胜)" <Xiangsheng.Hou@mediatek.com>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"gch981213@gmail.com" <gch981213@gmail.com>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"richard@nod.at" <richard@nod.at>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Benliang Zhao (赵本亮)" <Benliang.Zhao@mediatek.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Bin Zhang (章斌)" <bin.zhang@mediatek.com>
Subject: Re: [PATCH v2 7/9] dt-bindings: spi: mtk-snfi: Add read latch latency property
Date: Tue, 6 Dec 2022 13:19:51 +0100	[thread overview]
Message-ID: <9992c9a5-059a-9396-32ce-7ed63cd12a96@collabora.com> (raw)
In-Reply-To: <a8f706b37f5decf91bfa9a9ac8cf04be4346dd85.camel@mediatek.com>

Il 06/12/22 10:04, Xiangsheng Hou (侯祥胜) ha scritto:
> Hi Angelo,
> 
> On Mon, 2022-12-05 at 15:21 +0100, AngeloGioacchino Del Regno wrote:
>> Il 05/12/22 07:57, Xiangsheng Hou ha scritto:
>>> Add mediatek,rx-latch-latency property which adjust read delay in
>>> the
>>> unit of clock cycle.
>>>
>>> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>>    .../devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml     | 7
>>> +++++++
>>>    1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml
>>> index bab23f1b11fd..6e6ff8d73fcd 100644
>>> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> @@ -45,6 +45,13 @@ properties:
>>>        description: device-tree node of the accompanying ECC engine.
>>>        $ref: /schemas/types.yaml#/definitions/phandle
>>>    
>>> +  mediatek,rx-latch-latency:
>>> +    description: Rx delay to sample data with this value, the
>>> value
>>> +                 unit is clock cycle.
>>
>> Can't we use nanoseconds or microseconds as a unit here, instead of
>> clock cycles?
> 
> The clock cycle will be various with MediaTek SPI NAND controller which
> clock frequency can support 26/52/68/81/104MHz...
> It`s may be easy to configure and understand with clock cycle in unit.
> 

Yes, but whatever clock frequency we use, the target is to always wait for
X nanoseconds, right?

Waiting for 5 clock cycles at 104MHz is obviously not the same as waiting
for the same 5 clock cycles at 26MHz: in that case, expressing the value
in nanoseconds or microseconds would make that independent from the
controller's clock frequency as the calculation from `time` to `cycles`
would be performed inside of the driver.

Regards,
Angelo


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Xiangsheng Hou (侯祥胜)" <Xiangsheng.Hou@mediatek.com>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"gch981213@gmail.com" <gch981213@gmail.com>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"richard@nod.at" <richard@nod.at>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Benliang Zhao (赵本亮)" <Benliang.Zhao@mediatek.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Bin Zhang (章斌)" <bin.zhang@mediatek.com>
Subject: Re: [PATCH v2 7/9] dt-bindings: spi: mtk-snfi: Add read latch latency property
Date: Tue, 6 Dec 2022 13:19:51 +0100	[thread overview]
Message-ID: <9992c9a5-059a-9396-32ce-7ed63cd12a96@collabora.com> (raw)
In-Reply-To: <a8f706b37f5decf91bfa9a9ac8cf04be4346dd85.camel@mediatek.com>

Il 06/12/22 10:04, Xiangsheng Hou (侯祥胜) ha scritto:
> Hi Angelo,
> 
> On Mon, 2022-12-05 at 15:21 +0100, AngeloGioacchino Del Regno wrote:
>> Il 05/12/22 07:57, Xiangsheng Hou ha scritto:
>>> Add mediatek,rx-latch-latency property which adjust read delay in
>>> the
>>> unit of clock cycle.
>>>
>>> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>>    .../devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml     | 7
>>> +++++++
>>>    1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-
>>> mtk-snfi.yaml
>>> index bab23f1b11fd..6e6ff8d73fcd 100644
>>> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-
>>> snfi.yaml
>>> @@ -45,6 +45,13 @@ properties:
>>>        description: device-tree node of the accompanying ECC engine.
>>>        $ref: /schemas/types.yaml#/definitions/phandle
>>>    
>>> +  mediatek,rx-latch-latency:
>>> +    description: Rx delay to sample data with this value, the
>>> value
>>> +                 unit is clock cycle.
>>
>> Can't we use nanoseconds or microseconds as a unit here, instead of
>> clock cycles?
> 
> The clock cycle will be various with MediaTek SPI NAND controller which
> clock frequency can support 26/52/68/81/104MHz...
> It`s may be easy to configure and understand with clock cycle in unit.
> 

Yes, but whatever clock frequency we use, the target is to always wait for
X nanoseconds, right?

Waiting for 5 clock cycles at 104MHz is obviously not the same as waiting
for the same 5 clock cycles at 26MHz: in that case, expressing the value
in nanoseconds or microseconds would make that independent from the
controller's clock frequency as the calculation from `time` to `cycles`
would be performed inside of the driver.

Regards,
Angelo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-06 12:20 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05  6:57 [PATCH v2 0/9] Add MediaTek MT7986 SPI NAND and ECC support Xiangsheng Hou
2022-12-05  6:57 ` Xiangsheng Hou
2022-12-05  6:57 ` Xiangsheng Hou
2022-12-05  6:57 ` [PATCH v2 1/9] spi: mtk-snfi: Add snfi support for MT7986 IC Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05 14:21   ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05  6:57 ` [PATCH v2 2/9] spi: mtk-snfi: Change default page format to setup default setting Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57 ` [PATCH v2 3/9] spi: mtk-snfi: Add optional nfi_hclk which needed for MT7986 Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05 14:21   ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-07  1:42     ` Xiangsheng Hou (侯祥胜)
2022-12-07  1:42       ` Xiangsheng Hou (侯祥胜)
2022-12-07  1:42       ` Xiangsheng Hou (侯祥胜)
2022-12-07 10:08       ` AngeloGioacchino Del Regno
2022-12-07 10:08         ` AngeloGioacchino Del Regno
2022-12-07 10:08         ` AngeloGioacchino Del Regno
2022-12-05  6:57 ` [PATCH v2 4/9] mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05 14:21   ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-06  9:04     ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:04       ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:04       ` Xiangsheng Hou (侯祥胜)
2022-12-06 12:22       ` AngeloGioacchino Del Regno
2022-12-06 12:22         ` AngeloGioacchino Del Regno
2022-12-06 12:22         ` AngeloGioacchino Del Regno
2022-12-07  2:01         ` Xiangsheng Hou (侯祥胜)
2022-12-07  2:01           ` Xiangsheng Hou (侯祥胜)
2022-12-07  2:01           ` Xiangsheng Hou (侯祥胜)
2022-12-05  6:57 ` [PATCH v2 5/9] dt-bindings: spi: mtk-snfi: Add compatible for MT7986 Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  9:05   ` Krzysztof Kozlowski
2022-12-05  9:05     ` Krzysztof Kozlowski
2022-12-05  9:05     ` Krzysztof Kozlowski
2022-12-05  6:57 ` [PATCH v2 6/9] spi: mtk-snfi: Add snfi sample delay and read latency adjustment Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05 14:21   ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05  6:57 ` [PATCH v2 7/9] dt-bindings: spi: mtk-snfi: Add read latch latency property Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  9:06   ` Krzysztof Kozlowski
2022-12-05  9:06     ` Krzysztof Kozlowski
2022-12-05  9:06     ` Krzysztof Kozlowski
2022-12-05 14:21   ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-05 14:21     ` AngeloGioacchino Del Regno
2022-12-06  9:04     ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:04       ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:04       ` Xiangsheng Hou (侯祥胜)
2022-12-06 12:19       ` AngeloGioacchino Del Regno [this message]
2022-12-06 12:19         ` AngeloGioacchino Del Regno
2022-12-06 12:19         ` AngeloGioacchino Del Regno
2022-12-07  2:00         ` Xiangsheng Hou (侯祥胜)
2022-12-07  2:00           ` Xiangsheng Hou (侯祥胜)
2022-12-07  2:00           ` Xiangsheng Hou (侯祥胜)
2022-12-07  9:48           ` AngeloGioacchino Del Regno
2022-12-07  9:48             ` AngeloGioacchino Del Regno
2022-12-07  9:48             ` AngeloGioacchino Del Regno
2022-12-08  1:15             ` Xiangsheng Hou (侯祥胜)
2022-12-08  1:15               ` Xiangsheng Hou (侯祥胜)
2022-12-08  1:15               ` Xiangsheng Hou (侯祥胜)
2022-12-08  8:46               ` Krzysztof Kozlowski
2022-12-08  8:46                 ` Krzysztof Kozlowski
2022-12-08  8:46                 ` Krzysztof Kozlowski
2022-12-05  6:57 ` [PATCH v2 8/9] dt-bindings: mtd: Split ECC engine with rawnand controller Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  9:21   ` Krzysztof Kozlowski
2022-12-05  9:21     ` Krzysztof Kozlowski
2022-12-05  9:21     ` Krzysztof Kozlowski
2022-12-06  9:05     ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:05       ` Xiangsheng Hou (侯祥胜)
2022-12-06  9:05       ` Xiangsheng Hou (侯祥胜)
2022-12-05  6:57 ` [PATCH v2 9/9] dt-bindings: mtd: ecc-mtk: Add compatible for MT7986 Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  6:57   ` Xiangsheng Hou
2022-12-05  9:22   ` Krzysztof Kozlowski
2022-12-05  9:22     ` Krzysztof Kozlowski
2022-12-05  9:22     ` Krzysztof Kozlowski
2022-12-06 16:04 ` (subset) [PATCH v2 0/9] Add MediaTek MT7986 SPI NAND and ECC support Mark Brown
2022-12-06 16:04   ` Mark Brown
2022-12-06 16:04   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9992c9a5-059a-9396-32ce-7ed63cd12a96@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Benliang.Zhao@mediatek.com \
    --cc=Xiangsheng.Hou@mediatek.com \
    --cc=bin.zhang@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gch981213@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.