brintos

brintos / linux-shallow public Read only

0
0
Text · 3.1 KiB · 56a8f55 Raw
133 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: U-Boot environment variables layout8 9description: |10  U-Boot uses environment variables to store device parameters and11  configuration. They may be used for booting process, setup or keeping end user12  info.13 14  Data is stored using U-Boot specific formats (variant specific header and NUL15  separated key-value pairs).16 17  Environment data can be stored on various storage entities, e.g.:18  1. Raw flash partition19  2. UBI volume20 21  This binding allows marking storage device (as containing env data) and22  specifying used format.23 24  Variables can be defined as NVMEM device subnodes.25 26maintainers:27  - Rafał Miłecki <rafal@milecki.pl>28 29properties:30  compatible:31    oneOf:32      - description: A standalone env data block33        const: u-boot,env34      - description: Two redundant blocks with active one flagged35        const: u-boot,env-redundant-bool36      - description: Two redundant blocks with active having higher counter37        const: u-boot,env-redundant-count38      - description: Broadcom's variant with custom header39        const: brcm,env40 41  reg:42    description: Partition offset and size for env on top of MTD43    maxItems: 144 45  bootcmd:46    type: object47    description: Command to use for automatic booting48 49  ethaddr:50    type: object51    description: Ethernet interfaces base MAC address.52    additionalProperties: false53 54    properties:55      "#nvmem-cell-cells":56        description: The first argument is a MAC address offset.57        const: 158 59allOf:60  - if:61      properties:62        $nodename:63          not:64            contains:65              pattern: "^partition@[0-9a-f]+$"66    then:67      properties:68        reg: false69 70additionalProperties: false71 72examples:73  - |74    partitions {75        compatible = "fixed-partitions";76        #address-cells = <1>;77        #size-cells = <1>;78 79        partition@0 {80            reg = <0x0 0x40000>;81            label = "u-boot";82            read-only;83        };84 85        env: partition@40000 {86            compatible = "u-boot,env";87            reg = <0x40000 0x10000>;88 89            mac: ethaddr {90                #nvmem-cell-cells = <1>;91            };92        };93    };94  - |95    partitions {96        compatible = "fixed-partitions";97        #address-cells = <1>;98        #size-cells = <1>;99 100        partition@0 {101            reg = <0x0 0x100000>;102            compatible = "brcm,u-boot";103            label = "u-boot";104 105            partition-u-boot-env {106                compatible = "brcm,env";107 108                ethaddr {109                };110            };111        };112    };113  - |114    partition@0 {115        reg = <0x0 0x100000>;116        label = "ubi";117        compatible = "linux,ubi";118 119        volumes {120            ubi-volume-u-boot-env {121                volname = "env";122 123                nvmem-layout {124                    compatible = "u-boot,env";125 126                    ethaddr {127                        #nvmem-cell-cells = <1>;128                    };129                };130            };131        };132    };133