diff --git a/arch/arm/dts/stm32mp157c-odyssey.dts b/arch/arm/dts/stm32mp157c-odyssey.dts index 0e395bd..8b57044 100644 --- a/arch/arm/dts/stm32mp157c-odyssey.dts +++ b/arch/arm/dts/stm32mp157c-odyssey.dts @@ -7,6 +7,10 @@ #include "stm32mp151.dtsi" / { + aliases { + state = &state; + }; + chosen { environment-sd { compatible = "barebox,environment"; @@ -19,6 +23,70 @@ device-path = &sdmmc2, "partname:barebox-environment"; status = "disabled"; }; + + state: state { + magic = <0x12222013>; + compatible = "barebox,state"; + backend-type = "raw"; + backend = <&state_mmc>; + backend-stridesize = <1024>; + #address-cells = <1>; + #size-cells = <1>; + + bootstate { + #address-cells = <1>; + #size-cells = <1>; + + system0 { + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts { + reg = <0x0 0x4>; + type = "uint32"; + default = <3>; + }; + priority { + reg = <0x4 0x4>; + type = "uint32"; + default = <21>; + }; + }; + system1 { + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts { + reg = <0x10 0x4>; + type = "uint32"; + default = <3>; + }; + priority { + reg = <0x14 0x4>; + type = "uint32"; + default = <20>; + }; + }; + }; + last_chosen { + reg = <0x20 0x4>; + type = "uint32"; + }; + }; + }; +}; + +&sdmmc2 { + + partitions { + compatible = "fixed-partitions"; + #size-cells = <1>; + #address-cells = <1>; + + state_mmc: partition@14400 { + label = "state"; + reg = <0x14400 0x30000>; + }; }; };