Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp196754lqj; Wed, 10 Apr 2024 08:01:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzS8TAG3wlS75YoiH0/fSiTa12+RLCElqax9lmwOBZ0QuJD1i5jWXQidxqWrrUHOT+dcc+VMN03F/S6iFD4CAfyvg1SSzoT3KcwJb7DA== X-Google-Smtp-Source: AGHT+IF/xjvyRBja7Embz/jzDx6Q6mzlBcG9hVP0if5QzWieJjKDU53PeAa32QGrpWhjZAl7P5TL X-Received: by 2002:a17:902:f68d:b0:1e5:1734:296c with SMTP id l13-20020a170902f68d00b001e51734296cmr1048041plg.53.1712761286088; Wed, 10 Apr 2024 08:01:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712761286; cv=pass; d=google.com; s=arc-20160816; b=zpF2YbbNLOk9Ui0N/AGsUnuLBtPLgxMTglDeascn5rp5b7hWsdW1+frPo3vSeUBWql S45QDfQDG9SAFLFvEbNM469e2AEX/OxKT8ZdmPFd2QMXUECd/KXZt87GfZbPWkRzUGRT fd6m6czv62Lu3K6lYlS253fWvItykYMyXur5HL+79mev8qU3EhCKYWnsa9FAhUSfMy1E +PfHX6fqHdiwuIXcwIxIHnZ2Zsw9THqlWHfJ70TGScuGCexxkACUhRLCqxXfwq5mZ3TB 3si0ZF8duQMkC2dWLKExrgGIkFwx4ZYUUayTBa76+6QURE63xSLvjJA3Ajx6GlJe/tfX YNtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=s8Jp2yeif5VAKKBhmostp0DMhMpyI/I2d+WdPlscn4o=; fh=d21rU0t5ldv8qmdUTthuKC1WHykG2KPeb/08d9+CuU8=; b=agyT3nMwXnuDTX29TyPPgVrTmEG7cCOvBbqpB2w8zq83KPUBLrL+IE7az2GKYrran6 wC8JukwkHDAF3AFMmX1Kqp1wbdvAB0Epbu01/J+mqZjAS2ctEWelsjgvO33Br/NTSpx8 rfJi7FYGkDJKIZN9mthlKpETr0UlTMYuESbVIKL+t5uLr+G826EEZ4bOKu636dwxAw99 HFIRNVFof9gs7AkSS+5VsznLDwnnXktsICG/dv75/xR1qhBw9zadqF/tvTDO9j26ryL0 V4GPyYl5JnjhgdOOCCGnnAyrstpN2RFPT72UE9QxVR0nbTehGVdOIluKCxbqNx09IeCI Z2nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=kNvpm2A5; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-138833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 20-20020a170902ee5400b001e2a44ff6c5si10476630plo.289.2024.04.10.08.01.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 08:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=kNvpm2A5; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-138833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5C5BE28616E for ; Wed, 10 Apr 2024 15:00:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C87FA16E878; Wed, 10 Apr 2024 14:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="kNvpm2A5" Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (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 3270D15EFAD; Wed, 10 Apr 2024 14:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712761133; cv=none; b=H8jbyt8Ut3boEFBbaWBQIgVWAtRNBMUvRL32Hri6gbkTDZz9l5FxFnU+uBxRjsoqLhYgti2kBdBi6pxUL0QuS4QmkL3yIN8DEY+QNeoRwLDgvQU6WJ7gsNpL9GW+4u4IPHlt/N0KymwaOU8oba9uQfj63WPnY5NDQ3ivQ95CEEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712761133; c=relaxed/simple; bh=YsqK/mjEyW8jty8w2OzNqu7tqQVF9pS7pFR7q1iAm0U=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=iNya8snI8IytKk/OQmm4BGJPUMyD6iGAUH7Ov7gK25HDHXjdipOpORwDAayd41E/3WQw4LZSCA+011oPVR4KHLFlloKsp6OXF0lQJWwjEb/kFQ7HLVIB3n98SL2odIk3wWXWDNOaY9W5eCBrul7L/2HSQrUGzhKj2RUxvCPaXuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=kNvpm2A5; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 4853A120059; Wed, 10 Apr 2024 17:58:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 4853A120059 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1712761126; bh=s8Jp2yeif5VAKKBhmostp0DMhMpyI/I2d+WdPlscn4o=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=kNvpm2A569qLsm12AbdnxFN2hRYvCoaeNhjiEX+qvGKsT2W11zx/mFp2JAssoqg09 H2TjeqWCzQrzqD0eX33JsivX/pPqjxg5F7fPCC/ICrLpuCG7p6TUmw3wSY4UE0e9Uc jz2U7hgt4oIX62djwoWtgBl/KthdYsev7KrjllD8GvrSdK6MF3aVOUbEf4qzOfzY89 mX98Vkp6snHHsTWIC9a76cfNgWea/ax4mSqhHzpfaTuMu+3nSzygkarfdJCoURIicR tJU8WJfiSl4PvnL/OjwzRbOln170pZ4I/Gqk4/5ilaPxaIaErqOrghRbWlIK2zhmK3 CEvveW0HHXdbQ== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Wed, 10 Apr 2024 17:58:46 +0300 (MSK) Received: from [172.28.64.75] (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 10 Apr 2024 17:58:45 +0300 Message-ID: <588551c9-3426-e623-e2aa-70b040c9324a@salutedevices.com> Date: Wed, 10 Apr 2024 17:48:02 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v3 1/2] dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Content-Language: en-US To: Miquel Raynal CC: Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , , , , , , , References: <20240409181025.55504-1-avkrasnov@salutedevices.com> <20240409181025.55504-2-avkrasnov@salutedevices.com> <20240410122356.30852b3c@xps-13> From: Arseniy Krasnov In-Reply-To: <20240410122356.30852b3c@xps-13> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184655 [Apr 10 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: avkrasnov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 16 0.3.16 6e64c33514fcbd07e515710c86ba61de7f56194e, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;smtp.sberdevices.ru:7.1.1,5.0.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/04/10 11:03:00 #24738255 X-KSMG-AntiVirus-Status: Clean, skipped Hi, On 10.04.2024 13:23, Miquel Raynal wrote: > Hi Arseniy, > > avkrasnov@salutedevices.com wrote on Tue, 9 Apr 2024 21:10:24 +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. Such pages located with the specified interval >> within specified offset. Both interval and offset are located in the >> device tree and used by driver if 'nand-is-boot-medium' is set for >> NAND chip. >> >> Signed-off-by: Arseniy Krasnov >> --- >> .../bindings/mtd/amlogic,meson-nand.yaml | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml >> index 57b6957c8415..b86a1953056b 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 >> >> + amlogic,boot-page-last: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: >> + The NFC driver needs this information to select ECC >> + algorithms supported by the boot ROM. > > Shall we have a length rather than the last page? You mean rename it to "amlogic,boot-pages-length" or something like that ? But I think length in bytes is useless here: 1) boot rom needs that only some single pages are written in special mode (and as I see in vendor's driver it also works in pages). 2) NAND driver operates in pages during write/read such pages. So length in bytes will be converted to pages anyway. What do You think ? Thanks, Arseniy > >> + >> + amlogic,boot-page-step: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: >> + The NFC driver needs this information to select ECC >> + algorithms supported by the boot ROM (in pages). >> + >> unevaluatedProperties: false >> >> dependencies: >> nand-ecc-strength: [nand-ecc-step-size] >> nand-ecc-step-size: [nand-ecc-strength] >> + amlogic,boot-page-last: [nand-is-boot-medium, "amlogic,boot-page-step"] >> + amlogic,boot-page-step: [nand-is-boot-medium, "amlogic,boot-page-last"] >> >> >> required: > > > Thanks, > Miquèl