Skip to contentSkip to conversation

New Phytec i.MX6 Patches

PATCH In review Stefan Christ 4 participants 23 messages Apr 27, 2016 – May 3, 2016

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

PATCH 1/15 ARM: imx_v7_defconfig: enable NANDTEST command

In reply to Stefan Christ
---
 arch/arm/configs/imx_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/imx_v7_defconfig +1 -0
index 82b3821..044d826 100644
@@ -101,6 +101,7 @@ CONFIG_CMD_FLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
+CONFIG_CMD_NANDTEST=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_USBGADGET=y
Signature · 7 lines
1.9.1


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

PATCH 2/15 ARM: imx_v7_defconfig: add command mmc_extcsd

In reply to Stefan Christ

Enable the mmc_extcsd command to read and write MMC/eMMC registers.

---
 arch/arm/configs/imx_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/imx_v7_defconfig +1 -0
index 044d826..1b0739c 100644
@@ -54,6 +54,7 @@ CONFIG_CMD_IMD=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_MMC_EXTCSD=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
 CONFIG_CMD_BOOTM_VERBOSE=y
 CONFIG_CMD_BOOTM_INITRD=y
Signature · 7 lines
1.9.1


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

cover New Phytec i.MX6 Patches

Hi,

a new round of barebox patches for the i.MX6 Phytec boards. New variants, two fixes for phyBOARD-SUBRA/ALCOR and phyFLEX-i.MX6 and industrial/automotive RAM calibration values for phyCORE-i.MX6 Solo/DualLite.

These patches are based on the next branch and the current changes in patches

ARM: i.MX: increase barebox partition sizes
ARM: dts: Fix partition names

are already integrated.

Kind reagards,
Stefan Christ

Christian Hemp (1):
ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM

Jan Remmet (1):
imx6qdl-phytec-pfla02.dtsi: add i2c eeprom

Stefan Christ (13):
ARM: imx_v7_defconfig: enable NANDTEST command
ARM: imx_v7_defconfig: add command mmc_extcsd
ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad
ARM: dts: imx6: phyboards: reduce clock speed for usdhc3
ARM: dts: pfla02: use long enough reset for ethernet phy
ARM: phytec-som-imx6: add barebox partitions for MMC
ARM: phytec-som-imx6: add boot device emmc and automount
ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6
ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite
ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl
ARM: phytec-som-imx6: rename environment folder
ARM: phytec-som-imx6: adapt main update handler for eMMC
ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc

 arch/arm/boards/phytec-som-imx6/Makefile           |  2 +-
 arch/arm/boards/phytec-som-imx6/board.c            | 17 +++--
 .../defaultenv-physom-imx6-mira/init/automount     | 14 -----
 .../defaultenv-physom-imx6-phycore/boot/emmc       |  5 ++
 .../defaultenv-physom-imx6-phycore/init/automount  | 17 +++++
 .../defaultenv-physom-imx6-phycore/init/bootsource | 19 ++++++
 .../flash-header-phytec-pcm058-2gib.imxcfg         |  8 +++
 .../flash-header-phytec-pcm058dl-1gib.imxcfg       |  8 +++
 .../phytec-som-imx6/flash-header-phytec-pcm058dl.h | 24 ++++----
 arch/arm/boards/phytec-som-imx6/lowlevel.c         |  3 +
 arch/arm/configs/imx_v7_defconfig                  |  2 +
 arch/arm/dts/Makefile                              |  4 +-
 arch/arm/dts/imx6dl-phytec-phyboard-subra.dts      | 17 +----
 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts    | 72 ++++++++++++++++++++++
 arch/arm/dts/imx6q-phytec-phyboard-alcor.dts       |  1 +
 arch/arm/dts/imx6q-phytec-phyboard-subra.dts       | 20 ++++++
 arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts     | 21 +++++++
 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi            | 13 ++++
 arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi    | 30 +++++++++
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi       |  1 +
 images/Makefile.imx                                | 15 +++++
 21 files changed, 265 insertions(+), 48 deletions(-)
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
 create mode 100644 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
 create mode 100644 arch/arm/dts/imx6q-phytec-phyboard-subra.dts
 create mode 100644 arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
Signature · 7 lines
1.9.1


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

PATCH 3/15 ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad

Add support for phyBOARD-SUBRA-i.MX6 with phyFLEX-i.MX6 Quad 1GiB on one bank. This patch factors out the common device tree nodes for the Quad and Solo variant into 'imx6qdl-phytec-phyboard-subra.dtsi'.

---
 arch/arm/boards/phytec-som-imx6/lowlevel.c      |  1 +
 arch/arm/dts/Makefile                           |  1 +
 arch/arm/dts/imx6dl-phytec-phyboard-subra.dts   | 17 +--------------
 arch/arm/dts/imx6q-phytec-phyboard-subra.dts    | 20 +++++++++++++++++
 arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi | 29 +++++++++++++++++++++++++
 images/Makefile.imx                             |  5 +++++
 6 files changed, 57 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/dts/imx6q-phytec-phyboard-subra.dts
 create mode 100644 arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
arch/arm/boards/phytec-som-imx6/lowlevel.c +1 -0
index eb796e7..6506e5f 100644
@@ -91,6 +91,7 @@ PHYTEC_ENTRY(start_phytec_pbab01s_256mb_1bank, imx6s_phytec_pbab01, SZ_256M, fal
 PHYTEC_ENTRY(start_phytec_pbab01s_512mb_1bank, imx6s_phytec_pbab01, SZ_512M, false);
 PHYTEC_ENTRY(start_phytec_phyboard_alcor_1gib, imx6q_phytec_phyboard_alcor, SZ_1G, false);
 PHYTEC_ENTRY(start_phytec_phyboard_subra_512mb_1bank, imx6dl_phytec_phyboard_subra, SZ_512M, false);
+PHYTEC_ENTRY(start_phytec_phyboard_subra_1gib_1bank, imx6q_phytec_phyboard_subra, SZ_1G, false);
 
 PHYTEC_ENTRY(start_phytec_phycore_imx6dl_som_nand_256mb, imx6dl_phytec_phycore_som_nand, SZ_256M, true);
 PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_nand_1gib, imx6q_phytec_phycore_som_nand, SZ_1G, true);
arch/arm/dts/Makefile +1 -0
index b83c110..f3129c5 100644
@@ -45,6 +45,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \
 				imx6dl-phytec-pbab01.dtb.o \
 				imx6q-phytec-pbab01.dtb.o \
 				imx6q-phytec-phyboard-alcor.dtb.o \
+				imx6q-phytec-phyboard-subra.dtb.o \
 				imx6dl-phytec-phyboard-subra.dtb.o \
 				imx6q-phytec-phycore-som-nand.dtb.o \
 				imx6q-phytec-phycore-som-emmc.dtb.o \
arch/arm/dts/imx6dl-phytec-phyboard-subra.dts +1 -16
index 34e4144..3d1069a 100644
@@ -11,24 +11,9 @@
 
 /dts-v1/;
 #include "imx6s-phytec-pfla02.dtsi"
+#include "imx6qdl-phytec-phyboard-subra.dtsi"
 
 / {
 	model = "Phytec phyBOARD SUBRA";
 	compatible = "phytec,imx6dl-pbab05", "phytec,imx6s-pfla02", "fsl,imx6dl";
-
-	chosen {
-		stdout-path = &uart4;
-	};
-};
-
-&fec {
-	status = "okay";
-};
-
-&uart4 {
-	status = "okay";
-};
-
-&usdhc3 {
-	status = "okay";
 };
arch/arm/dts/imx6q-phytec-phyboard-subra.dts new file +20 -0
new file mode 100644
index 0000000..561e985
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <[email protected]>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q-phytec-pfla02.dtsi"
+#include "imx6qdl-phytec-phyboard-subra.dtsi"
+
+/ {
+	model = "Phytec phyBOARD SUBRA";
+	compatible = "phytec,imx6q-pbab05", "phytec,imx6q-pfla02", "fsl,imx6q";
+};
arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi new file +29 -0
new file mode 100644
index 0000000..1efc632
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <[email protected]>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/ {
+	chosen {
+		stdout-path = &uart4;
+	};
+};
+
+&fec {
+	status = "okay";
+};
+
+&uart4 {
+	status = "okay";
+};
+
+&usdhc3 {
+	status = "okay";
+};
images/Makefile.imx +5 -0
index 6870bce..81293fe 100644
@@ -203,6 +203,11 @@ CFG_start_phytec_phyboard_subra_512mb_1bank.pblx.imximg = $(board)/phytec-som-im
 FILE_barebox-phytec-phyboard-subra-512mb-1bank.img = start_phytec_phyboard_subra_512mb_1bank.pblx.imximg
 image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phyboard-subra-512mb-1bank.img
 
+pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_subra_1gib_1bank
+CFG_start_phytec_phyboard_subra_1gib_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
+FILE_barebox-phytec-phyboard-subra-1gib-1bank.img = start_phytec_phyboard_subra_1gib_1bank.pblx.imximg
+image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phyboard-subra-1gib-1bank.img
+
 pblx-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6dl_dfi_fs700_m60_6s
 CFG_start_imx6dl_dfi_fs700_m60_6s.pblx.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
 FILE_barebox-dfi-fs700-m60-6s.img = start_imx6dl_dfi_fs700_m60_6s.pblx.imximg
Signature · 7 lines
1.9.1


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

PATCH 5/15 ARM: dts: imx6: phyboards: reduce clock speed for usdhc3

In reply to Stefan Christ

Due to hardware issues the usdhc3 interface on phyBOARD-ALCOR i.MX6 and phyBOARD-SUBRA i.MX6 doesn't work reliable at 50Mhz. You get communication errors like

barebox@Phytec phyBOARD SUBRA:/ ls /mnt/mmc/
mmc2: detected SD card version 2.0
mmc2: registered mmc2
imx-esdhc 2198000.usdhc: timeout 2
mmc2: Cannot read MBR/partition table

Therefore reduce the maximum clock speed to avoid these problems.

---
 arch/arm/dts/imx6q-phytec-phyboard-alcor.dts    | 1 +
 arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi | 1 +
 2 files changed, 2 insertions(+)
arch/arm/dts/imx6q-phytec-phyboard-alcor.dts +1 -0
index a60fc18..1c4a785 100644
@@ -35,4 +35,5 @@
 
 &usdhc3 {
 	status = "okay";
+	max-frequency = <25000000>; /* 25 Mhz */
 };
arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi +1 -0
index 1efc632..a38765b 100644
@@ -26,4 +26,5 @@
 
 &usdhc3 {
 	status = "okay";
+	max-frequency = <25000000>; /* 25 Mhz */
 };
Signature · 7 lines
1.9.1


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

PATCH 7/15 ARM: phytec-som-imx6: add barebox partitions for MMC

In reply to Stefan Christ

Add missing MMC barebox environment partitions for the phyCORE-i.MX6 with EMMC. Otherwise the barebox cannot find the environment, when the board is boot from sd-card.

---
 arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts +13 -0
index 6e19ab5..116a18d 100644
@@ -43,6 +43,19 @@
 
 &usdhc1 {
 	status = "okay";
+
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	partition@0 {
+		label = "barebox";
+		reg = <0x0 0xe0000>;
+	};
+
+	partition@e0000 {
+		label = "barebox-environment";
+		reg = <0xe0000 0x20000>;
+	};
 };
 
 &usdhc4 {
Signature · 7 lines
1.9.1


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

PATCH 4/15 imx6qdl-phytec-pfla02.dtsi: add i2c eeprom

In reply to Stefan Christ

From: Jan Remmet <[email protected]>

add atmel,24c32 mounted on module

---
 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +12 -0
index 26f9746..aa39fd9 100644
@@ -188,3 +188,15 @@
 		reg = <0xe0000 0x20000>;
 	};
 };
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+
+	eeprom: eeprom@50 {
+		compatible = "atmel,24c32";
+		pagesize = <32>;
+		reg = <0x50>;
+	};
+};
Signature · 7 lines
1.9.1


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

PATCH 6/15 ARM: dts: pfla02: use long enough reset for ethernet phy

In reply to Stefan Christ

Use a longer reset time for ethernet phy Micrel KSZ9031RNX. Otherwise a small percentage of modules have 'transmission timeouts' errors like

barebox@Phytec phyFLEX-i.MX6 Quad Carrier-Board:/ ifup eth0
warning: No MAC address set. Using random address 7e:94:4d:02:f8:f3
eth0: 1000Mbps full duplex link detected
eth0: transmission timeout
T eth0: transmission timeout
T eth0: transmission timeout
T eth0: transmission timeout
T eth0: transmission timeout

---
 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +1 -0
index aa39fd9..9a8c702 100644
@@ -85,6 +85,7 @@
 
 &fec {
 	phy-handle = <&ethphy>;
+	phy-reset-duration = <10>; /* in msecs */
 
 	mdio {
 		#address-cells = <1>;
Signature · 7 lines
1.9.1


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

PATCH 8/15 ARM: phytec-som-imx6: add boot device emmc and automount

In reply to Stefan Christ

Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.

---
 .../arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc | 5 +++++
 .../phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount       | 3 +++
 2 files changed, 8 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount +3 -0
index 3659cf7..a059e19 100644
@@ -12,3 +12,6 @@ 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'
+
+mkdir -p /mnt/emmc
+automount -d /mnt/emmc 'mmc3.probe=1 && [ -e /dev/mmc3.0 ] && mount /dev/mmc3.0 /mnt/emmc'
Signature · 7 lines
1.9.1


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

PATCH 9/15 ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6

In reply to Stefan Christ

The phyCORE-i.MX6 has either a NAND or EMMC storage device and an external SD-Card interface. The automatic bootsource detection in the barebox environment should reflect that.

- If the board was booted from the external SD-Card interface, it should continue loading the kernel and device tree from it.

- If the board was booted from EMMC, it should load kernel and device tree from the boot partition on the EMMC.

---
 .../defaultenv-physom-imx6-mira/init/bootsource       | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource new file +19 -0
new file mode 100644
index 0000000..515613b
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+	exit
+fi
+
+if [ $bootsource = mmc ]; then
+	if [ $bootsource_instance = 0 ]; then
+		global.boot.default="mmc emmc nand spi net"
+	elif [ $bootsource_instance = 3 ]; then
+		global.boot.default="emmc mmc nand spi net"
+	fi
+elif [ $bootsource = nand ]; then
+	global.boot.default="nand spi emmc mmc net"
+elif [ $bootsource = spi ]; then
+	global.boot.default="spi nand emmc mmc net"
+elif [ $bootsource = net ]; then
+	global.boot.default="net nand spi emmc mmc"
+fi
Signature · 7 lines
1.9.1


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

PATCH 14/15 ARM: phytec-som-imx6: adapt main update handler for eMMC

In reply to Stefan Christ

Some phyCORE-i.MX6 variants have eMMC instead of a NAND chip. Provide an update_handler for them.

---
 arch/arm/boards/phytec-som-imx6/board.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boards/phytec-som-imx6/board.c +8 -1
index 4445b07..40cbcae 100644
@@ -154,7 +154,14 @@ static int physom_imx6_devices_init(void)
 
 	pr_notice("Using environment in %s\n", envdev);
 
-	imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
+	if (of_machine_is_compatible("phytec,imx6q-pcm058-emmc")
+		|| of_machine_is_compatible("phytec,imx6dl-pcm058-emmc")) {
+		imx6_bbu_internal_mmc_register_handler("mmc3",
+						"/dev/mmc3",
+						BBU_HANDLER_FLAG_DEFAULT);
+	} else {
+		imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
+	}
 
 	defaultenv_append_directory(defaultenv_physom_imx6);
 
Signature · 7 lines
1.9.1


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

PATCH 10/15 ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM

In reply to Stefan Christ

From: Christian Hemp <[email protected]>

Add new Phytec phyCORE-i.MX6 SOM:
Support:
- imx6q-phytec-phycore-som-emmc:
- 2GiB RAM on 1 Bank with 64Bit
- 1GBit Ethernet
- SPI NOR
- eMMC
- SD
- UART

---
 .../boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg | 8 ++++++++
 arch/arm/boards/phytec-som-imx6/lowlevel.c                        | 1 +
 images/Makefile.imx                                               | 5 +++++
 3 files changed, 14 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg new file +8 -0
new file mode 100644
index 0000000..54c9e41
@@ -0,0 +1,8 @@
+#define SETUP_MDCFG0			\
+	wm 32 0x021b000c 0x8c929b85
+
+#define SETUP_MDASP_MDCTL		\
+	wm 32 0x021b0040 0x00000047;	\
+	wm 32 0x021b0000 0x841A0000
+
+#include "flash-header-phytec-pcm058.h"
arch/arm/boards/phytec-som-imx6/lowlevel.c +1 -0
index 6506e5f..d2d8b68 100644
@@ -96,3 +96,4 @@ PHYTEC_ENTRY(start_phytec_phyboard_subra_1gib_1bank, imx6q_phytec_phyboard_subra
 PHYTEC_ENTRY(start_phytec_phycore_imx6dl_som_nand_256mb, imx6dl_phytec_phycore_som_nand, SZ_256M, true);
 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);
images/Makefile.imx +5 -0
index 81293fe..b632a58 100644
@@ -353,6 +353,11 @@ CFG_start_phytec_phycore_imx6q_som_emmc_1gib.pblx.imximg = $(board)/phytec-som-i
 FILE_barebox-phytec-phycore-imx6q-som-emmc-1gib.img = start_phytec_phycore_imx6q_som_emmc_1gib.pblx.imximg
 image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6q-som-emmc-1gib.img
 
+pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_emmc_2gib
+CFG_start_phytec_phycore_imx6q_som_emmc_2gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
+FILE_barebox-phytec-phycore-imx6q-som-emmc-2gib.img = start_phytec_phycore_imx6q_som_emmc_2gib.pblx.imximg
+image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6q-som-emmc-2gib.img
+
 pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_nand_256mb
 CFG_start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
 FILE_barebox-phytec-phycore-imx6dl-som-nand-256mb.img = start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg
Signature · 7 lines
1.9.1


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

PATCH 12/15 ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl

In reply to Stefan Christ

Update RAM calibration values in the flashheader file for phyCORE-i.MX6 DualLite/Solo. These are verified and tested in the climatic chamber for commercial, extended commercial, industrial and automotive i.MX6 variants.

---
 .../phytec-som-imx6/flash-header-phytec-pcm058dl.h | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h +12 -12
index c7df790..a6e4578 100644
@@ -44,18 +44,18 @@ wm 32 0x020e0488 0x00000028
 wm 32 0x020e048c 0x00000028
 wm 32 0x021b0800 0xa1390003
 wm 32 0x021b4800 0xa1380003
-wm 32 0x021b080c 0x0032003A
-wm 32 0x021b0810 0x00350037
-wm 32 0x021b480c 0x00260038
-wm 32 0x021b4810 0x002C0038
-wm 32 0x021b083c 0x42630244
-wm 32 0x021b0840 0x02300238
-wm 32 0x021b483c 0x02540258
-wm 32 0x021b4840 0x0236021e
-wm 32 0x021b0848 0x46484446
-wm 32 0x021b4848 0x302d2c35
-wm 32 0x021b0850 0x36342630
-wm 32 0x021b4850 0x3423372d
+wm 32 0x021b080c 0x0019001C
+wm 32 0x021b0810 0x00140019
+wm 32 0x021b480c 0x00030003
+wm 32 0x021b4810 0x00030010
+wm 32 0x021b083c 0x42140210
+wm 32 0x021b0840 0x02040208
+wm 32 0x021b483c 0x42040208
+wm 32 0x021b4840 0x01680178
+wm 32 0x021b0848 0x40423E3E
+wm 32 0x021b4848 0x4242443E
+wm 32 0x021b0850 0x2C2C2A30
+wm 32 0x021b4850 0x2E2A3228
 wm 32 0x021b081c 0x33333333
 wm 32 0x021b0820 0x33333333
 wm 32 0x021b0824 0x33333333
Signature · 7 lines
1.9.1


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

PATCH 11/15 ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite

In reply to Stefan Christ

Add Phytec phyCORE-i.MX6 SOM.
Support:
- imx6dl-phytec-phycore-som-emmc:
- 1GB RAM on 1 Bank with 64Bit
- 10/100MBit Ethernet
- SPI NOR
- eMMC
- SD
- UART

---
 arch/arm/boards/phytec-som-imx6/board.c            |  6 +-
 .../flash-header-phytec-pcm058dl-1gib.imxcfg       |  8 +++
 arch/arm/boards/phytec-som-imx6/lowlevel.c         |  1 +
 arch/arm/dts/Makefile                              |  3 +-
 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts    | 64 ++++++++++++++++++++++
 images/Makefile.imx                                |  5 ++
 6 files changed, 84 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
 create mode 100644 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
arch/arm/boards/phytec-som-imx6/board.c +4 -2
index 6b81db4..64f5ff0 100644
@@ -114,7 +114,8 @@ static int physom_imx6_devices_init(void)
 
 	} else if (of_machine_is_compatible("phytec,imx6q-pcm058-nand")
 		|| of_machine_is_compatible("phytec,imx6q-pcm058-emmc")
-		|| of_machine_is_compatible("phytec,imx6dl-pcm058-nand")) {
+		|| of_machine_is_compatible("phytec,imx6dl-pcm058-nand")
+		|| of_machine_is_compatible("phytec,imx6dl-pcm058-emmc")) {
 
 		barebox_set_hostname("phyCORE-i.MX6");
 		default_environment_path = "/chosen/environment-spinor";
@@ -160,7 +161,8 @@ static int physom_imx6_devices_init(void)
 	/* Overwrite file /env/init/automount */
 	if (of_machine_is_compatible("phytec,imx6q-pcm058-nand")
 		|| of_machine_is_compatible("phytec,imx6q-pcm058-emmc")
-		|| of_machine_is_compatible("phytec,imx6dl-pcm058-nand")) {
+		|| of_machine_is_compatible("phytec,imx6dl-pcm058-nand")
+		|| of_machine_is_compatible("phytec,imx6dl-pcm058-emmc")) {
 		defaultenv_append_directory(defaultenv_physom_imx6_mira);
 	}
 
arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg new file +8 -0
new file mode 100644
index 0000000..f047253
@@ -0,0 +1,8 @@
+#define SETUP_MDCFG0			\
+	wm 32 0x021b000c 0x555A7955
+
+#define SETUP_MDASP_MDCTL		\
+	wm 32 0x021b0040 0x00000027;	\
+	wm 32 0x021b0000 0x831A0000
+
+#include "flash-header-phytec-pcm058dl.h"
arch/arm/boards/phytec-som-imx6/lowlevel.c +1 -0
index d2d8b68..c732d32 100644
@@ -94,6 +94,7 @@ PHYTEC_ENTRY(start_phytec_phyboard_subra_512mb_1bank, imx6dl_phytec_phyboard_sub
 PHYTEC_ENTRY(start_phytec_phyboard_subra_1gib_1bank, imx6q_phytec_phyboard_subra, SZ_1G, false);
 
 PHYTEC_ENTRY(start_phytec_phycore_imx6dl_som_nand_256mb, imx6dl_phytec_phycore_som_nand, SZ_256M, true);
+PHYTEC_ENTRY(start_phytec_phycore_imx6dl_som_emmc_1gib, imx6dl_phytec_phycore_som_emmc, SZ_1G, true);
 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);
arch/arm/dts/Makefile +2 -1
index f3129c5..813e098 100644
@@ -49,7 +49,8 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \
 				imx6dl-phytec-phyboard-subra.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-nand.dtb.o \
+				imx6dl-phytec-phycore-som-emmc.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/imx6dl-phytec-phycore-som-emmc.dts new file +64 -0

64 lines not on this page · raw message

images/Makefile.imx +5 -0
index b632a58..3ba04d3 100644
@@ -363,6 +363,11 @@ CFG_start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg = $(board)/phytec-som
 FILE_barebox-phytec-phycore-imx6dl-som-nand-256mb.img = start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg
 image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6dl-som-nand-256mb.img
 
+pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_emmc_1gib
+CFG_start_phytec_phycore_imx6dl_som_emmc_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
+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_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
#20 lore raw

PATCH 13/15 ARM: phytec-som-imx6: rename environment folder

In reply to Stefan Christ

The extra environment folder for the phyCORE-i.MX6 had the suffix '-mira'. That's the name of a baseboard. Since the bootloader is generic for all baseboards, use a generic suffix for the environment folder.

---
 arch/arm/boards/phytec-som-imx6/Makefile              |  2 +-
 arch/arm/boards/phytec-som-imx6/board.c               |  2 +-
 .../defaultenv-physom-imx6-mira/boot/emmc             |  5 -----
 .../defaultenv-physom-imx6-mira/init/automount        | 17 -----------------
 .../defaultenv-physom-imx6-mira/init/bootsource       | 19 -------------------
 .../defaultenv-physom-imx6-phycore/boot/emmc          |  5 +++++
 .../defaultenv-physom-imx6-phycore/init/automount     | 17 +++++++++++++++++
 .../defaultenv-physom-imx6-phycore/init/bootsource    | 19 +++++++++++++++++++
 8 files changed, 43 insertions(+), 43 deletions(-)
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource
arch/arm/boards/phytec-som-imx6/Makefile +1 -1
index c61e9cd..2f9c4a8 100644
@@ -1,4 +1,4 @@
 obj-y += board.o
 lwl-y += lowlevel.o
 bbenv-y += defaultenv-physom-imx6
-bbenv-y += defaultenv-physom-imx6-mira
+bbenv-y += defaultenv-physom-imx6-phycore
arch/arm/boards/phytec-som-imx6/board.c +1 -1
index 64f5ff0..4445b07 100644
@@ -163,7 +163,7 @@ static int physom_imx6_devices_init(void)
 		|| of_machine_is_compatible("phytec,imx6q-pcm058-emmc")
 		|| of_machine_is_compatible("phytec,imx6dl-pcm058-nand")
 		|| of_machine_is_compatible("phytec,imx6dl-pcm058-emmc")) {
-		defaultenv_append_directory(defaultenv_physom_imx6_mira);
+		defaultenv_append_directory(defaultenv_physom_imx6_phycore);
 	}
 
 	return 0;
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc deleted +0 -5
deleted file mode 100644
index e3cc9e3..0000000
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/mnt/emmc/linuximage"
-global.bootm.oftree="/mnt/emmc/oftree"
-global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount deleted +0 -17
deleted file mode 100644
index a059e19..0000000
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Automountpoints"
-	exit
-fi
-
-# 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'
-
-mkdir -p /mnt/emmc
-automount -d /mnt/emmc 'mmc3.probe=1 && [ -e /dev/mmc3.0 ] && mount /dev/mmc3.0 /mnt/emmc'
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource deleted +0 -19
deleted file mode 100644
index 515613b..0000000
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-if [ -n "$nv.boot.default" ]; then
-	exit
-fi
-
-if [ $bootsource = mmc ]; then
-	if [ $bootsource_instance = 0 ]; then
-		global.boot.default="mmc emmc nand spi net"
-	elif [ $bootsource_instance = 3 ]; then
-		global.boot.default="emmc mmc nand spi net"
-	fi
-elif [ $bootsource = nand ]; then
-	global.boot.default="nand spi emmc mmc net"
-elif [ $bootsource = spi ]; then
-	global.boot.default="spi nand emmc mmc net"
-elif [ $bootsource = net ]; then
-	global.boot.default="net nand spi emmc mmc"
-fi
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc new file +5 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount new file +17 -0
new file mode 100644
index 0000000..a059e19
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "Automountpoints"
+	exit
+fi
+
+# 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'
+
+mkdir -p /mnt/emmc
+automount -d /mnt/emmc 'mmc3.probe=1 && [ -e /dev/mmc3.0 ] && mount /dev/mmc3.0 /mnt/emmc'
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource new file +19 -0
new file mode 100644
index 0000000..515613b
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+	exit
+fi
+
+if [ $bootsource = mmc ]; then
+	if [ $bootsource_instance = 0 ]; then
+		global.boot.default="mmc emmc nand spi net"
+	elif [ $bootsource_instance = 3 ]; then
+		global.boot.default="emmc mmc nand spi net"
+	fi
+elif [ $bootsource = nand ]; then
+	global.boot.default="nand spi emmc mmc net"
+elif [ $bootsource = spi ]; then
+	global.boot.default="spi nand emmc mmc net"
+elif [ $bootsource = net ]; then
+	global.boot.default="net nand spi emmc mmc"
+fi
Signature · 7 lines
1.9.1


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

PATCH 15/15 ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc

In reply to Stefan Christ

Enable NOR for phyCORE-i.MX6 DualLite and Quad eMMC variants.

Furthermore add an extra 'status = "disabled"' in the flash node. It has no functional effect, because the SPI bus node 'ecspi1' is disabled, too.

---
 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts | 8 ++++++++
 arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts  | 8 ++++++++
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi    | 1 +
 3 files changed, 17 insertions(+)
arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts +8 -0
index 834aa2b..fc153a6 100644
@@ -21,6 +21,10 @@
 	compatible = "phytec,imx6dl-pcm058-emmc", "fsl,imx6dl";
 };
 
+&ecspi1 {
+	status = "okay";
+};
+
 &eeprom {
 	status = "okay";
 };
@@ -42,6 +46,10 @@
 	};
 };
 
+&flash {
+	status = "okay";
+};
+
 &usdhc1 {
 	status = "okay";
 
arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts +8 -0
index 116a18d..74bc09b 100644
@@ -20,6 +20,10 @@
 	compatible = "phytec,imx6q-pcm058-emmc", "fsl,imx6q";
 };
 
+&ecspi1 {
+	status = "okay";
+};
+
 &eeprom {
 	status = "okay";
 };
@@ -41,6 +45,10 @@
 	};
 };
 
+&flash {
+	status = "okay";
+};
+
 &usdhc1 {
 	status = "okay";
 
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +1 -0
index 139150e..d446a5e 100644
@@ -46,6 +46,7 @@
 		compatible = "m25p80";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
+		status = "disabled";
 
 		#address-cells = <1>;
 		#size-cells = <1>;
Signature · 7 lines
1.9.1


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

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

In reply to Stefan Christ
Quoted 15 lines · Stefan Christ

Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.

---
 .../arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc | 5 +++++
 .../phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount       | 3 +++
 2 files changed, 8 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

When I see patches like this it's probably time to remind how barebox can handle bootloader spec ;)

Put a file like this to /loader/entries/loader.conf:

title                   Phytec-Monster-Linux
version                 4.6
options                 rootwait
linux-appendroot        true
linux                   /boot/zImage
devicetree              /boot/imx6q-phytec-pflaxy.dtb

Then you can boot the system with "boot mmc3.0", no further barebox configuration is needed. Set nv.boot to mmc3.0 if you always want to boot from there. The same can be done with nfsroot: Put the rootfs somewhere reachable via NFS and do:

boot nfs://nfshost//path/to/rootfs

(You'll need a "ip=dhcp" in the options in your loader.conf)

You can also create multiple loader.conf files with different device trees, barebox will then pick the one which is compatible to the current board.

The above also works with NAND/UBI. "boot nand0.root.ubi.root" will boot from the root volume on the ubi found on the root partition from the nand0 device. Again, no further barebox configuration and no manual ubiattach required. the root= and ubi.mtd= arguments to the kernel will be automatically generated.

Configuration files in the environment have become pretty much unnecessary for the common case.

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
#10 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

Quoted 2 lines

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

I have a *hack* that in my kernel that names the SD-Card to "sdblk0" and my eMMC to "mmcblk0". That that is completely unacceptable for upstream, I never even tried it. :-)

drivers/mmc/card/block.c +7 -5
Index: linux-4.3/drivers/mmc/card/block.c
===================================================================
@@ -2259,14 +2259,16 @@ static struct mmc_blk_data *mmc_blk_allo
 	 * messages to tell when the card is present.
 	 */
 
-	snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
-		 "mmcblk%u%s", md->name_idx, subname ? subname : "");
-
-	if (mmc_card_mmc(card))
+	if (mmc_card_mmc(card)) {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "mmcblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue,
 					     card->ext_csd.data_sector_size);
-	else
+	} else {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "sdblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue, 512);
+	}
 
 	set_capacity(md->disk, size);
 

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

#11 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

I added an ability to barebox to put partition GUIDs into MMC device attributes. Then I can start the kernel by passing the GUID for the rootfs, which the kernel code (not initramfs+udev, the kernel itself) can parse and mount.

Like:
global.linux.bootargs.dyn.root="root=PARTUUID=${mmc0.root0} rw rootwait"

I only have mmc0 to worry about (with multiple roots that barebox determines which to use), but I think this would allow you to say PARTUUID=${mmc0.root} vs PARTUUID=${mmc1.root} in barebox and have the kernel find the correct partition without needing to worry about what mmcblkXpY device it happens to be assigned to by the kernel.

Quoted 35 lines · Holger Schurig
Quoted 2 lines

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

I have a *hack* that in my kernel that names the SD-Card to "sdblk0" and my eMMC to "mmcblk0". That that is completely unacceptable for upstream, I never even tried it. :-)

Index: linux-4.3/drivers/mmc/card/block.c
===================================================================

drivers/mmc/card/block.c +7 -5
@@ -2259,14 +2259,16 @@ static struct mmc_blk_data *mmc_blk_allo
 	 * messages to tell when the card is present.
 	 */
 
-	snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
-		 "mmcblk%u%s", md->name_idx, subname ? subname : "");
-
-	if (mmc_card_mmc(card))
+	if (mmc_card_mmc(card)) {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "mmcblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue,
 					     card->ext_csd.data_sector_size);
-	else
+	} else {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "sdblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue, 512);
+	}
 
 	set_capacity(md->disk, size);
 
Quoted 4 lines

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

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

#12 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

In reply to Sascha Hauer

Hi Sascha,

Quoted 6 lines
Quoted 6 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
Quoted 8 lines

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

Our kernel tree contains a patch for that. The mmcblk id is derived from the device tree alias index. It isn't a mainline ready solution, since there are some unhandled edge cases in the patch and it's implemented currently only for the driver "sdhci-esdhc-imx".

Quoted 11 lines

When I see patches like this it's probably time to remind how barebox can handle bootloader spec ;)

Put a file like this to /loader/entries/loader.conf:

title                   Phytec-Monster-Linux
version                 4.6
options                 rootwait
linux-appendroot        true
linux                   /boot/zImage
devicetree              /boot/imx6q-phytec-pflaxy.dtb

We already looked at the bootspec and currently evaluating it to use it for MMC and eMMC boot devices. It nicely decouples the bootloader and kernel/userspace handling. E.g. maintaining the kernel arguments in the bootloader is not good thing, because they are product, rootfs, kernel and usecase specific. (Same argument holds for NAND/NOR partitions in the bootloader device tree ;-)

Quoted 5 lines

The above also works with NAND/UBI. "boot nand0.root.ubi.root" will boot from the root volume on the ubi found on the root partition from the nand0 device. Again, no further barebox configuration and no manual ubiattach required. the root= and ubi.mtd= arguments to the kernel will be automatically generated.

Using the bootspec for NAND is not an ideal solution yet. Attaching UBI in the bootloader to read kernel/devicetree from UBIFS and then reattaching the UBI again in the kernel, is very time consuming. For a 1GB NAND the UBI attach can take couple of seconds. Without UBI fastmap it will delay the boot process to much. And UBI fastmap has still an experimental touch, but will be the way to go in the future.

Additionally placing the kernel and device tree on NOR is not handled by the bootspec, but this will mostly be an embedded special case forever :-)

Mit freundlichen Grüßen / Kind regards,
Stefan Christ

Quoted 56 lines · Sascha Hauer
Quoted 15 lines · Stefan Christ

Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.

---
 .../arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc | 5 +++++
 .../phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount       | 3 +++
 2 files changed, 8 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

When I see patches like this it's probably time to remind how barebox can handle bootloader spec ;)

Put a file like this to /loader/entries/loader.conf:

title                   Phytec-Monster-Linux
version                 4.6
options                 rootwait
linux-appendroot        true
linux                   /boot/zImage
devicetree              /boot/imx6q-phytec-pflaxy.dtb

Then you can boot the system with "boot mmc3.0", no further barebox configuration is needed. Set nv.boot to mmc3.0 if you always want to boot from there. The same can be done with nfsroot: Put the rootfs somewhere reachable via NFS and do:

boot nfs://nfshost//path/to/rootfs

(You'll need a "ip=dhcp" in the options in your loader.conf)

You can also create multiple loader.conf files with different device trees, barebox will then pick the one which is compatible to the current board.

The above also works with NAND/UBI. "boot nand0.root.ubi.root" will boot from the root volume on the ubi found on the root partition from the nand0 device. Again, no further barebox configuration and no manual ubiattach required. the root= and ubi.mtd= arguments to the kernel will be automatically generated.

Quoted 10 lines

Configuration files in the environment have become pretty much unnecessary for the common case.

Sascha

Signature · 4 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

maintainer
#13 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

Quoted 17 lines · Stefan Christ

Hi Sascha,

Quoted 6 lines
Quoted 6 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
Quoted 8 lines

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

Quoted 4 lines

Our kernel tree contains a patch for that. The mmcblk id is derived from the device tree alias index. It isn't a mainline ready solution, since there are some unhandled edge cases in the patch and it's implemented currently only for the driver "sdhci-esdhc-imx".

There was yet another attempt for consistent mmcblk numbering shot down here just last weekend: http://www.spinics.net/lists/arm-kernel/msg501495.html

Given that there probably never will be a way to (reliably) pass the rootfs via root=mmcblkxy, I can't take this patch. I sent a patch which pushes the partuuid mechanism from the bootloader spec code to bootm which might help to solve this problem here.

I applied this series without this patch. This provoked a little merge conflict in the patch renaming the environment directory. Please check the result in -next.

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
#14 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

Hi Sascha,

Quoted 23 lines · Sascha Hauer
Quoted 17 lines · Stefan Christ

Hi Sascha,

Quoted 6 lines
Quoted 6 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
Quoted 8 lines

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

Quoted 4 lines

Our kernel tree contains a patch for that. The mmcblk id is derived from the device tree alias index. It isn't a mainline ready solution, since there are some unhandled edge cases in the patch and it's implemented currently only for the driver "sdhci-esdhc-imx".

Quoted 7 lines

There was yet another attempt for consistent mmcblk numbering shot down here just last weekend: http://www.spinics.net/lists/arm-kernel/msg501495.html

Given that there probably never will be a way to (reliably) pass the rootfs via root=mmcblkxy, I can't take this patch. I sent a patch which pushes the partuuid mechanism from the bootloader spec code to bootm which might help to solve this problem here.

Thanks for implementing this feature. Since our kernel and device tree is not in the root filesystem currently, we cannot use it. We will take a look at the bootspec to solve this problem.

Quoted 3 lines

I applied this series without this patch. This provoked a little merge conflict in the patch renaming the environment directory. Please check the result in -next.

I just diffed the next branch. So far it looks good. The dropped patch also introduced an 'automount' setting for the eMMC device. Have you an objection about this? If no, I would sent an extra patch for that.

--- >8 ---

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount +3 -0
index 3659cf7..a059e19 100644
@@ -12,3 +12,6 @@ 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'
+
+mkdir -p /mnt/emmc
+automount -d /mnt/emmc 'mmc3.probe=1 && [ -e /dev/mmc3.0 ] && mount /dev/mmc3.0 /mnt/emmc'

--- >8 ---

Mit freundlichen Grüßen / Kind regards,
Stefan Christ

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

maintainer
#15 lore raw

Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

Quoted 29 lines · Stefan Christ

Hi Sascha,

Quoted 26 lines · Sascha Hauer
Quoted 17 lines · Stefan Christ

Hi Sascha,

Quoted 6 lines
Quoted 6 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +0 -0
new file mode 100644
index 0000000..e3cc9e3
@@ -0,0 +1,5 @@
Quoted 8 lines

arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc line 5

Quoted 5 lines
arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc new file +5 -0
+#!/bin/sh
+
+global.bootm.image="/mnt/emmc/linuximage"
+global.bootm.oftree="/mnt/emmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates fixed numbers for MMC/SD block devices?

Quoted 4 lines

Our kernel tree contains a patch for that. The mmcblk id is derived from the device tree alias index. It isn't a mainline ready solution, since there are some unhandled edge cases in the patch and it's implemented currently only for the driver "sdhci-esdhc-imx".

There was yet another attempt for consistent mmcblk numbering shot down here just last weekend: http://www.spinics.net/lists/arm-kernel/msg501495.html

Quoted 8 lines
Quoted 4 lines

Given that there probably never will be a way to (reliably) pass the rootfs via root=mmcblkxy, I can't take this patch. I sent a patch which pushes the partuuid mechanism from the bootloader spec code to bootm which might help to solve this problem here.

Thanks for implementing this feature. Since our kernel and device tree is not in the root filesystem currently, we cannot use it. We will take a look at the bootspec to solve this problem.

Something I can think of is that we add a bootargs parameter to the partition device similar to what we do with the fs devices. Only problem is that there currently is no partition device, but that could be changed.

Quoted 9 lines
Quoted 5 lines

I applied this series without this patch. This provoked a little merge conflict in the patch renaming the environment directory. Please check the result in -next.

I just diffed the next branch. So far it looks good. The dropped patch also introduced an 'automount' setting for the eMMC device. Have you an objection about this? If no, I would sent an extra patch for that.

No objections, you can send a patch.

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