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 F0DF0C4708E for ; Tue, 6 Dec 2022 12:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=CMme1AvazOP/i2nnbk3Uh+9ByR3nyfXtTblTJYljqTk=; b=nRHkyTH+AeZ5ue7yAbHD5Yg8oL cUYS+UtfmU+bxsff9cOsp7WHKQzb5ylM8laqmk7lZOKQ7Gac7OHH7zX2+fZgHPiSvFSOmFaYFWT+A 3DDhB98kI9uC7J36J7ksG5sLWHd5pQobBYJKTpmwj+YYHM5OXHJjzPTSynGYTIxDmgc35E1lC3D9S hLbgEPN24FUnrR6UR5PQbctTBDIqr8iPEvTVo24VGGmpKjJ+jbgldtUoqtHe1EaLVbdtyqjJ3wG8l 8b10Z6L+DCr9XkYWiLTQACNx7c5CdT5CAWp+8zdEecA1C5/HdYtyz1dUOygrXVucFivWZXgiRHPqt zWJPAvXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2Wvg-0091vf-O9; Tue, 06 Dec 2022 12:20:08 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2WvU-0091px-FX; Tue, 06 Dec 2022 12:19:58 +0000 Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 91C4A660035D; Tue, 6 Dec 2022 12:19:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1670329194; bh=l310F9lHcGhGvP4PuGtAy05tWbjB4PQoJ3xaWw36ABM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gttCpPDYm0hfTw/9o5b8PCwS0lR+0JzCaoDBMHOUWsCpuY1DQIz6ReUTPcpHKJnCk Etv1bSL67CKIoWAbqV8tdl520zDnCNEHZ5MfLI7LPHa2T0TQaVYH3Il3UmKg6PU1Yt +SZh2bw1HX+hvWvGjZ8zK6yi1EdGtpYBQI7WTZKzIzh1Q7TrvtZhxBwEFGZbijunJW JEfWxF7VXO1BOocXgHM8IjdVpHOdlfy0VdG6s4JcvVwDHs8AmCL2RENS3siV937e8f I8xkIxGm/+gcRYMox0bVcOz0FFD02COEr2s6tjgk9HidF8K2iH31MbnisDs5eLVohj Mc97lj4nNI3UA== Message-ID: <9992c9a5-059a-9396-32ce-7ed63cd12a96@collabora.com> Date: Tue, 6 Dec 2022 13:19:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 7/9] dt-bindings: spi: mtk-snfi: Add read latch latency property Content-Language: en-US To: =?UTF-8?B?WGlhbmdzaGVuZyBIb3UgKOS+r+elpeiDnCk=?= , "miquel.raynal@bootlin.com" , "robh+dt@kernel.org" , "broonie@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "matthias.bgg@gmail.com" , "gch981213@gmail.com" , "vigneshr@ti.com" , "richard@nod.at" Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "linux-mtd@lists.infradead.org" , "devicetree@vger.kernel.org" , =?UTF-8?B?QmVubGlhbmcgWmhhbyAo6LW15pys5LquKQ==?= , "linux-spi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , =?UTF-8?B?QmluIFpoYW5nICjnq6Dmlowp?= References: <20221205065756.26875-1-xiangsheng.hou@mediatek.com> <20221205065756.26875-8-xiangsheng.hou@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221206_041956_673500_0A29F970 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 >>> Acked-by: Krzysztof Kozlowski >>> --- >>> .../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