summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-07-29 11:20:06 +0300
committerDenys Drozdov <denys.drozdov@toradex.com>2021-01-08 19:42:06 +0200
commitcae4bfdd7da65b37556ced63535152af00d31d44 (patch)
tree6c95d78fd9514abc23ac8368bfa58cd2c93af883 /include
parent9e32ced048a5b8afb2185fedf96d3b1230cf4694 (diff)
colibri-imx8x: up-port initial implementation
USB (both host and device), Networking, MMC/SD work. Testing: ----------------------------------------------- U-Boot 2020.04-00119-g9dc5e94cb0-dirty (Jul 30 2020 - 22:36:54 +0300) CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 47C DRAM: 2 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... OK In: serial@5a090000 Out: serial@5a090000 Err: serial@5a090000 Model: Toradex Colibri iMX8 QuadXPlus 2GB Wi-Fi / BT IT V1.0B, Serial# 06494331 Net: eth0: ethernet@5b040000 [PRIME] Boot from USB for mfgtools Hit any key to stop autoboot: 0 ----------------------------------------------- Was tested with: imx-mkimage: imx_5.4.24_2.1.0 imx-scfw: ab182211e("Update .gitignore to ignore our built files and files from vscode") imx-atf: imx_5.4.24_2.1.0 imx-seco: 3.6.3 [1] ----------------------------------------------- Dropped patches from toradex_imx_v2018.03_4.14.98_2.3.0_bringup as they have come in from mainline v2020.04 or just not relevant anymore: 9bfdda4f ("tdx-cfg-block.c: correct colibri imx8 string") ae52342b ("colibri-imx8qxp: initial add") 9b950998 ("colibri-imx8qxp: move debug uart to lpuart3") f9b0065b ("colibri-imx8qxp: synchronize with imx8qxp-mek from beta2") 982b4667 ("colibri-imx8qxp: forward port to 2018.03") 5c80880d ("colibri-imx8qxp: add unused pins as gpio") 30b37a6a ("colibri-imx8qxp: adjust copyright/licensing headers) 873a9561 ("colibri-imx8qxp: fix top-level compatible") 0e0f095d ("colibri-imx8qxp: clean-up device tree") f61187df ("colibri-imx8qxp: clean-up configuration") 85a5d16b ("colibri-imx8qxp: clean-up board file") a5a9bb4b ("colibri-imx8qxp: fused modules boot from emmc") 39c20ddd ("colibri-imx8qxp: default to dsihdmi device tree") 7443a6e5 ("colibri-imx8qxp: fix usb device/host functionality") c721083a ("colibri-imx8qxp: fix ethernet functionality") 9f40db9d ("colibri-imx8qxp: adjust copyright/licensing headers some more") 9070b6f0 ("colibri-imx8qxp: dts: clean-up whitespace") 257470ac ("colibri-imx8x: enable FDT relocation") a9272336 ("colibri-imx8qxp: change default device tree") 8470fb25 ("colibri-imx8x/apalis-imx8: converge scriptaddr for distroboot") 62493440 ("apalis-imx8/colibri-imx8x: use proper distroboot script") f1993901 ("apalis-imx8/colibri-imx8x: set fdtfile since it is used by distro bootcmd") 890d03ae ("colibri-imx8qxp: sync with MEK platform") eeb1d9b8 ("colibri-imx8qxp: move environment into first boot area") c8c562ea ("colibri-imx8qxp: do not undef configs configured using Kconfig") 12489199 ("colibri-imx8qxp: make sure config block fdt fix-ups are called") 6a84ffaa ("colibri-imx8qxp: modify default ramdisk loading address") [1] https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.6.3.bin Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/colibri-imx8x.h89
1 files changed, 58 insertions, 31 deletions
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index 311ed439f6..f1b8dfc807 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -6,17 +6,14 @@
#ifndef __COLIBRI_IMX8X_H
#define __COLIBRI_IMX8X_H
-#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <asm/arch/imx-regs.h>
#define CONFIG_REMAKE_ELF
-#define CONFIG_DISPLAY_BOARDINFO_LATE
-
-#define CONFIG_SYS_FSL_ESDHC_ADDR 0
-#define USDHC1_BASE_ADDR 0x5b010000
-#define USDHC2_BASE_ADDR 0x5b020000
-#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
+#define CONFIG_SYS_FSL_ESDHC_ADDR 0
+#define USDHC1_BASE_ADDR 0x5B010000
+#define USDHC2_BASE_ADDR 0x5B020000
#define CONFIG_ENV_OVERWRITE
@@ -50,44 +47,29 @@
"${m4_0_image}\0" \
"m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
-#define MFG_NAND_PARTITION ""
-
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
+ func(USB, usb, 0) \
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
-#undef BOOTENV_RUN_NET_USB_START
-#define BOOTENV_RUN_NET_USB_START ""
-
-#define CONFIG_MFG_ENV_SETTINGS \
- "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
- "rdinit=/linuxrc g_mass_storage.stall=0 " \
- "g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F " \
- "g_mass_storage.idProduct=0x37FF " \
- "g_mass_storage.iSerialNumber=\"\" " MFG_NAND_PARTITION \
- "${vidargs} clk_ignore_unused\0" \
- "initrd_addr=0x83800000\0" \
- "initrd_high=0xffffffff\0" \
- "bootcmd_mfg=run mfgtool_args;booti ${loadaddr} ${initrd_addr} " \
- "${fdt_addr};\0" \
+#define FDT_FILE "fsl-imx8qxp-colibri-eval-v3.dtb"
+
+#include <config_distro_bootcmd.h>
/* Initial environment variables */
#define CONFIG_EXTRA_ENV_SETTINGS \
- AHAB_ENV \
BOOTENV \
- CONFIG_MFG_ENV_SETTINGS \
+ AHAB_ENV \
M4_BOOT_ENV \
MEM_LAYOUT_ENV_SETTINGS \
"boot_file=Image\0" \
- "console=ttyLP3 earlycon\0" \
+ "console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200\0" \
"fdt_addr=0x83000000\0" \
- "fdt_file=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \
- "fdtfile=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \
+ "fdtfile=" FDT_FILE "\0" \
"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
"image=Image\0" \
"initrd_addr=0x83800000\0" \
- "initrd_high=0xffffffffffffffff\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=PARTUUID=${uuid} rootwait " \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
@@ -100,6 +82,7 @@
"${fdt_addr}\0" \
"panel=NULL\0" \
"script=boot.scr\0" \
+ "setup=run mmcargs\0" \
"update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \
"if test \"$confirm\" = \"y\"; then " \
"setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
@@ -117,6 +100,8 @@
#define CONFIG_SYS_MEMTEST_START 0x88000000
#define CONFIG_SYS_MEMTEST_END 0x89000000
+#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
+
/* Environment in eMMC, before config block at the end of 1st "boot sector" */
#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 eMMC */
#define CONFIG_SYS_MMC_ENV_PART 1
@@ -151,7 +136,49 @@
/* Generic Timer Definitions */
#define COUNTER_FREQUENCY 8000000 /* 8MHz */
-#define BOOTAUX_RESERVED_MEM_BASE 0x88000000
-#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
+/* USB Config */
+#define CONFIG_USBD_HS
+
+#define CONFIG_CMD_USB_MASS_STORAGE
+#define CONFIG_USB_GADGET_MASS_STORAGE
+#define CONFIG_USB_FUNCTION_MASS_STORAGE
+
+#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
+
+/* USB OTG controller configs */
+#ifdef CONFIG_USB_EHCI_HCD
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
+#endif
+
+/* Networking */
+#define CONFIG_FEC_ENET_DEV 0
+
+#if (CONFIG_FEC_ENET_DEV == 0)
+#define IMX_FEC_BASE 0x5B040000
+#define CONFIG_FEC_MXC_PHYADDR 0x0
+#define CONFIG_ETHPRIME "eth0"
+#elif (CONFIG_FEC_ENET_DEV == 1)
+#define IMX_FEC_BASE 0x5B050000
+#define CONFIG_FEC_MXC_PHYADDR 0x1
+#define CONFIG_ETHPRIME "eth1"
+#endif
+
+#define CONFIG_FEC_XCV_TYPE RGMII
+#define FEC_QUIRK_ENET_MAC
+#define PHY_ANEG_TIMEOUT 20000
+
+#ifdef CONFIG_DM_VIDEO
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN_ALIGN
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+#define CONFIG_BMP_24BPP
+#define CONFIG_BMP_32BPP
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_VIDEO_BMP_LOGO
+#endif
#endif /* __COLIBRI_IMX8X_H */