Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7372735rwb; Tue, 6 Dec 2022 05:05:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf5cBVOv68yVmAwCBlB+JUqw/NjgjnoY3qVGc6aH7j2jcDfr8T6QEr1+MHJaCS04gPiDU0H8 X-Received: by 2002:a17:90a:5295:b0:219:a43b:1006 with SMTP id w21-20020a17090a529500b00219a43b1006mr17004553pjh.195.1670331937115; Tue, 06 Dec 2022 05:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670331937; cv=none; d=google.com; s=arc-20160816; b=HjW5i7ygh0cQBbyWp6f8hj1N7Ip+VJJWzYvB23alEo97izTVztDv4FMB3oTg/kMa4j sNYR7lJLoiL7gIxhX0zIvJdoyqfLzMW5ESCdcqemebvTwLKxztBteM7Te7hImgDedC+h +g86Nmi90Ik1mwyr9T9hBbbca0rnGnOZ3WhygAG35qlNKUp9Ib62wQUVU4/Mj/2Ar9Wp lMSj/UL5wfIHBL8BYkaxcbGM0A7Y0hMg9HtpzqK83x6CooD+ZyTq/13i40tBqTFFl/Qx j2kPhOiUADMzkDwctak9vzPNSHUWRg+wNEYvYZyoUk9OaObGMNd57yP/1Jn67a2esxGL om3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CMme1AvazOP/i2nnbk3Uh+9ByR3nyfXtTblTJYljqTk=; b=nqeZI/Ls7ay1Um85TiZAgjUnmkDtzvN/pHi68bdzD2PctvKTeiWPG4oshE31j9j45N +RDHatFqqw/8P8c10wyeu+WaUAbXmxnWi3hlojQNCOP38LVk7RAW3s2KMlspJIFIoyEt iM218nwyuM4ooJzAqpVLwj2wj6Xga82r7/zgEk9oVI+qLN/SuSG6GwysiJjLR+la7s/n /X4NzOwLuudjROnfwxv0QOw+FwFT2JtTWeD3Cl/6Bp9DHgV7uAQ6atKqY6JcSeubBpPG m7Sh5venQ/TQNFpo2pZ4TkQUsd/1SF9O97gxnJ8BvwZ7dCS3qupjpzBD2BTXIexbL0nN LciA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gttCpPDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a63e855000000b00476ca041d89si10446885pgk.790.2022.12.06.05.05.21; Tue, 06 Dec 2022 05:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gttCpPDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234091AbiLFMUE (ORCPT + 79 others); Tue, 6 Dec 2022 07:20:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234153AbiLFMT6 (ORCPT ); Tue, 6 Dec 2022 07:19:58 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 458E728E27; Tue, 6 Dec 2022 04:19:56 -0800 (PST) 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-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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