Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp812022rwi; Mon, 31 Oct 2022 07:52:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6q0Gf4nNLHA5A0P0D42wRtEzzWNRjAqAYY0EpdaWH5gDcsGSEYdWmmPLiNrqwbzNethNRV X-Received: by 2002:a17:902:b697:b0:187:1acf:249c with SMTP id c23-20020a170902b69700b001871acf249cmr7330238pls.14.1667227925910; Mon, 31 Oct 2022 07:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667227925; cv=none; d=google.com; s=arc-20160816; b=bJGCR8QGKAGH9hJPA/1lbjkYLNdz5BKEEdSUYlAOSKrQXAzJDN90zXm5zxV7Q4jw7S yyM9oTRTRrxi0CjYMI9XWBGumNXa5bLod+KH9SYgu3b40pAghy53bFZk2/qnJg/lsgW2 Zsuzl5XP6GmEyqjW+tLDaCmD3Saeks4P87isyHY5jNcIRPV7kiL5G9q7QKkag964BFrQ 5sNxYwb8x4293w69yGfYjF2SjijPHdfbQU8ZmWpUGgvZHxQqUisVXAjehVOIExka0npL kf5fINpMTrysr42wa1x8SuYpdNc+gNf3eor56gpeGWndJiuVJI/qK7Bxxu3pABipkCcj s5rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Y/FH10O3eEqn0o6aN8sU7z4Nn4gIFyCFRKnoNg2C2xQ=; b=VZ+MB2jmnw3QF3JdCNuwUHnQtgKle6pec1cQSXjmsf+WN7uwzCcFxJBxszl3UwjjBu nH1izPpSgReEbLFSKemkq8Xe8FEB6TQNQX6uItBjyD3MLLUIdmm04Q0Acn9CiJCxR4PU AQl+30PYeIP8zWyk2QWQiylMvPAW5tFWRUycsu4c66IG6hWg1SaedUXWmLNnFC5pHgXA NKKB4FjURS6z+QSIG8N0lPtlerr2IxUHJBOw+IHhOrHo2dUySmppkKFHyLcIk0QJhDF9 jcJWPqa1xTbWnlAEyvkCJ/BaU8tmmS8jGwpbbvi8b5Z0DMGGjB7wVKfphdD+ElFHejEA wdDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170902f61000b001868bb70fd5si9383000plg.124.2022.10.31.07.51.53; Mon, 31 Oct 2022 07:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbiJaOpq (ORCPT + 98 others); Mon, 31 Oct 2022 10:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbiJaOpm (ORCPT ); Mon, 31 Oct 2022 10:45:42 -0400 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9197101C3; Mon, 31 Oct 2022 07:45:40 -0700 (PDT) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-13bef14ea06so13691102fac.3; Mon, 31 Oct 2022 07:45:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y/FH10O3eEqn0o6aN8sU7z4Nn4gIFyCFRKnoNg2C2xQ=; b=J+909/6mBWUWa388jxN0d2CqCJoeXr+eFoB7Bua75SxYQMIrt/DHymaJUYoKo/Dcu7 JuFJkGI9+5f+ZMt+3kCEtGX+N6eLXLAT6e1JGbSedzcvJXkv5+weWSi8ZayPVH/eWnU4 22wpOoLxgCIEa9Kv7OJPbqTGMOBZB9RSnF1nhwywt7A63nJN5f/gvZG3SapxofjmbJyr BxTuAQmiv6ujF6ooqIBvwvQV7K/52UaFMwCVgSu1/Q/qKXRXJ8LcBSaB1MP2xyU54MIO qCnkB/IikTPxCjTLeTft4Cd8mGzsG78ATVGkvbGUFz51G+8d9qa48euNts0OsHyOwzft gKlQ== X-Gm-Message-State: ACrzQf2SDZrfd4is+TFiPcdpInIXHl8Z/7/t7PS6aeERDQI25yY1SX3y nz4iPZ0uQOMn28IU3jg8wQ== X-Received: by 2002:a05:6870:630f:b0:132:8af2:c8f2 with SMTP id s15-20020a056870630f00b001328af2c8f2mr17541017oao.284.1667227540101; Mon, 31 Oct 2022 07:45:40 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id q7-20020a056871080700b0012b298699dbsm3093444oap.1.2022.10.31.07.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 07:45:39 -0700 (PDT) Received: (nullmailer pid 2861020 invoked by uid 1000); Mon, 31 Oct 2022 14:45:41 -0000 Date: Mon, 31 Oct 2022 09:45:41 -0500 From: Rob Herring To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: bcm-kernel-feedback-list@broadcom.com, Vignesh Raghavendra , Tom Rini , u-boot@lists.denx.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla , Miquel Raynal , linux-arm-kernel@lists.infradead.org, Conor Dooley , Krzysztof Kozlowski , Richard Weinberger , William Zhang , Joel Peshkin , linux-mtd@lists.infradead.org, Rob Herring , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Florian Fainelli Subject: Re: [PATCH V3 2/2] dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding Message-ID: <166722753485.2860867.13096604705900447995.robh@kernel.org> References: <20221018154202.4634-1-zajec5@gmail.com> <20221018154202.4634-2-zajec5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221018154202.4634-2-zajec5@gmail.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Oct 2022 17:42:02 +0200, Rafał Miłecki wrote: > From: Rafał Miłecki > > Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. U-Boot > stores its configuration in an environment data block. > > Such blocks are usually stored on flash as a separated partition at > hardcoded address. Broadcom however decided to: > 1. Store env data block inside U-Boot partition > 2. Avoid sticking to hardcoded offsets > 3. Use custom header with "uEnv" magic and env data length > > Example (length 0x4000): > $ hexdump -n 32 -C -s 0x40000 /dev/mtdblock0 > 00040000 76 6e 45 75 00 40 00 00 34 89 7a 82 49 4d 41 47 |vnEu.@..4.z.IMAG| > 00040010 45 3d 4e 41 4e 44 3a 31 4d 2c 31 30 32 34 4d 00 |E=NAND:1M,1024M.| > (0x40000 offset is unit specific and can change) > > Starting with the commit 118f3fbe517f4 ("dt-bindings: mtd: partitions: > support label/name only partition") DT can describe partitions matching > them by a name (without specifying actual address). With that feature > and this binding change it's possible to: > 1. Specify DT node for Broadcom's U-Boot env data subpartition > 2. Add nodes for specific environment data variables > 3. Reference them as NVMEM cells > > This binding is unlikely to help Broadcom's U-Boot. U-Boot SPL needs to > find environment data early (before it accesses DTB) and it does that by > looking for an "uEnv" magic. Dirty way. > > This binding can however be used by operating systems. It allows > describing cleanly U-Boot, its env data and variables. It tells > operating system about Broadcom-specific env data so it can parse it. > > Signed-off-by: Rafał Miłecki > --- > V2: Work on better commit body & add example > V3: Avoid duplicated "mac" label > --- > .../devicetree/bindings/nvmem/u-boot,env.yaml | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > Applied, thanks!