summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sandbox/dts/sandbox-state-example.dtsi50
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/sandbox/dts/sandbox-state-example.dtsi b/arch/sandbox/dts/sandbox-state-example.dtsi
new file mode 100644
index 0000000000..fc17bd0788
--- /dev/null
+++ b/arch/sandbox/dts/sandbox-state-example.dtsi
@@ -0,0 +1,50 @@
+/ {
+ aliases {
+ state = &state;
+ };
+
+ disk {
+ compatible = "barebox,hostfile";
+ barebox,filename = "disk";
+ reg = <0x0 0x0 0x100000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ hostfile_state: state@0 {
+ reg = <0x0 0x1000>;
+ label = "state";
+ };
+ };
+ };
+
+ state: state {
+ magic = <0xaa3b86a6>;
+ compatible = "barebox,state";
+ backend-type = "raw";
+ backend = <&hostfile_state>;
+ backend-storage-type = "direct";
+ backend-stridesize = <64>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ vars {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ x {
+ reg = <0x0 0x4>;
+ type = "uint32";
+ default = <1>;
+ };
+
+ y {
+ reg = <0x4 0x4>;
+ type = "uint32";
+ default = <3>;
+ };
+ };
+ };
+};