summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-06-03 22:20:00 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-07 09:04:44 +0200
commit9fdbd39f320a4dca62c2537dd3b62ed4030b3c38 (patch)
tree84f799dfd89833fe569b5ab97f61d4b84b68c411 /Documentation/devicetree
parent001b421ad9bb85b63e38d47aa21c7dfdcc0704cd (diff)
downloadbarebox-9fdbd39f320a4dca62c2537dd3b62ed4030b3c38.tar.gz
barebox-9fdbd39f320a4dca62c2537dd3b62ed4030b3c38.tar.xz
misc: Add a driver to expose U-Boot environment variable data
Add a driver to expose U-Boot environment variable data as a single mmap-able device, hiding various low-level details such as: * Preamble format differences * Read/write logic in presence of redundant partition Not very useful on its own, it is a crucial low-level plumbing needed by filesystem driver introduced in the following commit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst43
1 files changed, 43 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst b/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst
new file mode 100644
index 0000000000..da0ccd2c25
--- /dev/null
+++ b/Documentation/devicetree/bindings/barebox/barebox,uboot-environment.rst
@@ -0,0 +1,43 @@
+U-Boot environment device
+=========================
+
+This driver provides a unified device exposing U-Boot environment
+varaible data, sans the low-level parts. Resulting device is intended
+to be used with corresponding filesystem driver to expose environment
+data as a filesystem.
+
+Required properties:
+
+* ``compatible``: should be ``barebox,uboot-environment``
+* ``device-path``: phandle of the partition the device environment is
+ on (single partiton configuration)
+* ``device-path-0`` and ``device-path-1``: phandle of the partition
+ the environment is on (redundant configuration)
+
+Example:
+
+.. code-block:: none
+
+ environment {
+ compatible = "barebox,uboot-environment";
+ device-path-0 = &uboot_env_0;
+ device-path-1 = &uboot_env_1;
+ };
+
+ &usdhc4 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot_env_0: partition@c0000 {
+ label = "uboot-environment-0";
+ reg = <0xc0000 0x4000>;
+ };
+
+ uboot_env_1: partition@cc800 {
+ label = "uboot-environment-1";
+ reg = <0xcc800 0x4000>;
+ };
+ };
+ };