1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/nvmem/u-boot,env.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: U-Boot environment variables 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotdescription: | 10c9ccf3a3SEmmanuel Vadot U-Boot uses environment variables to store device parameters and 11c9ccf3a3SEmmanuel Vadot configuration. They may be used for booting process, setup or keeping end user 12c9ccf3a3SEmmanuel Vadot info. 13c9ccf3a3SEmmanuel Vadot 14c9ccf3a3SEmmanuel Vadot Data is stored using U-Boot specific formats (variant specific header and NUL 15c9ccf3a3SEmmanuel Vadot separated key-value pairs). 16c9ccf3a3SEmmanuel Vadot 17c9ccf3a3SEmmanuel Vadot Environment data can be stored on various storage entities, e.g.: 18c9ccf3a3SEmmanuel Vadot 1. Raw flash partition 19c9ccf3a3SEmmanuel Vadot 2. UBI volume 20c9ccf3a3SEmmanuel Vadot 21c9ccf3a3SEmmanuel Vadot This binding allows marking storage device (as containing env data) and 22c9ccf3a3SEmmanuel Vadot specifying used format. 23c9ccf3a3SEmmanuel Vadot 24c9ccf3a3SEmmanuel Vadot Right now only flash partition case is covered but it may be extended to e.g. 25c9ccf3a3SEmmanuel Vadot UBI volumes in the future. 26c9ccf3a3SEmmanuel Vadot 277ef62cebSEmmanuel Vadot Variables can be defined as NVMEM device subnodes. 287ef62cebSEmmanuel Vadot 29c9ccf3a3SEmmanuel Vadotmaintainers: 30c9ccf3a3SEmmanuel Vadot - Rafał Miłecki <rafal@milecki.pl> 31c9ccf3a3SEmmanuel Vadot 32c9ccf3a3SEmmanuel Vadotproperties: 33c9ccf3a3SEmmanuel Vadot compatible: 34c9ccf3a3SEmmanuel Vadot oneOf: 35c9ccf3a3SEmmanuel Vadot - description: A standalone env data block 36c9ccf3a3SEmmanuel Vadot const: u-boot,env 37c9ccf3a3SEmmanuel Vadot - description: Two redundant blocks with active one flagged 38c9ccf3a3SEmmanuel Vadot const: u-boot,env-redundant-bool 39c9ccf3a3SEmmanuel Vadot - description: Two redundant blocks with active having higher counter 40c9ccf3a3SEmmanuel Vadot const: u-boot,env-redundant-count 418bab661aSEmmanuel Vadot - description: Broadcom's variant with custom header 428bab661aSEmmanuel Vadot const: brcm,env 43c9ccf3a3SEmmanuel Vadot 44c9ccf3a3SEmmanuel Vadot reg: 45c9ccf3a3SEmmanuel Vadot maxItems: 1 46c9ccf3a3SEmmanuel Vadot 477ef62cebSEmmanuel Vadot bootcmd: 487ef62cebSEmmanuel Vadot type: object 497ef62cebSEmmanuel Vadot description: Command to use for automatic booting 507ef62cebSEmmanuel Vadot 517ef62cebSEmmanuel Vadot ethaddr: 527ef62cebSEmmanuel Vadot type: object 53fac71e4eSEmmanuel Vadot description: Ethernet interfaces base MAC address. 54*84943d6fSEmmanuel Vadot additionalProperties: false 55*84943d6fSEmmanuel Vadot 56fac71e4eSEmmanuel Vadot properties: 57fac71e4eSEmmanuel Vadot "#nvmem-cell-cells": 58fac71e4eSEmmanuel Vadot description: The first argument is a MAC address offset. 59fac71e4eSEmmanuel Vadot const: 1 607ef62cebSEmmanuel Vadot 61c9ccf3a3SEmmanuel VadotadditionalProperties: false 62c9ccf3a3SEmmanuel Vadot 63c9ccf3a3SEmmanuel Vadotexamples: 64c9ccf3a3SEmmanuel Vadot - | 65c9ccf3a3SEmmanuel Vadot partitions { 66c9ccf3a3SEmmanuel Vadot compatible = "fixed-partitions"; 67c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 68c9ccf3a3SEmmanuel Vadot #size-cells = <1>; 69c9ccf3a3SEmmanuel Vadot 70c9ccf3a3SEmmanuel Vadot partition@0 { 71c9ccf3a3SEmmanuel Vadot reg = <0x0 0x40000>; 72c9ccf3a3SEmmanuel Vadot label = "u-boot"; 73c9ccf3a3SEmmanuel Vadot read-only; 74c9ccf3a3SEmmanuel Vadot }; 75c9ccf3a3SEmmanuel Vadot 76c9ccf3a3SEmmanuel Vadot env: partition@40000 { 77c9ccf3a3SEmmanuel Vadot compatible = "u-boot,env"; 78c9ccf3a3SEmmanuel Vadot reg = <0x40000 0x10000>; 797ef62cebSEmmanuel Vadot 807ef62cebSEmmanuel Vadot mac: ethaddr { 81fac71e4eSEmmanuel Vadot #nvmem-cell-cells = <1>; 827ef62cebSEmmanuel Vadot }; 83c9ccf3a3SEmmanuel Vadot }; 84c9ccf3a3SEmmanuel Vadot }; 858bab661aSEmmanuel Vadot - | 868bab661aSEmmanuel Vadot partitions { 878bab661aSEmmanuel Vadot compatible = "fixed-partitions"; 888bab661aSEmmanuel Vadot #address-cells = <1>; 898bab661aSEmmanuel Vadot #size-cells = <1>; 908bab661aSEmmanuel Vadot 918bab661aSEmmanuel Vadot partition@0 { 928bab661aSEmmanuel Vadot reg = <0x0 0x100000>; 938bab661aSEmmanuel Vadot compatible = "brcm,u-boot"; 948bab661aSEmmanuel Vadot label = "u-boot"; 958bab661aSEmmanuel Vadot 968bab661aSEmmanuel Vadot partition-u-boot-env { 978bab661aSEmmanuel Vadot compatible = "brcm,env"; 988bab661aSEmmanuel Vadot 998bab661aSEmmanuel Vadot ethaddr { 1008bab661aSEmmanuel Vadot }; 1018bab661aSEmmanuel Vadot }; 1028bab661aSEmmanuel Vadot }; 1038bab661aSEmmanuel Vadot }; 104