devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding
@ 2022-04-06 15:25 Rafał Miłecki
       [not found] ` <CAN3=V2vOVLc95ZYBUDo8J7ast4UQMnZm4uYmX63LpcJdZWnmNQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2022-04-06 15:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Srinivas Kandagatla, Tom Rini
  Cc: Florian Fainelli, devicetree, linux-arm-kernel, u-boot,
	bcm-kernel-feedback-list, linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

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 <rafal@milecki.pl>
---
 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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-21 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 15:25 [PATCH] dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding Rafał Miłecki
     [not found] ` <CAN3=V2vOVLc95ZYBUDo8J7ast4UQMnZm4uYmX63LpcJdZWnmNQ@mail.gmail.com>
2022-04-07 18:17   ` [PATCH] dt-bindings: nvmem: u-boot, env: " Rob Herring
2022-09-21 11:57     ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).