From patchwork Wed Apr 6 15:25:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12803620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C15BDC433EF for ; Wed, 6 Apr 2022 15:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UO25W5k2p3pqASSUdjEsOy8iWhNBPsjsvbxofrRO00g=; b=y8631t1Wd1Xp0q JHj0em+DFS8cq3yCE2wk/kYC0NaqtQvdYly+Cvk2X7H85JtJ+TeoH/co5pn9H1V3uhmAlVrKD55WR 3cr86ZcplW6K5M19FAkxqd1LQ5dYIbH3HdrFbJ7cqWsxWYKM7EwIiRRL7UioPM6Yn2KMrqZnRgDje O1qM45BLD0tbS5WlYRMvBsqEGS2ri8gm4kgVLTqR2qR+gWa+/ASYiZ2X1xIBnaugN9+Ik9ZEenOxC SqhA8KZHNrE1D9E+oWvNoLEDnwBItnBxgtbgKS62yB59pSoPqTagdaiIY7FFb2vInOXVZV3WElEMQ ag6l+KN7wN9C3FRpZV3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc7XD-006oe0-Ni; Wed, 06 Apr 2022 15:25:27 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc7XA-006odX-Le for linux-arm-kernel@lists.infradead.org; Wed, 06 Apr 2022 15:25:25 +0000 Received: by mail-lf1-x130.google.com with SMTP id h7so4740932lfl.2 for ; Wed, 06 Apr 2022 08:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=buklFgMo3io8o1oTm+e0Xy6mGquidMcjQ+rAVmjF0R0=; b=IpUBnNb1wMpq3Z33rLXUmoesOPAyubbH73r3NT6CG2VFE7ISsrjIUEOS4mq1gMPJ0/ y/P3ojZkkt5w1AXkNY2BYWBVLXwhiaiDchr3olLAUF1lLuK/mxEVqh5ainO6buKOAQcW cUQazL0acLThFgQpSb6DFLnF60L9LGJUgO4uNUxz397btFBQeiciuYcoqB1UwvkYTjgM +GYm8SLvp98Oka8FJutNz86JOqwL1MFh3KNAjkKuYRl8NwT6VNsNLWKpihRnTNa/pYmg vT3st63NFAB33DNhWFfKe4Gm/CQd4KYl+hY5lpXmcLaexYpP63+/ZlNXrr/DUxmdlVw5 rGgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=buklFgMo3io8o1oTm+e0Xy6mGquidMcjQ+rAVmjF0R0=; b=SgWvrAF0+ISTQWv0PMRMJ30Lu70n8ymSwZKCXY6qfo9dsytF4wLzbv31KrEdJwclwV maQ2j2gekPyu024OBI4fwcfQlOtpu8HvxfOxGl17fJf0GqMAtBnHWwIyBL/wQFD/YVu+ P1KlegM7GvLvvv+qJwWFNIP0BlloVf03UTa4ie344PS/zZlYiCjUiTwr5zqkNe9BTK0O LuZzUKaA6T6/l55sn8k61ssZzfI/Wi/3oFfWmJraKU0ecVj6qOkTTOaIkwoYTV82kdfw GAY0O1ELMoI0li5W2fceyULGFhw9p2hqrmiCt0P/MTrtqPelNQf62b3KRPu1Oj5WtnUs zLUA== X-Gm-Message-State: AOAM532NmQ3lr2JmYYZoBUCjgyQ96FCZJEfDV6QVl9aUwYUmdwnFeR1W xpdCuk7PU0LDyg8Dha5FZb0= X-Google-Smtp-Source: ABdhPJw+wxyyrmHkxuNDGzpTAjtnLv+6MCubb/xVpbVgTR8NNXWidB7jX7O3yhmXgjH6l8xw/z/JWg== X-Received: by 2002:a05:6512:3dab:b0:44a:247:2d8 with SMTP id k43-20020a0565123dab00b0044a024702d8mr6374447lfv.628.1649258723148; Wed, 06 Apr 2022 08:25:23 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id y5-20020a2e3205000000b0024b045e3b18sm1557359ljy.66.2022.04.06.08.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:25:22 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Tom Rini Cc: Florian Fainelli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, u-boot@lists.denx.de, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] dt-bindings: nvmem: u-boot, env: add Broadcom's variant binding Date: Wed, 6 Apr 2022 17:25:15 +0200 Message-Id: <20220406152515.31316-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_082524_750129_0F270C13 X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki Broadcom uses U-Boot for some of their recent platforms like BCM4908. They decided to use modified environment variables variables format though. Their header includes 2 extra 32 b fields at the beginning. The first field meaning is unknown, the second one stores length of env data block. 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.| Add a custom "compatible" value to allow describing Broadcom devices properly. Signed-off-by: Rafał Miłecki --- Documentation/devicetree/bindings/nvmem/u-boot,env.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml index e70b2a60cb9a..6a6b223be4a0 100644 --- a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml +++ b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml @@ -36,6 +36,8 @@ properties: const: u-boot,env-redundant-bool - description: Two redundant blocks with active having higher counter const: u-boot,env-redundant-count + - description: Broadcom's variant with custom header + const: brcm,env reg: maxItems: 1