Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp356238lqh; Tue, 7 May 2024 00:46:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1XdRlyVYfDUBI9F/w0LTgLmQGeGuwjp9ljllhHiDDdBJXm3WK94mOgR9NYafJcGtIToZe5ySXkI2BrT1cr730k8pkafjaBAT7cRRESg== X-Google-Smtp-Source: AGHT+IF3atmQbTUWqkdw0eT/mTkHbX4j3dLnMSyv4I5V2IAJ901ysQEgLgc7sF4oEkvnTPDRy7si X-Received: by 2002:a05:6a20:3c92:b0:1af:ab23:82ce with SMTP id adf61e73a8af0-1afbdc9327emr3341035637.3.1715068009236; Tue, 07 May 2024 00:46:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715068009; cv=pass; d=google.com; s=arc-20160816; b=Z6ryge48fjg1u7A3Z4f2bWtmNPs6iCDfyf1yobFy7Ru9L9o+Oyy+sQAotwjlY3rGRZ 7oTOlfbK9x6Ikw5RVUODvqbIc1BW0CBIo7JlWXURpRrAGMEqBouW24TVdw4x1wpLmGBa Xw27RbwRLMIM8cNkUsqdSnqwtEusKSmEtmLy1hK6FK+erFJbQwoXth6gkCjRYHw3KuiJ zK6b8+Hqe956RK2LfUqK/tvjLi6fvLuPjdJ8HtR04dKBjVA1kjPD/jUsudlIXYxDKlxP sifWKO1spbLLhIoD5BFVlVcisCJCj6kEMLJTd8vpQv2Ec3PtFmOheMsEZi9SbjJ78SFY G9dw== 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=Gu71DSSw7UmD80j9iS8L6fOPFWts2Eqb3HZYUJnLUQo=; fh=d21rU0t5ldv8qmdUTthuKC1WHykG2KPeb/08d9+CuU8=; b=eVwqtMaOa2GXgh7XzUbdtlZukFiJsZE7fyX95w6txEmwPUff8cT1S6ZeXB0AZvR/RD yPs2FiMooBgRwrDliYd6hrvhHf2VHPNozfYieuCe7rxz9/T+n2c3J63f3HHGX3DsLWfG r7LMDAJGn1FWT4wFtj369Xid+qx2ojOVYvcu4Y0VLHiOjFNSWJvDq6xCzbREYGoYYi4Z 6LaRQ2+tbD9/Y3RLGiRV2DCxQCqJcstK0GFAD3MtqKsbWmd/dz8h12xzzI0QdBCmA0lJ Q0QVM97uK31UhpGTBPTOAJeSMzocO5xU0j6c2578f+JPdtntqEEWbszk5kCd7nQf/z/i j1Kg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=g1xsU6pQ; 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-170833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170833-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q11-20020a656a8b000000b005f435bce73dsi10354411pgu.361.2024.05.07.00.46.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:46:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=g1xsU6pQ; 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-170833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170833-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 DA54C285A8A for ; Tue, 7 May 2024 07:46:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4355E13C66D; Tue, 7 May 2024 07:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="g1xsU6pQ" 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 138AE13BC39; Tue, 7 May 2024 07:46:37 +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=1715068001; cv=none; b=uTZgwJ48HPVMx7FVJirR1aM5WUZbzm90QcARoJRWKFkKX6VOaweN5+++JOrQObAebH99ZN9RwlU0LYv3QyF2rJYvO2Kzb/PtWoiu/9LBdHUE03zf3PzSZ/+d97q8pme30mnrzmsZRIEOuYvD8/JfIB8BIU33GPDbuOpx8p4Q+qM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715068001; c=relaxed/simple; bh=94Af4ymmCiF00Qx1iKDK+IJXafc4Rr4rO1jecboT9BE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=sIJwhm02ZgQ7DEZChJLKcMRz7fW7+zJrLYioZlazVHtKtrnUvEqwkm2tJsXJ5MHNJDI3UaEpsTMnzC84UEoj94S0BhoYRSgbp0A/uG3eSS+hlyZOUM+Y1ssZqQVmSIj1q62S1GM9GpvjgE+akzW9evMcIcwsM1xVLOPSuFCjKoc= 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=g1xsU6pQ; 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 0D05B120005; Tue, 7 May 2024 10:46:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 0D05B120005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1715067995; bh=Gu71DSSw7UmD80j9iS8L6fOPFWts2Eqb3HZYUJnLUQo=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=g1xsU6pQtn8HsuRHl2PbpoH6ktNn/NNTJgnu0d8Pf8dUGmmrRIrDCX2d5yDCkOWdO UqjUFPp6maQ0CRIbDhCLdQRZQUj6mIFSiIUSAwrG9Z6kuxGOlAz3fmkD11k4FG4loc ROgfBNtqvbXp40oDGrHlk/IYx8hgcfApUZHO+q1j57maDX0vnPOL14tpZqiI8FWKVR YthHiYDaJxdWI9L4+owRh4Y0RvL/j0u8rpt+2GOO+HOrJ7zPrQpwSKnvp/Sy+jMvoG Pml6qneHQmbss0rwzQo9SjB2UWqILgORZESCta4fj11wcAoMUCB3gkfw1q0yS2Qru9 FBXOb92L87g4w== 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; Tue, 7 May 2024 10:46:34 +0300 (MSK) Received: from [172.28.226.125] (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; Tue, 7 May 2024 10:46:34 +0300 Message-ID: Date: Tue, 7 May 2024 10:35:51 +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 v5 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: <20240416085101.740458-1-avkrasnov@salutedevices.com> <20240416085101.740458-2-avkrasnov@salutedevices.com> <20240506154858.003bab54@xps-13> <20240507092726.4ab1afdb@xps-13> From: Arseniy Krasnov In-Reply-To: <20240507092726.4ab1afdb@xps-13> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) 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: 185103 [May 07 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: 19 0.3.19 07c7fa124d1a1dc9662cdc5aace418c06ae99d2b, {Tracking_from_domain_doesnt_match_to}, smtp.sberdevices.ru:7.1.1,5.0.1;salutedevices.com:7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.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/05/07 06:33:00 #25113436 X-KSMG-AntiVirus-Status: Clean, skipped On 07.05.2024 10:27, Miquel Raynal wrote: > Hi Arseniy, > > avkrasnov@salutedevices.com wrote on Tue, 7 May 2024 09:53:06 +0300: > >> On 06.05.2024 16:48, Miquel Raynal wrote: >>> 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. >> >> Sorry, I mean this (let me draw :) ) : >> >> [ page 0 ][ page 1 ][ page 2 ][ page 3 ][ page 4 ][ page 5 ][ page 6 ][ page 7 ][ page 8 ][ page 9 ] >> >> For example, we have 10 pages starting from the beginning of the chip - this is "within specified offset", >> e.g. offset is 10. BootROM on axg needs that (for example) every third page must be written in "special" >> mode: scrambling is on and ECC is 384 bytes. Such pages are 0, 2, 4, 6, 8. E.g. "specified interval" will >> be 3. > > Shall be 2, no? yes, starting from 0 - then 2. e.g. if (!(page_num % 2)) boot ROM need this page > >> >> So: >> >> amlogic,boot-pages: 10 >> amlogic,boot-page-step: 3 > > Ok I get it. Thanks for the explanation. I don't really understand the > logic behind it though. Do you know why the bootROM would access only > one page over 2 or 3? Is there a default value? Is this configurable? No, boot rom source is closed, I don't have access to it. I get this logic from old version of vendor's uboot - in practice they use non 2 or 3, they use hardcoded 128 step value. And amlogic,boot-pages is 1024 Thanks, Arseniy > > Thanks, > Miquèl