From f2c72e8b170f05390896fc845f28ca77dd8ee658 Mon Sep 17 00:00:00 2001 From: Xogium <contact@xogium.me> Date: Wed, 29 Jul 2020 23:41:35 +0200 Subject: [PATCH 1/4] dts: stm32mp157c-odyssey: add partitions and state framework support. --- arch/arm/dts/stm32mp157c-odyssey.dts | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/arch/arm/dts/stm32mp157c-odyssey.dts b/arch/arm/dts/stm32mp157c-odyssey.dts index 0e395bdec..8b570443b 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>; + }; }; }; -- 2.28.0