From 9637071114a4862b818c35c629c3fba578e01584 Mon Sep 17 00:00:00 2001 From: Yannis Damigos Date: Mon, 2 Sep 2024 15:14:29 +0300 Subject: [PATCH] odroid_go: Move flash partition table to a separate file Move flash partition table to a separate file Signed-off-by: Yannis Damigos --- .../odroid_go-flash_partition_table.dtsi | 39 ++++++++++++++++++ .../hardkernel/odroid_go/odroid_go_appcpu.dts | 41 +------------------ .../hardkernel/odroid_go/odroid_go_procpu.dts | 41 +------------------ 3 files changed, 41 insertions(+), 80 deletions(-) create mode 100644 boards/hardkernel/odroid_go/odroid_go-flash_partition_table.dtsi diff --git a/boards/hardkernel/odroid_go/odroid_go-flash_partition_table.dtsi b/boards/hardkernel/odroid_go/odroid_go-flash_partition_table.dtsi new file mode 100644 index 00000000000..bd0a69298c8 --- /dev/null +++ b/boards/hardkernel/odroid_go/odroid_go-flash_partition_table.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 Yannis Damigos + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&flash0 { + status = "okay"; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Reserve 60kB for the bootloader */ + boot_partition: partition@1000 { + label = "mcuboot"; + reg = <0x00001000 0x0000F000>; + read-only; + }; + + /* Reserve 2048kB for the application in slot 0 */ + slot0_partition: partition@10000 { + label = "image-0"; + reg = <0x00010000 0x00200000>; + }; + + /* Reserve 2048kB for the application in slot 1 */ + slot1_partition: partition@210000 { + label = "image-1"; + reg = <0x00210000 0x00200000>; + }; + + /* Reserve the remaining 12224kB for the storage partition */ + storage_partition: partition@410000 { + label = "storage"; + reg = <0x00410000 0x00BF0000>; + }; + }; +}; diff --git a/boards/hardkernel/odroid_go/odroid_go_appcpu.dts b/boards/hardkernel/odroid_go/odroid_go_appcpu.dts index 0b1ff7ddda0..656272a24e8 100644 --- a/boards/hardkernel/odroid_go/odroid_go_appcpu.dts +++ b/boards/hardkernel/odroid_go/odroid_go_appcpu.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include "odroid_go-flash_partition_table.dtsi" / { model = "ODROID-GO Game Kit APPCPU"; @@ -25,43 +26,3 @@ &trng0 { status = "okay"; }; - -&flash0 { - status = "okay"; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Reserve 60kB for the bootloader */ - boot_partition: partition@1000 { - label = "mcuboot"; - reg = <0x00001000 0x0000F000>; - read-only; - }; - - /* Reserve 2048kB for the application in slot 0 */ - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x00200000>; - }; - - /* Reserve 2048kB for the application in slot 1 */ - slot1_partition: partition@210000 { - label = "image-1"; - reg = <0x00210000 0x00200000>; - }; - - /* Reserve 64kB for the scratch partition */ - scratch_partition: partition@410000 { - label = "image-scratch"; - reg = <0x00410000 0x00010000>; - }; - - /* Reserve the remaining 12160kB for the storage partition */ - storage_partition: partition@420000 { - label = "storage"; - reg = <0x00420000 0x00BE0000>; - }; - }; -}; diff --git a/boards/hardkernel/odroid_go/odroid_go_procpu.dts b/boards/hardkernel/odroid_go/odroid_go_procpu.dts index a3cbe29bfa2..108e503cec4 100644 --- a/boards/hardkernel/odroid_go/odroid_go_procpu.dts +++ b/boards/hardkernel/odroid_go/odroid_go_procpu.dts @@ -7,6 +7,7 @@ #include #include "odroid_go-pinctrl.dtsi" +#include "odroid_go-flash_partition_table.dtsi" #include / { @@ -169,46 +170,6 @@ status = "okay"; }; -&flash0 { - status = "okay"; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Reserve 60kB for the bootloader */ - boot_partition: partition@1000 { - label = "mcuboot"; - reg = <0x00001000 0x0000F000>; - read-only; - }; - - /* Reserve 2048kB for the application in slot 0 */ - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x00200000>; - }; - - /* Reserve 2048kB for the application in slot 1 */ - slot1_partition: partition@210000 { - label = "image-1"; - reg = <0x00210000 0x00200000>; - }; - - /* Reserve 64kB for the scratch partition */ - scratch_partition: partition@410000 { - label = "image-scratch"; - reg = <0x00410000 0x00010000>; - }; - - /* Reserve the remaining 12160kB for the storage partition */ - storage_partition: partition@420000 { - label = "storage"; - reg = <0x00420000 0x00BE0000>; - }; - }; -}; - &esp32_bt_hci { status = "okay"; };