Skip to contentSkip to conversation

ZII RPU2 i.MX7D board support

PATCH Superseded Andrey Smirnov 2 participants 9 messages Sep 26, 2018 – Oct 4, 2018

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#7 lore raw

PATCH 5/6 ARM: i.MX7: bbu: Add I2C and SPI handler

In reply to Andrey Smirnov
---
 arch/arm/mach-imx/imx-bbu-internal.c |  6 ++++++
 arch/arm/mach-imx/include/mach/bbu.h | 10 ++++++++++
 2 files changed, 16 insertions(+)
arch/arm/mach-imx/imx-bbu-internal.c +6 -0
index 77e0b86bc..5f85b13dc 100644
@@ -649,6 +649,12 @@ int vf610_bbu_internal_spi_i2c_register_handler(const char *name,
 						unsigned long flags)
 	__alias(imx6_bbu_internal_spi_i2c_register_handler);
 
+
+int imx7_bbu_internal_spi_i2c_register_handler(const char *name,
+						const char *devicefile,
+						unsigned long flags)
+	__alias(imx6_bbu_internal_spi_i2c_register_handler);
+
 int imx_bbu_external_nor_register_handler(const char *name,
 					  const char *devicefile,
 					  unsigned long flags)
arch/arm/mach-imx/include/mach/bbu.h +10 -0
index 1174c21d2..c8223c840 100644
@@ -71,6 +71,9 @@ int vf610_bbu_internal_mmc_register_handler(const char *name, const char *device
 int vf610_bbu_internal_spi_i2c_register_handler(const char *name, const char *devicefile,
 						unsigned long flags);
 
+int imx7_bbu_internal_spi_i2c_register_handler(const char *name, const char *devicefile,
+					       unsigned long flags);
+
 int imx8mq_bbu_internal_mmc_register_handler(const char *name, const char *devicefile,
 					     unsigned long flags);
 
@@ -175,6 +178,13 @@ vf610_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
 	return -ENOSYS;
 }
 
+static inline int
+imx7_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
+					   unsigned long flags)
+{
+	return -ENOSYS;
+}
+
 #endif
 
 #if defined(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND)
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/6 i.MX7D: DCD: Create shared DDR configuration header

In reply to Andrey Smirnov

Create a shared DDR configuration header based on configuration used by i.MX7D SabreSD board.

---
 .../flash-header-mx7-sabresd.imxcfg           | 79 +------------------
 .../flash-header/imx7d-ddr-default.imxcfg     | 78 ++++++++++++++++++
 2 files changed, 79 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg
arch/arm/boards/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg +1 -78
index 83ed2dc06..f4d7925bd 100644
@@ -1,82 +1,5 @@
-/*
- * Copyright (C) 2016 NXP Semiconductors
- *
- * SPDX-License-Identifier:	GPL-2.0
- *
- * Refer docs/README.imxmage for more details about how-to configure
- * and create imximage boot image
- *
- * The syntax is taken as close as possible with the kwbimage
- *
- * Taken from upstream U-Boot git://git.denx.de/u-boot.git, commit
- * 1a8150d4b16fbafa6f1d207ddb85eda7dc399e2d
- */
-
 soc imx7
 loadaddr 0x80000000
 dcdofs 0x400
 
-#include <mach/imx7-ddr-regs.h>
-
-wm 32 0x30340004 0x4F400005
-
-wm 32 0x30391000 0x00000002
-
-wm 32 MX7_DDRC_MSTR 0x01040001
-wm 32 MX7_DDRC_DFIUPD0 0x80400003
-wm 32 MX7_DDRC_DFIUPD1 0x00100020
-wm 32 MX7_DDRC_DFIUPD2 0x80100004
-wm 32 MX7_DDRC_RFSHTMG 0x00400046
-wm 32 MX7_DDRC_MP_PCTRL_0 0x00000001
-wm 32 MX7_DDRC_INIT0 0x00020083
-wm 32 MX7_DDRC_INIT1 0x00690000
-wm 32 MX7_DDRC_INIT3 0x09300004
-wm 32 MX7_DDRC_INIT4 0x04080000
-wm 32 MX7_DDRC_INIT5 0x00100004
-wm 32 MX7_DDRC_RANKCTL 0x0000033f
-wm 32 MX7_DDRC_DRAMTMG0 0x09081109
-wm 32 MX7_DDRC_DRAMTMG1 0x0007020d
-wm 32 MX7_DDRC_DRAMTMG2 0x03040407
-wm 32 MX7_DDRC_DRAMTMG3 0x00002006
-wm 32 MX7_DDRC_DRAMTMG4 0x04020205
-wm 32 MX7_DDRC_DRAMTMG5 0x03030202
-wm 32 MX7_DDRC_DRAMTMG8 0x00000803
-wm 32 MX7_DDRC_ZQCTL0 0x00800020
-wm 32 MX7_DDRC_ZQCTL1 0x02000100
-wm 32 MX7_DDRC_DFITMG0 0x02098204
-wm 32 MX7_DDRC_DFITMG1 0x00030303
-wm 32 MX7_DDRC_ADDRMAP0 0x00000016
-wm 32 MX7_DDRC_ADDRMAP1 0x00171717
-wm 32 MX7_DDRC_ADDRMAP5 0x04040404
-wm 32 MX7_DDRC_ADDRMAP6 0x0f040404
-wm 32 MX7_DDRC_ODTCFG 0x06000604
-wm 32 MX7_DDRC_ODTMAP 0x00000001
-
-wm 32 0x30391000 0x00000000
-
-wm 32 MX7_DDR_PHY_PHY_CON0 0x17420f40
-wm 32 MX7_DDR_PHY_PHY_CON1 0x10210100
-wm 32 MX7_DDR_PHY_PHY_CON4 0x00060807
-wm 32 MX7_DDR_PHY_MDLL_CON0 0x1010007e
-wm 32 MX7_DDR_PHY_DRVDS_CON0 0x00000d6e
-wm 32 MX7_DDR_PHY_OFFSET_RD_CON0 0x08080808
-wm 32 MX7_DDR_PHY_OFFSET_WR_CON0 0x08080808
-wm 32 MX7_DDR_PHY_CMD_SDLL_CON0 0x01000010
-wm 32 MX7_DDR_PHY_CMD_SDLL_CON0 0x00000010
-
-wm 32 MX7_DDR_PHY_ZQ_CON0 0x0e407304
-wm 32 MX7_DDR_PHY_ZQ_CON0 0x0e447304
-wm 32 MX7_DDR_PHY_ZQ_CON0 0x0e447306
-
-check 32 until_any_bit_set MX7_DDR_PHY_ZQ_CON1 0x1
-
-wm 32 MX7_DDR_PHY_ZQ_CON0 0x0e447304
-wm 32 MX7_DDR_PHY_ZQ_CON0 0x0e407304
-
-wm 32 0x30384130 0x00000000
-wm 32 0x30340020 0x00000178
-wm 32 0x30384130 0x00000002
-
-wm 32 MX7_DDR_PHY_LP_CON0 0x0000000f
-
-check 32 until_any_bit_set MX7_DDRC_STAT 0x1
+#include <mach/flash-header/imx7d-ddr-default.imxcfg>
\ No newline at end of file
arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg new file +78 -0

78 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#0 lore raw

cover ZII RPU2 i.MX7D board support

Everyone:

This series is a number of small patches I developed while adding support for ZII's RPU2 board. Hopefully all of them are self-explanatory.

Feedback is welcome!

Thanks,
Andrey Smirnov

Andrey Smirnov (6):
ARM: i.MX: esdctl: Add memory size detection for i.MX7D
ARM: freescale-mx7-sabresd: Make used of imx7d_barebox_entry() i.MX7D: DCD: Create shared DDR configuration header
ARM: i.MX7: bbu: Add MMC boot handler
ARM: i.MX7: bbu: Add I2C and SPI handler
i.MX: Add support for ZII's i.MX7D-based RPU2 board

 arch/arm/boards/Makefile                      |   1 +
 .../flash-header-mx7-sabresd.imxcfg           |  79 +--
 .../boards/freescale-mx7-sabresd/lowlevel.c   |   7 +-
 arch/arm/boards/zii-imx7d-rpu2/Makefile       |   2 +
 arch/arm/boards/zii-imx7d-rpu2/board.c        |  49 ++
 .../flash-header-zii-imx7d-rpu2.imxcfg        |   6 +
 arch/arm/boards/zii-imx7d-rpu2/lowlevel.c     |  50 ++
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx7d-ddrc.dtsi                  |  15 +
 arch/arm/dts/imx7d-zii-rpu2.dts               | 613 ++++++++++++++++++
 arch/arm/mach-imx/Kconfig                     |   4 +
 arch/arm/mach-imx/esdctl.c                    |  61 ++
 arch/arm/mach-imx/imx-bbu-internal.c          |  11 +
 arch/arm/mach-imx/include/mach/bbu.h          |  20 +
 arch/arm/mach-imx/include/mach/esdctl.h       |   1 +
 .../flash-header/imx7d-ddr-default.imxcfg     |  78 +++
 arch/arm/mach-imx/include/mach/imx7-regs.h    |   2 +
 images/Makefile.imx                           |   5 +
 18 files changed, 923 insertions(+), 83 deletions(-)
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/Makefile
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/board.c
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/lowlevel.c
 create mode 100644 arch/arm/dts/imx7d-ddrc.dtsi
 create mode 100644 arch/arm/dts/imx7d-zii-rpu2.dts
 create mode 100644 arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/6 ARM: freescale-mx7-sabresd: Make used of imx7d_barebox_entry()

---
 arch/arm/boards/freescale-mx7-sabresd/lowlevel.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
arch/arm/boards/freescale-mx7-sabresd/lowlevel.c +2 -5
index 43aa61075..f718ea73b 100644
@@ -9,6 +9,7 @@
 #include <mach/iomux-mx7.h>
 #include <mach/debug_ll.h>
 #include <asm/cache.h>
+#include <mach/esdctl.h>
 
 extern char __dtb_imx7d_sdb_start[];
 
@@ -33,14 +34,10 @@ static inline void setup_uart(void)
 
 ENTRY_FUNCTION(start_imx7d_sabresd, r0, r1, r2)
 {
-	void *fdt;
-
 	imx7_cpu_lowlevel_init();
 
 	if (IS_ENABLED(CONFIG_DEBUG_LL))
 		setup_uart();
 
-	fdt = __dtb_imx7d_sdb_start + get_runtime_offset();
-
-	barebox_arm_entry(0x80000000, SZ_1G, fdt);
+	imx7d_barebox_entry(__dtb_imx7d_sdb_start + get_runtime_offset());
 }
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 4/6 ARM: i.MX7: bbu: Add MMC boot handler

In reply to Andrey Smirnov
---
 arch/arm/mach-imx/imx-bbu-internal.c |  5 +++++
 arch/arm/mach-imx/include/mach/bbu.h | 10 ++++++++++
 2 files changed, 15 insertions(+)
arch/arm/mach-imx/imx-bbu-internal.c +5 -0
index 799b97361..77e0b86bc 100644
@@ -624,6 +624,11 @@ int vf610_bbu_internal_mmcboot_register_handler(const char *name,
 						unsigned long flags)
 	__alias(imx_bbu_internal_mmcboot_register_handler);
 
+int imx7_bbu_internal_mmcboot_register_handler(const char *name,
+						const char *devicefile,
+						unsigned long flags)
+	__alias(imx_bbu_internal_mmcboot_register_handler);
+
 /*
  * Register an i.MX53 internal boot update handler for i2c/spi
  * EEPROMs / flashes. Nearly the same as MMC/SD, but we do not need to
arch/arm/mach-imx/include/mach/bbu.h +10 -0
index bc1fc4ba6..1174c21d2 100644
@@ -59,6 +59,9 @@ int imx51_bbu_internal_mmcboot_register_handler(const char *name, const char *de
 int vf610_bbu_internal_mmcboot_register_handler(const char *name, const char *devicefile,
 						unsigned long flags);
 
+int imx7_bbu_internal_mmcboot_register_handler(const char *name, const char *devicefile,
+						unsigned long flags);
+
 int imx6_bbu_internal_spi_i2c_register_handler(const char *name, const char *devicefile,
 		unsigned long flags);
 
@@ -134,6 +137,13 @@ static inline int vf610_bbu_internal_mmcboot_register_handler(const char *name,
 	return -ENOSYS;
 }
 
+static inline int imx7_bbu_internal_mmcboot_register_handler(const char *name,
+							     const char *devicefile,
+							     unsigned long flags)
+{
+	return -ENOSYS;
+}
+
 static inline int imx6_bbu_internal_spi_i2c_register_handler(const char *name, const char *devicefile,
 		unsigned long flags)
 {
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/6 ARM: i.MX: esdctl: Add memory size detection for i.MX7D

In reply to Andrey Smirnov
---
 arch/arm/dts/imx7d-ddrc.dtsi               | 15 ++++++
 arch/arm/mach-imx/esdctl.c                 | 61 ++++++++++++++++++++++
 arch/arm/mach-imx/include/mach/esdctl.h    |  1 +
 arch/arm/mach-imx/include/mach/imx7-regs.h |  2 +
 4 files changed, 79 insertions(+)
 create mode 100644 arch/arm/dts/imx7d-ddrc.dtsi
arch/arm/dts/imx7d-ddrc.dtsi new file +15 -0
new file mode 100644
index 000000000..b4cd597be
@@ -0,0 +1,15 @@
+/*
+ * Include file to switch board DTS form using hardcoded memory node
+ * to dynamic memory size detection based on DDR controller settings
+ */
+
+/ {
+	/delete-node/ memory;
+};
+
+&aips2 {
+	ddrc@307a0000 {
+		compatible = "fsl,imx7d-ddrc";
+		reg = <0x307a0000 0x10000>;
+	};
+};
\ No newline at end of file
arch/arm/mach-imx/esdctl.c +61 -0

94 lines not on this page · raw message

arch/arm/mach-imx/include/mach/esdctl.h +1 -0
index ff109aa10..bc6c73395 100644
@@ -140,6 +140,7 @@ void __noreturn imx6q_barebox_entry(void *boarddata);
 void __noreturn imx6ul_barebox_entry(void *boarddata);
 void __noreturn vf610_barebox_entry(void *boarddata);
 void __noreturn imx8mq_barebox_entry(void *boarddata);
+void __noreturn imx7d_barebox_entry(void *boarddata);
 void imx_esdctl_disable(void);
 #endif
 
arch/arm/mach-imx/include/mach/imx7-regs.h +2 -0
index 8625d0b61..21e2830b9 100644
@@ -116,4 +116,6 @@
 #define MX7_ENET1_BASE_ADDR		(MX7_AIPS3_BASE_ADDR + 0x3E0000)
 #define MX7_ENET2_BASE_ADDR		(MX7_AIPS3_BASE_ADDR + 0x3F0000)
 
+#define MX7_DDR_BASE_ADDR		0x80000000
+
 #endif /* __MACH_IMX7_REGS_H */
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 6/6 i.MX: Add support for ZII's i.MX7D-based RPU2 board

In reply to Andrey Smirnov
---
 arch/arm/boards/Makefile                      |   1 +
 arch/arm/boards/zii-imx7d-rpu2/Makefile       |   2 +
 arch/arm/boards/zii-imx7d-rpu2/board.c        |  49 ++
 .../flash-header-zii-imx7d-rpu2.imxcfg        |   6 +
 arch/arm/boards/zii-imx7d-rpu2/lowlevel.c     |  50 ++
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx7d-zii-rpu2.dts               | 613 ++++++++++++++++++
 arch/arm/mach-imx/Kconfig                     |   4 +
 images/Makefile.imx                           |   5 +
 9 files changed, 732 insertions(+)
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/Makefile
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/board.c
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg
 create mode 100644 arch/arm/boards/zii-imx7d-rpu2/lowlevel.c
 create mode 100644 arch/arm/dts/imx7d-zii-rpu2.dts
arch/arm/boards/Makefile +1 -0
index b9bf67f0a..b6766616a 100644
@@ -156,3 +156,4 @@ obj-$(CONFIG_MACH_ZII_RDU1)			+= zii-imx51-rdu1/
 obj-$(CONFIG_MACH_ZII_RDU2)			+= zii-imx6q-rdu2/
 obj-$(CONFIG_MACH_ZII_RDU3)			+= zii-imx8mq-rdu3/
 obj-$(CONFIG_MACH_ZII_VF610_DEV)		+= zii-vf610-dev/
+obj-$(CONFIG_MACH_ZII_IMX7D_RPU2)		+= zii-imx7d-rpu2/
arch/arm/boards/zii-imx7d-rpu2/Makefile new file +2 -0
new file mode 100644
index 000000000..01c7a259e
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
arch/arm/boards/zii-imx7d-rpu2/board.c new file +49 -0

49 lines not on this page · raw message

arch/arm/boards/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg new file +6 -0
new file mode 100644
index 000000000..bf31eaf60
@@ -0,0 +1,6 @@
+soc imx7
+loadaddr 0x80000000
+dcdofs 0x400
+
+#include <mach/flash-header/imx7d-ddr-default.imxcfg>
+
arch/arm/boards/zii-imx7d-rpu2/lowlevel.c new file +50 -0

50 lines not on this page · raw message

arch/arm/dts/Makefile +2 -0
index 2361e0d6f..f8ebb6ca5 100644
@@ -118,4 +118,6 @@ pbl-dtb-$(CONFIG_MACH_ZII_VF610_DEV) += \
 pbl-dtb-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o
 pbl-dtb-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek.dtb.o
 
+pbl-dtb-$(CONFIG_MACH_ZII_IMX7D_RPU2) += imx7d-zii-rpu2.dtb.o
+
 clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
arch/arm/dts/imx7d-zii-rpu2.dts new file +613 -0

613 lines not on this page · raw message

arch/arm/mach-imx/Kconfig +4 -0
index 535c08e47..4a56fb9f4 100644
@@ -435,6 +435,10 @@ config MACH_ZII_VF610_DEV
 	select ARCH_VF610
 	select CLKDEV_LOOKUP
 
+config MACH_ZII_IMX7D_RPU2
+	bool "ZII i.MX7D RPU2"
+	select ARCH_IMX7
+
 config MACH_PHYTEC_PHYCORE_IMX7
 	bool "Phytec phyCORE i.MX7"
 	select ARCH_IMX7
images/Makefile.imx +5 -0
index eb3ed492e..e91976996 100644
@@ -532,6 +532,11 @@ CFG_start_imx7d_sabresd.pblx.imximg = $(board)/freescale-mx7-sabresd/flash-heade
 FILE_barebox-freescale-mx7-sabresd.img = start_imx7d_sabresd.pblx.imximg
 image-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += barebox-freescale-mx7-sabresd.img
 
+pblx-$(CONFIG_MACH_ZII_IMX7D_RPU2) += start_zii_imx7d_rpu2
+CFG_start_zii_imx7d_rpu2.pblx.imximg = $(board)/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg
+FILE_barebox-zii-imx7d-rpu2.img = start_zii_imx7d_rpu2.pblx.imximg
+image-$(CONFIG_MACH_ZII_IMX7D_RPU2) += barebox-zii-imx7d-rpu2.img
+
 # ----------------------- i.MX8mq based boards --------------------------
 pblx-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk
 CFG_start_nxp_imx8mq_evk.imx-sram-img = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#4 lore raw

Re: [PATCH 3/6] i.MX7D: DCD: Create shared DDR configuration header

In reply to Andrey Smirnov
Quoted 27 lines · Andrey Smirnov

Create a shared DDR configuration header based on configuration used by i.MX7D SabreSD board.

---
 .../flash-header-mx7-sabresd.imxcfg           | 79 +------------------
 .../flash-header/imx7d-ddr-default.imxcfg     | 78 ++++++++++++++++++
 2 files changed, 79 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg
arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg new file +11 -0
new file mode 100644
index 000000000..e98f055ee
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2016 NXP Semiconductors
+ *
+ * SPDX-License-Identifier:	GPL-2.0
+ *
+ * Refer docs/README.imxmage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ *
+ * Taken from upstream U-Boot git://git.denx.de/u-boot.git, commit

arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg line 21

Quoted 10 lines
arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg new file +10 -0
+ * 1a8150d4b16fbafa6f1d207ddb85eda7dc399e2d
+ */
+
+#include <mach/imx7-ddr-regs.h>
+
+wm 32 0x30340004 0x4F400005
+
+wm 32 0x30391000 0x00000002
+
+wm 32 MX7_DDRC_MSTR 0x01040001

How default is this default header? It looks like it only works for the exact DDR type and size like used on the i.MX7D SabreSD board. Many boards are more or less copied from the eval boards, so having a common DDR setup header is a good thing, but calling this "default" sounds a bit strong. How about replacing "default" with "sabresd"?

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re: [PATCH 3/6] i.MX7D: DCD: Create shared DDR configuration header

Quoted 37 lines · Sascha Hauer
Quoted 35 lines · Andrey Smirnov

Create a shared DDR configuration header based on configuration used by i.MX7D SabreSD board.

---
 .../flash-header-mx7-sabresd.imxcfg           | 79 +------------------
 .../flash-header/imx7d-ddr-default.imxcfg     | 78 ++++++++++++++++++
 2 files changed, 79 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg
arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg new file +19 -0
new file mode 100644
index 000000000..e98f055ee
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2016 NXP Semiconductors
+ *
+ * SPDX-License-Identifier:  GPL-2.0
+ *
+ * Refer docs/README.imxmage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ *
+ * Taken from upstream U-Boot git://git.denx.de/u-boot.git, commit
+ * 1a8150d4b16fbafa6f1d207ddb85eda7dc399e2d
+ */
+
+#include <mach/imx7-ddr-regs.h>
+
+wm 32 0x30340004 0x4F400005
+
+wm 32 0x30391000 0x00000002
Quoted 8 lines

arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg line 21

Quoted 2 lines
arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-default.imxcfg new file +2 -0
+
+wm 32 MX7_DDRC_MSTR 0x01040001

How default is this default header? It looks like it only works for the exact DDR type and size like used on the i.MX7D SabreSD board. Many boards are more or less copied from the eval boards, so having a common DDR setup header is a good thing, but calling this "default" sounds a bit strong. How about replacing "default" with "sabresd"?

Sounds good. Will do in v2.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox