[PATCH] ARM: dts: state-example: fix use with Phytec phyFLEX i.MX6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The state-example.dtsi was added 5 years ago and while the binding is
still applicable, the imx6q-phytec-pbab01.dts device tree that it
extends when USE_STATE_EXAMPLE is defined has changed in a way that
breaks use of the state nodes.

Do the necessary to restore the examples to working order:

  - Reference the NOR partition inside of the fixed-partition container
    it's inside now

  - Resize the NAND, so the last 1M of the barebox 16M partition can
    be used for state. Also use the fixed-partition container that
    has been added in the meantime.

  - Use phandles or label-relative paths, so we get build errors
    if the path changes again in future

There's still a WARNING: state_nor: Failed to initialize desired amount
of buckets, only 2 of 3 succeeded, but that can be fixed separately.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
I don't know how to fix the warning. Setting backend-stridesize = <64>
didn't help. I've CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
---
 arch/arm/dts/state-example.dtsi | 41 +++++++++++++++++----------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/arch/arm/dts/state-example.dtsi b/arch/arm/dts/state-example.dtsi
index 490ee7840b24..4572168336ae 100644
--- a/arch/arm/dts/state-example.dtsi
+++ b/arch/arm/dts/state-example.dtsi
@@ -89,28 +89,29 @@ state_eeprom: state_eeprom {
 
 };
 
-&ecspi3 {
-	flash@0 {
-		backend_state_nor: partition@120000 {
-		};
+backend_state_nor: &{ecspi3/flash@0/partitions/partition@120000} {
+};
+
+/* Reduce barebox partition size from 16M to 15M */
+&{gpmi/partitions/partition@0} {
+	reg = <0x0 0xf00000>;
+};
+
+&{gpmi/partitions} {
+	backend_state_nand: partition@f00000 {
+		label = "barebox-state";
+		reg = <0xf00000 0x100000>;
 	};
 };
 
-&gpmi {
-	backend_state_nand: partition@500000 {
-	};
-};
-
-&i2c1 {
-	eeprom@50 {
-		partitions {
-			compatible = "fixed-partitions";
-			#size-cells = <1>;
-			#address-cells = <1>;
-			backend_state_eeprom: state@400 {
-				reg = <0x400 0x400>;
-				label = "state-eeprom";
-			};
+&som_eeprom { /* On I2C1 */
+	partitions {
+		compatible = "fixed-partitions";
+		#size-cells = <1>;
+		#address-cells = <1>;
+		backend_state_eeprom: state@400 {
+			reg = <0x400 0x400>;
+			label = "state-eeprom";
 		};
 	};
 };
@@ -125,4 +126,4 @@ backend_state_usdhc: state@0x80000 {
 			label = "state-sd";
 		};
 	};
-};
\ No newline at end of file
+};
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux