Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6022135rwi; Tue, 18 Oct 2022 07:12:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4o882xyGGbesvenzoToyurg1E1rsuWbL8bJ1xJ2fQKp8YvBFuAtffVDGOEBfHcvGp8qdGW X-Received: by 2002:a17:907:2d91:b0:78d:8747:71b4 with SMTP id gt17-20020a1709072d9100b0078d874771b4mr2570749ejc.545.1666102374351; Tue, 18 Oct 2022 07:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666102374; cv=none; d=google.com; s=arc-20160816; b=twMor1j4Px3iRUh1AAbPd6ra9eNmqSxeLKZEnyQyLJN9gCWuMojsASRiOGwld50Xc8 DN5DtPsnvAZ6CbxAIBc+SieuWdaM4t9eM5adHjnQJSpqecpa8O1tr9e71dRCZECd2sH2 0WASWobLZvPNAZVeHBGvbuLZ7mkHk2TbfmQUOttjwH2C47kKrhiIvSEiX2c3ksZgOHeo 1ObxNe1EyX5a87asW5pezIMDMQpnpmzeMUH0kFOZWlpd8GnLIt6gHoSQ8qwCqpXBoKbJ sEqsfo1jRa2+ju/lHiMlN8dApXhORnqmVU2TzuFxXodx+IYkY3JXgyjYaZN37OcFTCTC WDnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=yNvg7dJc4v85iivVesuNckJ8VnSoJSGr9nvVYYYfI8Q=; b=LUgh+JQ4Q+xsXoJcpXdARw1avFfFmdIL4Qti4mQhdMT6QFXA1hx/MsySjXZmjWQQlD 4qbaSy0LKu4aPszhDnz0xH2SG/jcq8UMQuLyomkCj7u+29WEGaM4cWgvaBxGPm2I4HCh G7UNqKihf1WV7eqL2PLxxZWxuBvzPYyXaHnnlqCKOXhvyJLN5E0BuTzU1yP4jQZYSu84 K7vDvhwXXqylWJ7ADRHUDByCc2dxdcnIpnpV9gQdfCLu/LBUghuHr+PW8fEu/jwOH21V jlh9Nm0h1SNfh5JORT8LfkQ7Hk4Nk9ahzOPuc6t7qf7I6akfnOnD0+Xh/mK7PWOu4U7Z UKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MvSWiW5y; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a1709065d0c00b007707ab4be23si13170189ejt.560.2022.10.18.07.12.13; Tue, 18 Oct 2022 07:12:54 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MvSWiW5y; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbiJRN6s (ORCPT + 99 others); Tue, 18 Oct 2022 09:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbiJRN6o (ORCPT ); Tue, 18 Oct 2022 09:58:44 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13F59CF874; Tue, 18 Oct 2022 06:58:41 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id z97so20565426ede.8; Tue, 18 Oct 2022 06:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=yNvg7dJc4v85iivVesuNckJ8VnSoJSGr9nvVYYYfI8Q=; b=MvSWiW5yn8tumonucJ27BJ1DvOPfCyCk1Eott6lHotQqjJ9KPwEMFaXOzLSM7sYYKn +bz8rTOJ32iFsZa+92WkVydmKZYuk12FtsbeDZrhRsAQU5FsRQVp+zgxCSfPhYVir48r PnNmicXzCOAxCapJNyEBpkVBnSTpYovvaKRcdI/zXNofeIkroIkPDplKxFpYtiK5MY+U Pt9WLxCHN8WJSQTdRa+bMk7TkDIJGhtGX3CVbluiFNQMTAn7anXnuQMGL2oxlDRGpwHY UBEVUH59fVwwe1xFbcU2Zql2KiC5nsgjZqmZ+xIBgg/SEeOuy4A50/n9dFwtFpuvczo3 634g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yNvg7dJc4v85iivVesuNckJ8VnSoJSGr9nvVYYYfI8Q=; b=FmVhbOCr4bZDgPnLw4GoJebEx3caPjRtUH32Sc0RrquU56+dDRzWPSfjmykNnOFHDn WNZZIMkqwvVdAzMGJbL0BskhQ5cF7l+Azibt4QWU/i4UXcl5n7LhrrAhnxQcQUksXH3Q dx2Lh7Hqd6Kw3F+rhvWvAcFgxwMgsWuP0YCobcKCaLq9IWlgKwrTejdLJRWruzP/LXwS WIVIMEQjT12r1ZcX6L3g8GA6l4xrM6i8rme73YiaeeL6GYHm6V0spcJRZVVN5IwJoqzb MzxAfK+++TPdwifQloS0s2S4avOXiNIT/+j6zLRNO/7gIReL9yMwYVOMXvagm7K3slFR TKvQ== X-Gm-Message-State: ACrzQf1aiF+AaKTZvbasQ2qJZyn5tdzABgiRFpL16odZTnc/+GE8WJnd P+aqGdMGfZHISu+im7oD2zo= X-Received: by 2002:a05:6402:1604:b0:458:b2b7:bd5a with SMTP id f4-20020a056402160400b00458b2b7bd5amr2615998edv.73.1666101519504; Tue, 18 Oct 2022 06:58:39 -0700 (PDT) Received: from [192.168.26.149] (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.googlemail.com with ESMTPSA id 24-20020a170906301800b0073dd8e5a39fsm7445732ejz.156.2022.10.18.06.58.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Oct 2022 06:58:39 -0700 (PDT) Message-ID: <2f5f0c7f-4e1d-2434-51b4-d98d3fa7f49a@gmail.com> Date: Tue, 18 Oct 2022 15:58:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Thunderbird/96.0 Subject: Re: [PATCH V2] dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding To: Conor Dooley , Rob Herring Cc: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , William Zhang , Srinivas Kandagatla , Joel Peshkin , Florian Fainelli , Krzysztof Kozlowski , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Rob Herring , Tom Rini , u-boot@lists.denx.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220930163631.27040-1-zajec5@gmail.com> <166578177913.2909910.7600034251484225468.robh@kernel.org> From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 18.10.2022 12:19, Conor Dooley wrote: > On Fri, Oct 14, 2022 at 04:09:40PM -0500, Rob Herring wrote: >> On Fri, 30 Sep 2022 18:36:31 +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 >>> --- >>> .../devicetree/bindings/nvmem/u-boot,env.yaml | 21 +++++++++++++++++++ >>> 1 file changed, 21 insertions(+) >>> >> >> Applied, thanks! > > Hey Rob, > Maybe my tooling is out of date or w/e but this is breaking > dt_binding_check for me. > > I applied the below to fix the build, which I was about to send, before > realising that you'd applied it and wondered if I was missing something. Thanks for catching that and submitting a fix! I guess I didn't run dt_binding_check this time or I did it before adding an example. Sorry for that!