Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2813181imm; Mon, 24 Sep 2018 10:18:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda0uhQGLavJzEkOqxa2mHDNiOV43viD8CuLSprkYy+sy9AtdgrT8UfNTDxwQRML1DJ/CLty X-Received: by 2002:a63:904a:: with SMTP id a71-v6mr7560328pge.264.1537809529938; Mon, 24 Sep 2018 10:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537809529; cv=none; d=google.com; s=arc-20160816; b=AS6p+bgt/wr/qo5B5PoFwD4pxO1byfPaRHmZ1+uuTuudSWn8AaZR94odvpCXMhFvaL vKw4Mi7JqC/Q2aFteMHiuwSWD9TcKmyb1qQLB8cT4NOl/BT6s6t81WXyCzWgg4QzRUWP EVElYIJ7I/+7qL8TLxTWT1F1chN1RL7ePHlQSnZij42Nl1tJF1HD1CtxOBwCviMRRm4Z 0EI1bhEIdUIyh/p/8mbLQYCF/UDd9w5e7vs52JWDk8Pd1O83zL0tQmopvkMOLJ33x5LA hdc0LiapPkEJYCKw2UNmw0JN0TNqVYD8XTh5c9RAf7A1HmsYqhXLDhg2TY87Gv52G78Y /oDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=mlVce4LjJ45YnRNna9iN/SbALBxW5uM8V1+X+JdNAZA=; b=c8Fwjx7QL3PWhVgOQJyAPRMuOkunRg+p2T+/bjAXGmySyHm5e8IYhzqoN6nQcj5Chx z6y00dp4FVM1w5sO8YV+bkBV7qdZcqP9CT6M3d3LSi3GqtiuEwZdZFEK5VHs+ltL29TX LidwHjeUWrXaYuZ5IKcpk8skv1xrOhXPiX9ihjpDq+puUFCCwtXQIxcmDgzSDoo/tNhH pKm8DAyI8/Goam+B+00zJr/TZyM1A+O/td+OhHnBi7EYUihjpxXQDMqc/wxQeDf/DgkM DkhE8TJBKMmfUKt0hwNn0bxplF2uWSEmciwUxXbhZ64qKOLuBnikNxgyAKUOA2Djtpfs L7LA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si35828739plc.170.2018.09.24.10.18.33; Mon, 24 Sep 2018 10:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733050AbeIXXUs (ORCPT + 99 others); Mon, 24 Sep 2018 19:20:48 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46591 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbeIXXUs (ORCPT ); Mon, 24 Sep 2018 19:20:48 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 2C9E320725; Mon, 24 Sep 2018 19:17:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id D92B820379; Mon, 24 Sep 2018 19:17:25 +0200 (CEST) Date: Mon, 24 Sep 2018 19:17:25 +0200 From: Boris Brezillon To: Christophe Kerello Cc: Miquel Raynal , , , , , , , , , , Subject: Re: [PATCH 1/3] dt-bindings: mtd: stm32_fmc2: add STM32 FMC2 NAND controller documentation Message-ID: <20180924191725.2439fd10@bbrezillon> In-Reply-To: References: <1537199260-7280-1-git-send-email-christophe.kerello@st.com> <1537199260-7280-2-git-send-email-christophe.kerello@st.com> <20180922103440.12575714@xps13> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, On Mon, 24 Sep 2018 18:36:27 +0200 Christophe Kerello wrote: > >> +- st,fmc2_timings: array of 8 bytes for NAND timings. The meanings of > >> + these bytes are: > >> + byte 0 TCLR : CLE to RE delay in number of AHB clock cycles, only 4 bits > >> + are valid. Zero means one clock cycle, 15 means 16 clock > >> + cycles. > >> + byte 1 TAR : ALE to RE delay, 4 bits are valid. Same format as TCLR. > >> + byte 2 THIZ : number of HCLK clock cycles during which the data bus is > >> + kept in Hi-Z (tristate) after the start of a write access. > >> + Only valid for write transactions. Zero means 1 cycle, > >> + 255 means 256 cycles. > >> + byte 3 TWAIT : number of HCLK clock cycles to assert the command to the > >> + NAND flash in response to SMWAITn. Zero means 1 cycle, > >> + 255 means 256 cycles. > >> + byte 4 THOLD_MEM : common memory space timing > >> + number of HCLK clock cycles to hold the address (and data > >> + when writing) after the command deassertion. Zero means > >> + 1 cycle, 255 means 256 cycles. > >> + byte 5 TSET_MEM : common memory space timing > >> + number of HCLK clock cycles to assert the address before > >> + the command is asserted. Zero means 1 cycle, 255 means 256 > >> + cycles. > >> + byte 6 THOLD_ATT : attribute memory space timing > >> + number of HCLK clock cycles to hold the address (and data > >> + when writing) after the command deassertion. Zero means > >> + 1 cycle, 255 means 256 cycles. > >> + byte 7 TSET_ATT : attribute memory space timing > >> + number of HCLK clock cycles to assert the address before > >> + the command is asserted. Zero means 1 cycle, 255 means 256 > >> + cycles. > > > > Let me review the driver but this array of timings is really > > suspicious. I am pretty sure you don't need it in the DT. > > "st,fmc2-timings" is an optional property that allow the end user to > overwrite the timings calculated by setup_data_interface callback. By > setting this property in the NAND flash memory device tree node, the end > user could have a better throughput. For NON ONFI SLC NAND, timing mode > 0 is often used. Exactly the kind of tweaking I'd like to avoid. If the NAND is not ONFI, the vendor driver (nand_.c) can overwrite chip->default_onfi_timing_mode, and if the ONFI timings modes are not exactly matching the NAND spec and you need the exact timings, then we should consider adding a manufacturer hook to let the manufacturer driver tweak the timings. In any case, I'm not willing to accept timings description in the DT. Regards, Boris