Skip to contentSkip to conversation

mx6cuboxi: Enable OF_CONTROL and DM in SPL

RFC In review Walter Lozano 2 participants 3 messages Jan 29, 2020 – Feb 5, 2020

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

RFC 1/1 mx6cuboxi: Enable OF_CONTROL and DM in SPL

Make an additional step to add full DM support to mx6cuboxi, including its support for SPL

With this new configuration SPL image is 50 KB, higher than the 38 KB from the previous version, but it still under the 68 KB limit.

---
 arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 4 ++++
 configs/mx6cuboxi_defconfig                                 | 3 +++
 2 files changed, 7 insertions(+)
arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi +4 -0
index d302b2e275..b1364a0bbf 100644
@@ -34,3 +34,7 @@
 &usdhc1 {
 	status = "disabled";
 };
+
+&usdhc2 {
+	u-boot,dm-pre-reloc;
+};
configs/mx6cuboxi_defconfig +3 -0
index 23ce485f43..ae8d920260 100644
@@ -24,6 +24,7 @@ CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; setenv stdout serial,vga; setenv stderr serial,vga; else setenv stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_FS_EXT4=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -36,6 +37,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-hummingboard2-emmc-som-v15"
 CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
 CONFIG_MULTI_DTB_FIT=y
@@ -44,6 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
Signature · 1 line
2.20.1
#1 lore raw

Hi Walter,

Thanks for the patch.

One comment below.

Quoted 16 lines · Walter Lozano

Make an additional step to add full DM support to mx6cuboxi, including its support for SPL

With this new configuration SPL image is 50 KB, higher than the 38 KB from the previous version, but it still under the 68 KB limit.

---
 arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 4 ++++
 configs/mx6cuboxi_defconfig                                 | 3 +++
 2 files changed, 7 insertions(+)
arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi +0 -0
index d302b2e275..b1364a0bbf 100644

arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi line 40

Quoted 7 lines
arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi +4 -0
@@ -34,3 +34,7 @@
 &usdhc1 {
 	status = "disabled";
 };
+
+&usdhc2 {
+	u-boot,dm-pre-reloc;
+};

Have you tested boot from eMMC?

You would most likely need to add &usdhc3 to SPL DT for that.

baruch

Quoted 28 lines
configs/mx6cuboxi_defconfig +3 -0
index 23ce485f43..ae8d920260 100644
@@ -24,6 +24,7 @@ CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; setenv stdout serial,vga; setenv stderr serial,vga; else setenv stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_FS_EXT4=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -36,6 +37,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-hummingboard2-emmc-som-v15"
 CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
 CONFIG_MULTI_DTB_FIT=y
@@ -44,6 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

Hi Baruch,

Thanks for your comments. My replay below.

Quoted 32 lines · Baruch Siach

Hi Walter,

Thanks for the patch.

One comment below.

Quoted 16 lines · Walter Lozano

Make an additional step to add full DM support to mx6cuboxi, including its support for SPL

With this new configuration SPL image is 50 KB, higher than the 38 KB from the previous version, but it still under the 68 KB limit.

---
  arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 4 ++++
  configs/mx6cuboxi_defconfig                                 | 3 +++
  2 files changed, 7 insertions(+)
arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi +0 -0
index d302b2e275..b1364a0bbf 100644

arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi line 40

Quoted 7 lines
arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi +4 -0
@@ -34,3 +34,7 @@
  &usdhc1 {
  	status = "disabled";
  };
+
+&usdhc2 {
+	u-boot,dm-pre-reloc;
+};

Have you tested boot from eMMC?

Quoted 1 line

You would most likely need to add &usdhc3 to SPL DT for that.

Good point. I haven't tested booting from eMMC as I can only boot from SD because of eFuse settings. However after re thinking it should be still possible to test it by keeping SPL on SD and placing U-Boot on eMMC.

Regards,

Walter

Quoted 31 lines

baruch

Quoted 28 lines
configs/mx6cuboxi_defconfig +3 -0
index 23ce485f43..ae8d920260 100644
@@ -24,6 +24,7 @@ CONFIG_USE_PREBOOT=y
  CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; setenv stdout serial,vga; setenv stderr serial,vga; else setenv stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
  CONFIG_BOUNCE_BUFFER=y
  CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL_SEPARATE_BSS=y
  CONFIG_SPL_FS_EXT4=y
  CONFIG_SPL_I2C_SUPPORT=y
  CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -36,6 +37,7 @@ CONFIG_CMD_CACHE=y
  CONFIG_CMD_EXT4_WRITE=y
  # CONFIG_SPL_PARTITION_UUIDS is not set
  CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
  CONFIG_DEFAULT_DEVICE_TREE="imx6dl-hummingboard2-emmc-som-v15"
  CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
  CONFIG_MULTI_DTB_FIT=y
@@ -44,6 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
  CONFIG_NET_RANDOM_ETHADDR=y
  CONFIG_DM=y
+CONFIG_SPL_DM=y
  CONFIG_DWC_AHSATA=y
  CONFIG_DM_GPIO=y
  CONFIG_DM_MMC=y