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 1C149CF9C6F for ; Mon, 23 Sep 2024 15:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=TXUE/W5L7B+Ps22uDsVkw2spI0BAGqtaSjKn0YNIuGc=; b=QEiEhYM3WCFslw 1YgSLOevbvEDAGKXfJsTwiAPr0PSSMSoSrFTZSFFFpfNfoehYgHqTrtA2rkZ97amWAEZZeCV9Wyye JYchlpmUnWZD6uPQEwFy7lebs+JbVVsxnwaQEnsur1MohdSd0ROr9N6Cvw/Rk1DU0RXlJpgMNZLoH o1BeGXCTJBBUCracNsOrFoazSZc5aVbaS5QORbuhGx+X7BpoSJ59iGBCI8LATUhS10luVknnqxoSR q/omtXnM78sZoSFr0M/YvKub7CpOJygZcmLFGfPrsqBa9j/TsPHvCZq3eBPVcd4Z4X9UIIH540lbN HDMvgenbhEIt5HEpPdCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sslD7-0000000HX72-10S8; Mon, 23 Sep 2024 15:42:49 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sslD4-0000000HX5E-1B7B for linux-mtd@lists.infradead.org; Mon, 23 Sep 2024 15:42:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 2C0B8A42169; Mon, 23 Sep 2024 15:42:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BDC1C4CECD; Mon, 23 Sep 2024 15:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727106164; bh=t+7IuhRWDk00ypz8u+yjo2secAHWniKaBdDHZARt9tA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WHJ5hmH94HVxC4aUwyQRiop8ww28DHccAf38Cq1/iEbz1FzJ0JHWLaswf2xZq4zLW T8UiG+jzhMWRYZO49iFmGMLQ8Fe2xUQ/Nm4baHZVGPMWjGohXeAHUoZGyFGaowOrNp NIAvNt1tO5ymeQpYXTNTYCFY42ug8K01VeUiQRE8u/JdAVc/gl9zVCpIIxbiN/Q/gm zmnZaCNa+xePHji2SnH5uzkW3ytBjdtqARK+Jt0xNEn6TqqDiWWscp2fxNd7qnjdpX Bppft+ebCc+/qDyEjPOvzEfdIuuMG5EQfUsapb+rgojUV0n9KNk260IPtCBp55WN3y R93LWm+1CnZJg== Message-ID: Date: Mon, 23 Sep 2024 17:42:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/5] dt-bindings: mtd: spi-nor: add OTP parameters To: Erez Cc: Erez Geva , linux-mtd@lists.infradead.org, Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Esben Haabendal References: <20240920181231.20542-1-erezgeva@nwtime.org> <20240920181231.20542-4-erezgeva@nwtime.org> <2fo7pndjqieq6lfydmq2pnwb374oqoqnrcsezycgougmr7mtl5@2wm6fe3inf5u> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl7pDsAKR1InemMAmuykCHl+XgC0LDqrsWhAH5TYeTVXGSyDsuZjHvj+FRP+ gZaEIYSw2Yf0e91U9HXo3RY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M114-CacheID: sfid-20240923_084246_482519_268E7021 X-CRM114-Status: GOOD ( 26.10 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On 23/09/2024 11:21, Erez wrote: > On Sun, 22 Sept 2024 at 22:40, Krzysztof Kozlowski wrote: >> >> On Fri, Sep 20, 2024 at 08:12:29PM +0200, Erez Geva wrote: >>> From: Erez Geva >>> >>> Some flash devices need OTP parameters in device tree. >>> As we can not deduce the parameters based on JEDEC ID or SFDP. >>> >>> Signed-off-by: Erez Geva >>> --- >>> .../bindings/mtd/jedec,spi-nor.yaml | 39 +++++++++++++++++++ >>> 1 file changed, 39 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml >>> index 6e3afb42926e..4f7bb3f41cb1 100644 >>> --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml >>> +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml >>> @@ -90,6 +90,43 @@ properties: >>> the SRWD bit while writing the status register. WP# signal hard strapped to GND >>> can be a valid use case. >>> >>> + otp-n-regions: >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + description: >>> + Some flash devices need OTP parameters in the device tree. >>> + As we can not deduce the parameters based on JEDEC ID or SFDP. >>> + This parameter indicates the number of OTP regions. >> >> OTP regions where? In DTS? On flash itself? > > Where can OTP regions be? > Can you please be serious? > If you have any suggestions, I am happy to hear. > I did ask before. Yes, I am serious, imagine that we do not know what you wanted to say. At first this just sounded like you mix nvmem-cells here. Out of blue this binding starts mentioning OTP and you add bunch of generic properties not really matching anything so far. Instead of being sarcastic about reviewers confusion, rather improve your description. Otherwise, good luck. > >> >>> + The value must be larger or equal to 1 and mandatory for OTP. >> >> Don't repeat constraints in free form text. Add proper minimum and > > Sure, I will add a minimum. > >> default, although it is confusing - property is not required but it is >> mandatory for OTP? > > You are welcome to suggest a better rephrase. > Using OTP settings is optional. > If you set OTP then the number of regions and region length are mandatory. > While offset and base are optional for OTP settings. So properties should be required? > > >> >> >> >>> + >>> + otp-len: >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + description: >>> + Some flash devices need OTP parameters in the device tree. >>> + As we can not deduce the parameters based on JEDEC ID or SFDP. >> >> Don't repeat the same. > > Is there a grouping description? > >> >>> + This parameter indicates the size (length) in bytes of an OTP region. >> >> What if each region has different length? Is it possible? > > Yes, there are. Old Mactronix have chips with the first region bigger > than the second region. > As these are old chips, we may skip the support of them. Other devices can come later re-introducing this approach. Best regards, Krzysztof ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/