devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Erez <erezgeva2@gmail.com>
Cc: Erez Geva <erezgeva@nwtime.org>,
	linux-mtd@lists.infradead.org,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <mwalle@kernel.org>,
	linux-kernel@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	devicetree@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Esben Haabendal <esben@geanix.com>
Subject: Re: [PATCH v5 3/5] dt-bindings: mtd: spi-nor: add OTP parameters
Date: Mon, 23 Sep 2024 17:42:36 +0200	[thread overview]
Message-ID: <bcb4fcf5-b49b-4e1c-a5c4-e417d04097f0@kernel.org> (raw)
In-Reply-To: <CANeKEMPjLYbBi0AXkEdNum=kqtVe_mfTcVf4zUvJsszVhnh+pw@mail.gmail.com>

On 23/09/2024 11:21, Erez wrote:
> On Sun, 22 Sept 2024 at 22:40, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Fri, Sep 20, 2024 at 08:12:29PM +0200, Erez Geva wrote:
>>> From: Erez Geva <ErezGeva2@gmail.com>
>>>
>>> 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 <ErezGeva2@gmail.com>
>>> ---
>>>  .../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


  reply	other threads:[~2024-09-23 15:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 18:12 [PATCH v5 0/5] Add support for SPI-NOR Macronix OTP Erez Geva
2024-09-20 18:12 ` [PATCH v5 1/5] mtd: spi-nor: core: add manufacturer flags Erez Geva
2024-09-23  6:04   ` Tudor Ambarus
2024-09-23 10:31     ` Erez
2024-09-23 10:46       ` Michael Walle
2024-09-23 13:25         ` Erez
2024-09-23 16:19           ` Michael Walle
2024-09-23 16:31             ` Erez
2024-09-23 18:04               ` Tudor Ambarus
2024-09-23 18:21                 ` Tudor Ambarus
2024-09-26  7:46               ` Esben Haabendal
2024-09-26 11:08                 ` Erez
2024-09-26 11:37                   ` Esben Haabendal
2024-09-26 13:16                     ` Erez
2024-09-23 12:07       ` Tudor Ambarus
2024-09-23 13:01         ` Erez
2024-09-23 14:18           ` Tudor Ambarus
2024-09-23 14:51             ` Erez
2024-09-23 17:52               ` Tudor Ambarus
2024-09-23 19:30                 ` Erez
2024-09-23 21:41                   ` Erez
2024-09-24  6:04                     ` Tudor Ambarus
2024-09-24  6:01                   ` Tudor Ambarus
2024-09-20 18:12 ` [PATCH v5 2/5] mtd: spi-nor: core: add generic functions Erez Geva
2024-09-20 18:12 ` [PATCH v5 3/5] dt-bindings: mtd: spi-nor: add OTP parameters Erez Geva
2024-09-22 20:40   ` Krzysztof Kozlowski
2024-09-23  9:21     ` Erez
2024-09-23 15:42       ` Krzysztof Kozlowski [this message]
2024-09-23 15:49         ` Erez
2024-09-20 18:12 ` [PATCH v5 4/5] mtd: spi-nor: macronix: add support for OTP Erez Geva
2024-09-20 18:12 ` [PATCH v5 5/5] mtd: spi-nor: macronix: add manufacturer flags Erez Geva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcb4fcf5-b49b-4e1c-a5c4-e417d04097f0@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=erezgeva2@gmail.com \
    --cc=erezgeva@nwtime.org \
    --cc=esben@geanix.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).