mx6sabre: Add DM and SPL FIT support
Subsystems (7)
v3 cover mx6sabre: Add DM and SPL FIT support
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.html
Changes since v2:
* Removed the unecessary SYS_MALLOC_F_LEN from both defocnfig
* Fixed the copyright for all the *u-boot.dtsi files
Abel Vesa (22):
usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE
usb: ehci-mx6: Make regulator DM_REGULATOR dependent
configs: imx6sabreauto: Add DM_MMC support
configs: imx6sabreauto: Add DM_USB support
mmc: fsl_esdhc: Fix DM_REGULATOR ifdefs for SPL builds
board: mx6sabresd: Add board_fit_config_name_match to support FIT in
SPL
board: mx6sabreauto: Add board_fit_config_name_match to support FIT in
SPL
arm: dts: Add all the imx6[q|qp|dl] sabre[auto|sd] u-boot dts[i] files
arm: dts: Update all the dts[i] files for imx6[q|qp|dl] sabre[auto|sd]
arm: imx: Add FIT SPL its
configs: mx6sabreauto: Add SPL FIT and DM support
configs: mx6sabresd: Add SPL FIT and DM support
mx6sabreauto: Add DM_GPIO support
mx6sabresd: Add DM_GPIO support
configs: mx6sabreauto: Add DM_SPI_FLASH necessary configs
configs: mx6sabresd: Add DM_SPI_FLASH necessary configs
board: mx6sabreauto: Remove the non-DM code
board: mx6sabresd: Remove non-DM code
board: mx6sabresd: Remove the enet reset gpio handling
configs: mx6sabresd: Reduce size for SPL by disabling SPL_DOS and
SPL_EFI
board: mx6sabreauto: Update README with the SPL DM FIT info
board: mx6sabresd: Update README with the SPL DM FIT info
arch/arm/dts/Makefile | 8 +- arch/arm/dts/imx6dl-sabreauto-u-boot.dtsi | 6 + arch/arm/dts/imx6dl-sabreauto.dts | 13 + arch/arm/dts/imx6dl-sabresd-u-boot.dtsi | 6 + arch/arm/dts/imx6dl-sabresd.dts | 18 + arch/arm/dts/imx6dl.dtsi | 306 ++++++++++- arch/arm/dts/imx6q-sabreauto-u-boot.dtsi | 6 + arch/arm/dts/imx6q-sabreauto.dts | 18 + arch/arm/dts/imx6q-sabresd-u-boot.dtsi | 6 + arch/arm/dts/imx6q-sabresd.dts | 23 + arch/arm/dts/imx6q.dtsi | 310 +++++++++-- arch/arm/dts/imx6qdl-sabreauto-u-boot.dtsi | 21 + arch/arm/dts/imx6qdl-sabreauto.dtsi | 810 ++++++++++++++++++++++++++++ arch/arm/dts/imx6qdl-sabresd-u-boot.dtsi | 14 + arch/arm/dts/imx6qdl-sabresd.dtsi | 741 +++++++++++++++++++++++++ arch/arm/dts/imx6qdl-u-boot.dtsi | 4 +- arch/arm/dts/imx6qdl.dtsi | 455 +++++++++------- arch/arm/dts/imx6qp-sabreauto-u-boot.dtsi | 6 + arch/arm/dts/imx6qp-sabreauto.dts | 55 ++ arch/arm/dts/imx6qp-sabresd-u-boot.dtsi | 6 + arch/arm/dts/imx6qp-sabresd.dts | 55 ++ arch/arm/dts/imx6qp.dtsi | 115 ++++ arch/arm/include/asm/arch-am33xx/spl.h | 2 +- arch/arm/mach-imx/mx6/fit_spl.its | 41 ++ arch/arm/mach-omap2/boot-common.c | 2 +- board/freescale/mx6sabreauto/README | 6 +- board/freescale/mx6sabreauto/mx6sabreauto.c | 91 +--- board/freescale/mx6sabresd/README | 9 +- board/freescale/mx6sabresd/mx6sabresd.c | 78 +-- common/Makefile | 5 +- common/spl/Kconfig | 4 +- common/spl/Makefile | 2 +- common/spl/spl_usb.c | 4 - configs/am43xx_evm_usbhost_boot_defconfig | 2 +- configs/am43xx_hs_evm_defconfig | 2 +- configs/mx6sabreauto_defconfig | 21 +- configs/mx6sabresd_defconfig | 26 +- drivers/mmc/fsl_esdhc.c | 8 +- drivers/usb/host/ehci-mx6.c | 7 +- 39 files changed, 2900 insertions(+), 412 deletions(-) create mode 100644 arch/arm/dts/imx6dl-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-sabreauto.dts create mode 100644 arch/arm/dts/imx6dl-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-sabresd.dts create mode 100644 arch/arm/dts/imx6q-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6q-sabreauto.dts create mode 100644 arch/arm/dts/imx6q-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6q-sabresd.dts create mode 100644 arch/arm/dts/imx6qdl-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabreauto.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabresd.dtsi create mode 100644 arch/arm/dts/imx6qp-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qp-sabreauto.dts create mode 100644 arch/arm/dts/imx6qp-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qp-sabresd.dts create mode 100644 arch/arm/dts/imx6qp.dtsi create mode 100644 arch/arm/mach-imx/mx6/fit_spl.its
Signature · 1 line
2.7.4
PATCH v3 1/22 usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE
Since there is the SPL_USB_HOST_SUPPORT for enabling USB support in SPL, makes more sense to rename the SPL_USB_SUPPORT as SPL_USB_STORAGE. Everything that is not part of the usb storage support in SPL is now build under SPL_USB_HOST_SUPPORT.
--- arch/arm/include/asm/arch-am33xx/spl.h | 2 +- arch/arm/mach-omap2/boot-common.c | 2 +- common/Makefile | 5 +++-- common/spl/Kconfig | 4 ++-- common/spl/Makefile | 2 +- common/spl/spl_usb.c | 4 ---- configs/am43xx_evm_usbhost_boot_defconfig | 2 +- configs/am43xx_hs_evm_defconfig | 2 +- 8 files changed, 10 insertions(+), 13 deletions(-)
arch/arm/include/asm/arch-am33xx/spl.h +1 -1
@@ -62,7 +62,7 @@#define BOOT_DEVICE_CPGMAC 0x47#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1 -#ifdef CONFIG_SPL_USB_SUPPORT +#ifdef CONFIG_SPL_USB_STORAGE #define MMC_BOOT_DEVICES_END BOOT_DEVICE_USB#else #define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
arch/arm/mach-omap2/boot-common.c +1 -1
@@ -93,7 +93,7 @@ void save_omap_boot_params(void) sys_boot_device =1 ;break ;#endif -#if defined(BOOT_DEVICE_USB ) && !defined(CONFIG_SPL_USB_SUPPORT ) +#if defined(BOOT_DEVICE_USB ) && !defined(CONFIG_SPL_USB_STORAGE )case BOOT_DEVICE_USB : sys_boot_device =1 ;break ;
common/Makefile +3 -2
@@ -75,8 +75,9 @@ obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o ifdef CONFIG_SPL_USB_HOST_SUPPORT -obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o -obj-$(CONFIG_USB_STORAGE) += usb_storage.o +obj-y += usb.o +obj-y += usb_hub.o +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o else obj-$(CONFIG_USB_MUSB_HOST) += usb.o endif
common/spl/Kconfig +2 -2
@@ -766,9 +766,9 @@ config SPL_USB_HOST_SUPPORT device can be attached. This option enables the drivers in drivers/usb/host as part of an SPL build. -config SPL_USB_SUPPORT +config SPL_USB_STORAGE bool "Support loading from USB" - depends on SPL_USB_HOST_SUPPORT + depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB) help Enable support for USB devices in SPL. This allows use of USB devices such as hard drives and flash drivers for loading U-Boot.
common/spl/Makefile +1 -1
@@ -22,7 +22,7 @@ obj-$(CONFIG_$(SPL_TPL_)NET_SUPPORT) += spl_net.o obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += spl_mmc.o obj-$(CONFIG_$(SPL_TPL_)ATF) += spl_atf.o obj-$(CONFIG_$(SPL_TPL_)OPTEE) += spl_optee.o -obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o +obj-$(CONFIG_$(SPL_TPL_)USB_STORAGE) += spl_usb.o obj-$(CONFIG_$(SPL_TPL_)FAT_SUPPORT) += spl_fat.o obj-$(CONFIG_$(SPL_TPL_)EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o
common/spl/spl_usb.c +0 -4
@@ -15,9 +15,7 @@#include <usb.h> #include <fat.h> -#ifdef CONFIG_USB_STORAGE static int usb_stor_curr_dev =-1 ;/* current device */ -#endif static int spl_usb_load_image (struct spl_image_info *spl_image,struct spl_boot_device *bootdev)
@@ -34,13 +32,11 @@ static int spl_usb_load_image(struct spl_image_info *spl_image,return err; } -#ifdef CONFIG_USB_STORAGE /* try to recognize storage devices immediately */ usb_stor_curr_dev =usb_stor_scan (1 ); stor_dev =blk_get_devnum_by_type (IF_TYPE_USB , usb_stor_curr_dev);if (!stor_dev)return -ENODEV ; -#endif debug ("boot mode - FAT\n" );
configs/am43xx_evm_usbhost_boot_defconfig +1 -1
@@ -14,7 +14,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_USB_HOST_SUPPORT=y -CONFIG_SPL_USB_SUPPORT=y +CONFIG_SPL_USB_STORAGE=y CONFIG_CMD_SPL=y CONFIG_CMD_SPL_NAND_OFS=0x00100000 CONFIG_CMD_SPL_WRITE_SIZE=0x40000
configs/am43xx_hs_evm_defconfig +1 -1
@@ -24,7 +24,7 @@ CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_NET_SUPPORT=y CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" CONFIG_SPL_USB_HOST_SUPPORT=y -CONFIG_SPL_USB_SUPPORT=y +CONFIG_SPL_USB_STORAGE=y CONFIG_SPL_USB_GADGET=y CONFIG_SPL_USB_ETHER=y # CONFIG_CMD_FLASH is not set
Signature · 1 line
2.7.4
PATCH v3 2/22 usb: ehci-mx6: Make regulator DM_REGULATOR dependent
In reply to Abel VesaDo the regulator related work only if the build has the DM_REGULATOR.
--- drivers/usb/host/ehci-mx6.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-mx6.c +6 -1
@@ -404,6 +404,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)if (ret)return ret; +#if CONFIG_IS_ENABLED (DM_REGULATOR )if (priv->vbus_supply) { ret = regulator_set_enable(priv->vbus_supply, (type == USB_INIT_DEVICE) ?
@@ -413,6 +414,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) return ret; } } +#endif if (type ==USB_INIT_DEVICE )return 0 ;
@@ -514,15 +516,17 @@ static int ehci_usb_probe(struct udevice *dev) priv->portnr = dev->seq; priv->init_type = type; +#if CONFIG_IS_ENABLED (DM_REGULATOR ) ret =device_get_supply_regulator (dev,"vbus-supply" , &priv->vbus_supply);if (ret)debug ("%s: No vbus supply\n" , dev->name); - +#endif ret =ehci_mx6_common_init (ehci, priv->portnr);if (ret)return ret; +#if CONFIG_IS_ENABLED (DM_REGULATOR )if (priv->vbus_supply) { ret = regulator_set_enable(priv->vbus_supply, (type == USB_INIT_DEVICE) ?
@@ -532,6 +536,7 @@ static int ehci_usb_probe(struct udevice *dev) return ret; } } +#endif if (priv->init_type ==USB_INIT_HOST ) {setbits_le32 (&ehci->usbmode,CM_HOST );
Signature · 1 line
2.7.4
PATCH v3 3/22 configs: imx6sabreauto: Add DM_MMC support
In reply to Abel VesaAdd DM_MMC config to imx6sabreauto defconfig.
--- configs/mx6sabreauto_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/mx6sabreauto_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DFU_MMC=y CONFIG_DFU_SF=y +CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_NAND=y CONFIG_NAND_MXS=y
Signature · 1 line
2.7.4
PATCH v3 4/22 configs: imx6sabreauto: Add DM_USB support
In reply to Abel VesaAdd the DM support for USB. For that, DM_REGULATOR is needed.
--- configs/mx6sabreauto_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/mx6sabreauto_defconfig +2 -0
@@ -52,9 +52,11 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y +CONFIG_DM_REGULATOR=y CONFIG_SPI=y CONFIG_MXC_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL"
Signature · 1 line
2.7.4
PATCH v3 5/22 mmc: fsl_esdhc: Fix DM_REGULATOR ifdefs for SPL builds
In reply to Abel VesaSince the fsl_esdhc will also be used by SPL, make the preprocessor switches more generic to allow any kind of build.
--- drivers/mmc/fsl_esdhc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mmc/fsl_esdhc.c +4 -4
@@ -804,7 +804,7 @@ static int esdhc_set_voltage(struct mmc *mmc)case MMC_SIGNAL_VOLTAGE_330 :if (priv->vs18_enable)return -EIO ; -#ifdef CONFIG_DM_REGULATOR +#if CONFIG_IS_ENABLED (DM_REGULATOR )if (!IS_ERR_OR_NULL (priv->vqmmc_dev)) { ret =regulator_set_value (priv->vqmmc_dev,3300000 );if (ret) {
@@ -823,7 +823,7 @@ static int esdhc_set_voltage(struct mmc *mmc)return -EAGAIN ;case MMC_SIGNAL_VOLTAGE_180 : -#ifdef CONFIG_DM_REGULATOR +#if CONFIG_IS_ENABLED (DM_REGULATOR )if (!IS_ERR_OR_NULL (priv->vqmmc_dev)) { ret =regulator_set_value (priv->vqmmc_dev,1800000 );if (ret) {
@@ -1442,7 +1442,7 @@ static int fsl_esdhc_probe(struct udevice *dev)int node =dev_of_offset (dev);struct esdhc_soc_data *data = (struct esdhc_soc_data *)dev_get_driver_data (dev); -#ifdef CONFIG_DM_REGULATOR +#if CONFIG_IS_ENABLED (DM_REGULATOR )struct udevice *vqmmc_dev;#endif fdt_addr_t addr;
@@ -1500,7 +1500,7 @@ static int fsl_esdhc_probe(struct udevice *dev) priv->vs18_enable =0 ; -#ifdef CONFIG_DM_REGULATOR +#if CONFIG_IS_ENABLED (DM_REGULATOR )/* * If emmc I/O has a fixed voltage at 1.8V, this must be provided, * otherwise, emmc will work abnormally.
Signature · 1 line
2.7.4
PATCH v3 6/22 board: mx6sabresd: Add board_fit_config_name_match to support FIT in SPL
In reply to Abel VesaThis matches one of the following three boards (or fails):
- imx6q-sabresd
- imx6qp-sabresd
- imx6dl-sabresd
--- board/freescale/mx6sabresd/mx6sabresd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
board/freescale/mx6sabresd/mx6sabresd.c +18 -0
@@ -1062,3 +1062,21 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); }#endif + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match (const char *name) +{ +if (is_mx6dq ()) { +if (!strcmp (name,"imx6q-sabresd" )) +return 0 ; + }else if (is_mx6dqp ()) { +if (!strcmp (name,"imx6qp-sabresd" )) +return 0 ; + }else if (is_mx6dl ()) { +if (!strcmp (name,"imx6dl-sabresd" )) +return 0 ; + } + +return -1 ; +} +#endif
Signature · 1 line
2.7.4
PATCH v3 7/22 board: mx6sabreauto: Add board_fit_config_name_match to support FIT in SPL
In reply to Abel VesaThis matches one of the following three boards (or fails):
- imx6q-sabreauto
- imx6qp-sabreauto
- imx6dl-sabreauto
--- board/freescale/mx6sabreauto/mx6sabreauto.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
board/freescale/mx6sabreauto/mx6sabreauto.c +18 -0
@@ -1097,3 +1097,21 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); }#endif + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match (const char *name) +{ +if (is_mx6dq ()) { +if (!strcmp (name,"imx6q-sabreauto" )) +return 0 ; + }else if (is_mx6dqp ()) { +if (!strcmp (name,"imx6qp-sabreauto" )) +return 0 ; + }else if (is_mx6dl ()) { +if (!strcmp (name,"imx6dl-sabreauto" )) +return 0 ; + } + +return -1 ; +} +#endif
Signature · 1 line
2.7.4
PATCH v3 8/22 arm: dts: Add all the imx6[q|qp|dl] sabre[auto|sd] u-boot dts[i] files
In reply to Abel VesaThis allows us to keep the basic dts[i] files up-to-date with the ones in kernel, but at the same time allowing the u-boot to add its own properties to the existing nodes.
--- arch/arm/dts/imx6dl-sabreauto-u-boot.dtsi | 6 ++++++ arch/arm/dts/imx6dl-sabresd-u-boot.dtsi | 6 ++++++ arch/arm/dts/imx6q-sabreauto-u-boot.dtsi | 6 ++++++ arch/arm/dts/imx6q-sabresd-u-boot.dtsi | 6 ++++++ arch/arm/dts/imx6qdl-sabreauto-u-boot.dtsi | 21 +++++++++++++++++++++ arch/arm/dts/imx6qdl-sabresd-u-boot.dtsi | 14 ++++++++++++++ arch/arm/dts/imx6qdl-u-boot.dtsi | 4 ++-- arch/arm/dts/imx6qp-sabreauto-u-boot.dtsi | 6 ++++++ arch/arm/dts/imx6qp-sabresd-u-boot.dtsi | 6 ++++++ 9 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/imx6dl-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6q-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6q-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabresd-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qp-sabreauto-u-boot.dtsi create mode 100644 arch/arm/dts/imx6qp-sabresd-u-boot.dtsi
arch/arm/dts/imx6dl-sabreauto-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabreauto-u-boot.dtsi"
arch/arm/dts/imx6dl-sabresd-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabresd-u-boot.dtsi"
arch/arm/dts/imx6q-sabreauto-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabreauto-u-boot.dtsi"
arch/arm/dts/imx6q-sabresd-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabresd-u-boot.dtsi"
arch/arm/dts/imx6qdl-sabreauto-u-boot.dtsi new file +21 -0
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-u-boot.dtsi" + +/ { + aliases { + mmc0 = &usdhc3; + }; +}; + +&usdhc3 { + no-1-8-v; + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +};
arch/arm/dts/imx6qdl-sabresd-u-boot.dtsi new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-u-boot.dtsi" + +&usdhc3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +};
arch/arm/dts/imx6qdl-u-boot.dtsi +2 -2
@@ -7,11 +7,11 @@ soc { u-boot,dm-spl; - aips-bus at 02000000 { + aips-bus at 2000000 { u-boot,dm-spl; }; - aips-bus at 02100000 { + aips-bus at 2100000 { u-boot,dm-spl; }; };
arch/arm/dts/imx6qp-sabreauto-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabreauto-u-boot.dtsi"
arch/arm/dts/imx6qp-sabresd-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 NXP + */ + +#include "imx6qdl-sabresd-u-boot.dtsi"
Signature · 1 line
2.7.4
PATCH v3 9/22 arm: dts: Update all the dts[i] files for imx6[q|qp|dl] sabre[auto|sd]
In reply to Abel VesaUpdate all the dts[i] files for imx6[q|qp|dl] sabre[auto|sd] to the ones from kernel v4.20 (commit 8fe28cb58bcb2).
--- arch/arm/dts/Makefile | 8 +- arch/arm/dts/imx6dl-sabreauto.dts | 13 + arch/arm/dts/imx6dl-sabresd.dts | 18 + arch/arm/dts/imx6dl.dtsi | 306 ++++++++++++-- arch/arm/dts/imx6q-sabreauto.dts | 18 + arch/arm/dts/imx6q-sabresd.dts | 23 + arch/arm/dts/imx6q.dtsi | 310 ++++++++++++-- arch/arm/dts/imx6qdl-sabreauto.dtsi | 810 ++++++++++++++++++++++++++++++++++++ arch/arm/dts/imx6qdl-sabresd.dtsi | 741 +++++++++++++++++++++++++++++++++ arch/arm/dts/imx6qdl.dtsi | 455 +++++++++++--------- arch/arm/dts/imx6qp-sabreauto.dts | 55 +++ arch/arm/dts/imx6qp-sabresd.dts | 55 +++ arch/arm/dts/imx6qp.dtsi | 115 +++++ 13 files changed, 2669 insertions(+), 258 deletions(-) create mode 100644 arch/arm/dts/imx6dl-sabreauto.dts create mode 100644 arch/arm/dts/imx6dl-sabresd.dts create mode 100644 arch/arm/dts/imx6q-sabreauto.dts create mode 100644 arch/arm/dts/imx6q-sabresd.dts create mode 100644 arch/arm/dts/imx6qdl-sabreauto.dtsi create mode 100644 arch/arm/dts/imx6qdl-sabresd.dtsi create mode 100644 arch/arm/dts/imx6qp-sabreauto.dts create mode 100644 arch/arm/dts/imx6qp-sabresd.dts create mode 100644 arch/arm/dts/imx6qp.dtsi
arch/arm/dts/Makefile +7 -1
@@ -443,7 +443,13 @@ dtb-$(CONFIG_MX6QDL) += \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \ imx6q-icore-rqs.dtb \ - imx6q-logicpd.dtb + imx6q-logicpd.dtb \ + imx6q-sabreauto.dtb \ + imx6q-sabresd.dtb \ + imx6dl-sabreauto.dtb \ + imx6dl-sabresd.dtb \ + imx6qp-sabreauto.dtb \ + imx6qp-sabresd.dtb dtb-$(CONFIG_MX6SL) += imx6sl-evk.dtb
arch/arm/dts/imx6dl-sabreauto.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Copyright (C) 2013 Freescale Semiconductor, Inc. + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-sabreauto.dtsi" + +/ { + model = "Freescale i.MX6 DualLite/Solo SABRE Automotive Board"; + compatible = "fsl,imx6dl-sabreauto", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-sabresd.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Copyright (C) 2013 Freescale Semiconductor, Inc. + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-sabresd.dtsi" + +/ { + model = "Freescale i.MX6 DualLite SABRE Smart Device Board"; + compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl"; +}; + +&ipu1_csi1_from_ipu1_csi1_mux { + clock-lanes = <0>; + data-lanes = <1 2>; +};
arch/arm/dts/imx6dl.dtsi +282 -24
365 lines not on this page · raw message
arch/arm/dts/imx6q-sabreauto.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright 2012 Freescale Semiconductor, Inc. +// Copyright 2011 Linaro Ltd. + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-sabreauto.dtsi" + +/ { + model = "Freescale i.MX6 Quad SABRE Automotive Board"; + compatible = "fsl,imx6q-sabreauto", "fsl,imx6q"; +}; + +&sata { + status = "okay"; +};
arch/arm/dts/imx6q-sabresd.dts new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright 2012 Freescale Semiconductor, Inc. +// Copyright 2011 Linaro Ltd. + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-sabresd.dtsi" + +/ { + model = "Freescale i.MX6 Quad SABRE Smart Device Board"; + compatible = "fsl,imx6q-sabresd", "fsl,imx6q"; +}; + +&sata { + status = "okay"; +}; + +&ipu1_csi1_from_mipi_vc1 { + clock-lanes = <0>; + data-lanes = <1 2>; +};
arch/arm/dts/imx6q.dtsi +276 -34
450 lines not on this page · raw message
arch/arm/dts/imx6qdl-sabreauto.dtsi new file +810 -0
810 lines not on this page · raw message
arch/arm/dts/imx6qdl-sabresd.dtsi new file +741 -0
741 lines not on this page · raw message
arch/arm/dts/imx6qdl.dtsi +256 -199
548 lines not on this page · raw message
arch/arm/dts/imx6qp-sabreauto.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6qp-sabresd.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6qp.dtsi new file +115 -0
115 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
PATCH v3 10/22 arm: imx: Add FIT SPL its
In reply to Abel VesaAdd simple its in order to allow SPL to boot u-boot proper via FIT table.
--- arch/arm/mach-imx/mx6/fit_spl.its | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 arch/arm/mach-imx/mx6/fit_spl.its
arch/arm/mach-imx/mx6/fit_spl.its new file +41 -0
@@ -0,0 +1,41 @@ +/* + * Copyright (C) 2018 NXP + * + * Simple U-boot fit source file containing U-Boot (with dtb appended) + */ + +/dts-v1/; + +/ { + description = "Image for u-boot proper (with dtb appended)"; + #address-cells = <1>; + + images { + #address-cells = <1>; + #size-cells = <0>; + + uboot at 1 { + reg = <0>; + description = "U-Boot"; + data = /incbin/("../../../../u-boot-fit-dtb.bin"); + type = "standalone"; + os = "U-Boot"; + compression = "none"; + arch = "arm"; + load = <0x17800000>; + }; + }; + + configurations { + #address-cells = <1>; + #size-cells = <0>; + + default = "conf at 1"; + + conf at 1 { + reg = <0>; + description = "i.MX armv7"; + loadables = "uboot at 1"; + }; + }; +};
Signature · 1 line
2.7.4
PATCH v3 11/22 configs: mx6sabreauto: Add SPL FIT and DM support
In reply to Abel VesaEnable all the necessary configs for SPL DM and FIT support for mx6sabreauto.
--- configs/mx6sabreauto_defconfig | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
configs/mx6sabreauto_defconfig +14 -1
@@ -11,12 +11,19 @@ CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_NXP_BOARD_REVISION=y CONFIG_NR_DRAM_BANKS=1 +# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT=y +CONFIG_SPL_FIT_PRINT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_SOURCE="arch/arm/mach-imx/mx6/fit_spl.its" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_BOUNCE_BUFFER=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_EXT_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -40,8 +47,15 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabreauto" +CONFIG_OF_LIST="imx6dl-sabreauto imx6q-sabreauto imx6qp-sabreauto" +CONFIG_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_SF=y CONFIG_DM_MMC=y
@@ -68,4 +82,3 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set -CONFIG_OF_LIBFDT=y
Signature · 1 line
2.7.4
PATCH v3 12/22 configs: mx6sabresd: Add SPL FIT and DM support
In reply to Abel VesaEnable all the necessary configs for SPL DM and FIT support for mx6sabresd.
--- configs/mx6sabresd_defconfig | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
configs/mx6sabresd_defconfig +19 -2
@@ -10,12 +10,19 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 +# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT=y +CONFIG_SPL_FIT_PRINT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_SOURCE="arch/arm/mach-imx/mx6/fit_spl.its" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_BOUNCE_BUFFER=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_EXT_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y
@@ -47,23 +54,34 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_EFI_PARTITION=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd" +CONFIG_OF_LIST="imx6q-sabresd imx6qp-sabresd imx6dl-sabresd" +CONFIG_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT=y +CONFIG_SPL_OF_LIST="imx6dl-sabresd imx6q-sabresd imx6qp-sabresd" CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_SPL_DM=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 CONFIG_FASTBOOT_BUF_SIZE=0x10000000 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 +CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_REGULATOR=y CONFIG_SPI=y CONFIG_MXC_SPI=y CONFIG_USB=y -CONFIG_USB_STORAGE=y +CONFIG_DM_USB=y +# CONFIG_SPL_DM_USB is not set CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525
@@ -73,4 +91,3 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set -CONFIG_OF_LIBFDT=y
Signature · 1 line
2.7.4
PATCH v3 13/22 mx6sabreauto: Add DM_GPIO support
In reply to Abel VesaAdd the DM_GPIO related config for mx6sabreauto.
Also add the gpio request calls.
--- board/freescale/mx6sabreauto/mx6sabreauto.c | 3 +++ configs/mx6sabreauto_defconfig | 1 + 2 files changed, 4 insertions(+)
board/freescale/mx6sabreauto/mx6sabreauto.c +3 -0
@@ -501,6 +501,7 @@ iomux_v3_cfg_t const backlight_pads[] = {static void setup_iomux_backlight (void ) { +gpio_request (IMX_GPIO_NR (2 ,9 ),"backlight" );gpio_direction_output (IMX_GPIO_NR (2 ,9 ),1 );SETUP_IOMUX_PADS (backlight_pads); }
@@ -594,6 +595,7 @@ int board_init(void)else setup_i2c (1 ,CONFIG_SYS_I2C_SPEED ,0x7f , &mx6dl_i2c_pad_info1);/* I2C 3 Steer */ +gpio_request (IMX_GPIO_NR (5 ,4 ),"steer logic" );gpio_direction_output (IMX_GPIO_NR (5 ,4 ),1 );SETUP_IOMUX_PADS (i2c3_pads);#ifndef CONFIG_SYS_FLASH_CFI
@@ -602,6 +604,7 @@ int board_init(void) else setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info2);#endif +gpio_request (IMX_GPIO_NR (1 ,15 ),"expander en" );gpio_direction_output (IMX_GPIO_NR (1 ,15 ),1 );SETUP_IOMUX_PADS (port_exp);
configs/mx6sabreauto_defconfig +1 -0
@@ -58,6 +58,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_SF=y +CONFIG_DM_GPIO=y CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_NAND=y
Signature · 1 line
2.7.4
PATCH v3 14/22 mx6sabresd: Add DM_GPIO support
In reply to Abel VesaAdd the DM_GPIO related config for mx6sabresd.
Also add the gpio request calls.
--- board/freescale/mx6sabresd/mx6sabresd.c | 5 +++++ configs/mx6sabresd_defconfig | 1 + 2 files changed, 6 insertions(+)
board/freescale/mx6sabresd/mx6sabresd.c +5 -0
@@ -96,6 +96,7 @@ static void setup_iomux_enet(void)SETUP_IOMUX_PADS (enet_pads);/* Reset AR8031 PHY */ +gpio_request (IMX_GPIO_NR (1 ,25 ),"ENET PHY Reset" );gpio_direction_output (IMX_GPIO_NR (1 ,25 ) ,0 );mdelay (10 );gpio_set_value (IMX_GPIO_NR (1 ,25 ),1 );
@@ -189,6 +190,7 @@ static iomux_v3_cfg_t const bl_pads[] = {static void enable_backlight (void ) {SETUP_IOMUX_PADS (bl_pads); +gpio_request (DISP0_PWR_EN ,"Display Power Enable" );gpio_direction_output (DISP0_PWR_EN ,1 ); }
@@ -307,11 +309,13 @@ int board_mmc_init(bd_t *bis)switch (i) {case 0 :SETUP_IOMUX_PADS (usdhc2_pads); +gpio_request (USDHC2_CD_GPIO ,"USDHC2 CD" );gpio_direction_input (USDHC2_CD_GPIO ); usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC2_CLK );break ;case 1 :SETUP_IOMUX_PADS (usdhc3_pads); +gpio_request (USDHC3_CD_GPIO ,"USDHC3 CD" );gpio_direction_input (USDHC3_CD_GPIO ); usdhc_cfg[1 ].sdhc_clk =mxc_get_clock (MXC_ESDHC3_CLK );break ;
@@ -729,6 +733,7 @@ int checkboard(void)#ifdef CONFIG_SPL_OS_BOOT int spl_start_uboot (void ) { +gpio_request (KEY_VOL_UP ,"KEY Volume UP" );gpio_direction_input (KEY_VOL_UP );/* Only enter in Falcon mode if KEY_VOL_UP is pressed */
configs/mx6sabresd_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x12000000 CONFIG_FASTBOOT_BUF_SIZE=0x10000000 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 +CONFIG_DM_GPIO=y CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y
Signature · 1 line
2.7.4
PATCH v3 15/22 configs: mx6sabreauto: Add DM_SPI_FLASH necessary configs
In reply to Abel VesaEnable all neceassary configs to support DM_SPI_FLASH on mx6sabreauto.
--- configs/mx6sabreauto_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/mx6sabreauto_defconfig +2 -0
@@ -63,12 +63,14 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_NAND=y CONFIG_NAND_MXS=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_DM_REGULATOR=y CONFIG_SPI=y +CONFIG_DM_SPI=y CONFIG_MXC_SPI=y CONFIG_USB=y CONFIG_DM_USB=y
Signature · 1 line
2.7.4
PATCH v3 16/22 configs: mx6sabresd: Add DM_SPI_FLASH necessary configs
In reply to Abel VesaEnable all neceassary configs to support DM_SPI_FLASH on mx6sabresd.
--- configs/mx6sabresd_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/mx6sabresd_defconfig +2 -0
@@ -72,6 +72,7 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_DM_GPIO=y CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y
@@ -79,6 +80,7 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_DM_REGULATOR=y CONFIG_SPI=y +CONFIG_DM_SPI=y CONFIG_MXC_SPI=y CONFIG_USB=y CONFIG_DM_USB=y
Signature · 1 line
2.7.4
PATCH v3 17/22 board: mx6sabreauto: Remove the non-DM code
In reply to Abel VesaSince the mx6sabreauto has DM support, remove the unused non-DM code from mx6sabreauto board file.
--- board/freescale/mx6sabreauto/mx6sabreauto.c | 70 ----------------------------- 1 file changed, 70 deletions(-)
board/freescale/mx6sabreauto/mx6sabreauto.c +0 -70
@@ -159,44 +159,6 @@ static iomux_v3_cfg_t const port_exp[] = { IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL)), }; -/*Define for building port exp gpio, pin starts from 0*/ -#define PORTEXP_IO_NR (chip, pin) \ - ((chip << 5) + pin) - -/*Get the chip addr from a ioexp gpio*/ -#define PORTEXP_IO_TO_CHIP (gpio_nr) \ - (gpio_nr >> 5) - -/*Get the pin number from a ioexp gpio*/ -#define PORTEXP_IO_TO_PIN (gpio_nr) \ - (gpio_nr & 0x1f) - -static int port_exp_direction_output (unsigned gpio,int value) -{ -int ret; - -i2c_set_bus_num (2 ); - ret =i2c_probe (PORTEXP_IO_TO_CHIP (gpio)); -if (ret) -return ret; - - ret =pca953x_set_dir (PORTEXP_IO_TO_CHIP (gpio), - (1 <<PORTEXP_IO_TO_PIN (gpio)), - (PCA953X_DIR_OUT <<PORTEXP_IO_TO_PIN (gpio))); - -if (ret) -return ret; - - ret =pca953x_set_val (PORTEXP_IO_TO_CHIP (gpio), - (1 <<PORTEXP_IO_TO_PIN (gpio)), - (value <<PORTEXP_IO_TO_PIN (gpio))); - -if (ret) -return ret; - -return 0 ; -} -#ifdef CONFIG_MTD_NOR_FLASH static iomux_v3_cfg_t const eimnor_pads[] = { IOMUX_PADS(PAD_EIM_D16__EIM_DATA16 | MUX_PAD_CTRL(WEIM_NOR_PAD_CTRL)),
@@ -681,19 +643,10 @@ int checkboard(void) }#ifdef CONFIG_USB_EHCI_MX6 -#define USB_HOST1_PWR PORTEXP_IO_NR(0x32, 7) -#define USB_OTG_PWR PORTEXP_IO_NR(0x34, 1) - -iomux_v3_cfg_t const usb_otg_pads[] = { -IOMUX_PADS (PAD_ENET_RX_ER__USB_OTG_ID |MUX_PAD_CTRL (NO_PAD_CTRL )), -}; -int board_ehci_hcd_init (int port) {switch (port) {case 0 : -SETUP_IOMUX_PADS (usb_otg_pads); -/* * Set daisy chain for otg_pin_id on 6q. * For 6dl, this bit is reserved.
@@ -708,29 +661,6 @@ int board_ehci_hcd_init(int port) }return 0 ; } - -int board_ehci_power (int port,int on) -{ -switch (port) { -case 0 : -if (on) -port_exp_direction_output (USB_OTG_PWR ,1 ); -else -port_exp_direction_output (USB_OTG_PWR ,0 ); -break ; -case 1 : -if (on) -port_exp_direction_output (USB_HOST1_PWR ,1 ); -else -port_exp_direction_output (USB_HOST1_PWR ,0 ); -break ; -default : -printf ("MXC USB port %d not yet supported\n" , port); -return -EINVAL ; - } - -return 0 ; -}#endif #ifdef CONFIG_SPL_BUILD
Signature · 1 line
2.7.4
PATCH v3 18/22 board: mx6sabresd: Remove non-DM code
In reply to Abel VesaSince the mx6sabreauto has DM support, remove the unused non-DM code from mx6sabresd board file.
--- board/freescale/mx6sabresd/mx6sabresd.c | 50 --------------------------------- 1 file changed, 50 deletions(-)
board/freescale/mx6sabresd/mx6sabresd.c +0 -50
@@ -563,63 +563,13 @@ int board_eth_init(bd_t *bis) }#ifdef CONFIG_USB_EHCI_MX6 -#define USB_OTHERREGS_OFFSET 0x800 -#define UCTRL_PWR_POL (1 << 9) - -static iomux_v3_cfg_t const usb_otg_pads[] = { -IOMUX_PADS (PAD_EIM_D22__USB_OTG_PWR |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_ENET_RX_ER__USB_OTG_ID |MUX_PAD_CTRL (NO_PAD_CTRL )), -}; - -static iomux_v3_cfg_t const usb_hc1_pads[] = { -IOMUX_PADS (PAD_ENET_TXD1__GPIO1_IO29 |MUX_PAD_CTRL (NO_PAD_CTRL )), -}; -static void setup_usb (void ) { -SETUP_IOMUX_PADS (usb_otg_pads); -/* * set daisy chain for otg_pin_id on 6q. * for 6dl, this bit is reserved */ imx_iomux_set_gpr_register (1 ,13 ,1 ,0 ); - -SETUP_IOMUX_PADS (usb_hc1_pads); -} - -int board_ehci_hcd_init (int port) -{ -u32 *usbnc_usb_ctrl; - -if (port >1 ) -return -EINVAL ; - - usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR +USB_OTHERREGS_OFFSET + - port *4 ); - -setbits_le32 (usbnc_usb_ctrl,UCTRL_PWR_POL ); - -return 0 ; -} - -int board_ehci_power (int port,int on) -{ -switch (port) { -case 0 : -break ; -case 1 : -if (on) -gpio_direction_output (IMX_GPIO_NR (1 ,29 ),1 ); -else -gpio_direction_output (IMX_GPIO_NR (1 ,29 ),0 ); -break ; -default : -printf ("MXC USB port %d not yet supported\n" , port); -return -EINVAL ; - } - -return 0 ; }#endif
Signature · 1 line
2.7.4
PATCH v3 19/22 board: mx6sabresd: Remove the enet reset gpio handling
In reply to Abel VesaRely on the phy-reset-gpios which is set in imx6qdl-sabresd dtsi and get rid of the enet reset gpio handling from the board file.
--- board/freescale/mx6sabresd/mx6sabresd.c | 7 ------- 1 file changed, 7 deletions(-)
board/freescale/mx6sabresd/mx6sabresd.c +0 -7
@@ -94,13 +94,6 @@ static iomux_v3_cfg_t const enet_pads[] = {static void setup_iomux_enet (void ) {SETUP_IOMUX_PADS (enet_pads); - -/* Reset AR8031 PHY */ -gpio_request (IMX_GPIO_NR (1 ,25 ),"ENET PHY Reset" ); -gpio_direction_output (IMX_GPIO_NR (1 ,25 ) ,0 ); -mdelay (10 ); -gpio_set_value (IMX_GPIO_NR (1 ,25 ),1 ); -udelay (100 ); }static iomux_v3_cfg_t const usdhc2_pads[] = {
Signature · 1 line
2.7.4
PATCH v3 20/22 configs: mx6sabresd: Reduce size for SPL by disabling SPL_DOS and SPL_EFI
In reply to Abel VesaWith DM and FIT enabled in SPL, there is an sram overflow. By disabling CONFIG_SPL_DOS_PARTITION and CONFIG_SPL_EFI_PARTITION, we get to keep the 'one binary to fit all' for imx6[q|qp|dl] on sabresd since the final SPL image is now under 64KB.
--- configs/mx6sabresd_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/mx6sabresd_defconfig +2 -0
@@ -54,6 +54,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_EFI_PARTITION=y +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd"
Signature · 1 line
2.7.4
PATCH v3 21/22 board: mx6sabreauto: Update README with the SPL DM FIT info
In reply to Abel VesaThere is a new step now. The need to build the u-boot.itb. And instead of flashing the .img file, now the .itb file needs to be flashed.
--- board/freescale/mx6sabreauto/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
board/freescale/mx6sabreauto/README +4 -2
@@ -8,6 +8,7 @@ In order to build it: $ make mx6sabreauto_defconfig $ make +$ make u-boot.itb This will generate the SPL and u-boot.img binaries.
@@ -17,7 +18,7 @@ $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync - Flash the u-boot.img binary into the SD card: -$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync +$ sudo dd if=u-boot.itb of=/dev/sdX bs=1K seek=69 && sync Booting via Falcon mode -----------------------
@@ -31,6 +32,7 @@ In order to build it: $ make mx6sabreauto_defconfig $ make +$ make u-boot.itb This will generate the SPL image called SPL and the u-boot.img.
@@ -40,7 +42,7 @@ $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync - Flash the u-boot.img image into the SD card: -$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 && sync +$ sudo dd if=u-boot.itb of=/dev/sdb bs=1K seek=69 && sync Create a FAT16 boot partition to store uImage and the dtb file, then copy the files there:
Signature · 1 line
2.7.4
PATCH v3 22/22 board: mx6sabresd: Update README with the SPL DM FIT info
In reply to Abel VesaThere is a new step now. The need to build the u-boot.itb. And instead of flashing the .img file, now the .itb file needs to be flashed.
--- board/freescale/mx6sabresd/README | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
board/freescale/mx6sabresd/README +6 -3
@@ -20,6 +20,7 @@ In order to build it: $ make mx6sabresd_defconfig $ make +$ make u-boot.itb This will generate the SPL and u-boot.img binaries.
@@ -29,7 +30,7 @@ $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync - Flash the u-boot.img binary into the SD card: -$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync +$ sudo dd if=u-boot.itb of=/dev/sdX bs=1K seek=69 && sync 2. Booting from eMMC
@@ -38,6 +39,7 @@ $ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync $ make mx6sabresd_defconfig $ make +$ make u-boot.itb This will generate the SPL and u-boot.img binaries.
@@ -54,7 +56,7 @@ Mount the eMMC in the host PC: - Flash SPL and u-boot.img binaries into the eMMC: $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync -$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync +$ sudo dd if=u-boot.itb of=/dev/sdX bs=1K seek=69 && sync Set SW6 to eMMC 8-bit boot: 11010110
@@ -64,6 +66,7 @@ Set SW6 to eMMC 8-bit boot: 11010110 $ make mx6sabresd_defconfig $ make +$ make u-boot.itb This will generate the SPL image called SPL and the u-boot.img.
@@ -73,7 +76,7 @@ $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 oflag=sync status=none && sync - Flash the u-boot.img image into the SD card: -$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 oflag=sync status=none && sync +$ sudo dd if=u-boot.itb of=/dev/sdX bs=1K seek=69 oflag=sync status=none && sync Create a partition for root file system and extract it there:
Signature · 1 line
2.7.4
v3 cover mx6sabre: Add DM and SPL FIT support
In reply to Abel VesaQuoted 6 lines · Abel Vesa
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.htmlChanges since v2:
* Removed the unecessarySYS_MALLOC_F_LENfrom both defocnfig
* Fixed the copyright for all the *u-boot.dtsi files
OK, but you didn't answer why you need to specify your own its file when the TI examples show how to have mkimage generate this for you, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190130/abf2964d/attachment.sig>
v3 cover mx6sabre: Add DM and SPL FIT support
Quoted 5 lines · Tom Rini
Quoted 3 lines · Abel Vesa
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.html
Quoted 7 lines
Quoted 3 lines
Changes since v2:
* Removed the unecessarySYS_MALLOC_F_LENfrom both defocnfig
* Fixed the copyright for all the *u-boot.dtsi filesOK, but you didn't answer why you need to specify your own its file when the TI examples show how to have mkimage generate this for you, thanks!
I might be wrong here but TI is doing this for MLO, which AFAIU, it's for SPL. The fit_spl.its I'm adding here is actually for u-boot proper.
SPL expects descriptions in the configurations and that can't be done without its file, again, AFAIK.
Please let me know what exactly am I missing here.
Quoted 2 lines
Signature · 1 line
Tom
v3 cover mx6sabre: Add DM and SPL FIT support
Quoted 14 lines · Abel Vesa
Quoted 5 lines · Tom Rini
Quoted 3 lines · Abel Vesa
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.htmlQuoted 7 lines
Quoted 3 lines
Changes since v2:
* Removed the unecessarySYS_MALLOC_F_LENfrom both defocnfig
* Fixed the copyright for all the *u-boot.dtsi filesOK, but you didn't answer why you need to specify your own its file when the TI examples show how to have mkimage generate this for you, thanks!
Quoted 7 lines
I might be wrong here but TI is doing this for MLO, which AFAIU, it's for SPL. The fit_spl.its I'm adding here is actually for u-boot proper.
SPL expects descriptions in the configurations and that can't be done without its file, again, AFAIK.
Please let me know what exactly am I missing here.
The flag to mkimage is not about SPL but rather "create a single configurations its file on the fly". This should also be fine for the its file in patch 10/22 (of v2, don't have v3 in front of me in patchwork).
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190131/be25699e/attachment.sig>
v3 cover mx6sabre: Add DM and SPL FIT support
Quoted 21 lines · Tom Rini
Quoted 20 lines · Abel Vesa
Quoted 5 lines · Tom Rini
Quoted 3 lines · Abel Vesa
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.htmlQuoted 7 lines
Quoted 3 lines
Changes since v2:
* Removed the unecessarySYS_MALLOC_F_LENfrom both defocnfig
* Fixed the copyright for all the *u-boot.dtsi filesOK, but you didn't answer why you need to specify your own its file when the TI examples show how to have mkimage generate this for you, thanks!
I might be wrong here but TI is doing this for MLO, which AFAIU, it's for SPL. The fit_spl.its I'm adding here is actually for u-boot proper.
SPL expects descriptions in the configurations and that can't be done without its file, again, AFAIK.
Quoted 7 lines
Quoted 1 line
Please let me know what exactly am I missing here.
The flag to mkimage is not about SPL but rather "create a single configurations its file on the fly". This should also be fine for the its file in patch 10/22 (of v2, don't have v3 in front of me in patchwork).
Well, I tried something like this (manually):
$ ./tools/mkimage -f auto -C none -A ARM -T standalone -a 0x17800000 -e 0x17800000 -d u-boot-fit-dtb.bin -n "U-Boot" u-boot.itb -E
and the output was:
FIT description: Standalone Program image with one or more FDT blobs Created: Thu Jan 31 13:58:01 2019 Image 0 (standalone-1) Description: U-Boot Created: Thu Jan 31 13:58:01 2019 Type: Standalone Program Compression: uncompressed Data Size: 646400 Bytes = 631.25 KiB = 0.62 MiB
Architecture: ARM
Load Address: 0x17800000
Entry Point: 0x17800000
Default Configuration: 'conf-1'
Configuration 0 (conf-1)
Description: unavailable
Kernel: unavailable
And then the SPL complains about the configuration description:
U-Boot SPL 2019.01-00374-gbe79a83 (Jan 31 2019 - 13:56:01 +0200) Trying to boot from MMC1fit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsfit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsfit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsmmc_load_image_raw_sector: mmc block read error
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
But with the fit_spl.its file I added I have this and works:
FIT description: Image for u-boot proper (with dtb appended) Created: Thu Jan 31 13:57:02 2019 Image 0 (uboot at 1) Description: U-Boot Created: Thu Jan 31 13:57:02 2019 Type: Standalone Program Compression: uncompressed Data Size: 646400 Bytes = 631.25 KiB = 0.62 MiB Architecture: ARM Load Address: 0x17800000 Entry Point: unavailable Default Configuration: 'conf at 1' Configuration 0 (conf at 1) Description: i.MX armv7 Kernel: unavailable Loadables: uboot at 1
So the differences between this and the one generated with mkimage+flags are the loadables and the description in the configuration 0.
Can I specify those through flags ?
Quoted 2 lines
Signature · 1 line
Tom
v3 cover mx6sabre: Add DM and SPL FIT support
Quoted 89 lines · Abel Vesa
Quoted 21 lines · Tom Rini
Quoted 20 lines · Abel Vesa
Quoted 5 lines · Tom Rini
Quoted 3 lines · Abel Vesa
The second version is here:
https://lists.denx.de/pipermail/u-boot/2019-January/356557.htmlQuoted 7 lines
Quoted 3 lines
Changes since v2:
* Removed the unecessarySYS_MALLOC_F_LENfrom both defocnfig
* Fixed the copyright for all the *u-boot.dtsi filesOK, but you didn't answer why you need to specify your own its file when the TI examples show how to have mkimage generate this for you, thanks!
I might be wrong here but TI is doing this for MLO, which AFAIU, it's for SPL. The fit_spl.its I'm adding here is actually for u-boot proper.
SPL expects descriptions in the configurations and that can't be done without its file, again, AFAIK.
Quoted 7 lines
Quoted 1 line
Please let me know what exactly am I missing here.
The flag to mkimage is not about SPL but rather "create a single configurations its file on the fly". This should also be fine for the its file in patch 10/22 (of v2, don't have v3 in front of me in patchwork).
Well, I tried something like this (manually):
$ ./tools/mkimage -f auto -C none -A ARM -T standalone -a 0x17800000 -e 0x17800000 -d u-boot-fit-dtb.bin -n "U-Boot" u-boot.itb -Eand the output was:
FIT description: Standalone Program image with one or more FDT blobs Created: Thu Jan 31 13:58:01 2019 Image 0 (standalone-1) Description: U-Boot Created: Thu Jan 31 13:58:01 2019 Type: Standalone Program Compression: uncompressed Data Size: 646400 Bytes = 631.25 KiB = 0.62 MiBArchitecture: ARM
Load Address:0x17800000
Entry Point:0x17800000
Default Configuration: 'conf-1'
Configuration 0 (conf-1)
Description: unavailable
Kernel: unavailableAnd then the SPL complains about the configuration description:
U-Boot SPL 2019.01-00374-gbe79a83 (Jan 31 2019 - 13:56:01 +0200) Trying to boot from MMC1
fit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsfit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsfit_find_config_node: Missing FDT description in DTB No matching DT out of these options:
Firmware image with one or more FDT blobsmmc_load_image_raw_sector: mmc block read error
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###But with the fit_spl.its file I added I have this and works:
FIT description: Image for u-boot proper (with dtb appended) Created: Thu Jan 31 13:57:02 2019 Image 0 (uboot at 1) Description: U-Boot Created: Thu Jan 31 13:57:02 2019 Type: Standalone Program Compression: uncompressed Data Size: 646400 Bytes = 631.25 KiB = 0.62 MiB Architecture: ARM Load Address: 0x17800000 Entry Point: unavailable Default Configuration: 'conf at 1' Configuration 0 (conf at 1) Description: i.MX armv7 Kernel: unavailable Loadables: uboot at 1
Quoted 4 lines
So the differences between this and the one generated with mkimage+flags are the loadables and the description in the configuration 0.
Can I specify those through flags ?
Off the top of my head, I'm not sure what's going on, but thanks for digging at it more. I would say that this case not working is a bug, not a feature, so please figure out what's needed such that mkimage does the right thing in this case. The intention is that for a single configuration FIT we should not have to write the its file by hand. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190131/de5c3828/attachment.sig>