* [PATCH for next 00/15] New Phytec i.MX6 Patches
@ 2016-04-27 10:04 Stefan Christ
2016-04-27 10:04 ` [PATCH for next 01/15] ARM: imx_v7_defconfig: enable NANDTEST command Stefan Christ
` (14 more replies)
0 siblings, 15 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 01/15] ARM: imx_v7_defconfig: enable NANDTEST command
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 02/15] ARM: imx_v7_defconfig: add command mmc_extcsd Stefan Christ
` (13 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/configs/imx_v7_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 82b3821..044d826 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 02/15] ARM: imx_v7_defconfig: add command mmc_extcsd
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
2016-04-27 10:04 ` [PATCH for next 01/15] ARM: imx_v7_defconfig: enable NANDTEST command Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 03/15] ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad Stefan Christ
` (12 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
Enable the mmc_extcsd command to read and write MMC/eMMC registers.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/configs/imx_v7_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 044d826..1b0739c 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 03/15] ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
2016-04-27 10:04 ` [PATCH for next 01/15] ARM: imx_v7_defconfig: enable NANDTEST command Stefan Christ
2016-04-27 10:04 ` [PATCH for next 02/15] ARM: imx_v7_defconfig: add command mmc_extcsd Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 04/15] imx6qdl-phytec-pfla02.dtsi: add i2c eeprom Stefan Christ
` (11 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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'.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
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
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index eb796e7..6506e5f 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -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);
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b83c110..f3129c5 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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 \
diff --git a/arch/arm/dts/imx6dl-phytec-phyboard-subra.dts b/arch/arm/dts/imx6dl-phytec-phyboard-subra.dts
index 34e4144..3d1069a 100644
--- a/arch/arm/dts/imx6dl-phytec-phyboard-subra.dts
+++ b/arch/arm/dts/imx6dl-phytec-phyboard-subra.dts
@@ -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";
};
diff --git a/arch/arm/dts/imx6q-phytec-phyboard-subra.dts b/arch/arm/dts/imx6q-phytec-phyboard-subra.dts
new file mode 100644
index 0000000..561e985
--- /dev/null
+++ b/arch/arm/dts/imx6q-phytec-phyboard-subra.dts
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <s.christ@phytec.de>
+ *
+ * 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";
+};
diff --git a/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi b/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
new file mode 100644
index 0000000..1efc632
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <s.christ@phytec.de>
+ *
+ * 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";
+};
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6870bce..81293fe 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 04/15] imx6qdl-phytec-pfla02.dtsi: add i2c eeprom
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (2 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 03/15] ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 05/15] ARM: dts: imx6: phyboards: reduce clock speed for usdhc3 Stefan Christ
` (10 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
From: Jan Remmet <j.remmet@phytec.de>
add atmel,24c32 mounted on module
Signed-off-by: Jan Remmet <j.remmet@phytec.de>
---
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
index 26f9746..aa39fd9 100644
--- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
@@ -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>;
+ };
+};
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 05/15] ARM: dts: imx6: phyboards: reduce clock speed for usdhc3
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (3 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 04/15] imx6qdl-phytec-pfla02.dtsi: add i2c eeprom Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 06/15] ARM: dts: pfla02: use long enough reset for ethernet phy Stefan Christ
` (9 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/dts/imx6q-phytec-phyboard-alcor.dts | 1 +
arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/dts/imx6q-phytec-phyboard-alcor.dts b/arch/arm/dts/imx6q-phytec-phyboard-alcor.dts
index a60fc18..1c4a785 100644
--- a/arch/arm/dts/imx6q-phytec-phyboard-alcor.dts
+++ b/arch/arm/dts/imx6q-phytec-phyboard-alcor.dts
@@ -35,4 +35,5 @@
&usdhc3 {
status = "okay";
+ max-frequency = <25000000>; /* 25 Mhz */
};
diff --git a/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi b/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
index 1efc632..a38765b 100644
--- a/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-phyboard-subra.dtsi
@@ -26,4 +26,5 @@
&usdhc3 {
status = "okay";
+ max-frequency = <25000000>; /* 25 Mhz */
};
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 06/15] ARM: dts: pfla02: use long enough reset for ethernet phy
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (4 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 05/15] ARM: dts: imx6: phyboards: reduce clock speed for usdhc3 Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 07/15] ARM: phytec-som-imx6: add barebox partitions for MMC Stefan Christ
` (8 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
---
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
index aa39fd9..9a8c702 100644
--- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
@@ -85,6 +85,7 @@
&fec {
phy-handle = <ðphy>;
+ phy-reset-duration = <10>; /* in msecs */
mdio {
#address-cells = <1>;
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 07/15] ARM: phytec-som-imx6: add barebox partitions for MMC
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (5 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 06/15] ARM: dts: pfla02: use long enough reset for ethernet phy Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount Stefan Christ
` (7 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts b/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
index 6e19ab5..116a18d 100644
--- a/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
+++ b/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
@@ -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 {
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (6 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 07/15] ARM: phytec-som-imx6: add barebox partitions for MMC Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-28 8:34 ` Sascha Hauer
2016-04-27 10:04 ` [PATCH for next 09/15] ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6 Stefan Christ
` (6 subsequent siblings)
14 siblings, 1 reply; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
.../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
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
new file mode 100644
index 0000000..e3cc9e3
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
@@ -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"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
index 3659cf7..a059e19 100644
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
@@ -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'
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 09/15] ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (7 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 10/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM Stefan Christ
` (5 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
.../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
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
new file mode 100644
index 0000000..515613b
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 10/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (8 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 09/15] ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6 Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 11/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite Stefan Christ
` (4 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
From: Christian Hemp <c.hemp@phytec.de>
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
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
---
| 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
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
new file mode 100644
index 0000000..54c9e41
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
@@ -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"
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index 6506e5f..d2d8b68 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -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);
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 81293fe..b632a58 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 11/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (9 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 10/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 12/15] ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl Stefan Christ
` (3 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/boards/phytec-som-imx6/board.c | 6 +-
| 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
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 6b81db4..64f5ff0 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -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);
}
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
new file mode 100644
index 0000000..f047253
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
@@ -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"
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index d2d8b68..c732d32 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -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);
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index f3129c5..813e098 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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
diff --git a/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts b/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
new file mode 100644
index 0000000..834aa2b
--- /dev/null
+++ b/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2015 PHYTEC Messtechnik GmbH,
+ * Author: Stefan Christ <s.christ@phytec.de>
+ *
+ * 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 <arm/imx6dl.dtsi>
+#include "imx6dl.dtsi"
+#include "imx6qdl-phytec-phycore-som.dtsi"
+
+/ {
+ model = "Phytec phyCORE-i.MX6 DualLite/SOLO with eMMC";
+ compatible = "phytec,imx6dl-pcm058-emmc", "fsl,imx6dl";
+};
+
+&eeprom {
+ status = "okay";
+};
+
+&fec {
+ status = "okay";
+ phy-handle = <ðphy>;
+ phy-mode = "rgmii";
+ phy-reset-gpios = <&gpio1 14 1>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy: ethernet-phy@3 {
+ reg = <3>;
+ max-speed = <100>;
+ };
+ };
+};
+
+&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 {
+ status = "okay";
+};
diff --git a/images/Makefile.imx b/images/Makefile.imx
index b632a58..3ba04d3 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 12/15] ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (10 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 11/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 13/15] ARM: phytec-som-imx6: rename environment folder Stefan Christ
` (2 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
| 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
index c7df790..a6e4578 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 13/15] ARM: phytec-som-imx6: rename environment folder
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (11 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 12/15] ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 14/15] ARM: phytec-som-imx6: adapt main update handler for eMMC Stefan Christ
2016-04-27 10:04 ` [PATCH for next 15/15] ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc Stefan Christ
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
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
diff --git a/arch/arm/boards/phytec-som-imx6/Makefile b/arch/arm/boards/phytec-som-imx6/Makefile
index c61e9cd..2f9c4a8 100644
--- a/arch/arm/boards/phytec-som-imx6/Makefile
+++ b/arch/arm/boards/phytec-som-imx6/Makefile
@@ -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
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 64f5ff0..4445b07 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -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;
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
deleted file mode 100644
index e3cc9e3..0000000
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
+++ /dev/null
@@ -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"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
deleted file mode 100644
index a059e19..0000000
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount
+++ /dev/null
@@ -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'
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
deleted file mode 100644
index 515613b..0000000
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
+++ /dev/null
@@ -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
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc
new file mode 100644
index 0000000..e3cc9e3
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc
@@ -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"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
new file mode 100644
index 0000000..a059e19
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
@@ -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'
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource
new file mode 100644
index 0000000..515613b
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/bootsource
@@ -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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 14/15] ARM: phytec-som-imx6: adapt main update handler for eMMC
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (12 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 13/15] ARM: phytec-som-imx6: rename environment folder Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
2016-04-27 10:04 ` [PATCH for next 15/15] ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc Stefan Christ
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
Some phyCORE-i.MX6 variants have eMMC instead of a NAND chip. Provide an
update_handler for them.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
arch/arm/boards/phytec-som-imx6/board.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 4445b07..40cbcae 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -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);
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH for next 15/15] ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
` (13 preceding siblings ...)
2016-04-27 10:04 ` [PATCH for next 14/15] ARM: phytec-som-imx6: adapt main update handler for eMMC Stefan Christ
@ 2016-04-27 10:04 ` Stefan Christ
14 siblings, 0 replies; 23+ messages in thread
From: Stefan Christ @ 2016-04-27 10:04 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
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(+)
diff --git a/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts b/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
index 834aa2b..fc153a6 100644
--- a/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
+++ b/arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts
@@ -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";
diff --git a/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts b/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
index 116a18d..74bc09b 100644
--- a/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
+++ b/arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts
@@ -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";
diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
index 139150e..d446a5e 100644
--- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi
@@ -46,6 +46,7 @@
compatible = "m25p80";
spi-max-frequency = <20000000>;
reg = <0>;
+ status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-27 10:04 ` [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount Stefan Christ
@ 2016-04-28 8:34 ` Sascha Hauer
2016-04-28 11:56 ` Holger Schurig
2016-04-29 7:25 ` Stefan Christ
0 siblings, 2 replies; 23+ messages in thread
From: Sascha Hauer @ 2016-04-28 8:34 UTC (permalink / raw)
To: Stefan Christ; +Cc: barebox
On Wed, Apr 27, 2016 at 12:04:42PM +0200, Stefan Christ wrote:
> Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.
>
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> ---
> .../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
>
> diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> new file mode 100644
> index 0000000..e3cc9e3
> --- /dev/null
> +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> @@ -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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-28 8:34 ` Sascha Hauer
@ 2016-04-28 11:56 ` Holger Schurig
2016-04-28 20:31 ` Trent Piepho
2016-04-29 7:25 ` Stefan Christ
1 sibling, 1 reply; 23+ messages in thread
From: Holger Schurig @ 2016-04-28 11:56 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
> 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
===================================================================
--- linux-4.3.orig/drivers/mmc/card/block.c 2015-12-09 17:17:57.264650273 +0100
+++ linux-4.3/drivers/mmc/card/block.c 2015-12-10 08:46:41.874985403 +0100
@@ -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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-28 11:56 ` Holger Schurig
@ 2016-04-28 20:31 ` Trent Piepho
0 siblings, 0 replies; 23+ messages in thread
From: Trent Piepho @ 2016-04-28 20:31 UTC (permalink / raw)
To: Holger Schurig; +Cc: barebox
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.
On Thu, 2016-04-28 at 13:56 +0200, Holger Schurig wrote:
> > 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
> ===================================================================
> --- linux-4.3.orig/drivers/mmc/card/block.c 2015-12-09 17:17:57.264650273 +0100
> +++ linux-4.3/drivers/mmc/card/block.c 2015-12-10 08:46:41.874985403 +0100
> @@ -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
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-28 8:34 ` Sascha Hauer
2016-04-28 11:56 ` Holger Schurig
@ 2016-04-29 7:25 ` Stefan Christ
2016-05-02 7:51 ` Sascha Hauer
1 sibling, 1 reply; 23+ messages in thread
From: Stefan Christ @ 2016-04-29 7:25 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha,
> > diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > new file mode 100644
> > index 0000000..e3cc9e3
> > --- /dev/null
> > +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > @@ -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?
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".
> 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 ;-)
> 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
On Thu, Apr 28, 2016 at 10:34:49AM +0200, Sascha Hauer wrote:
> On Wed, Apr 27, 2016 at 12:04:42PM +0200, Stefan Christ wrote:
> > Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.
> >
> > Signed-off-by: Stefan Christ <s.christ@phytec.de>
> > ---
> > .../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
> >
> > diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > new file mode 100644
> > index 0000000..e3cc9e3
> > --- /dev/null
> > +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > @@ -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
>
> --
> 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-04-29 7:25 ` Stefan Christ
@ 2016-05-02 7:51 ` Sascha Hauer
2016-05-02 9:03 ` Stefan Christ
0 siblings, 1 reply; 23+ messages in thread
From: Sascha Hauer @ 2016-05-02 7:51 UTC (permalink / raw)
To: Stefan Christ; +Cc: barebox
On Fri, Apr 29, 2016 at 09:25:28AM +0200, Stefan Christ wrote:
> Hi Sascha,
>
> > > diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > new file mode 100644
> > > index 0000000..e3cc9e3
> > > --- /dev/null
> > > +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > @@ -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?
>
> 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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-05-02 7:51 ` Sascha Hauer
@ 2016-05-02 9:03 ` Stefan Christ
2016-05-03 7:12 ` Sascha Hauer
0 siblings, 1 reply; 23+ messages in thread
From: Stefan Christ @ 2016-05-02 9:03 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha,
On Mon, May 02, 2016 at 09:51:56AM +0200, Sascha Hauer wrote:
> On Fri, Apr 29, 2016 at 09:25:28AM +0200, Stefan Christ wrote:
> > Hi Sascha,
> >
> > > > diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > > new file mode 100644
> > > > index 0000000..e3cc9e3
> > > > --- /dev/null
> > > > +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > > @@ -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?
> >
> > 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.
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.
> 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 ---
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount b/arch/arm/boar
index 3659cf7..a059e19 100644
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
@@ -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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount
2016-05-02 9:03 ` Stefan Christ
@ 2016-05-03 7:12 ` Sascha Hauer
0 siblings, 0 replies; 23+ messages in thread
From: Sascha Hauer @ 2016-05-03 7:12 UTC (permalink / raw)
To: Stefan Christ; +Cc: barebox
On Mon, May 02, 2016 at 11:03:58AM +0200, Stefan Christ wrote:
> Hi Sascha,
>
> On Mon, May 02, 2016 at 09:51:56AM +0200, Sascha Hauer wrote:
> > On Fri, Apr 29, 2016 at 09:25:28AM +0200, Stefan Christ wrote:
> > > Hi Sascha,
> > >
> > > > > diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > > > new file mode 100644
> > > > > index 0000000..e3cc9e3
> > > > > --- /dev/null
> > > > > +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> > > > > @@ -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?
> > >
> > > 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.
>
> 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.
>
>
> > 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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2016-05-03 7:12 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 10:04 [PATCH for next 00/15] New Phytec i.MX6 Patches Stefan Christ
2016-04-27 10:04 ` [PATCH for next 01/15] ARM: imx_v7_defconfig: enable NANDTEST command Stefan Christ
2016-04-27 10:04 ` [PATCH for next 02/15] ARM: imx_v7_defconfig: add command mmc_extcsd Stefan Christ
2016-04-27 10:04 ` [PATCH for next 03/15] ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad Stefan Christ
2016-04-27 10:04 ` [PATCH for next 04/15] imx6qdl-phytec-pfla02.dtsi: add i2c eeprom Stefan Christ
2016-04-27 10:04 ` [PATCH for next 05/15] ARM: dts: imx6: phyboards: reduce clock speed for usdhc3 Stefan Christ
2016-04-27 10:04 ` [PATCH for next 06/15] ARM: dts: pfla02: use long enough reset for ethernet phy Stefan Christ
2016-04-27 10:04 ` [PATCH for next 07/15] ARM: phytec-som-imx6: add barebox partitions for MMC Stefan Christ
2016-04-27 10:04 ` [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount Stefan Christ
2016-04-28 8:34 ` Sascha Hauer
2016-04-28 11:56 ` Holger Schurig
2016-04-28 20:31 ` Trent Piepho
2016-04-29 7:25 ` Stefan Christ
2016-05-02 7:51 ` Sascha Hauer
2016-05-02 9:03 ` Stefan Christ
2016-05-03 7:12 ` Sascha Hauer
2016-04-27 10:04 ` [PATCH for next 09/15] ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6 Stefan Christ
2016-04-27 10:04 ` [PATCH for next 10/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM Stefan Christ
2016-04-27 10:04 ` [PATCH for next 11/15] ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite Stefan Christ
2016-04-27 10:04 ` [PATCH for next 12/15] ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl Stefan Christ
2016-04-27 10:04 ` [PATCH for next 13/15] ARM: phytec-som-imx6: rename environment folder Stefan Christ
2016-04-27 10:04 ` [PATCH for next 14/15] ARM: phytec-som-imx6: adapt main update handler for eMMC Stefan Christ
2016-04-27 10:04 ` [PATCH for next 15/15] ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc Stefan Christ
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox