Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1126636rdh; Fri, 27 Oct 2023 05:41:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHya0HPVdlU+2RT7b11BcP9/UnEmD335K9ghFp1ucGZbbCAPIpIemJXL+pvOwUd0kY8pA1p X-Received: by 2002:a81:7805:0:b0:5a7:b545:dcaa with SMTP id t5-20020a817805000000b005a7b545dcaamr4909536ywc.23.1698410507835; Fri, 27 Oct 2023 05:41:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698410507; cv=pass; d=google.com; s=arc-20160816; b=fLcALi9e3856PpHMVnE5adSANGJKtaS/ZdQu9nu8U37ua+sZhqoGzGLam9qWY3e/N8 eoUR6WbhhxxVaw/r+5ksg9r+ifBI5h/rc1G2raU9j/jYIaON9q5O7t5tnN8EbbGrmyaJ lREG03vVxMaljv0cQ2IjKGfzIjPQ0hrcVZTIhXlAO5Vvxkg3yL8FLrhEapqRqmuMt99Z dQuxu3FSqNUxFvvVPFtdask5CXP7Jq2PjYpTO2SR34R3O8D3UrJ2bkByEbyaXsgeQLNO Z4eGK8wDBC+o4fIeywTyI9d1NeDwpifGOunUCUtHr5iAkQJOzs6VFoDTOHXuGvD7JCWO 5fSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Zy1IyN1qGx1tnAs9vhsmG9RkW9Ek2LlyjeiYzEfkyQo=; fh=s5VIVYZe+IRijU3zdxj8BmnT5bmmHvv733E+AqbtsZs=; b=tx5h7KtvV+g/q8KEMcZZtg+IfLmrQbspluqwU4PG/zKz0qcNDYavEDh0LWHPOjb9Aa alSpB20FI8Kt0grk9L0FI8S6UhyxQ2JEuOAlsld3i1qr1yPnfpcf+qy3Q1thZFk7pQ8q 8Z5IN2YE82HRJQhLlp813W0/mRP8jpv6/V6n2pkON5b0nb7sfrZH9IX2jPGY+bjWcImP 1ZrplNX8jH/K3HWPvdRoKcm3xYdISfMqPO2MMMzf8d4rQoZI4U8XrHZjBAhuovJLSW3j vPpaGLkM79kQSW8Ir9DbDBQvnSYPi4mkS4E1LmHjQtZCr9aIzE42zeoCH1iVn6QADN5c xWRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mysnt.onmicrosoft.com header.s=selector2-mysnt-onmicrosoft-com header.b=GNCjyhEi; arc=pass (i=1 spf=pass spfdomain=kontron.de dkim=pass dkdomain=kontron.de dmarc=pass fromdomain=kontron.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t16-20020a81c250000000b005a7f2c46b5dsi2344286ywg.162.2023.10.27.05.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 05:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@mysnt.onmicrosoft.com header.s=selector2-mysnt-onmicrosoft-com header.b=GNCjyhEi; arc=pass (i=1 spf=pass spfdomain=kontron.de dkim=pass dkdomain=kontron.de dmarc=pass fromdomain=kontron.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C25A1807CF70; Fri, 27 Oct 2023 05:41:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345881AbjJ0Mlc (ORCPT + 99 others); Fri, 27 Oct 2023 08:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345880AbjJ0Mla (ORCPT ); Fri, 27 Oct 2023 08:41:30 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2111.outbound.protection.outlook.com [40.107.20.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 329B7DE; Fri, 27 Oct 2023 05:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bU+xA2977Vb6ferH0CkRzGqIs5ZppI1YJBVSUayMCcuVW3Nmt2SyJjtzGildSZCTPFbWhGNxVr4sTpY1a0mF+NkyG6Nv+NoyC6D7hepXoDFYHoinPYmGVeeF4nLXuni3hCB91bqaix0nAE2uZzVIC6EpR2UR8Xw00I8URBki4QWvQIofmFlo5uHFhpDhHEdcA5n6aAoAEpTzU7uUillzl/W1b6X3chEsMUWVKrqx5vI8EpX9rbxzMgxrH5FPfsYDLsVtbToa2Onio/5r2qrXLtk82W+eJGrDKN0ED9o2xJhh9kkt8BBhRDriCmMenT7NSZgc53TKT5PALgnII3CMxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zy1IyN1qGx1tnAs9vhsmG9RkW9Ek2LlyjeiYzEfkyQo=; b=LPIDY2iLla4uGCA+W59eQ3JC5xYLAr5niPsSJcGEpW48hkD2OgEqkGRkTNIcD2fHLpGontdGYNE+tuAs5EYXVInNijUsKepT4XE3VBQrmF7HYPG3W+S/dgFxXWFdep8rLLdtDvp8sHA8JcskiaGYBlz9osWrFVj5q9eBXJdXhOqRGstvDJKm4y18gXtZebeVJZkSZlTq/VwpO5IXkku5r947oJ6BYECdPjwe8P9qdYj/DrkeKVCTiOhg2FhkKHZC/p/nQf3VD4Z8WJQr/RoZsqxheeH8KgKhK9Z2jqZYFY4jorgEzWsq/DZ226zZ0Jlg1fworiYtWGsgZ2gtklCwGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kontron.de; dmarc=pass action=none header.from=kontron.de; dkim=pass header.d=kontron.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mysnt.onmicrosoft.com; s=selector2-mysnt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zy1IyN1qGx1tnAs9vhsmG9RkW9Ek2LlyjeiYzEfkyQo=; b=GNCjyhEir1paUV6WcASmPa/sgoaLQ/tQ3EyLhtz6V5HV0yA/NLx9+gNJuSyD+JwpLOLwKMrW7xH7dWGS9VUhMDpAzEJuFglVP8ghlLWJa8qmMueBMv/HkSJ6WVEr28M/dKd6pPMj5j/n2OjBQeitaS6mHBJMzIgSHcTWuXdr99E= Received: from DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:4c9::10) by DB9PR10MB5690.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:30e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.22; Fri, 27 Oct 2023 12:41:23 +0000 Received: from DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM ([fe80::b9ed:5aac:1984:3013]) by DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM ([fe80::b9ed:5aac:1984:3013%2]) with mapi id 15.20.6907.025; Fri, 27 Oct 2023 12:41:23 +0000 From: "Stoll, Eberhard" To: Andy Shevchenko CC: Miquel Raynal , Eberhard Stoll , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , Mark Brown , "Schrempf, Frieder" , Amit Kumar Mahapatra , Christophe JAILLET , Geert Uytterhoeven , Krishna Yarlagadda , =?iso-8859-1?Q?Leonard_G=F6hrs?= , Yang Yingliang Subject: AW: AW: [PATCH 1/4] spi: Add parameter for clock to rx delay Thread-Topic: AW: [PATCH 1/4] spi: Add parameter for clock to rx delay Thread-Index: AQHaCCByhlFLq4Q3qUiFonGDuLJz8bBcrx+AgACFHbCAAFIEAIAAAyig Date: Fri, 27 Oct 2023 12:41:23 +0000 Message-ID: References: <20231026152316.2729575-1-estl@gmx.net> <20231026152316.2729575-2-estl@gmx.net> <20231027005643.4b95f17e@xps-13> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kontron.de; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9PR10MB8246:EE_|DB9PR10MB5690:EE_ x-ms-office365-filtering-correlation-id: c0044cc0-d289-4167-4e62-08dbd6ea074e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BRiZCAZxfk9hR5hKbdlDFHdQSF9C4XC1JWBL5iB0afV7tUxtaQ37FcwDjE6lJzJFofeqsnMRhpx+tXbS0liARFb5nUaEkeqsDTDFi4Khe8vJNI1sUb63FTCGpB90r9UPc4VdCVc1q1Wjt+I3GevSaBfMDkPQ8AT2tcT3VOllPkqj9uRz66/m/Giu1YAqqNUmhmu8w+lBWxq1EXBqz/UEJdci/AMPaOnJEz3yCS9060MGJW9JAQ8IKO/cKS3Q8uP/hEBSkSvfIInGd2nB9qDjsmtXvmPttSaocx7Wg0yNYqKubBI6lSPlnhA1qO7gpWuTfRGAKLJ2xj5Pr/ngh6Pocfy/WZL5ZG+1B/MUeYu1fxynUdd3Bbiwj8x1XuiZcKvNHCdaPvKhunMkqwvMsXBFO9BqetwM4glgMxj09E28LCwbQBGU3N9SEnN/pbheSQa/XccjpZfBWrRK1dSujweXGZO6Nc/tx8LE55FLVWCiGMkvHSH28b9EpUQZ8SPX6qQxWjDq9sMmhaaf7UPCUEzdc2x7+qbe1wJp05a7tc0siFmK8bHwnUA6ok/7XNBxBo/U1mMSzZkHYn/htjZi3xDLdu05arOTOsMVmjiyBCsMGw57KPyzeNb9d/3W3HbJpOzF x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(346002)(136003)(39860400002)(396003)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(41300700001)(9686003)(122000001)(55016003)(5660300002)(38070700009)(8676002)(8936002)(4326008)(6506007)(66556008)(66946007)(66476007)(76116006)(54906003)(64756008)(66446008)(6916009)(316002)(478600001)(7696005)(71200400001)(52536014)(86362001)(38100700002)(33656002)(2906002)(83380400001)(7416002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?/EL1TkmJzP35g4sFBRzrQCfZJ97uF+phvxDK+rIIVkXCKubhNUmOxlyjBW?= =?iso-8859-1?Q?jUAaceYenG6xwo39sH8rOzNKHrxBvCDcVMc+JCJRfyfFfg8TN1GB8CtiOp?= =?iso-8859-1?Q?pFqnOS9OyXzy8/CDbaEHDvg9isYA1Op1fFRxEwl1pzDaffXmgr8xmP3sKz?= =?iso-8859-1?Q?ZjORC/P2lclvMV95cs/sJnQ8n9ycHxZBiH+NHHEGyBkYnAhWHpTkHh4lX3?= =?iso-8859-1?Q?QFfh7qalpuAFrZN5vuB8fEZfLQaFPDvsUaUNGizmHxF2y8Rk4hzVRSMQoo?= =?iso-8859-1?Q?GSXu8ssyndPF0dj6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?iso-8859-1?Q?crgIfXJarHHcje6mU/CkC389NZHHwjRp6C6s25lP0ilFKfxtLU6bDYoug8?= =?iso-8859-1?Q?GC+pTPLxHKfCv4QGOum4tz+t2GpACAV0AzHvJIGZVEtitz3tGzwnIIDUCF?= =?iso-8859-1?Q?/G9Yco6ISVNa/UQrae4+tOOk0EMEYzM0FYiED6i8Orrn7HeeOPSb1WaUd/?= =?iso-8859-1?Q?UHZrmq9ru9jt/LojbCC0esb7nLawUYep7ciBxdcJ4YSgWh7V6j4eVmILfs?= =?iso-8859-1?Q?05EX0XT3uc2VVYmUWGrSN3N3v3pISBtQKUhxTIvHZM981kuSW4WatndHB/?= =?iso-8859-1?Q?AfvbFvS21MFWA6NNIMOyjfQ+TfDOMIAwAnne/IrdzrdSJkdhA+830yazHq?= =?iso-8859-1?Q?yfbdLSrYbdu209dlBEkh8sFNes2D0uaQS40likFmrdfEqn4+7m0jOWA1Qn?= =?iso-8859-1?Q?sMPWziX3mZuBULcO7uCHoKnxM3eujDy9R1YkOfNq2VxbaTn880E1pGwJI/?= =?iso-8859-1?Q?zLjbBnmBXojyIjihsJq+cH5vaTHggC1Fp2tM6Q3hfk96e8Y2z4yZ2/PHj/?= =?iso-8859-1?Q?9QVg=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: kontron.de X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: c0044cc0-d289-4167-4e62-08dbd6ea074e X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2023 12:41:23.6163 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8c9d3c97-3fd9-41c8-a2b1-646f3942daf1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GtZiI4cIVTSiD5m9D3Ibhbq+l44rNNe4mNocBXdWUQ93lXBYrv3oeixHLX/0j0Q4r6T3WOeiuVswOueDNHN14PU19RZqwjXccQgzSDUrd1A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB5690 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 27 Oct 2023 05:41:45 -0700 (PDT) Hello, > > > Can you be more specific? I am wondering how big the need is. > > > > In our case it's a QSPI NAND chip (Winbond W25N02KV). This device > > can operate at 104MHz SPI clock. But it also has a tCLQV value of 7ns. > > The tCLQV value limits the SPI clock speed for this device to 2x7ns > > (if it is not adjustable in the SPI controller) which is approximately > > 70MHz. > > > > Without the ability to set the tCLQV value, the SPI clock has to be > > limited to 70MHz in device tree for this bus. > > > > In our case the Winbond W25N02KV chip is a replacement of an > > older chip. The older chip can operate at 104MHz and does not > > have the tCLQV restrictions as this new one. > > The new chip is mostly is better than the data sheet and meet the > > timing requirements for 104MHz. But on higher temperatures > > devices fail. > > > > In device tree QSPI NAND chips are configured by a compatible > > property of 'spi-nand'. The mtd layer detects the real device > > and fetches the properties of this device from the appropriate > > driver. > > > > So for our case (boards containing the old and new chip) we well > > have to reduce the SPI clock for the entire QSPI bus to 70MHz, even > > for the elder chips which can operate well also with 104MHz. >=20 > So, to me sounds like device tree source issue. I.e. you need to provide > different DT(b)s depending on the platform (and how it should be). > The cleanest solution (as I see not the first time people I trying quirks= like > this to be part of the subsystems / drivers) is to make DT core (OF) to h= ave > conditionals or boot-time modifications allowed. We don't talk about device tree modifications on boot time! Currently the SPI NAND chips are not fully configured in the device tree data. Today a QSPI NAND is represented by an abstract 'compatible' ent= ry of 'spi-nand' in device tree. Which can be seen as something like a 'spi-na= nd' bus with autodetection of the connected chips. Therefore there is no way to reference a QSPI NAND chip directly, it's auto-detected by the framework. There is also currently no possibility to set the tCLQV parameter for a single SPI CS line. Some parameters for the SPI NAND chips are already provided only by the fitting chip driver (e.g. flash layout, banks, variants of the command set of the device, ...). With this patchset it's now possible to provide al= so the tCLQV data for this chip. IMHO a autodetect system does not make much sense if you have to provide parts of the chip configuration also in device tree. The framework should detect the chip and fetch the operation parameters either from the chip itself or from a chip driver which provides the required configuration sett= ings. Best Regards, Eberhard