Convert CONFIG_PCIE_IMX to Kconfig
[platform/kernel/u-boot.git] / include / configs / novena.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Configuration settings for the Novena U-Boot.
4  *
5  * Copyright (C) 2014 Marek Vasut <marex@denx.de>
6  */
7
8 #ifndef __CONFIG_H
9 #define __CONFIG_H
10
11 /* System configurations */
12
13 #include "mx6_common.h"
14
15 /* U-Boot Commands */
16
17 /* U-Boot general configurations */
18
19 /* U-Boot environment */
20 /*
21  * Environment is on MMC, starting at offset 512KiB from start of the card.
22  * Please place first partition at offset 1MiB from the start of the card
23  * as recommended by GNU/fdisk. See below for details:
24  * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html
25  */
26
27 /* Booting Linux */
28 #define CONFIG_HOSTNAME                 "novena"
29
30 /* Physical Memory Map */
31 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
32
33 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
34 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
35 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
36
37 /* SPL */
38 #include "imx6_spl.h"                   /* common IMX6 SPL configuration */
39
40 /* I2C */
41 #define CONFIG_I2C_MULTI_BUS
42
43 /* I2C EEPROM */
44
45 /* MMC Configs */
46 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
47 #define CONFIG_SYS_FSL_USDHC_NUM        2
48
49 /* PCI express */
50 #ifdef CONFIG_CMD_PCI
51 #define CONFIG_PCI_SCAN_SHOW
52 #define CONFIG_PCIE_IMX_PERST_GPIO      IMX_GPIO_NR(3, 29)
53 #define CONFIG_PCIE_IMX_POWER_GPIO      IMX_GPIO_NR(7, 12)
54 #endif
55
56 /* PMIC */
57 #define CONFIG_POWER_PFUZE100
58 #define CONFIG_POWER_PFUZE100_I2C_ADDR  0x08
59
60 /* UART */
61 #define CONFIG_MXC_UART_BASE            UART2_BASE
62
63 /* USB Configs */
64 #ifdef CONFIG_CMD_USB
65 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
66 #define CONFIG_MXC_USB_FLAGS            0
67 /* Gadget part */
68 #define CONFIG_USBD_HS
69 #endif
70
71 /* Video output */
72 #define CONFIG_IMX_HDMI
73 #define CONFIG_IMX_VIDEO_SKIP
74
75 /* Extra U-Boot environment. */
76 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
77         "fdt_high=0xffffffff\0"                                         \
78         "initrd_high=0xffffffff\0"                                      \
79         "consdev=ttymxc1\0"                                             \
80         "baudrate=115200\0"                                             \
81         "bootdev=/dev/mmcblk0p1\0"                                      \
82         "rootdev=/dev/mmcblk0p2\0"                                      \
83         "netdev=eth0\0"                                                 \
84         "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0"           \
85         "pxefile_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0"          \
86         "scriptaddr="__stringify(CONFIG_SYS_LOAD_ADDR)"\0"                      \
87         "ramdisk_addr_r=0x28000000\0"                                   \
88         "fdt_addr_r=0x18000000\0"                                       \
89         "fdtfile=imx6q-novena.dtb\0"                                    \
90         "stdout=serial,vidconsole\0"                                    \
91         "stderr=serial,vidconsole\0"                                    \
92         "addcons="                                                      \
93                 "setenv bootargs ${bootargs} "                          \
94                 "console=${consdev},${baudrate}\0"                      \
95         "addip="                                                        \
96                 "setenv bootargs ${bootargs} "                          \
97                 "ip=${ipaddr}:${serverip}:${gatewayip}:"                \
98                         "${netmask}:${hostname}:${netdev}:off\0"        \
99         "addmisc="                                                      \
100                 "setenv bootargs ${bootargs} ${miscargs}\0"             \
101         "addargs=run addcons addmisc\0"                                 \
102         "mmcload="                                                      \
103                 "mmc rescan ; "                                         \
104                 "ext4load mmc 0:1 ${kernel_addr_r} ${bootfile}\0"       \
105         "netload="                                                      \
106                 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0"       \
107         "miscargs=nohlt panic=1\0"                                      \
108         "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0"         \
109         "nfsargs="                                                      \
110                 "setenv bootargs root=/dev/nfs rw "                     \
111                         "nfsroot=${serverip}:${rootpath},v3,tcp\0"      \
112         "mmc_mmc="                                                      \
113                 "run mmcload mmcargs addargs ; "                        \
114                 "bootm ${kernel_addr_r}\0"                              \
115         "mmc_nfs="                                                      \
116                 "run mmcload nfsargs addip addargs ; "                  \
117                 "bootm ${kernel_addr_r}\0"                              \
118         "net_mmc="                                                      \
119                 "run netload mmcargs addargs ; "                        \
120                 "bootm ${kernel_addr_r}\0"                              \
121         "net_nfs="                                                      \
122                 "run netload nfsargs addip addargs ; "                  \
123                 "bootm ${kernel_addr_r}\0"                              \
124         "update_sd_spl_filename=SPL\0"                                  \
125         "update_sd_uboot_filename=u-boot.img\0"                         \
126         "update_sd_firmware="   /* Update the SD firmware partition */  \
127                 "if mmc rescan ; then "                                 \
128                 "if dhcp ${update_sd_spl_filename} ; then "             \
129                 "mmc write ${loadaddr} 2 0x200 ; "                      \
130                 "fi ; "                                                 \
131                 "if dhcp ${update_sd_uboot_filename} ; then "           \
132                 "fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; "\
133                 "fi ; "                                                 \
134                 "fi\0"                                                  \
135         BOOTENV
136
137 #define BOOT_TARGET_DEVICES(func) \
138         func(MMC, mmc, 0) \
139         func(USB, usb, 0) \
140         func(SATA, sata, 0) \
141         func(PXE, pxe, na) \
142         func(DHCP, dhcp, na)
143
144 #include <config_distro_bootcmd.h>
145
146 #endif                          /* __CONFIG_H */