include/configs: Remove rootwait=1 to all the affected boards
[platform/kernel/u-boot.git] / include / configs / imx8mm_data_modul_edm_sbc.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2022 Marek Vasut <marex@denx.de>
4  */
5
6 #ifndef __IMX8MM_DATA_MODUL_EDM_SBC_H
7 #define __IMX8MM_DATA_MODUL_EDM_SBC_H
8
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include <asm/arch/imx-regs.h>
12
13 #define CONFIG_SYS_BOOTM_LEN            SZ_128M
14
15 #define CONFIG_SYS_MONITOR_LEN          SZ_1M
16
17 #ifdef CONFIG_SPL_BUILD
18 #define CONFIG_MALLOC_F_ADDR            0x930000
19
20 /* For RAW image gives a error info not panic */
21 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
22
23 #endif
24
25 /* Link Definitions */
26 #define CONFIG_SYS_INIT_RAM_ADDR        0x40000000
27 #define CONFIG_SYS_INIT_RAM_SIZE        0x200000
28
29 #define CONFIG_SYS_SDRAM_BASE           0x40000000
30 #define PHYS_SDRAM                      0x40000000
31 #define PHYS_SDRAM_SIZE                 0x40000000 /* Minimum 1 GiB DDR */
32
33 #define CONFIG_MXC_UART_BASE            UART3_BASE_ADDR
34
35 /* PHY needs a longer autonegotiation timeout after reset */
36 #define PHY_ANEG_TIMEOUT                20000
37
38 /* USDHC */
39 #define CONFIG_SYS_FSL_USDHC_NUM        2
40 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
41
42 #if !defined(CONFIG_SPL_BUILD)
43
44 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
45         "altbootcmd=setenv devpart 2 && run bootcmd ; reset\0"          \
46         "bootlimit=3\0"                                                 \
47         "devtype=mmc\0"                                                 \
48         "devpart=1\0"                                                   \
49         /* Give slow devices beyond USB HUB chance to come up. */       \
50         "usb_pgood_delay=2000\0"                                        \
51         "dfu_alt_info="                                                 \
52                 /* RAM block at DRAM offset 256..768 MiB */             \
53                 "ram ram0=ram ram 0x50000000 0x20000000&"               \
54                 /* 16 MiB SPI NOR */                                    \
55                 "mtd nor0=sf raw 0x0 0x1000000\0"                       \
56         "dmo_preboot="                                                  \
57                 "sf probe ; " /* Scan for SPI NOR, needed by DFU */     \
58                 "run dmo_usb_start_hub ; "                              \
59                 /* Attempt to start USB and Network console */          \
60                 "run dmo_usb_cdc_acm_start ; "                          \
61                 "run dmo_netconsole_start\0"                            \
62         "dmo_update_env="                                               \
63                 "setenv dmo_update_env true ; saveenv ; saveenv\0"      \
64         "dmo_usb_cdc_acm_start="                                        \
65                 "if test \"${dmo_usb_cdc_acm_enabled}\" = \"true\" ; then "\
66                         /* Ungate IMX8MM_CLK_USB1_CTRL_ROOT */          \
67                         "mw 0x303844d0 3 ; "                            \
68                         /* Read USBNC_n_PHY_STATUS BIT(4) VBUS_VLD */   \
69                         "setexpr.l usbnc_n_phy_status *0x32e4023c \\\\& 0x8 ; " \
70                         /* If USB OTG has valid VBUS, enable CDC ACM */ \
71                         "if test \"${usbnc_n_phy_status}\" -eq 8 ; then "\
72                                 "usb start && "                         \
73                                 "setenv stderr ${stderr},usbacm && "    \
74                                 "setenv stdout ${stdout},usbacm && "    \
75                                 "setenv stdin ${stdin},usbacm ; "       \
76                         "fi ; "                                         \
77                 "fi\0"                                                  \
78         "dmo_usb_start_hub="                                            \
79                 "i2c dev 1 ; "                                          \
80                 /* Reset the USB USB */                                 \
81                 "gpio clear GPIO5_2 ; sleep 0.01 ; " /* t1 > 1us */     \
82                 "gpio set GPIO5_2 ; sleep 0.01 ; " /* t5 > 3us */       \
83                 /* Write chunks of descriptor into the USB HUB */       \
84                 "mw.l 0x7e1000 0x14042417 ; mw.l 0x7e1004 0x9b0bb325 ; "\
85                 "mw.l 0x7e1008 0x00000220 ; mw.l 0x7e100c 0x01320100 ; "\
86                 "mw.l 0x7e1010 0x00003232 ; mw.l 0x7e1014 0x4d000909 ; "\
87                 "i2c write 0x7e1000 0x2c 0x00 0x18 -s ; "               \
88                 "mw.l 0x7e1000 0x6300690f ; mw.l 0x7e1004 0x6f007200 ; "\
89                 "mw.l 0x7e1008 0x68006300 ; mw.l 0x7e100c 0x70006900 ; "\
90                 "i2c write 0x7e1000 0x2c 0x18 0x10 -s ; "               \
91                 "mw.l 0x7e1000 0x53005511 ; mw.l 0x7e1004 0x32004200 ; "\
92                 "mw.l 0x7e1008 0x31003500 ; mw.l 0x7e100c 0x42003400 ; "\
93                 "mw.l 0x7e1010 0x00006900 ; "                           \
94                 "i2c write 0x7e1000 0x2c 0x54 0x12 -s ; "               \
95                 "mw.l 0x7e1000 0x00000101 ; "                           \
96                 "i2c write 0x7e1000 0x2c 0xff 0x2 -s\0"                 \
97         "dmo_netconsole_start="                                         \
98                 "if test \"${dmo_netconsole_enabled}\" = \"true\" ; then "\
99                         "setenv autoload false && "                     \
100                         "dhcp && "                                      \
101                         "setenv autoload && "                           \
102                         "setenv ncip ${serverip} && "                   \
103                         "setenv stderr ${stderr},nc && "                \
104                         "setenv stdout ${stdout},nc && "                \
105                         "setenv stdin ${stdin},nc ; "                   \
106                 "fi"
107
108 #endif
109
110 #endif