From nobody Fri Nov 29 18:44:21 2024 Received: from chessie.everett.org (chessie.fmt1.pfcs.com [66.220.13.234]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F382415F41B; Tue, 17 Sep 2024 09:50:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.220.13.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726566649; cv=none; b=Q0w6Tk0Xa3qZVdu6tcodmNWa+NCsqS6eKKiY+0US12c4n6s/z+aELQWrWwsTzUbQ1Ul1TUqsWySdRcOBucjo1PPMYBedynphuT6Txgu3tLso0zPBeZyUAvPkvgXjWcFxcQOMmzR4igsKNVYBQGBDT0BlxrC1ux3vqtqK5inHbLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726566649; c=relaxed/simple; bh=guGl3BlrqNv+pV6KuIUaBuZzzAE6v1eurl18wx/Xh4E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j76pN80+TwfNRvWoK7GpsIgR1wtwVF08h7hXZhv/bRoqq033Z3OHdhHBGk6gpSwKb5biF3aiTWRgEk2WBUou6fiPUv2SLBcZnkVBpnyFRRJWt63rU0/P1rmeREYPVxdxc+vBkJkpHhPdFX9DtidQaxDGkLGEmpVNjeOYyKgRvtw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nwtime.org; spf=pass smtp.mailfrom=nwtime.org; arc=none smtp.client-ip=66.220.13.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nwtime.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nwtime.org Received: from localhost.localdomain (unknown [31.16.248.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by chessie.everett.org (Postfix) with ESMTPSA id 4X7H8Z2M2lzMR5s; Tue, 17 Sep 2024 09:50:38 +0000 (UTC) From: Erez Geva To: linux-mtd@lists.infradead.org, Tudor Ambarus , Pratyush Yadav , Michael Walle Cc: linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Esben Haabendal , Erez Geva Subject: [PATCH v4 3/5] dt-bindings: mtd: spi-nor: add OTP parameters Date: Tue, 17 Sep 2024 11:49:54 +0200 Message-Id: <20240917094956.437078-4-erezgeva@nwtime.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240917094956.437078-1-erezgeva@nwtime.org> References: <20240917094956.437078-1-erezgeva@nwtime.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Doc= umentation/devicetree/bindings/mtd/jedec,spi-nor.yaml index 6e3afb42926e..d502b7fab2ce 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 stra= pped to GND can be a valid use case. =20 + opt_n_regions: + type: u32 + 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. + The value must be larger than 1 and mandatory for OTP. + + otp_len: + type: u32 + 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 size (length) in bytes of an OTP region. + Currently the driver supports symmetric OTP, + which means all regions must use the same size. + The value must be positive and mandatory for OTP. + + otp_offset: + type: u32 + 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 offset in bytes of + an OTP region relative to its previous. + User can omit it if the offset equals the length. + Or in case we have a single OTP region. + + otp_base: + type: u32 + 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 base in bytes of the first OTP region. + User can omit it if the base is zero. + I.e. the address of the first OTP region starts from 0. + reset-gpios: description: A GPIO line connected to the RESET (active low) signal of the device. --=20 2.39.5