1 # SPDX-License-Identifier: GPL-2.0-only OR BSD 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layou 4 $id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: U-Boot environment variables layout 7 title: U-Boot environment variables layout 8 8 9 description: | 9 description: | 10 U-Boot uses environment variables to store d 10 U-Boot uses environment variables to store device parameters and 11 configuration. They may be used for booting 11 configuration. They may be used for booting process, setup or keeping end user 12 info. 12 info. 13 13 14 Data is stored using U-Boot specific formats 14 Data is stored using U-Boot specific formats (variant specific header and NUL 15 separated key-value pairs). 15 separated key-value pairs). 16 16 17 Environment data can be stored on various st 17 Environment data can be stored on various storage entities, e.g.: 18 1. Raw flash partition 18 1. Raw flash partition 19 2. UBI volume 19 2. UBI volume 20 20 21 This binding allows marking storage device ( 21 This binding allows marking storage device (as containing env data) and 22 specifying used format. 22 specifying used format. 23 23 24 Variables can be defined as NVMEM device sub 24 Variables can be defined as NVMEM device subnodes. 25 25 26 maintainers: 26 maintainers: 27 - Rafał Miłecki <rafal@milecki.pl> 27 - Rafał Miłecki <rafal@milecki.pl> 28 28 29 properties: 29 properties: 30 compatible: 30 compatible: 31 oneOf: 31 oneOf: 32 - description: A standalone env data blo 32 - description: A standalone env data block 33 const: u-boot,env 33 const: u-boot,env 34 - description: Two redundant blocks with 34 - description: Two redundant blocks with active one flagged 35 const: u-boot,env-redundant-bool 35 const: u-boot,env-redundant-bool 36 - description: Two redundant blocks with 36 - description: Two redundant blocks with active having higher counter 37 const: u-boot,env-redundant-count 37 const: u-boot,env-redundant-count 38 - description: Broadcom's variant with c 38 - description: Broadcom's variant with custom header 39 const: brcm,env 39 const: brcm,env 40 40 41 reg: 41 reg: 42 description: Partition offset and size for 42 description: Partition offset and size for env on top of MTD 43 maxItems: 1 43 maxItems: 1 44 44 45 bootcmd: 45 bootcmd: 46 type: object 46 type: object 47 description: Command to use for automatic 47 description: Command to use for automatic booting 48 48 49 ethaddr: 49 ethaddr: 50 type: object 50 type: object 51 description: Ethernet interfaces base MAC 51 description: Ethernet interfaces base MAC address. 52 additionalProperties: false 52 additionalProperties: false 53 53 54 properties: 54 properties: 55 "#nvmem-cell-cells": 55 "#nvmem-cell-cells": 56 description: The first argument is a M 56 description: The first argument is a MAC address offset. 57 const: 1 57 const: 1 58 58 59 allOf: 59 allOf: 60 - if: 60 - if: 61 properties: 61 properties: 62 $nodename: 62 $nodename: 63 not: 63 not: 64 contains: 64 contains: 65 pattern: "^partition@[0-9a-f]+$" 65 pattern: "^partition@[0-9a-f]+$" 66 then: 66 then: 67 properties: 67 properties: 68 reg: false 68 reg: false 69 69 70 additionalProperties: false 70 additionalProperties: false 71 71 72 examples: 72 examples: 73 - | 73 - | 74 partitions { 74 partitions { 75 compatible = "fixed-partitions"; 75 compatible = "fixed-partitions"; 76 #address-cells = <1>; 76 #address-cells = <1>; 77 #size-cells = <1>; 77 #size-cells = <1>; 78 78 79 partition@0 { 79 partition@0 { 80 reg = <0x0 0x40000>; 80 reg = <0x0 0x40000>; 81 label = "u-boot"; 81 label = "u-boot"; 82 read-only; 82 read-only; 83 }; 83 }; 84 84 85 env: partition@40000 { 85 env: partition@40000 { 86 compatible = "u-boot,env"; 86 compatible = "u-boot,env"; 87 reg = <0x40000 0x10000>; 87 reg = <0x40000 0x10000>; 88 88 89 mac: ethaddr { 89 mac: ethaddr { 90 #nvmem-cell-cells = <1>; 90 #nvmem-cell-cells = <1>; 91 }; 91 }; 92 }; 92 }; 93 }; 93 }; 94 - | 94 - | 95 partitions { 95 partitions { 96 compatible = "fixed-partitions"; 96 compatible = "fixed-partitions"; 97 #address-cells = <1>; 97 #address-cells = <1>; 98 #size-cells = <1>; 98 #size-cells = <1>; 99 99 100 partition@0 { 100 partition@0 { 101 reg = <0x0 0x100000>; 101 reg = <0x0 0x100000>; 102 compatible = "brcm,u-boot"; 102 compatible = "brcm,u-boot"; 103 label = "u-boot"; 103 label = "u-boot"; 104 104 105 partition-u-boot-env { 105 partition-u-boot-env { 106 compatible = "brcm,env"; 106 compatible = "brcm,env"; 107 107 108 ethaddr { 108 ethaddr { 109 }; 109 }; 110 }; 110 }; 111 }; 111 }; 112 }; 112 }; 113 - | 113 - | 114 partition@0 { 114 partition@0 { 115 reg = <0x0 0x100000>; 115 reg = <0x0 0x100000>; 116 label = "ubi"; 116 label = "ubi"; 117 compatible = "linux,ubi"; 117 compatible = "linux,ubi"; 118 118 119 volumes { 119 volumes { 120 ubi-volume-u-boot-env { 120 ubi-volume-u-boot-env { 121 volname = "env"; 121 volname = "env"; 122 122 123 nvmem-layout { 123 nvmem-layout { 124 compatible = "u-boot,env"; 124 compatible = "u-boot,env"; 125 125 126 ethaddr { 126 ethaddr { 127 #nvmem-cell-cells = <1 127 #nvmem-cell-cells = <1>; 128 }; 128 }; 129 }; 129 }; 130 }; 130 }; 131 }; 131 }; 132 }; 132 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.