Skip to contentSkip to conversation

mci: imx: Add imx6sx compatible

PATCH Applied Christian Hemp 2 participants 3 messages Dec 13, 2016 – Jan 9, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mci: imx: Add imx6sx compatible

To let the driver probe on i.MX6SX and i.MX6UL.

---
 drivers/mci/imx-esdhc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mci/imx-esdhc.c +2 -0
index 262a904..41f0562 100644
@@ -648,6 +648,8 @@ static __maybe_unused struct of_device_id fsl_esdhc_compatible[] = {
 	}, {
 		.compatible = "fsl,imx6sl-usdhc",
 	}, {
+		.compatible = "fsl,imx6sx-usdhc",
+	}, {
 		/* sentinel */
 	}
 };
Signature · 7 lines
1.9.1


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

PATCH 2/2 ARCH: ARM: Add support for phytec-phycore-imx6ul

Add support for the phycore i.MX6 UltraLite.
- 512MB RAM
- 512MB NAND
- 10/100 Mbit Ethernet

---
 arch/arm/boards/phytec-som-imx6/Makefile           |   1 +
 arch/arm/boards/phytec-som-imx6/board.c            |  60 +++++++
 .../defaultenv-physom-imx6ul-phycore/boot/nand     |   8 +
 .../init/automount                                 |   9 +
 .../flash-header-phytec-pcl063-512mb.imxcfg        |   9 +
 .../phytec-som-imx6/flash-header-phytec-pcl063.h   |  70 ++++++++
 arch/arm/boards/phytec-som-imx6/lowlevel.c         |  21 ++-
 arch/arm/dts/Makefile                              |   3 +-
 arch/arm/dts/imx6ul-phytec-phycore-som.dts         | 185 +++++++++++++++++++++
 arch/arm/mach-imx/Kconfig                          |   1 +
 images/Makefile.imx                                |   5 +
 11 files changed, 367 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6ul-phycore/boot/nand
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6ul-phycore/init/automount
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063.h
 create mode 100644 arch/arm/dts/imx6ul-phytec-phycore-som.dts
arch/arm/boards/phytec-som-imx6/Makefile +1 -0
index 2f9c4a8..73456ae 100644
@@ -2,3 +2,4 @@ obj-y += board.o
 lwl-y += lowlevel.o
 bbenv-y += defaultenv-physom-imx6
 bbenv-y += defaultenv-physom-imx6-phycore
+bbenv-y += defaultenv-physom-imx6ul-phycore
arch/arm/boards/phytec-som-imx6/board.c +60 -0

84 lines not on this page · raw message

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6ul-phycore/boot/nand new file +8 -0
new file mode 100644
index 0000000..6ec0d44
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+
+global.bootm.image="/dev/nand0.root.ubi.kernel"
+global.bootm.oftree="/dev/nand0.root.ubi.oftree"
+
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs rw"
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6ul-phycore/init/automount new file +9 -0
new file mode 100644
index 0000000..71d9086
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# automount tftp server based on $eth0.serverip
+
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
+
+mkdir -p /mnt/mmc
+automount -d /mnt/mmc 'mmc0.probe=1 && [ -e /dev/mmc0.0 ] && mount /dev/mmc0.0 /mnt/mmc'
arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg new file +9 -0
new file mode 100644
index 0000000..c4122d2
@@ -0,0 +1,9 @@
+
+#define SETUP_MDCFG0			\
+	wm 32 0x021B000C 0x676B52F3
+
+#define SETUP_MDASP_MDCTL		\
+	wm 32 0x021B0040 0x0000004F;	\
+	wm 32 0x021B0000 0x84180000
+
+#include "flash-header-phytec-pcl063.h"
arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063.h new file +70 -0

70 lines not on this page · raw message

arch/arm/boards/phytec-som-imx6/lowlevel.c +17 -4
index c732d32..3ab88f4 100644
@@ -51,17 +51,28 @@ static void __noreturn start_imx6_phytec_common(uint32_t size,
 						bool do_early_uart_config,
 						void *fdt_blob_fixed_offset)
 {
+	int cpu_type = __imx6_cpu_type();
 	void *fdt;
 
-	imx6_cpu_lowlevel_init();
-
-	arm_setup_stack(0x00920000 - 8);
+	if (cpu_type == IMX6_CPUTYPE_IMX6UL) {
+		arm_cpu_lowlevel_init();
+		/* OCRAM Free Area is 0x00907000 to 0x00918000 (68KB) */
+		arm_setup_stack(0x00910000 - 8);
+	} else {
+		imx6_cpu_lowlevel_init();
+		/* OCRAM Free Area is 0x00907000 to 0x00938000 (196KB) */
+		arm_setup_stack(0x00920000 - 8);
+	}
 
 	if (do_early_uart_config && IS_ENABLED(CONFIG_DEBUG_LL))
 		setup_uart();
 
 	fdt = fdt_blob_fixed_offset - get_runtime_offset();
-	barebox_arm_entry(0x10000000, size, fdt);
+
+	if (cpu_type == IMX6_CPUTYPE_IMX6UL)
+		barebox_arm_entry(0x80000000, size, fdt);
+	else
+		barebox_arm_entry(0x10000000, size, fdt);
 }
 
 #define PHYTEC_ENTRY(name, fdt_name, memory_size, do_early_uart_config)	\
@@ -98,3 +109,5 @@ PHYTEC_ENTRY(start_phytec_phycore_imx6dl_som_emmc_1gib, imx6dl_phytec_phycore_so
 PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_nand_1gib, imx6q_phytec_phycore_som_nand, SZ_1G, true);
 PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_emmc_1gib, imx6q_phytec_phycore_som_emmc, SZ_1G, true);
 PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_emmc_2gib, imx6q_phytec_phycore_som_emmc, SZ_2G, true);
+
+PHYTEC_ENTRY(start_phytec_phycore_imx6ul_som_512mb, imx6ul_phytec_phycore_som, SZ_512M, false);
arch/arm/dts/Makefile +2 -1
index 607c620..8ba9957 100644
@@ -51,7 +51,8 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \
 				imx6q-phytec-phycore-som-nand.dtb.o \
 				imx6q-phytec-phycore-som-emmc.dtb.o \
 				imx6dl-phytec-phycore-som-nand.dtb.o \
-				imx6dl-phytec-phycore-som-emmc.dtb.o
+				imx6dl-phytec-phycore-som-emmc.dtb.o \
+				imx6ul-phytec-phycore-som.dtb.o
 pbl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += armada-xp-openblocks-ax3-4-bb.dtb.o
 pbl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += kirkwood-openblocks_a6-bb.dtb.o
 pbl-dtb-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o
arch/arm/dts/imx6ul-phytec-phycore-som.dts new file +185 -0

185 lines not on this page · raw message

arch/arm/mach-imx/Kconfig +1 -0
index 28ac9f4..be89a3a 100644
@@ -258,6 +258,7 @@ config MACH_FREESCALE_MX53_VMX53
 config MACH_PHYTEC_SOM_IMX6
         bool "Phytec phyCARD-i.MX6 and phyFLEX-i.MX6"
         select ARCH_IMX6
+	select ARCH_IMX6UL
 
 config MACH_DFI_FS700_M60
 	bool "DFI i.MX6 FS700 M60 Q7 Board"
images/Makefile.imx +5 -0
index 983d896..3b911ec 100644
@@ -394,6 +394,11 @@ CFG_start_phytec_phycore_imx6dl_som_emmc_1gib.pblx.imximg = $(board)/phytec-som-
 FILE_barebox-phytec-phycore-imx6dl-som-emmc-1gib.img = start_phytec_phycore_imx6dl_som_emmc_1gib.pblx.imximg
 image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6dl-som-emmc-1gib.img
 
+pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ul_som_512mb
+CFG_start_phytec_phycore_imx6ul_som_512mb.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg
+FILE_barebox-phytec-phycore-imx6ul-512mb.img = start_phytec_phycore_imx6ul_som_512mb.pblx.imximg
+image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6ul-512mb.img
+
 pblx-$(CONFIG_MACH_GW_VENTANA) += start_imx6q_gw54xx_1gx64
 CFG_start_imx6q_gw54xx_1gx64.pblx.imximg = $(board)/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
 FILE_barebox-gateworks-imx6q-ventana-1gx64.img = start_imx6q_gw54xx_1gx64.pblx.imximg
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#2 lore raw
In reply to Christian Hemp
Quoted 6 lines · Christian Hemp

To let the driver probe on i.MX6SX and i.MX6UL.

---
 drivers/mci/imx-esdhc.c | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks

Sascha

Quoted 23 lines
drivers/mci/imx-esdhc.c +2 -0
index 262a904..41f0562 100644
@@ -648,6 +648,8 @@ static __maybe_unused struct of_device_id fsl_esdhc_compatible[] = {
 	}, {
 		.compatible = "fsl,imx6sl-usdhc",
 	}, {
+		.compatible = "fsl,imx6sx-usdhc",
+	}, {
 		/* sentinel */
 	}
 };
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
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