aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-07-16 12:34:42 +0200
committerStefan Roese <sr@denx.de>2021-07-19 09:05:30 +0200
commita675eb14bd4a827c97afd8a44210aff81ee8095a (patch)
treea93f947a148ec404ea56b6271d64007974854d6c /arch/arm
parent92f36c8e74c19a7a84aca4dcea121eabc97b05f1 (diff)
downloadu-boot-a675eb14bd4a827c97afd8a44210aff81ee8095a.zip
u-boot-a675eb14bd4a827c97afd8a44210aff81ee8095a.tar.gz
u-boot-a675eb14bd4a827c97afd8a44210aff81ee8095a.tar.bz2
arm: mvebu: Espressobin: Enable 'mtd' command and define SPI NOR partitions
U-Boot now supports parsing SPI NOR partitions from Device Tree. So enable 'mtd' command support for Espressobin board and define partition layout in U-Boot Espressobin DTS file. Access to SPI NOR via 'sf' command is old method and 'mtd' command is now preferred variant. From include file remove '#define CONFIG_MTD_PARTITIONS' as this option is now defined and enabled in defconfig file. This change is required to fix compile error: CC arch/arm/lib/asm-offsets.s In file included from include/config.h:4, from include/common.h:16, from lib/asm-offsets.c:14: include/configs/mvebu_armada-37xx.h:63: warning: "CONFIG_MTD_PARTITIONS" redefined #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ In file included from ././include/linux/kconfig.h:4, from <command-line>: include/generated/autoconf.h:44: note: this is the location of the previous definition #define CONFIG_MTD_PARTITIONS 1 After enabling support for mtd command, output from 'mtd list' on Espressobin board is: => mtd list List of MTD devices: * w25q32dw - device: spi-flash@0 - parent: spi@10600 - driver: jedec_spi_nor - path: /soc/internal-regs/spi@10600/spi-flash@0 - type: NOR flash - block size: 0x1000 bytes - min I/O: 0x1 bytes - 0x000000000000-0x000000400000 : "w25q32dw" - 0x000000000000-0x0000003f0000 : "firmware" - 0x0000003f0000-0x000000400000 : "u-boot-env" => Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/dts/armada-3720-espressobin.dts18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index d86d8f0..cba6139 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -164,6 +164,24 @@
reg = <0>; /* Chip select 0 */
spi-max-frequency = <50000000>;
m25p,fast-read;
+
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@firmware {
+ reg = <0 CONFIG_ENV_OFFSET>;
+ label = "firmware";
+ };
+
+ partition@u-boot-env {
+ reg = <CONFIG_ENV_OFFSET CONFIG_ENV_SIZE>;
+ label = "u-boot-env";
+ };
+ };
+#endif
};
};