Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1400517lqh; Mon, 6 May 2024 06:49:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUM6Y+FydBxtPTf9suNgOe2KqkjhWCfbcyytld5k/2OcXgNcwVwCuLO5ZlTe7l1kSBQOOF33uUIK4FXSuSOM+C14KWNKz9Ygb3eVgijJg== X-Google-Smtp-Source: AGHT+IFVdNhEMWZdp25fEtOtN8gkWrabF6PFfzZ/tzZHozgiUx0mybb8dlElCQjGIMDNO1gFDeV6 X-Received: by 2002:a17:907:20e2:b0:a59:9c58:763a with SMTP id rh2-20020a17090720e200b00a599c58763amr5476105ejb.46.1715003361623; Mon, 06 May 2024 06:49:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715003361; cv=pass; d=google.com; s=arc-20160816; b=wDnp1IG85XfLw0FCm8GeJY4Ru8UZ6qqhqbPkC9nkyXoYvclSOB6j6/dXA5Fe5Q2sSH LCHk+F1AR1y6Aa+VHh3cT/FHcvjIOdvM5vM64S51Wz9Obzisv6w7oW0MjPiGRdl07kng 2aI8ExvGVJ5b3ayzA9JdO3j3WOnVGzcsMrodEHSnmyrcjC17OVVGI88IHxicOOZCHOyo fvgoGQKAh3dYSgshpTTS8w1GJToILnAszaDerUSMa0nYogp8woYTVhibYl91EX/9kJJB pMEFOG/vI8He49etvB76XzK+2DMu+s+22K4eGdck4TZJazv4Zjfk9DWRWI4svsEtjZ3W bIRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=IiYk/OF8J/A5XkO49NEeG0JReklIrIL4u4kDqBfVQe0=; fh=m4AmTI+nkqQJ0vp/+p23MsA/SUD+cmo0s+u5Q30hLd8=; b=ZI3AUZMEOewXRuZijX00LULShi6b3T+BPgaxVeXN7SlBIo8edQJfGfYRXRBLIFU1u3 hwJcy6qvRPKlqNzcOum9YuBk1SMrjYWYPzwWYVa8kI7IbgQjJKrBcqJngNMmk+igYtQ6 LHA9zbFbwk4qVPT0pIuYz0YkSFTPbxfG4exswr2zBTTtn+NBTO74Jr3CbtEaXquF0rdh oiXdYXknpNpx+U2WOKsxCCIcu1CrafvG7CbwBU4RXnqvKIx35oHSxq4zZp0mNzAcFyOz KPExB+tZLtpC+PU/74JrlsEI73UAuAMwltLKhGXa181Yc4kWLjclIFyLCsMa/GdmN6Zw gHJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mauWTkRJ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m15-20020a17090607cf00b00a59b02bc868si2706264ejc.993.2024.05.06.06.49.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 06:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mauWTkRJ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BD301F21F3F for ; Mon, 6 May 2024 13:49:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F092580056; Mon, 6 May 2024 13:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mauWTkRJ" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BD6080026; Mon, 6 May 2024 13:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003346; cv=none; b=k35EVLpPAIKsaj8hVbZdiLL1B9z4fSskSZwgc69MGTDBiXrgcILBHxH1rtG+nwQy1btCRf4QJGOVtjkLz2/SqlM4F4EUTVRPqXryc8Icr3TCQZVw4QfiZP4RTJay37XVzQov+sgU/NkAS+iJpfltC+vSsDbfFx/eUXu6sSn6LxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003346; c=relaxed/simple; bh=N+8SlHv+BG10Ed56ABIsCFuAhTqmY99V5r9tlcdPXOk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dTyHKyOeCaFWunj+1w+GVbf46mkQZq31vVHU3D747r5jW2AA/HN/G/62mZ8WCM588haleyNwbQOviklhZW31leK8307GhFnSlwqtq8i1XbvsdedsynGtMX3+OCp9nbD+lGTlfbtqAk0rgUW5+ueQdd7JaImAL8H7Om7kuV4gt0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mauWTkRJ; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id E3A7F1BF20E; Mon, 6 May 2024 13:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715003341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IiYk/OF8J/A5XkO49NEeG0JReklIrIL4u4kDqBfVQe0=; b=mauWTkRJEwC2lvjJlXWeuOXCeuQOgxLTQoZe+3vo06UVOGbnAcLbx+bNbmOKRWY6N/2LMh ZDPxv8XA2VsvMlJhgiYmdv0114okHcldvzL+KSx6iGlunRr5ydNL7c1Mq0g087+atQRTLh Fcxkxsn0rh1VeFRBkpGPfu7kOn8og+qC/lMfPl6ICDW6CAsuZmoH0jM9hFYKEDUbm7LxvN r/+W7vfKhw7rXY92GmeNbGyQxRdUAINnUkE2S2ksf/xbJYBm/OOO6MkCinkF6tem/bUGTb tYehaTyf0yxIyTjRNJDaA02iiBlYKZzDvBhnU+bDdBPdzk4dlsD1AkVCAv+VZA== Date: Mon, 6 May 2024 15:48:58 +0200 From: Miquel Raynal To: Arseniy Krasnov Cc: Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , , , , , , , Subject: Re: [PATCH v5 1/2] dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Message-ID: <20240506154858.003bab54@xps-13> In-Reply-To: <20240416085101.740458-2-avkrasnov@salutedevices.com> References: <20240416085101.740458-1-avkrasnov@salutedevices.com> <20240416085101.740458-2-avkrasnov@salutedevices.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Arseniy, avkrasnov@salutedevices.com wrote on Tue, 16 Apr 2024 11:51:00 +0300: > Boot ROM code on Meson requires that some pages on NAND must be written > in special mode: "short" ECC mode where each block is 384 bytes and > scrambling mode is on. Ok > Such pages located with the specified interval within specified offset. I'm sorry I don't get that sentence. > Both interval and offset are located in the > device tree and used by driver if 'nand-is-boot-medium' is set for > NAND chip. This sentence is probably not needed. >=20 > Signed-off-by: Arseniy Krasnov > --- > .../bindings/mtd/amlogic,meson-nand.yaml | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yam= l b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml > index 57b6957c8415..67b2f7c1259c 100644 > --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml > +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml > @@ -64,11 +64,25 @@ patternProperties: > items: > maximum: 0 > =20 > + amlogic,boot-pages: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Number of pages starting from 0, where special ECC from *offset* 0 I guess? > + algorithm will be used by the driver. "where a special ECC configuration must be used because it is accessed by the ROM code"? Maybe you can even detail what are these values if they are fixed. You should probably inform that scrambling shall be on as well. =20 > + > + amlogic,boot-page-step: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Interval between pages, read/written by the driver with > + special ECC algorithm. I'm not sure I fully get the description. What is the unit here? can you draw a small ascii-art diagram? > + > unevaluatedProperties: false > =20 > dependencies: > nand-ecc-strength: [nand-ecc-step-size] > nand-ecc-step-size: [nand-ecc-strength] > + amlogic,boot-pages: [nand-is-boot-medium, "amlogic,boot-page-step"] > + amlogic,boot-page-step: [nand-is-boot-medium, "amlogic,boot-pages"] > =20 > =20 > required: Thanks, Miqu=C3=A8l