Skip to contentSkip to conversation

ARM: dts: Add Facebook BMC flash layout

PATCH Superseded Tao Ren 2 participants 5 messages Nov 6, 2018 – Nov 8, 2018 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Tao Ren

author
#0 lore raw

PATCH v2 1/2 ARM: dts: Add Facebook BMC flash layout

This is the layout used by Facebook BMC systems. It describes the fixed flash layout of a 32MB mtd device.

---
Changes since v1:
- adding facebook copyright.

 .../boot/dts/facebook-bmc-flash-layout.dtsi   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +33 -0
new file mode 100644
index 000000000000..94039d7b7de5
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2018 Facebook Inc.
+
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot at 0 {
+		reg = <0x0 0x60000>;
+		label = "u-boot";
+	};
+
+	u-boot-env at 60000 {
+		reg = <0x60000 0x20000>;
+		label = "env";
+	};
+
+	fit at 80000 {
+		reg = <0x80000 0x1b80000>;
+		label = "fit";
+	};
+
+	data0 at 1c00000 {
+		reg = <0x1c00000 0x400000>;
+		label = "data0";
+	};
+
+	flash0 at 0 {
+		reg = <0x0 0x2000000>;
+		label = "flash0";
+	};
+};
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/2 ARM: dts: Add Facebook BMC flash layout

Hi Tao,

Quoted 41 lines · Tao Ren

This is the layout used by Facebook BMC systems. It describes the fixed flash layout of a 32MB mtd device.

---
Changes since v1:
- adding facebook copyright.

 .../boot/dts/facebook-bmc-flash-layout.dtsi   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi
arch/ renamed from arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi +0 -0

arm/boot/dts/facebook-bmc-flash-layout.dtsi
new file mode 100644
index 000000000000..94039d7b7de5

arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +22 -0
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2018 Facebook Inc.
+
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot at 0 {
+		reg = <0x0 0x60000>;
+		label = "u-boot";
+	};
+
+	u-boot-env at 60000 {
+		reg = <0x60000 0x20000>;
+		label = "env";
+	};
+
+	fit at 80000 {
+		reg = <0x80000 0x1b80000>;
+		label = "fit";
+	};

arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi line 32

Quoted 10 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +10 -0
+
+	data0 at 1c00000 {
+		reg = <0x1c00000 0x400000>;
+		label = "data0";
+	};
+
+	flash0 at 0 {
+		reg = <0x0 0x2000000>;
+		label = "flash0";
+	};

Is this necessary? Isn't the same thing achieved with the /dev/mtd0 device?

Cheers,

Andrew

Quoted 4 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +1 -0
+};
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v2 1/2 ARM: dts: Add Facebook BMC flash layout

Quoted 23 lines · Andrew Jeffery
Quoted 23 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +23 -0
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot at 0 {
+		reg = <0x0 0x60000>;
+		label = "u-boot";
+	};
+
+	u-boot-env at 60000 {
+		reg = <0x60000 0x20000>;
+		label = "env";
+	};
+
+	fit at 80000 {
+		reg = <0x80000 0x1b80000>;
+		label = "fit";
+	};
+
+	data0 at 1c00000 {
+		reg = <0x1c00000 0x400000>;
+		label = "data0";
Quoted 8 lines

arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi line 32

Quoted 6 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +6 -0
+	};
+
+	flash0 at 0 {
+		reg = <0x0 0x2000000>;
+		label = "flash0";
+	};

Is this necessary? Isn't the same thing achieved with the /dev/mtd0 device?

Hi Andrew,

Thank you for the review! The new layout file is needed mainly because of "data0" partition: several facebook platforms use the partition as "persistent" storage.

As for "flash0", technically it's not needed (as you pointed out, /dev/mtd0 covers the entire flash if master_partition is enabled). It's still here to avoid breaking some legacy applications.

Thanks,
Tao Ren

#3 lore raw

PATCH v2 1/2 ARM: dts: Add Facebook BMC flash layout

Quoted 35 lines · Tao Ren
Quoted 23 lines · Andrew Jeffery
Quoted 23 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +23 -0
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot at 0 {
+		reg = <0x0 0x60000>;
+		label = "u-boot";
+	};
+
+	u-boot-env at 60000 {
+		reg = <0x60000 0x20000>;
+		label = "env";
+	};
+
+	fit at 80000 {
+		reg = <0x80000 0x1b80000>;
+		label = "fit";
+	};
+
+	data0 at 1c00000 {
+		reg = <0x1c00000 0x400000>;
+		label = "data0";
Quoted 8 lines

arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi line 32

Quoted 6 lines
arch/arm/boot/dts/facebook-bmc-flash-layout.dtsi new file +6 -0
+	};
+
+	flash0 at 0 {
+		reg = <0x0 0x2000000>;
+		label = "flash0";
+	};

Is this necessary? Isn't the same thing achieved with the /dev/mtd0 device?

Hi Andrew,

Quoted 7 lines

Thank you for the review! The new layout file is needed mainly because of "data0" partition: several facebook platforms use the partition as "persistent" storage.

As for "flash0", technically it's not needed (as you pointed out, /dev/ mtd0 covers the entire flash if master_partition is enabled). It's still here to avoid breaking some legacy applications.

This is what I expected. I think it might be worth adding a comment, given you are respinning the series to address my comments on the board devicetree patch.

Anyway, thanks for the clarification.

Andrew

author
#4 lore raw

PATCH v2 1/2 ARM: dts: Add Facebook BMC flash layout

Quoted 12 lines · Andrew Jeffery
Quoted 11 lines
Quoted 1 line

Is this necessary? Isn't the same thing achieved with the /dev/mtd0 device?

Hi Andrew,

Thank you for the review! The new layout file is needed mainly because of "data0" partition: several facebook platforms use the partition as "persistent" storage.

As for "flash0", technically it's not needed (as you pointed out, /dev/ mtd0 covers the entire flash if master_partition is enabled). It's still here to avoid breaking some legacy applications.

Quoted 7 lines

This is what I expected. I think it might be worth adding a comment, given you are respinning the series to address my comments on the board devicetree patch.

Anyway, thanks for the clarification.

Andrew

Sure Andrew. I will add some comments and send out 2 updated patches together (most likely sometime tomorrow).

Thanks,
Tao Ren