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 CC2E0C32793 for ; Wed, 18 Jan 2023 15:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbjARPCd (ORCPT ); Wed, 18 Jan 2023 10:02:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231431AbjARPCR (ORCPT ); Wed, 18 Jan 2023 10:02:17 -0500 Received: from mail.zeus06.de (www.zeus06.de [194.117.254.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851D3367C9 for ; Wed, 18 Jan 2023 06:58:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=kicherer.org; h= mime-version:date:from:to:cc:subject:in-reply-to:references :message-id:content-type:content-transfer-encoding; s=k1; bh=14O ufMgjG2qC3itc1uMB8npDZTfnLmoIqjxKEWNG2xY=; b=E25ZUgiQVWQG1Btjpru gDFtuhJBblIDCJUhH832gGE6yPOUmz0OPJkIGqmsKIDEt3CZINKEXp4CrrTOSgQq UV81QyaAG2TrkMI0fbr9RdtlCUME0H8Dr2fwsrvyvn5AXOmypkeADLCK9l5v8Bk7 CqCADsXG4fydQHRyfumE0ovo= Received: (qmail 1552619 invoked from network); 18 Jan 2023 15:58:48 +0100 Received: by mail.zeus06.de with ESMTPA; 18 Jan 2023 15:58:48 +0100 X-UD-Smtp-Session: l3s6476p2@DK+5DYvyCKTCdf4e MIME-Version: 1.0 Date: Wed, 18 Jan 2023 15:58:48 +0100 From: Mario Kicherer To: "han.xu" Cc: Krzysztof Kozlowski , Rob Herring , linux-spi@vger.kernel.org, broonie@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/2] spi: dt-bindings: spi-fsl-qspi: add optional sampling-delay In-Reply-To: <20230117210500.oimf4yjkkqh3o4hi@umbrella> References: <20230116115050.2983406-1-dev@kicherer.org> <20230116115050.2983406-2-dev@kicherer.org> <20230117141057.GA2991740-robh@kernel.org> <85967a3fbce7051449f8d2b29ce5a47c@kicherer.org> <78fcf85f-b56b-79d1-f2fe-c038f424c72d@linaro.org> <20230117210500.oimf4yjkkqh3o4hi@umbrella> Message-ID: X-Sender: dev@kicherer.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hello Han, on my SoC (LS1021a), the QSPI clock is derived from the CPU clock (cluster1) and neither is controlled by the Linux kernel (afair) but by the RCW (or U-Boot). I could create a function to read the corresponding registers but I do not know where I should place this function and how I should call this function in a portable way in the QSPI module to convert the nanoseconds into delay cycles. I thought this would be a small and simple patch but I guess these changes will require quite some time with my knowledge level that I do not have right now. Thank you all for the review! Best regards, Mario On 2023-01-17 22:05, han.xu wrote: > On 23/01/17 06:10PM, Krzysztof Kozlowski wrote: >> On 17/01/2023 17:33, Mario Kicherer wrote: >> > Hello, >> > >> > unfortunately, the rx-sample-delay-ns property does not fit here, as we >> > can only delay >> > the sampling point between zero and three "half cycles" (or edges), not >> > by an arbitrary >> > number of nanoseconds. >> >> Why this is a problem for FSL but not for other platforms having >> exactly >> the same constraints/property? > > Hi Mario, > > Please use the common delay in DT and calculate to half cycle in > driver, we have > the similar discussion before for fspi controller delay settings. > >> >> Best regards, >> Krzysztof >>