Skip to contentSkip to conversation

mx6: dts: Keep dtb entries sorted

PATCH New Fabio Estevam 3 participants 11 messages Jun 12, 2019 – Jun 24, 2019

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/7 mx6: dts: Keep dtb entries sorted

Keep dtb entries sorted to help adding new dtbs
in an organized form.

---
 arch/arm/dts/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/Makefile +2 -2
index 3d31966380..39c5491015 100644
@@ -551,14 +551,14 @@ dtb-$(CONFIG_MX6QDL) += \
 	imx6dl-icore-mipi.dtb \
 	imx6dl-icore-rqs.dtb \
 	imx6dl-mamoj.dtb \
+	imx6dl-sabreauto.dtb \
+	imx6dl-sabresd.dtb \
 	imx6q-cm-fx6.dtb \
 	imx6q-icore.dtb \
 	imx6q-icore-mipi.dtb \
 	imx6q-icore-rqs.dtb \
 	imx6q-sabreauto.dtb \
 	imx6q-sabresd.dtb \
-	imx6dl-sabreauto.dtb \
-	imx6dl-sabresd.dtb \
 	imx6qp-sabreauto.dtb \
 	imx6qp-sabresd.dtb
 
Signature · 1 line
2.17.1
author reviewer
#1 lore raw

PATCH 2/7 mx6: dts: Move dtbs under SoC level

Place dtbs under SoC level rather than board level.

imx6q-novena.dtb and imx6dl-wandboard-revb1.dtb were placed under the board config option, so move them to SoC level.

This also aligns with the kernel dts Makefile format.

---
 arch/arm/dts/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm/dts/Makefile +2 -6
index 39c5491015..0fa82f5f2e 100644
@@ -541,9 +541,7 @@ dtb-$(CONFIG_MX6Q) += \
 	imx6-apalis.dtb \
 	imx6q-display5.dtb \
 	imx6q-logicpd.dtb \
-	imx6q-novena.dtb
-
-dtb-$(CONFIG_TARGET_TBS2910) += \
+	imx6q-novena.dtb \
 	imx6q-tbs2910.dtb
 
 dtb-$(CONFIG_MX6QDL) += \
@@ -553,6 +551,7 @@ dtb-$(CONFIG_MX6QDL) += \
 	imx6dl-mamoj.dtb \
 	imx6dl-sabreauto.dtb \
 	imx6dl-sabresd.dtb \
+	imx6dl-wandboard-revb1.dtb \
 	imx6q-cm-fx6.dtb \
 	imx6q-icore.dtb \
 	imx6q-icore-mipi.dtb \
@@ -562,9 +561,6 @@ dtb-$(CONFIG_MX6QDL) += \
 	imx6qp-sabreauto.dtb \
 	imx6qp-sabresd.dtb
 
-dtb-$(CONFIG_TARGET_WANDBOARD) += \
-	imx6dl-wandboard-revb1.dtb
-
 dtb-$(CONFIG_MX6SL) += imx6sl-evk.dtb
 
 dtb-$(CONFIG_MX6SLL) += imx6sll-evk.dtb
Signature · 1 line
2.17.1
author reviewer
#2 lore raw

PATCH 3/7 wandboard: Sync with devicetree files from kernel 5.1.9

In reply to Fabio Estevam

Udate the wandboard devicetree files with the ones from kernel 5.1.9.

---
 arch/arm/dts/imx6dl-wandboard-revb1.dts   |   1 +
 arch/arm/dts/imx6qdl-wandboard-revb1.dtsi |  15 +--
 arch/arm/dts/imx6qdl-wandboard.dtsi       | 107 +---------------------
 3 files changed, 11 insertions(+), 112 deletions(-)
arch/arm/dts/imx6dl-wandboard-revb1.dts +1 -0
index 738db4fc77..c2946fbaa0 100644
@@ -13,6 +13,7 @@
 	compatible = "wand,imx6dl-wandboard", "fsl,imx6dl";
 
 	memory at 10000000 {
+		device_type = "memory";
 		reg = <0x10000000 0x40000000>;
 	};
 };
arch/arm/dts/imx6qdl-wandboard-revb1.dtsi +5 -10
index 855dc6f9df..e781a45785 100644
@@ -1,13 +1,8 @@
-/*
- * Copyright 2013 Freescale Semiconductor, Inc.
- *
- * Author: Fabio Estevam <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- */
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright 2013 Freescale Semiconductor, Inc.
+//
+// Author: Fabio Estevam <[email protected]>
 
 #include "imx6qdl-wandboard.dtsi"
 
arch/arm/dts/imx6qdl-wandboard.dtsi +5 -102

125 lines not on this page · raw message

Signature · 1 line
2.17.1
author reviewer
#3 lore raw

PATCH 4/7 wandboard: Import extra wandboard devicetree files

In reply to Fabio Estevam

Import wandboard devicetree files so that the mx6q and mx6qp variants can be properly supported.

---
 arch/arm/dts/imx6q-wandboard-revb1.dts    |  23 +++
 arch/arm/dts/imx6qdl-wandboard-revd1.dtsi | 195 ++++++++++++++++++++++
 arch/arm/dts/imx6qp-wandboard-revd1.dts   |  23 +++
 3 files changed, 241 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-wandboard-revb1.dts
 create mode 100644 arch/arm/dts/imx6qdl-wandboard-revd1.dtsi
 create mode 100644 arch/arm/dts/imx6qp-wandboard-revd1.dts
arch/arm/dts/imx6q-wandboard-revb1.dts new file +23 -0
new file mode 100644
index 0000000000..f6ccbecff9
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <[email protected]>
+ */
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-wandboard-revb1.dtsi"
+
+/ {
+	model = "Wandboard i.MX6 Quad Board rev B1";
+	compatible = "wand,imx6q-wandboard", "fsl,imx6q";
+
+	memory at 10000000 {
+		device_type = "memory";
+		reg = <0x10000000 0x80000000>;
+	};
+};
+
+&sata {
+	status = "okay";
+};
arch/arm/dts/imx6qdl-wandboard-revd1.dtsi new file +195 -0

195 lines not on this page · raw message

arch/arm/dts/imx6qp-wandboard-revd1.dts new file +23 -0
new file mode 100644
index 0000000000..08d8b78a20
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <[email protected]>
+ */
+/dts-v1/;
+#include "imx6qp.dtsi"
+#include "imx6qdl-wandboard-revd1.dtsi"
+
+/ {
+	model = "Wandboard i.MX6 QuadPlus Board revD1";
+	compatible = "wand,imx6qp-wandboard", "fsl,imx6qp";
+
+	memory at 10000000 {
+		device_type = "memory";
+		reg = <0x10000000 0x80000000>;
+	};
+};
+
+&sata {
+	status = "okay";
+};
Signature · 1 line
2.17.1
author reviewer
#4 lore raw

PATCH 5/7 wandboard: Add mmc0 alias

In reply to Fabio Estevam

Add a mmc0 alias so that U-Boot proper can associate mmc0 with the boot SD card.

---
 arch/arm/dts/imx6qdl-wandboard.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/imx6qdl-wandboard.dtsi +4 -0
index 50d9a989e0..90aa43d21b 100644
@@ -8,6 +8,10 @@
 #include <dt-bindings/gpio/gpio.h>
 
 / {
+	aliases {
+		mmc0 = &usdhc3;
+	};
+
 	chosen {
 		stdout-path = &uart1;
 	};
Signature · 1 line
2.17.1
author reviewer
#7 lore raw

PATCH 6/7 wandboard: Add FIT image support

In reply to Fabio Estevam

After the transition to DM, only the mx6dl/solo wandboard is supported.

Add FIT image support so that all the wandboard variants can be supported, like it was prior to the DM conversion.

Successfully booted Linux on mx6q/solo/qp wandboards.

---
 arch/arm/dts/Makefile       |  4 +++-
 board/wandboard/wandboard.c | 18 ++++++++++++++++++
 configs/wandboard_defconfig |  7 +++++++
 3 files changed, 28 insertions(+), 1 deletion(-)
arch/arm/dts/Makefile +3 -1
index 0fa82f5f2e..3b8b4f430c 100644
@@ -558,8 +558,10 @@ dtb-$(CONFIG_MX6QDL) += \
 	imx6q-icore-rqs.dtb \
 	imx6q-sabreauto.dtb \
 	imx6q-sabresd.dtb \
+	imx6q-wandboard-revb1.dtb \
 	imx6qp-sabreauto.dtb \
-	imx6qp-sabresd.dtb
+	imx6qp-sabresd.dtb \
+	imx6qp-wandboard-revd1.dtb
 
 dtb-$(CONFIG_MX6SL) += imx6sl-evk.dtb
 
board/wandboard/wandboard.c +18 -0
index 9d7a94ff9d..74d7a17028 100644
@@ -500,3 +500,21 @@ int checkboard(void)
 
 	return 0;
 }
+
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+	if (is_mx6dq()) {
+		if (!strcmp(name, "imx6q-wandboard-revb1"))
+			return 0;
+	} else if (is_mx6dqp()) {
+		if (!strcmp(name, "imx6qp-wandboard-revd1"))
+			return 0;
+	} else if (is_mx6dl() || is_mx6solo()) {
+		if (!strcmp(name, "imx6dl-wandboard-revb1"))
+			return 0;
+	}
+
+	return -EINVAL;
+}
+#endif
configs/wandboard_defconfig +7 -0
index ee81e1aa1c..f1d6cc56b0 100644
@@ -13,6 +13,9 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FIT=y
+CONFIG_SPL_FIT_PRINT=y
+CONFIG_SPL_LOAD_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 # CONFIG_CONSOLE_MUX is not set
@@ -23,6 +26,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_TEXT_BASE=0x00908000
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_FIT_IMAGE_TINY=y
 CONFIG_SPL_FS_EXT4=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -36,6 +41,8 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
+CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_DM=y
Signature · 1 line
2.17.1
author reviewer
#8 lore raw

PATCH 7/7 wandboard: README: Adjust the U-Boot proper binary name

In reply to Fabio Estevam

After the conversion to DM the U-Boot proper binary name is 'u-boot-dtb.img', so adjust it accordingly.

---
 board/wandboard/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/wandboard/README +1 -1
index e5170bcc81..f84f205337 100644
@@ -29,7 +29,7 @@ $ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
 
 - Flash the u-boot.img image into the SD card:
 
-sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync
+sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=69; sync
 
 - Insert the SD card into the slot located in the bottom of the board (same side
 as the mx6 processor)
Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/7 wandboard: Add mmc0 alias

In reply to Fabio Estevam
Quoted 3 lines · Fabio Estevam

Add a mmc0 alias so that U-Boot proper can associate mmc0 with the boot SD card.

Shouldn't this go in a -u-boot.dtsi if it's diverging from the linux dtsi?

Quoted 27 lines
---
 arch/arm/dts/imx6qdl-wandboard.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/imx6qdl-wandboard.dtsi +4 -1
index 50d9a989e0..90aa43d21b 100644
@@ -8,6 +8,10 @@
 #include <dt-bindings/gpio/gpio.h>
 
 / {
+       aliases {
+               mmc0 = &usdhc3;
+       };
+
        chosen {
                stdout-path = &uart1;
        };
--

2.17.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

author reviewer
#6 lore raw

PATCH 5/7 wandboard: Add mmc0 alias

Hi Peter,

Quoted 7 lines · Peter Robinson
Quoted 3 lines · Fabio Estevam

Add a mmc0 alias so that U-Boot proper can associate mmc0 with the boot SD card.

Shouldn't this go in a -u-boot.dtsi if it's diverging from the linux dtsi?

I have also originally thought about doing this, but then decided to put it in the main dtsi as I plan to submit a patch adding the mmc alias for the upstream dtsi in the kernel.

Thanks for the feedback.

#9 lore raw

PATCH 7/7 wandboard: README: Adjust the U-Boot proper binary name

In reply to Fabio Estevam
Quoted 12 lines · Fabio Estevam

After the conversion to DM the U-Boot proper binary name is 'u-boot-dtb.img', so adjust it accordingly.

---
  board/wandboard/README | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
board/wandboard/README > @@ -29,7 +29,7 @@ $ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync renamed from board/wandboard/README +0 -0
index e5170bcc81..f84f205337 100644

board/wandboard/README > @@ -29,7 +29,7 @@ $ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync

Quoted 5 lines
board/wandboard/README > @@ -29,7 +29,7 @@ $ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync renamed from board/wandboard/README +1 -1
 
  - Flash the u-boot.img image into the SD card:
 
-sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync
+sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=69; sync

With U-Boot HEAD I cannot see any difference between the files:

$ md5sum u-boot*.bin
56a64c916b79c012759ad430a52fb2c1  u-boot.bin
56a64c916b79c012759ad430a52fb2c1  u-boot-dtb.bin
ed69f924f0cb4b9415d0bed27f896be3  u-boot-nodtb.bin

So is this just a formal change?

Best regards

Heinrich

Quoted 4 lines

- Insert the SD card into the slot located in the bottom of the board (same side as the mx6 processor)

author reviewer
#10 lore raw

PATCH 7/7 wandboard: README: Adjust the U-Boot proper binary name

Hi Heinrich,

Quoted 5 lines · Heinrich Schuchardt

With U-Boot HEAD I cannot see any difference between the files:

$ md5sum u-boot*.bin
56a64c916b79c012759ad430a52fb2c1  u-boot.bin
56a64c916b79c012759ad430a52fb2c1  u-boot-dtb.bin
ed69f924f0cb4b9415d0bed27f896be3  u-boot-nodtb.bin

Actually we are talking about .img in this patch :-)

You are right: u-boot.img and u-boot-dtb.img are the same.

Quoted 1 line

So is this just a formal change?

Yes, just to point out that the board has been converted to DM and since *dtb.img has been generated, we can explicitly use it.