diff options
Diffstat (limited to 'include')
113 files changed, 1381 insertions, 669 deletions
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h index 523defbab9..464cfb715c 100644 --- a/include/asm-generic/errno.h +++ b/include/asm-generic/errno.h @@ -1,5 +1,5 @@ /* - * U-boot - errno.h Error number defines + * U-Boot - errno.h Error number defines * * Copyright (c) 2005-2007 Analog Devices Inc. * diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index a587d3c203..f2810a1bd7 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -48,10 +48,6 @@ typedef struct global_data { #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ #endif -#ifdef CONFIG_MODEM_SUPPORT - unsigned long do_mdm_init; - unsigned long be_quiet; -#endif unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h index 424721b7e7..e858e55837 100644 --- a/include/config_cmd_all.h +++ b/include/config_cmd_all.h @@ -34,7 +34,6 @@ #define CONFIG_CMD_FUSE /* Device fuse support */ #define CONFIG_CMD_GETTIME /* Get time since boot */ #define CONFIG_CMD_HASH /* calculate hash / digest */ -#define CONFIG_CMD_HWFLOW /* RTS/CTS hw flow control */ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_IDE /* IDE harddisk support */ #define CONFIG_CMD_IMMAP /* IMMR dump support */ diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h index 9d1de5508f..0f85cd0e14 100644 --- a/include/config_distro_defaults.h +++ b/include/config_distro_defaults.h @@ -24,15 +24,15 @@ #define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) #if !defined(CONFIG_BOOTP_VCI_STRING) -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv7" #endif #elif defined(__aarch64__) #if !defined(CONFIG_BOOTP_VCI_STRING) -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv8" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv8" #endif #else #if !defined(CONFIG_BOOTP_VCI_STRING) -#define CONFIG_BOOTP_VCI_STRING "U-boot.arm" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.arm" #endif #endif #elif defined(__i386__) diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 342fdfe24a..535dc6eceb 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -334,7 +334,7 @@ * * Please notice, that the resulting clock frequency could differ from the * configured value. This is because the I2C clock is derived from system - * clock over a frequency divider with only a few divider values. U-boot + * clock over a frequency divider with only a few divider values. U-Boot * calculates the best approximation for CONFIG_SYS_I2C_SPEED. However the calculated * approximation allways lies below the configured value, never above. */ diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h index 42af34fdc6..de7d5c2243 100644 --- a/include/configs/VCMA9.h +++ b/include/configs/VCMA9.h @@ -20,6 +20,8 @@ * High Level Configuration Options * (easy to change) */ +#define CONFIG_SYS_THUMB_BUILD + #define CONFIG_S3C24X0 /* This is a SAMSUNG S3C24x0-type SoC */ #define CONFIG_S3C2410 /* specifically a SAMSUNG S3C2410 SoC */ #define CONFIG_VCMA9 /* on a MPL VCMA9 Board */ diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h index 2499b39c16..f6c0147dd9 100644 --- a/include/configs/adp-ag101p.h +++ b/include/configs/adp-ag101p.h @@ -271,7 +271,7 @@ /* * Load address and memory test area should agree with - * arch/nds32/config.mk. Be careful not to overwrite U-boot itself. + * arch/nds32/config.mk. Be careful not to overwrite U-Boot itself. */ #define CONFIG_SYS_LOAD_ADDR 0x300000 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 4547d7f4aa..4d662ad3c2 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -132,6 +132,10 @@ #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ #define CONFIG_CMD_JFFS2 /* JFFS2 Support */ +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE + +#define CONFIG_CMD_BOOTZ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ @@ -184,19 +188,34 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ "console=ttyO2,115200n8\0" \ + "fdtfile=am3517-evm.dtb\0" \ + "fdtaddr=0x82C00000\0" \ + "vram=16M\0" \ + "bootenv=uEnv.txt\0" \ + "cmdline=\0" \ + "optargs=\0" \ "mmcdev=0\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rw\0" \ + "mmcrootfstype=ext4 rootwait fixrtc\0" \ "mmcargs=setenv bootargs console=${console} " \ - "root=/dev/mmcblk0p2 rw rootwait\0" \ + "${optargs} " \ + "root=${mmcroot} " \ + "rootfstype=${mmcrootfstype} " \ + "${cmdline}\0" \ "nandargs=setenv bootargs console=${console} " \ "root=/dev/mtdblock4 rw " \ "rootfstype=jffs2\0" \ - "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \ + "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ - "bootm ${loadaddr}\0" \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ "nandboot=echo Booting from nand ...; " \ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ @@ -204,13 +223,20 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "else run nandboot; " \ - "fi; " \ + "echo SD/MMC found on device $mmcdev; " \ + "if run loadbootenv; then " \ + "run importbootenv; " \ + "fi; " \ + "echo Checking if uenvcmd is set ...; " \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...; " \ + "run uenvcmd; " \ + "fi; " \ + "echo Running default loadimage ...; " \ + "setenv bootfile zImage; " \ + "if run loadimage; then " \ + "run loadfdt; " \ + "run mmcboot; " \ "fi; " \ "else run nandboot; fi" diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index c3867efe9a..1428aa97b6 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -227,7 +227,7 @@ #define CONFIG_TI_SPI_MMAP #define CONFIG_QSPI_SEL_GPIO 48 #define CONFIG_SF_DEFAULT_SPEED 48000000 -#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_3 #define CONFIG_QSPI_QUAD_SUPPORT #define CONFIG_TI_EDMA3 diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index e1eb700404..32e9ba38d9 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -43,7 +43,6 @@ /* USB host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/bct-brettl2.h b/include/configs/bct-brettl2.h index 36637aef95..658b16d3ae 100644 --- a/include/configs/bct-brettl2.h +++ b/include/configs/bct-brettl2.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF536 brettl2 board + * U-Boot - Configuration file for BF536 brettl2 board */ #ifndef __CONFIG_BCT_BRETTL2_H__ diff --git a/include/configs/beaver.h b/include/configs/beaver.h index 89c7446d26..c672a8e40c 100644 --- a/include/configs/beaver.h +++ b/include/configs/beaver.h @@ -51,7 +51,6 @@ /* USB Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/bf506f-ezkit.h b/include/configs/bf506f-ezkit.h index 597f1cd5d1..68a91a6b5a 100644 --- a/include/configs/bf506f-ezkit.h +++ b/include/configs/bf506f-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF506F EZ-Kit board + * U-Boot - Configuration file for BF506F EZ-Kit board */ #ifndef __CONFIG_BF506F_EZKIT_H__ diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h index 84bb044421..9f44ebdb0b 100644 --- a/include/configs/bf518f-ezbrd.h +++ b/include/configs/bf518f-ezbrd.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF518F EZBrd board + * U-Boot - Configuration file for BF518F EZBrd board */ #ifndef __CONFIG_BF518F_EZBRD_H__ diff --git a/include/configs/bf525-ucr2.h b/include/configs/bf525-ucr2.h index d12963a5f0..5a6067e5e2 100644 --- a/include/configs/bf525-ucr2.h +++ b/include/configs/bf525-ucr2.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for bf525-ucr2 board + * U-Boot - Configuration file for bf525-ucr2 board * The board includes ADSP-BF525 rev. 0.2, * 32-bit SDRAM (SAMSUNG K4S561632H-UC75), * USB 2.0 High Speed OTG USB WIFI, diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h index 35a2228a6b..e9d900ef01 100644 --- a/include/configs/bf526-ezbrd.h +++ b/include/configs/bf526-ezbrd.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF526 EZBrd board + * U-Boot - Configuration file for BF526 EZBrd board */ #ifndef __CONFIG_BF526_EZBRD_H__ diff --git a/include/configs/bf527-ad7160-eval.h b/include/configs/bf527-ad7160-eval.h index 2f3dec5b09..dd62e7e0fe 100644 --- a/include/configs/bf527-ad7160-eval.h +++ b/include/configs/bf527-ad7160-eval.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF527 AD7160-EVAL board + * U-Boot - Configuration file for BF527 AD7160-EVAL board */ #ifndef __CONFIG_BF527_AD7160_EVAL_H__ diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h index aee776132c..44de44f8f5 100644 --- a/include/configs/bf527-ezkit.h +++ b/include/configs/bf527-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF537 STAMP board + * U-Boot - Configuration file for BF537 STAMP board */ #ifndef __CONFIG_BF527_EZKIT_H__ diff --git a/include/configs/bf527-sdp.h b/include/configs/bf527-sdp.h index 51814a677f..6b51201629 100644 --- a/include/configs/bf527-sdp.h +++ b/include/configs/bf527-sdp.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF527 SDP board + * U-Boot - Configuration file for BF527 SDP board */ #ifndef __CONFIG_BF527_SDP_H__ diff --git a/include/configs/bf533-ezkit.h b/include/configs/bf533-ezkit.h index 1b7290e8d7..95811018cf 100644 --- a/include/configs/bf533-ezkit.h +++ b/include/configs/bf533-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF533 EZKIT board + * U-Boot - Configuration file for BF533 EZKIT board */ #ifndef __CONFIG_BF533_EZKIT_H__ diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h index 4876169104..c8c48aeac4 100644 --- a/include/configs/bf533-stamp.h +++ b/include/configs/bf533-stamp.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF533 STAMP board + * U-Boot - Configuration file for BF533 STAMP board */ #ifndef __CONFIG_BF533_STAMP_H__ diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h index 4fbdca7239..be474ad1ba 100644 --- a/include/configs/bf537-minotaur.h +++ b/include/configs/bf537-minotaur.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CSP Minotaur board + * U-Boot - Configuration file for CSP Minotaur board * * Thu Oct 25 15:30:44 CEST 2007 <hackfin@section5.ch> * Minotaur config, brushed up for official uClinux dist. diff --git a/include/configs/bf537-pnav.h b/include/configs/bf537-pnav.h index 2474adb555..5794f471eb 100644 --- a/include/configs/bf537-pnav.h +++ b/include/configs/bf537-pnav.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF537 PNAV board + * U-Boot - Configuration file for BF537 PNAV board */ #ifndef __CONFIG_BF537_PNAV_H__ diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h index 89d26043da..6d4a93b324 100644 --- a/include/configs/bf537-srv1.h +++ b/include/configs/bf537-srv1.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CSP Minotaur board + * U-Boot - Configuration file for CSP Minotaur board * * Thu Oct 25 15:30:44 CEST 2007 <hackfin@section5.ch> * Minotaur config, brushed up for official uClinux dist. diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h index f250cdbf0a..b1787132ab 100644 --- a/include/configs/bf537-stamp.h +++ b/include/configs/bf537-stamp.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF537 STAMP board + * U-Boot - Configuration file for BF537 STAMP board */ #ifndef __CONFIG_BF537_STAMP_H__ diff --git a/include/configs/bf538f-ezkit.h b/include/configs/bf538f-ezkit.h index b1d4f263ae..55becdc5a1 100644 --- a/include/configs/bf538f-ezkit.h +++ b/include/configs/bf538f-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF538F EZ-Kit Lite board + * U-Boot - Configuration file for BF538F EZ-Kit Lite board */ #ifndef __CONFIG_BF538F_EZKIT_H__ diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h index 65009c6f28..8198cb862a 100644 --- a/include/configs/bf548-ezkit.h +++ b/include/configs/bf548-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF548 STAMP board + * U-Boot - Configuration file for BF548 STAMP board */ #ifndef __CONFIG_BF548_EZKIT_H__ diff --git a/include/configs/bf561-acvilon.h b/include/configs/bf561-acvilon.h index 92251fc0bd..31862daf31 100644 --- a/include/configs/bf561-acvilon.h +++ b/include/configs/bf561-acvilon.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF561 Acvilon System On Module + * U-Boot - Configuration file for BF561 Acvilon System On Module * For more information please go to http://www.niistt.ru/ */ diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h index efbc6c21d9..1a3b33f395 100644 --- a/include/configs/bf561-ezkit.h +++ b/include/configs/bf561-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF561 EZKIT board + * U-Boot - Configuration file for BF561 EZKIT board */ #ifndef __CONFIG_BF561_EZKIT_H__ diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h index b5d4847523..3e0bff56dd 100644 --- a/include/configs/bf609-ezkit.h +++ b/include/configs/bf609-ezkit.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BF609 EZ-Kit board + * U-Boot - Configuration file for BF609 EZ-Kit board */ #ifndef __CONFIG_BF609_EZKIT_H__ diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h index 60650aa77b..b9e859c07b 100644 --- a/include/configs/blackstamp.h +++ b/include/configs/blackstamp.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BlackStamp board + * U-Boot - Configuration file for BlackStamp board * Configuration by Ben Matthews for UR LLE using bf533-stamp.h * as a template * See http://blackfin.uclinux.org/gf/project/blackstamp/ diff --git a/include/configs/blackvme.h b/include/configs/blackvme.h index 16949aa929..a262e7914f 100644 --- a/include/configs/blackvme.h +++ b/include/configs/blackvme.h @@ -1,4 +1,4 @@ -/* U-boot for BlackVME. (C) Wojtek Skulski 2010. +/* U-Boot for BlackVME. (C) Wojtek Skulski 2010. * The board includes ADSP-BF561 rev. 0.5, * 32-bit SDRAM (2 * MT48LC16M16A2TG or MT48LC32M16A2TG), * Gigabit Ether AX88180 (ASIX) + 88E1111 rev. B2 (Marvell), diff --git a/include/configs/br4.h b/include/configs/br4.h index 7dda472fe7..85f31a46a4 100644 --- a/include/configs/br4.h +++ b/include/configs/br4.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for BR4 Appliance + * U-Boot - Configuration file for BR4 Appliance * * based on bf537-stamp.h * Copyright (c) Switchfin Org. <dpn@switchfin.org> diff --git a/include/configs/chromebox_panther.h b/include/configs/chromebox_panther.h index 00fe26da29..d5b33902cc 100644 --- a/include/configs/chromebox_panther.h +++ b/include/configs/chromebox_panther.h @@ -11,7 +11,5 @@ #include <configs/x86-chromebook.h> #define CONFIG_RTL8169 -/* Avoid a warning in the Realtek Ethernet driver */ -#define CONFIG_SYS_CACHELINE_SIZE 16 #endif /* __CONFIG_H */ diff --git a/include/configs/cm-bf527.h b/include/configs/cm-bf527.h index e9e4e1414a..761e2c5f43 100644 --- a/include/configs/cm-bf527.h +++ b/include/configs/cm-bf527.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CM-BF527 board + * U-Boot - Configuration file for CM-BF527 board */ #ifndef __CONFIG_CM_BF527_H__ diff --git a/include/configs/cm-bf533.h b/include/configs/cm-bf533.h index a4647858dd..d06333dc41 100644 --- a/include/configs/cm-bf533.h +++ b/include/configs/cm-bf533.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CM-BF533 board + * U-Boot - Configuration file for CM-BF533 board */ #ifndef __CONFIG_CM_BF533_H__ diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h index 0eebe56503..746a5bd417 100644 --- a/include/configs/cm-bf537e.h +++ b/include/configs/cm-bf537e.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CM-BF537E board + * U-Boot - Configuration file for CM-BF537E board */ #ifndef __CONFIG_CM_BF537E_H__ diff --git a/include/configs/cm-bf537u.h b/include/configs/cm-bf537u.h index 3a2d72626c..71008aaa06 100644 --- a/include/configs/cm-bf537u.h +++ b/include/configs/cm-bf537u.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CM-BF537U board + * U-Boot - Configuration file for CM-BF537U board */ #ifndef __CONFIG_CM_BF537U_H__ diff --git a/include/configs/cm-bf548.h b/include/configs/cm-bf548.h index cde23ada40..37205a9c5b 100644 --- a/include/configs/cm-bf548.h +++ b/include/configs/cm-bf548.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for cm-bf548 board + * U-Boot - Configuration file for cm-bf548 board */ #ifndef __CONFIG_CM_BF548_H__ diff --git a/include/configs/cm-bf561.h b/include/configs/cm-bf561.h index 9d8a2c613f..284ec83391 100644 --- a/include/configs/cm-bf561.h +++ b/include/configs/cm-bf561.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for CM-BF561 board + * U-Boot - Configuration file for CM-BF561 board */ #ifndef __CONFIG_CM_BF561_H__ diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h index 8e70d8c94c..67a143f8f6 100644 --- a/include/configs/cobra5272.h +++ b/include/configs/cobra5272.h @@ -7,7 +7,7 @@ */ /* --- - * Version: U-boot 1.0.0 - initial release for Sentec COBRA5272 board + * Version: U-Boot 1.0.0 - initial release for Sentec COBRA5272 board * Date: 2004-03-29 * Author: Florian Schlote * diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h index 7611fc5004..b7ad189af3 100644 --- a/include/configs/colibri_t20.h +++ b/include/configs/colibri_t20.h @@ -38,7 +38,6 @@ #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_ULPI #define CONFIG_USB_ULPI_VIEWPORT -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB @@ -53,10 +52,6 @@ #define CONFIG_TFTP_TSIZE /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 #define CONFIG_CMD_BMP diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index ef743b0d33..47914c7679 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -43,7 +43,6 @@ /* USB host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/cougarcanyon2.h b/include/configs/cougarcanyon2.h new file mode 100644 index 0000000000..88845dc068 --- /dev/null +++ b/include/configs/cougarcanyon2.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <configs/x86-common.h> + +#define CONFIG_SYS_MONITOR_LEN (2 << 20) +#define CONFIG_BOARD_EARLY_INIT_F + +#define CONFIG_SMSC_SIO1007 + +#define CONFIG_PCI_PNP + +#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ + "stdout=serial,vga\0" \ + "stderr=serial,vga\0" + +#define CONFIG_SCSI_DEV_LIST \ + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE} + +/* Environment configuration */ +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0x5ff000 + +/* Video is not supported for now */ +#undef CONFIG_VIDEO +#undef CONFIG_CFB_CONSOLE + +#endif /* __CONFIG_H */ diff --git a/include/configs/crownbay.h b/include/configs/crownbay.h index ffd65d5439..fc1a8baf89 100644 --- a/include/configs/crownbay.h +++ b/include/configs/crownbay.h @@ -16,7 +16,6 @@ #define CONFIG_SYS_MONITOR_LEN (1 << 20) #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_EARLY_INIT_R -#define CONFIG_ARCH_MISC_INIT #define CONFIG_SMSC_LPC47M diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h index fdfda6b903..f74ced1b43 100644 --- a/include/configs/dalmore.h +++ b/include/configs/dalmore.h @@ -58,6 +58,7 @@ /* General networking support */ #define CONFIG_CMD_DHCP +#include "tegra-common-usb-gadget.h" #include "tegra-common-post.h" #endif /* __CONFIG_H */ diff --git a/include/configs/dnp5370.h b/include/configs/dnp5370.h index 3b2da0ddd4..c46e60d2e5 100644 --- a/include/configs/dnp5370.h +++ b/include/configs/dnp5370.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for SSV DNP5370 board + * U-Boot - Configuration file for SSV DNP5370 board */ #ifndef __CONFIG_DNP5370_H__ diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 9d62421050..4658283014 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -138,8 +138,8 @@ #define CONFIG_CMD_SF #define CONFIG_CMD_SPI #define CONFIG_TI_SPI_MMAP -#define CONFIG_SF_DEFAULT_SPEED 48000000 -#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 +#define CONFIG_SF_DEFAULT_SPEED 64000000 +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 #define CONFIG_QSPI_QUAD_SUPPORT #ifdef CONFIG_SPL_BUILD diff --git a/include/configs/e2220-1170.h b/include/configs/e2220-1170.h index 18a63d7ec7..33ebb7c7af 100644 --- a/include/configs/e2220-1170.h +++ b/include/configs/e2220-1170.h @@ -44,7 +44,6 @@ /* USB2.0 Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/edb93xx.h b/include/configs/edb93xx.h index 9fce1cda6b..7bc58dc414 100644 --- a/include/configs/edb93xx.h +++ b/include/configs/edb93xx.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for Cirrus Logic EDB93xx boards + * U-Boot - Configuration file for Cirrus Logic EDB93xx boards */ #ifndef __CONFIG_H diff --git a/include/configs/efi-x86.h b/include/configs/efi-x86.h index 258a83f9de..6dd0b32dae 100644 --- a/include/configs/efi-x86.h +++ b/include/configs/efi-x86.h @@ -13,9 +13,6 @@ #undef CONFIG_TPM_TIS_BASE_ADDRESS -#undef CONFIG_CMD_IMLS - -#undef CONFIG_X86_SERIAL #undef CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_IS_NOWHERE #undef CONFIG_VIDEO @@ -23,6 +20,7 @@ #undef CONFIG_SCSI_AHCI #undef CONFIG_CMD_SCSI #undef CONFIG_INTEL_ICH6_GPIO +#undef CONFIG_USB_EHCI_PCI #define CONFIG_STD_DEVICES_SETTINGS "stdin=usbkbd,vga,serial\0" \ "stdout=vga,serial\0" \ diff --git a/include/configs/espt.h b/include/configs/espt.h index d854341b07..4896498c46 100644 --- a/include/configs/espt.h +++ b/include/configs/espt.h @@ -56,7 +56,7 @@ #define CONFIG_SYS_MAX_FLASH_BANKS (1) #define CONFIG_SYS_MAX_FLASH_SECT (150) -/* U-boot setting */ +/* U-Boot setting */ #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024 * 1024) #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE) #define CONFIG_SYS_MONITOR_LEN (128 * 1024) diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 9c3ea883ff..834a22f7a5 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -113,7 +113,7 @@ #define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE) #define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE) -/* U-boot copy size from boot Media to DRAM.*/ +/* U-Boot copy size from boot Media to DRAM.*/ #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512) #define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512) diff --git a/include/configs/harmony.h b/include/configs/harmony.h index e0bc7c0d73..f66ac7087e 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -42,7 +42,6 @@ #define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sector size */ /* USB Host support */ -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_ULPI @@ -60,10 +59,6 @@ #define CONFIG_CMD_DHCP /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 diff --git a/include/configs/ibf-dsp561.h b/include/configs/ibf-dsp561.h index 4757929618..7cb23466fb 100644 --- a/include/configs/ibf-dsp561.h +++ b/include/configs/ibf-dsp561.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for IBF-DSP561 board + * U-Boot - Configuration file for IBF-DSP561 board */ #ifndef __CONFIG_IBF_DSP561__H__ diff --git a/include/configs/ip04.h b/include/configs/ip04.h index 0993ffa444..3638648713 100644 --- a/include/configs/ip04.h +++ b/include/configs/ip04.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for IP04 board (having BF532 processor) + * U-Boot - Configuration file for IP04 board (having BF532 processor) * * Copyright (c) 2006 Intratrade Ltd., Ivan Danov, idanov@gmail.com * diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h index 23b2e43616..763d2ec71e 100644 --- a/include/configs/jetson-tk1.h +++ b/include/configs/jetson-tk1.h @@ -48,7 +48,6 @@ /* USB Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/ls2080a_emu.h b/include/configs/ls2080a_emu.h index 4a7ba2477b..534ebb6735 100644 --- a/include/configs/ls2080a_emu.h +++ b/include/configs/ls2080a_emu.h @@ -11,12 +11,12 @@ #ifdef CONFIG_LS2080A #define CONFIG_IDENT_STRING " LS2080A-EMU" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2080A-EMU" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.LS2080A-EMU" #endif #ifdef CONFIG_LS2085A #define CONFIG_IDENT_STRING " LS2085A-EMU" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2085A-EMU" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.LS2085A-EMU" #endif #define CONFIG_SYS_CLK_FREQ 100000000 diff --git a/include/configs/ls2080a_simu.h b/include/configs/ls2080a_simu.h index 876ee30517..2c2ce7bfec 100644 --- a/include/configs/ls2080a_simu.h +++ b/include/configs/ls2080a_simu.h @@ -11,12 +11,12 @@ #ifdef CONFIG_LS2080A #define CONFIG_IDENT_STRING " LS2080A-SIMU" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2080A-SIMU" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.LS2080A-SIMU" #endif #ifdef CONFIG_LS2085A #define CONFIG_IDENT_STRING " LS2085A-SIMU" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2085A-SIMU" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.LS2085A-SIMU" #endif #define CONFIG_SYS_CLK_FREQ 100000000 diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h new file mode 100644 index 0000000000..f0d5e9d3c5 --- /dev/null +++ b/include/configs/ma5d4evk.h @@ -0,0 +1,255 @@ +/* + * DENX MA5D4 configuration + * Copyright (C) 2015 Marek Vasut <marex@denx.de> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __MA5D4EVK_CONFIG_H__ +#define __MA5D4EVK_CONFIG_H__ + +#define CONFIG_SYS_NO_FLASH + +#define CONFIG_FIT + +#define CONFIG_TIMESTAMP /* Print image info with timestamp */ + +#include "at91-sama5_common.h" +#undef CONFIG_BOOTARGS +#define CONFIG_SYS_USE_SERIALFLASH 1 + +/* + * U-Boot Commands + */ +#define CONFIG_DOS_PARTITION +#define CONFIG_FAT_WRITE +/*#define CONFIG_LCD*/ + +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE +#define CONFIG_CMD_FAT +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_GREPENV +#define CONFIG_CMD_MII +#define CONFIG_CMD_MMC +#define CONFIG_CMD_PING +#define CONFIG_CMD_SF +#define CONFIG_CMD_USB + +/* + * Memory configurations + */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS +#define CONFIG_SYS_SDRAM_SIZE 0x10000000 + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_INIT_SP_ADDR 0x210000 +#else +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) +#endif + +/* + * Environment + */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_ENV_OFFSET 0x8000 +#define CONFIG_ENV_SIZE 0x4000 +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE +#define CONFIG_ENV_SECT_SIZE 0x1000 + +/* + * U-Boot general configurations + */ +#define CONFIG_VERSION_VARIABLE /* U-BOOT version */ + +/* + * Serial Driver + */ +#define CONFIG_ATMEL_USART +#define CONFIG_USART_BASE ATMEL_BASE_USART0 +#define CONFIG_USART_ID ATMEL_ID_USART0 + +/* + * Ethernet + */ +#ifdef CONFIG_CMD_NET +#define CONFIG_MACB +#define CONFIG_RMII +#define CONFIG_NET_RETRY_COUNT 20 +#define CONFIG_MACB_SEARCH_PHY +#define CONFIG_ARP_TIMEOUT 200UL +#define CONFIG_IP_DEFRAG +#endif + +/* + * LCD + */ +#ifdef CONFIG_LCD +#define CONFIG_CMD_BMP +#define CONFIG_BMP_16BPP +#define CONFIG_BMP_24BPP +#define CONFIG_BMP_32BPP +#define LCD_BPP LCD_COLOR16 +#define LCD_OUTPUT_BPP 24 +#define CONFIG_ATMEL_HLCD +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#endif + +/* + * SD/MMC + */ +#ifdef CONFIG_CMD_MMC +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_GENERIC_ATMEL_MCI +#endif + +/* + * SPI NOR (boot memory) + */ +#ifdef CONFIG_CMD_SF +#define CONFIG_ATMEL_SPI +#define CONFIG_ATMEL_SPI0 +#define CONFIG_SPI_FLASH_ATMEL +#define CONFIG_SF_DEFAULT_BUS 0 +#define CONFIG_SF_DEFAULT_CS 0 +#define CONFIG_SF_DEFAULT_SPEED 30000000 +#endif + +/* + * USB + */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_ATMEL +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 +#define CONFIG_USB_STORAGE + +/* USB device */ +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_ATMEL_USBA +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_RNDIS +#define CONFIG_USBNET_MANUFACTURER "DENX" +#endif + +/* + * Boot Linux + */ +#define CONFIG_CMDLINE_TAG +#define CONFIG_INITRD_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTARGS "console=ttyS3,115200" +#define CONFIG_LOADADDR 0x20800000 +#define CONFIG_BOOTCOMMAND "run mmc_mmc" +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR +#define CONFIG_OF_LIBFDT + +/* + * Extra Environments + */ +#define CONFIG_PREBOOT "run try_bootscript" +#define CONFIG_HOSTNAME ma5d4evk + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "consdev=ttyS3\0" \ + "baudrate=115200\0" \ + "bootscript=boot.scr\0" \ + "bootdev=/dev/mmcblk1p1\0" \ + "bootpart=1:1\0" \ + "rootdev=/dev/mmcblk1p2\0" \ + "netdev=eth0\0" \ + "kernel_addr_r=0x22000000\0" \ + "update_spi_firmware_spl_addr=0x21000000\0" \ + "update_spi_firmware_spl_filename=boot.bin\0" \ + "update_spi_firmware_addr=0x22000000\0" \ + "update_spi_firmware_filename=u-boot.img\0" \ + "update_spi_firmware=" /* Update the SPI flash firmware */ \ + "if sf probe ; then " \ + "if tftp ${update_spi_firmware_spl_addr} " \ + "${update_spi_firmware_spl_filename} ; then " \ + "setenv update_spi_firmware_spl_filesize ${filesize} ; "\ + "if tftp ${update_spi_firmware_addr} " \ + "${update_spi_firmware_filename} ; then " \ + "setenv update_spi_firmware_filesize ${filesize} ; " \ + "sf update ${update_spi_firmware_spl_addr} 0x0 " \ + "${update_spi_firmware_spl_filesize} ; " \ + "sf update ${update_spi_firmware_addr} 0x10000 " \ + "${update_spi_firmware_filesize} ; " \ + "fi ; " \ + "fi ; " \ + "fi\0" \ + "addcons=" \ + "setenv bootargs ${bootargs} " \ + "console=${consdev},${baudrate}\0" \ + "addip=" \ + "setenv bootargs ${bootargs} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:" \ + "${netmask}:${hostname}:${netdev}:off\0" \ + "addmisc=" \ + "setenv bootargs ${bootargs} ${miscargs}\0" \ + "addargs=run addcons addmisc\0" \ + "mmcload=" \ + "mmc rescan ; " \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootfile}\0" \ + "netload=" \ + "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ + "miscargs=nohlt panic=1\0" \ + "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \ + "nfsargs=" \ + "setenv bootargs root=/dev/nfs rw " \ + "nfsroot=${serverip}:${rootpath},v3,tcp\0" \ + "mmc_mmc=" \ + "run mmcload mmcargs addargs ; " \ + "bootm ${kernel_addr_r}\0" \ + "mmc_nfs=" \ + "run mmcload nfsargs addip addargs ; " \ + "bootm ${kernel_addr_r}\0" \ + "net_mmc=" \ + "run netload mmcargs addargs ; " \ + "bootm ${kernel_addr_r}\0" \ + "net_nfs=" \ + "run netload nfsargs addip addargs ; " \ + "bootm ${kernel_addr_r}\0" \ + "try_bootscript=" \ + "mmc rescan;" \ + "if test -e mmc ${bootpart} ${bootscript} ; then " \ + "if load mmc ${bootpart} ${kernel_addr_r} ${bootscript};"\ + "then ; " \ + "echo Running bootscript... ; " \ + "source ${kernel_addr_r} ; " \ + "fi ; " \ + "fi\0" +/* SPL */ +#define CONFIG_SPL_FRAMEWORK +#define CONFIG_SPL_TEXT_BASE 0x200000 +#define CONFIG_SPL_MAX_SIZE 0x10000 +#define CONFIG_SPL_BSS_START_ADDR 0x20000000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 +#define CONFIG_SYS_SPL_MALLOC_START 0x20080000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 + +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT + +#define CONFIG_SPL_BOARD_INIT +#define CONFIG_SYS_MONITOR_LEN (512 << 10) + +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_LOAD +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x10000 + +#endif /* __MA5D4EVK_CONFIG_H__ */ diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h index 6dfd5e2c40..cd89fa537b 100644 --- a/include/configs/medcom-wide.h +++ b/include/configs/medcom-wide.h @@ -48,10 +48,6 @@ #define CONFIG_CMD_DHCP /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK /* support the new (FDT-based) image format */ diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 863b032042..3813e25d2f 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -165,7 +165,7 @@ /* NAND configuration for the NAND_SPL */ -/* Start copying real U-boot from the second page */ +/* Start copying real U-Boot from the second page */ #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x3f800 /* Load U-Boot to this address */ diff --git a/include/configs/mxs.h b/include/configs/mxs.h index 63fdf9e4e7..4c490ae54e 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -121,12 +121,10 @@ * DUART Serial Driver. * Conflicts with AUART driver which can be set by board. */ -#ifndef CONFIG_MXS_AUART #define CONFIG_PL011_SERIAL #define CONFIG_PL011_CLOCK 24000000 #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE } #define CONFIG_CONS_INDEX 0 -#endif /* Default baudrate can be overriden by board! */ #ifndef CONFIG_BAUDRATE #define CONFIG_BAUDRATE 115200 diff --git a/include/configs/novena.h b/include/configs/novena.h index d5f517c76d..a5416131ba 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -1,5 +1,5 @@ /* - * Configuration settings for the Novena U-boot. + * Configuration settings for the Novena U-Boot. * * Copyright (C) 2014 Marek Vasut <marex@denx.de> * diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h index 176f6e902b..d528fac8c8 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -38,10 +38,7 @@ #define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA #define CONFIG_AS3722_POWER -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CMD_BMP @@ -58,7 +55,6 @@ /* USB Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 1dd71a8eb6..996f772a28 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -21,7 +21,7 @@ #include <asm/arch/omap.h> /* ---------------------------------------------------------------------------- - * Supported U-boot commands + * Supported U-Boot commands * ---------------------------------------------------------------------------- */ #define CONFIG_CMD_ASKENV @@ -37,7 +37,7 @@ #define CONFIG_CMD_PING /* ---------------------------------------------------------------------------- - * Supported U-boot features + * Supported U-Boot features * ---------------------------------------------------------------------------- */ #define CONFIG_SYS_LONGHELP diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index 2004d148c6..0f16a6e19d 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h @@ -175,7 +175,7 @@ #endif /* CONFIG_USB_OMAP3 */ /* ---------------------------------------------------------------------------- - * U-boot features + * U-Boot features * ---------------------------------------------------------------------------- */ #define CONFIG_SYS_MAXARGS 16 /* max args for a command */ diff --git a/include/configs/omap3_evm_quick_mmc.h b/include/configs/omap3_evm_quick_mmc.h index 27cd9bed5c..23a8a07132 100644 --- a/include/configs/omap3_evm_quick_mmc.h +++ b/include/configs/omap3_evm_quick_mmc.h @@ -16,7 +16,7 @@ #include <asm/arch/omap.h> /* ---------------------------------------------------------------------------- - * Supported U-boot commands + * Supported U-Boot commands * ---------------------------------------------------------------------------- */ #define CONFIG_CMD_MMC @@ -30,7 +30,7 @@ */ /* ---------------------------------------------------------------------------- - * Supported U-boot features + * Supported U-Boot features * ---------------------------------------------------------------------------- */ #define CONFIG_SILENT_CONSOLE diff --git a/include/configs/omap3_evm_quick_nand.h b/include/configs/omap3_evm_quick_nand.h index 124e8c6641..bb908fad3e 100644 --- a/include/configs/omap3_evm_quick_nand.h +++ b/include/configs/omap3_evm_quick_nand.h @@ -16,7 +16,7 @@ #include <asm/arch/omap.h> /* ---------------------------------------------------------------------------- - * Supported U-boot commands + * Supported U-Boot commands * ---------------------------------------------------------------------------- */ #define CONFIG_CMD_NAND @@ -29,7 +29,7 @@ */ /* ---------------------------------------------------------------------------- - * Supported U-boot features + * Supported U-Boot features * ---------------------------------------------------------------------------- */ #define CONFIG_SILENT_CONSOLE diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index e9ce3f6d1c..fba2a1256b 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -11,112 +11,138 @@ #ifndef __CONFIG_H #define __CONFIG_H -/* - * High Level Configuration Options - */ +/* High Level Configuration Options */ #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ -#define CONFIG_SYS_TEXT_BASE 0x80400000 -#include <configs/ti_omap3_common.h> -#define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */ /* - * Display CPU and Board information + * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM + * 64 bytes before this address should be set aside for u-boot.img's + * header. That is 0x800FFFC0--0x80100000 should not be used for any + * other needs. We use this rather than the inherited defines from + * ti_armv7_common.h for backwards compatibility. */ +#define CONFIG_SYS_TEXT_BASE 0x80100000 +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 +#define CONFIG_SPL_BSS_MAX_SIZE (512 << 10) /* 512 KB */ +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 + +#include <configs/ti_omap3_common.h> + +/* Override default SPL info to minimize empty space and allow BCH8 in SPL */ +#undef CONFIG_SPL_TEXT_BASE +#undef CONFIG_SPL_MAX_SIZE +#define CONFIG_SPL_TEXT_BASE 0x40200000 +#define CONFIG_SPL_MAX_SIZE (64 * 1024) + +/* Display CPU and Board information */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO -/* Clock Defines */ -#define V_OSCK 26000000 /* Clock output from T2 */ -#define V_SCLK (V_OSCK >> 1) - #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ - -#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG +#define CONFIG_CMDLINE_EDITING /* cmd line edit/history */ +#define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */ -#define CONFIG_CMDLINE_EDITING /* cmd line edit/history */ -#define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */ - -/* - * Size of malloc() pool - */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - /* Sector */ -/* - * Hardware drivers - */ +/* Hardware drivers */ /* GPIO banks */ #define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */ -/* - * select serial console configuration - */ +#define CONFIG_USB_OMAP3 + +/* select serial console configuration */ #undef CONFIG_CONS_INDEX #define CONFIG_CONS_INDEX 1 #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */ -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE -#define CONFIG_BAUDRATE 115200 -#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ - 115200} -#define CONFIG_GENERIC_MMC -#define CONFIG_MMC -#define CONFIG_OMAP_HSMMC -#define CONFIG_DOS_PARTITION - /* commands to include */ +#define CONFIG_CMD_NAND #define CONFIG_CMD_CACHE -#define CONFIG_CMD_EXT2 /* EXT2 Support */ -#define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ -#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ -#define MTDIDS_DEFAULT "nand0=omap2-nand.0" -#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\ - "1920k(u-boot),128k(u-boot-env),"\ - "4m(kernel),-(fs)" - -#define CONFIG_CMD_I2C /* I2C serial bus support */ -#define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_NAND /* NAND support */ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP -#define CONFIG_SYS_NO_FLASH - -/* - * I2C - */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_OMAP24_I2C_SPEED 100000 -#define CONFIG_SYS_OMAP24_I2C_SLAVE 1 +/* I2C */ #define CONFIG_SYS_I2C_OMAP34XX - -/* - * TWL4030 - */ - - -/* - * Board NAND Info. - */ -#define CONFIG_SYS_NAND_BASE NAND_BASE +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */ +#define EXPANSION_EEPROM_I2C_BUS 2 /* I2C Bus for AT24C64 */ +#define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID + +/* USB */ +#define CONFIG_USB_MUSB_GADGET +#define CONFIG_USB_MUSB_OMAP2PLUS +#define CONFIG_USB_MUSB_PIO_ONLY +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETHER_RNDIS +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW 0 +#define CONFIG_USB_GADGET_DOWNLOAD +#define CONFIG_G_DNL_VENDOR_NUM 0x0451 +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022 +#define CONFIG_G_DNL_MANUFACTURER "TI" +#define CONFIG_USB_FUNCTION_FASTBOOT +#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 +#define CONFIG_SYS_CACHELINE_SIZE 64 + +/* TWL4030 */ +#define CONFIG_TWL4030_PWM +#define CONFIG_TWL4030_USB + +/* Board NAND Info. */ +#ifdef CONFIG_NAND #define CONFIG_NAND_OMAP_GPMC -#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ - /* to access nand */ +#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */ +#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */ +#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */ +#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */ -#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ - /* NAND devices */ +#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ + /* to access nand */ +#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ + /* NAND devices */ #define CONFIG_SYS_NAND_BUSWIDTH_16BIT - +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_COUNT 64 +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 +#define CONFIG_SYS_NAND_OOBSIZE 64 +#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \ + 13, 14, 16, 17, 18, 19, 20, 21, 22, \ + 23, 24, 25, 26, 27, 28, 30, 31, 32, \ + 33, 34, 35, 36, 37, 38, 39, 40, 41, \ + 42, 44, 45, 46, 47, 48, 49, 50, 51, \ + 52, 53, 54, 55, 56} + +#define CONFIG_SYS_NAND_ECCSIZE 512 +#define CONFIG_SYS_NAND_ECCBYTES 13 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW +#define CONFIG_BCH +#define CONFIG_SYS_NAND_MAX_OOBFREE 2 +#define CONFIG_SYS_NAND_MAX_ECCPOS 56 +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ +#define MTDIDS_DEFAULT "nand0=omap2-nand.0" +#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\ + "1920k(u-boot),128k(u-boot-env),"\ + "4m(kernel),-(fs)" +#endif /* Environment information */ @@ -142,15 +168,20 @@ "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \ "setenv display 15;" \ "setenv preboot;" \ + "nand unlock;" \ "saveenv;" - #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x81000000\0" \ - "bootfile=uImage\0" \ + "uimage=uImage\0" \ + "zimage=zImage\0" \ "mtdids=" MTDIDS_DEFAULT "\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "mmcdev=0\0" \ + "mmcroot=/dev/mmcblk0p2 rw\0" \ + "mmcrootfstype=ext4 rootwait\0" \ + "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \ + "nandrootfstype=ubifs rootwait\0" \ "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ "if run loadbootscript; then " \ "run bootscript; " \ @@ -168,79 +199,81 @@ "setenv bootargs ${bootargs} omapfb.vrfb=y " \ "omapfb.rotate=${rotation}; " \ "fi\0" \ - "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \ + "optargs=ignore_loglevel early_printk no_console_suspend\0" \ "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ "common_bootargs=setenv bootargs ${bootargs} display=${display} " \ - "${otherbootargs};" \ + "${optargs};" \ "run addmtdparts; " \ "run vrfb_arg\0" \ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo 'Running bootscript from mmc ...'; " \ "source ${loadaddr}\0" \ - "loaduimage=mmc rescan ${mmcdev}; " \ - "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ + "loaduimage=mmc rescan; " \ + "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \ + "loadzimage=mmc rescan; " \ + "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \ "ramdisksize=64000\0" \ "ramdiskaddr=0x82000000\0" \ "ramdiskimage=rootfs.ext2.gz.uboot\0" \ + "loadramdisk=mmc rescan; " \ + "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \ "ramargs=run setconsole; setenv bootargs console=${console} " \ "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ - "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \ + "mmcargs=run setconsole; setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${mmcroot} " \ + "rootfstype=${mmcrootfstype}\0" \ + "nandargs=run setconsole; setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ + "fdtaddr=0x86000000\0" \ + "loadfdtimage=mmc rescan; " \ + "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ + "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ + "run mmcargs; " \ + "run common_bootargs; " \ + "run dump_bootargs; " \ + "run loadzimage; " \ + "run loadfdtimage; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ + "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \ "run ramargs; " \ "run common_bootargs; " \ "run dump_bootargs; " \ "run loaduimage; " \ - "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\ + "run loadramdisk; " \ "bootm ${loadaddr} ${ramdiskaddr}\0" \ - "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ + "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \ "run ramargs; " \ "run common_bootargs; " \ "run dump_bootargs; " \ - "tftpboot ${loadaddr} ${bootfile}; "\ - "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\ + "run loadzimage; " \ + "run loadramdisk; " \ + "run loadfdtimage; " \ + "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \ + "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ + "run ramargs; " \ + "run common_bootargs; " \ + "run dump_bootargs; " \ + "tftpboot ${loadaddr} ${uimage}; " \ + "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \ "bootm ${loadaddr} ${ramdiskaddr}\0" #define CONFIG_BOOTCOMMAND \ "run autoboot" +/* Miscellaneous configurable options */ #define CONFIG_AUTO_COMPLETE -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ -#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ - sizeof(CONFIG_SYS_PROMPT) + 16) - /* memtest works on */ #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ 0x01F00000) /* 31MB */ -/* - * OMAP3 has 12 GP timers, they can be driven by the system clock - * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). - * This rate is divided by a local divisor. - */ -#define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2) -#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ - -/* - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ -#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 - -/* - * FLASH and environment organization - */ +/* FLASH and environment organization */ /* **** PISMO SUPPORT *** */ -#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */ - #if defined(CONFIG_CMD_NAND) #define CONFIG_SYS_FLASH_BASE NAND_BASE #elif defined(CONFIG_CMD_ONENAND) @@ -250,29 +283,32 @@ /* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE +#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ +#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */ -#if defined(CONFIG_CMD_NAND) -#define CONFIG_NAND_OMAP_GPMC -#define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET -#endif - #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET +#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET -#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 -#define CONFIG_SYS_INIT_RAM_SIZE 0x800 -/* - * SMSC922x Ethernet - */ +/* SMSC922x Ethernet */ #if defined(CONFIG_CMD_NET) - #define CONFIG_SMC911X -#define CONFIG_SMC911X_16_BIT +#define CONFIG_SMC911X_32_BIT #define CONFIG_SMC911X_BASE 0x08000000 - #endif /* (CONFIG_CMD_NET) */ +/* Defines for SPL */ + +#define CONFIG_SPL_OMAP3_ID_NAND + +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif + #endif /* __CONFIG_H */ diff --git a/include/configs/origen.h b/include/configs/origen.h index ef80bf60ca..fa71874f8a 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -111,7 +111,7 @@ #define CONFIG_SYS_INIT_SP_ADDR 0x02040000 -/* U-boot copy size from boot Media to DRAM.*/ +/* U-Boot copy size from boot Media to DRAM.*/ #define COPY_BL2_SIZE 0x80000 #define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512) #define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512) diff --git a/include/configs/p2371-0000.h b/include/configs/p2371-0000.h index fffe5c9df8..9ca29f8b4e 100644 --- a/include/configs/p2371-0000.h +++ b/include/configs/p2371-0000.h @@ -44,7 +44,6 @@ /* USB2.0 Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h index 7dbf4221f4..01fd743d82 100644 --- a/include/configs/p2371-2180.h +++ b/include/configs/p2371-2180.h @@ -44,7 +44,6 @@ /* USB2.0 Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/p2571.h b/include/configs/p2571.h index f3357d1e0d..d35e25524f 100644 --- a/include/configs/p2571.h +++ b/include/configs/p2571.h @@ -45,7 +45,6 @@ /* USB2.0 Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/paz00.h b/include/configs/paz00.h index d9dd9bdcd4..6acecb1e27 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -48,10 +48,6 @@ #define CONFIG_CMD_DHCP /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 diff --git a/include/configs/pr1.h b/include/configs/pr1.h index 2e5ce75629..1af9ef7cad 100644 --- a/include/configs/pr1.h +++ b/include/configs/pr1.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for PR1 Appliance + * U-Boot - Configuration file for PR1 Appliance * * based on bf537-stamp.h * Copyright (c) Switchfin Org. <dpn@switchfin.org> diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h index 927bae78eb..97e5d2c795 100644 --- a/include/configs/rpi-common.h +++ b/include/configs/rpi-common.h @@ -144,8 +144,14 @@ /* * Memory layout for where various images get loaded by boot scripts: * - * scriptaddr can be pretty much anywhere that doesn't conflict with something - * else. Put it low in memory to avoid conflicts. + * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. + * + * fdt_addr_r simply shouldn't overlap anything else. However, the RPi's + * binary firmware loads a DT to address 0x100, so we choose this address to + * match it. This allows custom boot scripts to pass this DT on to Linux + * simply by not over-writing the data at this address. When using U-Boot, + * U-Boot (and scripts it executes) typicaly ignore the DT loaded by the FW + * and loads its own DT from disk (triggered by boot.scr or extlinux.conf). * * pxefile_addr_r can be pretty much anywhere that doesn't conflict with * something else. Put it low in memory to avoid conflicts. @@ -159,13 +165,15 @@ * this up to 16M allows for a sizable kernel to be decompressed below the * compressed load address. * - * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for - * the compressed kernel to be up to 16M too. + * scriptaddr can be pretty much anywhere that doesn't conflict with something + * else. Choosing 32M allows for the compressed kernel to be up to 16M. * * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows - * for the FDT/DTB to be up to 1M, which is hopefully plenty. + * for any boot script to be up to 1M, which is hopefully plenty. */ #define ENV_MEM_LAYOUT_SETTINGS \ + "fdt_high=ffffffff\0" \ + "initrd_high=ffffffff\0" \ "fdt_addr_r=0x00000100\0" \ "pxefile_addr_r=0x00100000\0" \ "kernel_addr_r=0x01000000\0" \ diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 3e904746f2..06112139ea 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -45,7 +45,6 @@ #define CONFIG_SYS_MMC_ENV_PART 2 /* USB Host support */ -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE @@ -66,10 +65,6 @@ #define CONFIG_USB_KEYBOARD /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h index 7148f1da95..0fd2caf161 100644 --- a/include/configs/sh7763rdp.h +++ b/include/configs/sh7763rdp.h @@ -56,7 +56,7 @@ #define CONFIG_SYS_MAX_FLASH_BANKS (1) #define CONFIG_SYS_MAX_FLASH_SECT (520) -/* U-boot setting */ +/* U-Boot setting */ #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024 * 1024) #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE) #define CONFIG_SYS_MONITOR_LEN (128 * 1024) diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index 44d1d5a171..de7b6bca1d 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -49,10 +49,18 @@ #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ #define CONFIG_DISPLAY_CPUINFO /* display CPU Info at startup */ +/* We set the max number of command args high to avoid HUSH bugs. */ +#define CONFIG_SYS_MAXARGS 32 + /* setting board specific options */ -# define CONFIG_MACH_TYPE MACH_TYPE_SMARTWEB -#define CONFIG_CMDLINE_EDITING +#define CONFIG_MACH_TYPE MACH_TYPE_SMARTWEB +#define CONFIG_AUTO_COMPLETE +#define CONFIG_ENV_OVERWRITE 1 /* Overwrite ethaddr / serial# */ +#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_AUTO_COMPLETE +#define CONFIG_SYS_AUTOLOAD "yes" +#define CONFIG_RESET_TO_RETRY /* The LED PINs */ #define CONFIG_RED_LED AT91_PIN_PA9 @@ -184,9 +192,7 @@ /* General Boot Parameter */ #define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTCOMMAND "run flashboot" -#define CONFIG_BOOT_RETRY_TIME 30 #define CONFIG_SYS_CBSIZE 512 -#define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_PBSIZE \ (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_LONGHELP diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h index 2492f99269..b7ac402f98 100644 --- a/include/configs/smdkv310.h +++ b/include/configs/smdkv310.h @@ -92,7 +92,7 @@ #define CONFIG_SYS_INIT_SP_ADDR 0x02040000 -/* U-boot copy size from boot Media to DRAM.*/ +/* U-Boot copy size from boot Media to DRAM.*/ #define COPY_BL2_SIZE 0x80000 #define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512) #define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512) diff --git a/include/configs/sniper.h b/include/configs/sniper.h index a995415432..4152ecde26 100644 --- a/include/configs/sniper.h +++ b/include/configs/sniper.h @@ -1,5 +1,5 @@ /* - * LG Optimus Black (P970) codename sniper config + * LG Optimus Black codename sniper config * * Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr> * diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index d2630f4be1..a309448ecf 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -12,7 +12,7 @@ */ -/* U-boot Load Address */ +/* U-Boot Load Address */ #define CONFIG_SYS_TEXT_BASE 0x00700000 /* Ethernet driver configuration */ diff --git a/include/configs/stv0991.h b/include/configs/stv0991.h index f4213217bb..6db628a052 100644 --- a/include/configs/stv0991.h +++ b/include/configs/stv0991.h @@ -45,7 +45,7 @@ #define CONFIG_SYS_INIT_RAM_ADDR 0x00190000 #define CONFIG_SYS_INIT_SP_OFFSET \ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -/* U-boot Load Address */ +/* U-Boot Load Address */ #define CONFIG_SYS_TEXT_BASE 0x00010000 #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) diff --git a/include/configs/tcm-bf518.h b/include/configs/tcm-bf518.h index 1e74535b5c..0f4d959e67 100644 --- a/include/configs/tcm-bf518.h +++ b/include/configs/tcm-bf518.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for Bluetechnix TCM-BF518 board + * U-Boot - Configuration file for Bluetechnix TCM-BF518 board */ #ifndef __CONFIG_TCM_BF518_H__ diff --git a/include/configs/tcm-bf537.h b/include/configs/tcm-bf537.h index a8947c5934..fc98d242fb 100644 --- a/include/configs/tcm-bf537.h +++ b/include/configs/tcm-bf537.h @@ -1,5 +1,5 @@ /* - * U-boot - Configuration file for TCM-BF537 board + * U-Boot - Configuration file for TCM-BF537 board */ #ifndef __CONFIG_TCM_BF537_H__ diff --git a/include/configs/tec.h b/include/configs/tec.h index 4b8ca5e8da..50b9e97fe7 100644 --- a/include/configs/tec.h +++ b/include/configs/tec.h @@ -48,10 +48,6 @@ #define CONFIG_CMD_DHCP /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK /* support the new (FDT-based) image format */ diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 68da23e8b7..b6b8ffc08f 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -53,6 +53,12 @@ #define STDOUT_LCD "" #endif +#ifdef CONFIG_DM_VIDEO +#define STDOUT_VIDEO ",vidconsole" +#else +#define STDOUT_VIDEO "" +#endif + #ifdef CONFIG_CROS_EC_KEYB #define STDOUT_CROS_EC ",cros-ec-keyb" #else @@ -61,8 +67,8 @@ #define TEGRA_DEVICE_SETTINGS \ "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ - "stdout=serial" STDOUT_LCD "\0" \ - "stderr=serial" STDOUT_LCD "\0" \ + "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ + "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ "" #ifndef BOARD_EXTRA_ENV_SETTINGS diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h index 8761f8de09..92ebb6aa4c 100644 --- a/include/configs/trimslice.h +++ b/include/configs/trimslice.h @@ -44,7 +44,6 @@ #define CONFIG_ENV_OFFSET (512 * 1024) /* USB Host support */ -#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h index 2f6c97cf58..50e1abb0e5 100644 --- a/include/configs/ts4800.h +++ b/include/configs/ts4800.h @@ -20,7 +20,7 @@ #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_NO_FLASH /* No NOR Flash */ -#define CONFIG_SKIP_LOWLEVEL_INIT /* U-boot is a 2nd stage bootloader */ +#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 2nd stage bootloader */ #define CONFIG_HW_WATCHDOG diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 599b26959e..fcec0c0ae2 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ -/* U-boot - Common settings for UniPhier Family */ +/* U-Boot - Common settings for UniPhier Family */ #ifndef __CONFIG_UNIPHIER_COMMON_H__ #define __CONFIG_UNIPHIER_COMMON_H__ @@ -173,7 +173,7 @@ "setenv bootargs $bootargs root=/dev/nfs rw " \ "nfsroot=$serverip:$rootpath " \ "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off;" \ - "tftpboot; bootm;" + "run __nfsboot" #ifdef CONFIG_FIT #define CONFIG_BOOTFILE "fitImage" @@ -186,7 +186,8 @@ "nandboot=nand read $fit_addr_r $fit_addr $fit_size &&" \ "bootm $fit_addr_r\0" \ "tftpboot=tftpboot $fit_addr_r $bootfile &&" \ - "bootm $fit_addr_r\0" + "bootm $fit_addr_r\0" \ + "__nfsboot=run tftpboot\0" #else #define CONFIG_CMD_BOOTZ #define CONFIG_BOOTFILE "zImage" @@ -201,31 +202,36 @@ "ramdisk_addr_r=0x84a00000\0" \ "ramdisk_size=0x00600000\0" \ "ramdisk_file=rootfs.cpio.uboot\0" \ - "norboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "setexpr kernel_addr $nor_base + $kernel_addr &&" \ - "setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \ - "setexpr fdt_addr $nor_base + $fdt_addr &&" \ - "bootz $kernel_addr $ramdisk_addr $fdt_addr\0" \ - "nandboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ + "boot_common=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ + "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \ + "norboot=setexpr kernel_addr $nor_base + $kernel_addr &&" \ + "cp.b $kernel_addr $kernel_addr_r $kernel_size &&" \ + "setexpr ramdisk_addr_r $nor_base + $ramdisk_addr &&" \ + "setexpr fdt_addr_r $nor_base + $fdt_addr &&" \ + "run boot_common\0" \ + "nandboot=nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \ "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \ - "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \ - "tftpboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "tftpboot $kernel_addr_r $bootfile &&" \ + "run boot_common\0" \ + "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \ "tftpboot $ramdisk_addr_r $ramdisk_file &&" \ "tftpboot $fdt_addr_r $fdt_file &&" \ - "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" + "run boot_common\0" \ + "__nfsboot=tftpboot $kernel_addr_r $bootfile &&" \ + "tftpboot $fdt_addr_r $fdt_file &&" \ + "tftpboot $fdt_addr_r $fdt_file &&" \ + "setenv ramdisk_addr_r - &&" \ + "run boot_common\0" #endif #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "verify=n\0" \ - "norbase=0x42000000\0" \ + "nor_base=0x42000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ - "tftpboot u-boot-spl-dtb.bin &&" \ + "tftpboot u-boot-spl.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ - "tftpboot u-boot-dtb.img &&" \ + "tftpboot u-boot.img &&" \ "nand write $loadaddr 0x00010000 0x000f0000\0" \ LINUXBOOT_ENV_SETTINGS @@ -245,7 +251,7 @@ #define CONFIG_SPL_TEXT_BASE 0x00100000 #endif -#define CONFIG_SPL_STACK (0x0ff08000) +#define CONFIG_SPL_STACK (0x00100000) #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE) #define CONFIG_PANIC_HANG diff --git a/include/configs/venice2.h b/include/configs/venice2.h index 4a0b448332..75f7268d10 100644 --- a/include/configs/venice2.h +++ b/include/configs/venice2.h @@ -45,7 +45,6 @@ /* USB Host support */ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA -#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB diff --git a/include/configs/ventana.h b/include/configs/ventana.h index e9c3500109..7f970d011d 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -49,10 +49,6 @@ #define CONFIG_USB_KEYBOARD /* LCD support */ -#define CONFIG_LCD -#define CONFIG_PWM_TEGRA -#define CONFIG_VIDEO_TEGRA -#define LCD_BPP LCD_COLOR16 #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 814934aa92..133041bca5 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -24,7 +24,7 @@ #define CONFIG_SYS_ICACHE_OFF #define CONFIG_IDENT_STRING " vexpress_aemv8a" -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv8.vexpress_aemv8a" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv8.vexpress_aemv8a" /* Link Definitions */ #if defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) || \ diff --git a/include/configs/vexpress_ca15_tc2.h b/include/configs/vexpress_ca15_tc2.h index 59b6310b57..883e58e660 100644 --- a/include/configs/vexpress_ca15_tc2.h +++ b/include/configs/vexpress_ca15_tc2.h @@ -12,7 +12,7 @@ #define __VEXPRESS_CA15X2_TC2_h #define CONFIG_VEXPRESS_EXTENDED_MEMORY_MAP -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.vexpress_ca15x2_tc2" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv7.vexpress_ca15x2_tc2" #include "vexpress_common.h" #define CONFIG_SYSFLAGS_ADDR 0x1c010030 diff --git a/include/configs/vexpress_ca5x2.h b/include/configs/vexpress_ca5x2.h index a4ffdf54db..43850272a6 100644 --- a/include/configs/vexpress_ca5x2.h +++ b/include/configs/vexpress_ca5x2.h @@ -12,7 +12,7 @@ #define __VEXPRESS_CA5X2_h #define CONFIG_VEXPRESS_EXTENDED_MEMORY_MAP -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.vexpress_ca5x2" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv7.vexpress_ca5x2" #include "vexpress_common.h" #endif /* __VEXPRESS_CA5X2_h */ diff --git a/include/configs/vexpress_ca9x4.h b/include/configs/vexpress_ca9x4.h index 71233d8c3f..99be50a5bd 100644 --- a/include/configs/vexpress_ca9x4.h +++ b/include/configs/vexpress_ca9x4.h @@ -12,7 +12,7 @@ #define __VEXPRESS_CA9X4_H #define CONFIG_VEXPRESS_ORIGINAL_MEMORY_MAP -#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.vexpress_ca9x4" +#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv7.vexpress_ca9x4" #include "vexpress_common.h" #endif /* VEXPRESS_CA9X4_H */ diff --git a/include/configs/vinco.h b/include/configs/vinco.h new file mode 100644 index 0000000000..92b1b4bca7 --- /dev/null +++ b/include/configs/vinco.h @@ -0,0 +1,167 @@ +/* + * Configuration settings for the VInCo platform. + * + * Based on the settings for the SAMA5-EK board + * Copyright (C) 2014 Atmel + * Bo Shen <voice.shen@atmel.com> + * Copyright (C) 2015 Free Electrons + * Gregory CLEMENT gregory.clement@free-electrons.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* No NOR flash, this definition should be put before common header */ +#define CONFIG_SYS_NO_FLASH + +#include "at91-sama5_common.h" + +/* The value in the common file is too far away for the VInCo platform */ +#ifdef CONFIG_SYS_TEXT_BASE +#undef CONFIG_SYS_TEXT_BASE +#endif +#define CONFIG_SYS_TEXT_BASE 0x20f00000 + +/* serial console */ +#define CONFIG_ATMEL_USART +#define CONFIG_USART_BASE ATMEL_BASE_USART3 +#define CONFIG_USART_ID ATMEL_ID_USART3 + +/* SDRAM */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS +#define CONFIG_SYS_SDRAM_SIZE 0x4000000 + + +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) + +#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ + +/* SerialFlash */ +#define CONFIG_CMD_SF + +#ifdef CONFIG_CMD_SF +#define CONFIG_ATMEL_SPI +#define CONFIG_ATMEL_SPI0 +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_SF_DEFAULT_BUS 0 +#define CONFIG_SF_DEFAULT_CS 0 +#define CONFIG_SF_DEFAULT_SPEED 50000000 +#define CONFIG_ENV_SPI_MAX_HZ 50000000 +#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) +#define CONFIG_ENV_SPI_MODE (SPI_MODE_0) +#endif + + +/* MMC */ +#define CONFIG_CMD_MMC + +#ifdef CONFIG_CMD_MMC +#define CONFIG_SUPPORT_EMMC_BOOT +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_GENERIC_ATMEL_MCI +#define ATMEL_BASE_MMCI ATMEL_BASE_MCI1 +#define CONFIG_SYS_MMC_CLK_OD 500000 + +/* For generating MMC partitions */ +#define CONFIG_PARTITION_UUIDS +#define CONFIG_RANDOM_UUID +#define CONFIG_EFI_PARTITION +#define CONFIG_CMD_GPT + +#endif + +/* USB */ +#define CONFIG_CMD_USB + +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_ATMEL +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 +#define CONFIG_USB_STORAGE +#endif + +/* USB device */ +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_ATMEL_USBA +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_RNDIS +#define CONFIG_USBNET_MANUFACTURER "L+G VInCo" + +#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC) +#define CONFIG_CMD_FAT +#define CONFIG_DOS_PARTITION +#endif + +/* Ethernet Hardware */ +#define CONFIG_CMD_MII +#define CONFIG_PHY_SMSC +#define CONFIG_MACB +#define CONFIG_RMII +#define CONFIG_NET_RETRY_COUNT 20 +#define CONFIG_MACB_SEARCH_PHY + + +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_RNDIS + + +#ifdef CONFIG_SYS_USE_SERIALFLASH +/* bootstrap + u-boot + env + linux in serial flash */ +#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS +#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS +/* Use our own mapping for the VInCo platform */ +#undef CONFIG_ENV_OFFSET +#undef CONFIG_ENV_SIZE + +#define CONFIG_ENV_OFFSET 0x10000 +#define CONFIG_ENV_SIZE 0x10000 + +/* Update the bootcommand according to our mapping for the VInCo platform */ +#undef CONFIG_BOOTCOMMAND +#define CONFIG_BOOTCOMMAND "mmc dev 0 0;" \ + "mmc read ${loadaddr} ${k_offset} ${k_blksize};" \ + "mmc read ${oftaddr} ${dtb_offset} ${dtb_blksize};" \ + "bootz ${loadaddr} - ${oftaddr}" + +#undef CONFIG_BOOTARGS +#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk rw root=/dev/mmcblk0p2 rootfstype=ext4 rootwait quiet lpj=1990656" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_start=0x20000\0" \ + "kernel_size=0x800000\0" \ + "mmcblksize=0x200\0" \ + "oftaddr=0x21000000\0" \ + "loadaddr=0x22000000\0" \ + "update_uboot=tftp ${loadaddr} u-boot.bin;sf probe 0;" \ + "sf erase 0x20000 0x4B000; sf write ${loadaddr} 0x20000 0x4B000\0" \ + "create_partition=setexpr dtb_start ${kernel_start} + 0x400000;" \ + "setexpr rootfs_start ${kernel_start} + ${kernel_size};" \ + "setenv partitions 'name=kernel,size=${kernel_size}," \ + "start=${kernel_start};name=rootfs,size=-';" \ + "gpt write mmc 0 ${partitions} \0"\ + "f2blk_size=setexpr fileblksize ${filesize} / ${mmcblksize};" \ + "setexpr fileblksize ${fileblksize} + 1\0" \ + "store_kernel=tftp ${loadaddr} zImage; run f2blk_size;" \ + "setexpr k_blksize ${fileblksize};" \ + "setexpr k_offset ${kernel_start} / ${mmcblksize};" \ + "mmc write ${fileaddr} ${k_offset} ${fileblksize}\0" \ + "store_dtb=tftp ${loadaddr} at91-vinco.dtb; run f2blk_size;" \ + "setexpr dtb_blksize ${fileblksize};" \ + "setexpr dtb_offset ${dtb_start} / ${mmcblksize};" \ + "mmc write ${fileaddr} ${dtb_offset} ${fileblksize}\0" \ + "store_rootfs=tftp ${loadaddr} vinco-gateway-image-vinco.ext4;" \ + "setexpr rootfs_offset ${rootfs_start} / ${mmcblksize};" \ + "mmc write ${fileaddr} ${rootfs_offset} ${fileblksize}\0" \ + "bootdelay=0\0" + +#endif +#define CONFIG_ZERO_BOOTDELAY_CHECK + +#endif diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index dc7b227d25..3ae4366bfa 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -236,4 +236,6 @@ "tftpboot $loadaddr $bootfile;" \ "zboot $loadaddr" +#define CONFIG_BOOTDELAY 2 + #endif /* __CONFIG_H */ diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 27ef74daf5..28622dec18 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -105,6 +105,15 @@ # define CONFIG_CMD_EXT4_WRITE #endif +#ifdef CONFIG_NAND_ARASAN +# define CONFIG_CMD_NAND +# define CONFIG_CMD_NAND_LOCK_UNLOCK +# define CONFIG_SYS_MAX_NAND_DEVICE 1 +# define CONFIG_SYS_NAND_SELF_INIT +# define CONFIG_SYS_NAND_ONFI_DETECTION +# define CONFIG_MTD_DEVICE +#endif + /* Miscellaneous configurable options */ #define CONFIG_SYS_LOAD_ADDR 0x8000000 diff --git a/include/dt-bindings/clock/tegra124-car-common.h b/include/dt-bindings/clock/tegra124-car-common.h new file mode 100644 index 0000000000..a215609056 --- /dev/null +++ b/include/dt-bindings/clock/tegra124-car-common.h @@ -0,0 +1,345 @@ +/* + * This header provides constants for binding nvidia,tegra124-car or + * nvidia,tegra132-car. + * + * The first 192 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB + * registers. These IDs often match those in the CAR's RST_DEVICES registers, + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In + * this case, those clocks are assigned IDs above 185 in order to highlight + * this issue. Implementations that interpret these clock IDs as bit values + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to + * explicitly handle these special cases. + * + * The balance of the clocks controlled by the CAR are assigned IDs of 185 and + * above. + */ + +#ifndef _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H +#define _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H + +/* 0 */ +/* 1 */ +/* 2 */ +#define TEGRA124_CLK_ISPB 3 +#define TEGRA124_CLK_RTC 4 +#define TEGRA124_CLK_TIMER 5 +#define TEGRA124_CLK_UARTA 6 +/* 7 (register bit affects uartb and vfir) */ +/* 8 */ +#define TEGRA124_CLK_SDMMC2 9 +/* 10 (register bit affects spdif_in and spdif_out) */ +#define TEGRA124_CLK_I2S1 11 +#define TEGRA124_CLK_I2C1 12 +/* 13 */ +#define TEGRA124_CLK_SDMMC1 14 +#define TEGRA124_CLK_SDMMC4 15 +/* 16 */ +#define TEGRA124_CLK_PWM 17 +#define TEGRA124_CLK_I2S2 18 +/* 20 (register bit affects vi and vi_sensor) */ +/* 21 */ +#define TEGRA124_CLK_USBD 22 +#define TEGRA124_CLK_ISP 23 +/* 26 */ +/* 25 */ +#define TEGRA124_CLK_DISP2 26 +#define TEGRA124_CLK_DISP1 27 +#define TEGRA124_CLK_HOST1X 28 +#define TEGRA124_CLK_VCP 29 +#define TEGRA124_CLK_I2S0 30 +/* 31 */ + +#define TEGRA124_CLK_MC 32 +/* 33 */ +#define TEGRA124_CLK_APBDMA 34 +/* 35 */ +#define TEGRA124_CLK_KBC 36 +/* 37 */ +/* 38 */ +/* 39 (register bit affects fuse and fuse_burn) */ +#define TEGRA124_CLK_KFUSE 40 +#define TEGRA124_CLK_SBC1 41 +#define TEGRA124_CLK_NOR 42 +/* 43 */ +#define TEGRA124_CLK_SBC2 44 +/* 45 */ +#define TEGRA124_CLK_SBC3 46 +#define TEGRA124_CLK_I2C5 47 +#define TEGRA124_CLK_DSIA 48 +/* 49 */ +#define TEGRA124_CLK_MIPI 50 +#define TEGRA124_CLK_HDMI 51 +#define TEGRA124_CLK_CSI 52 +/* 53 */ +#define TEGRA124_CLK_I2C2 54 +#define TEGRA124_CLK_UARTC 55 +#define TEGRA124_CLK_MIPI_CAL 56 +#define TEGRA124_CLK_EMC 57 +#define TEGRA124_CLK_USB2 58 +#define TEGRA124_CLK_USB3 59 +/* 60 */ +#define TEGRA124_CLK_VDE 61 +#define TEGRA124_CLK_BSEA 62 +#define TEGRA124_CLK_BSEV 63 + +/* 64 */ +#define TEGRA124_CLK_UARTD 65 +/* 66 */ +#define TEGRA124_CLK_I2C3 67 +#define TEGRA124_CLK_SBC4 68 +#define TEGRA124_CLK_SDMMC3 69 +#define TEGRA124_CLK_PCIE 70 +#define TEGRA124_CLK_OWR 71 +#define TEGRA124_CLK_AFI 72 +#define TEGRA124_CLK_CSITE 73 +/* 74 */ +/* 75 */ +#define TEGRA124_CLK_LA 76 +#define TEGRA124_CLK_TRACE 77 +#define TEGRA124_CLK_SOC_THERM 78 +#define TEGRA124_CLK_DTV 79 +/* 80 */ +#define TEGRA124_CLK_I2CSLOW 81 +#define TEGRA124_CLK_DSIB 82 +#define TEGRA124_CLK_TSEC 83 +/* 84 */ +/* 85 */ +/* 86 */ +/* 87 */ +/* 88 */ +#define TEGRA124_CLK_XUSB_HOST 89 +/* 90 */ +#define TEGRA124_CLK_MSENC 91 +#define TEGRA124_CLK_CSUS 92 +/* 93 */ +/* 94 */ +/* 95 (bit affects xusb_dev and xusb_dev_src) */ + +/* 96 */ +/* 97 */ +/* 98 */ +#define TEGRA124_CLK_MSELECT 99 +#define TEGRA124_CLK_TSENSOR 100 +#define TEGRA124_CLK_I2S3 101 +#define TEGRA124_CLK_I2S4 102 +#define TEGRA124_CLK_I2C4 103 +#define TEGRA124_CLK_SBC5 104 +#define TEGRA124_CLK_SBC6 105 +#define TEGRA124_CLK_D_AUDIO 106 +#define TEGRA124_CLK_APBIF 107 +#define TEGRA124_CLK_DAM0 108 +#define TEGRA124_CLK_DAM1 109 +#define TEGRA124_CLK_DAM2 110 +#define TEGRA124_CLK_HDA2CODEC_2X 111 +/* 112 */ +#define TEGRA124_CLK_AUDIO0_2X 113 +#define TEGRA124_CLK_AUDIO1_2X 114 +#define TEGRA124_CLK_AUDIO2_2X 115 +#define TEGRA124_CLK_AUDIO3_2X 116 +#define TEGRA124_CLK_AUDIO4_2X 117 +#define TEGRA124_CLK_SPDIF_2X 118 +#define TEGRA124_CLK_ACTMON 119 +#define TEGRA124_CLK_EXTERN1 120 +#define TEGRA124_CLK_EXTERN2 121 +#define TEGRA124_CLK_EXTERN3 122 +#define TEGRA124_CLK_SATA_OOB 123 +#define TEGRA124_CLK_SATA 124 +#define TEGRA124_CLK_HDA 125 +/* 126 */ +#define TEGRA124_CLK_SE 127 + +#define TEGRA124_CLK_HDA2HDMI 128 +#define TEGRA124_CLK_SATA_COLD 129 +/* 130 */ +/* 131 */ +/* 132 */ +/* 133 */ +/* 134 */ +/* 135 */ +/* 136 */ +/* 137 */ +/* 138 */ +/* 139 */ +/* 140 */ +/* 141 */ +/* 142 */ +/* 143 (bit affects xusb_falcon_src, xusb_fs_src, */ +/* xusb_host_src and xusb_ss_src) */ +#define TEGRA124_CLK_CILAB 144 +#define TEGRA124_CLK_CILCD 145 +#define TEGRA124_CLK_CILE 146 +#define TEGRA124_CLK_DSIALP 147 +#define TEGRA124_CLK_DSIBLP 148 +#define TEGRA124_CLK_ENTROPY 149 +#define TEGRA124_CLK_DDS 150 +/* 151 */ +#define TEGRA124_CLK_DP2 152 +#define TEGRA124_CLK_AMX 153 +#define TEGRA124_CLK_ADX 154 +/* 155 (bit affects dfll_ref and dfll_soc) */ +#define TEGRA124_CLK_XUSB_SS 156 +/* 157 */ +/* 158 */ +/* 159 */ + +/* 160 */ +/* 161 */ +/* 162 */ +/* 163 */ +/* 164 */ +/* 165 */ +#define TEGRA124_CLK_I2C6 166 +/* 167 */ +/* 168 */ +/* 169 */ +/* 170 */ +#define TEGRA124_CLK_VIM2_CLK 171 +/* 172 */ +/* 173 */ +/* 174 */ +/* 175 */ +#define TEGRA124_CLK_HDMI_AUDIO 176 +#define TEGRA124_CLK_CLK72MHZ 177 +#define TEGRA124_CLK_VIC03 178 +/* 179 */ +#define TEGRA124_CLK_ADX1 180 +#define TEGRA124_CLK_DPAUX 181 +#define TEGRA124_CLK_SOR0 182 +/* 183 */ +#define TEGRA124_CLK_GPU 184 +#define TEGRA124_CLK_AMX1 185 +/* 186 */ +/* 187 */ +/* 188 */ +/* 189 */ +/* 190 */ +/* 191 */ +#define TEGRA124_CLK_UARTB 192 +#define TEGRA124_CLK_VFIR 193 +#define TEGRA124_CLK_SPDIF_IN 194 +#define TEGRA124_CLK_SPDIF_OUT 195 +#define TEGRA124_CLK_VI 196 +#define TEGRA124_CLK_VI_SENSOR 197 +#define TEGRA124_CLK_FUSE 198 +#define TEGRA124_CLK_FUSE_BURN 199 +#define TEGRA124_CLK_CLK_32K 200 +#define TEGRA124_CLK_CLK_M 201 +#define TEGRA124_CLK_CLK_M_DIV2 202 +#define TEGRA124_CLK_CLK_M_DIV4 203 +#define TEGRA124_CLK_PLL_REF 204 +#define TEGRA124_CLK_PLL_C 205 +#define TEGRA124_CLK_PLL_C_OUT1 206 +#define TEGRA124_CLK_PLL_C2 207 +#define TEGRA124_CLK_PLL_C3 208 +#define TEGRA124_CLK_PLL_M 209 +#define TEGRA124_CLK_PLL_M_OUT1 210 +#define TEGRA124_CLK_PLL_P 211 +#define TEGRA124_CLK_PLL_P_OUT1 212 +#define TEGRA124_CLK_PLL_P_OUT2 213 +#define TEGRA124_CLK_PLL_P_OUT3 214 +#define TEGRA124_CLK_PLL_P_OUT4 215 +#define TEGRA124_CLK_PLL_A 216 +#define TEGRA124_CLK_PLL_A_OUT0 217 +#define TEGRA124_CLK_PLL_D 218 +#define TEGRA124_CLK_PLL_D_OUT0 219 +#define TEGRA124_CLK_PLL_D2 220 +#define TEGRA124_CLK_PLL_D2_OUT0 221 +#define TEGRA124_CLK_PLL_U 222 +#define TEGRA124_CLK_PLL_U_480M 223 + +#define TEGRA124_CLK_PLL_U_60M 224 +#define TEGRA124_CLK_PLL_U_48M 225 +#define TEGRA124_CLK_PLL_U_12M 226 +/* 227 */ +/* 228 */ +#define TEGRA124_CLK_PLL_RE_VCO 229 +#define TEGRA124_CLK_PLL_RE_OUT 230 +#define TEGRA124_CLK_PLL_E 231 +#define TEGRA124_CLK_SPDIF_IN_SYNC 232 +#define TEGRA124_CLK_I2S0_SYNC 233 +#define TEGRA124_CLK_I2S1_SYNC 234 +#define TEGRA124_CLK_I2S2_SYNC 235 +#define TEGRA124_CLK_I2S3_SYNC 236 +#define TEGRA124_CLK_I2S4_SYNC 237 +#define TEGRA124_CLK_VIMCLK_SYNC 238 +#define TEGRA124_CLK_AUDIO0 239 +#define TEGRA124_CLK_AUDIO1 240 +#define TEGRA124_CLK_AUDIO2 241 +#define TEGRA124_CLK_AUDIO3 242 +#define TEGRA124_CLK_AUDIO4 243 +#define TEGRA124_CLK_SPDIF 244 +#define TEGRA124_CLK_CLK_OUT_1 245 +#define TEGRA124_CLK_CLK_OUT_2 246 +#define TEGRA124_CLK_CLK_OUT_3 247 +#define TEGRA124_CLK_BLINK 248 +/* 249 */ +/* 250 */ +/* 251 */ +#define TEGRA124_CLK_XUSB_HOST_SRC 252 +#define TEGRA124_CLK_XUSB_FALCON_SRC 253 +#define TEGRA124_CLK_XUSB_FS_SRC 254 +#define TEGRA124_CLK_XUSB_SS_SRC 255 + +#define TEGRA124_CLK_XUSB_DEV_SRC 256 +#define TEGRA124_CLK_XUSB_DEV 257 +#define TEGRA124_CLK_XUSB_HS_SRC 258 +#define TEGRA124_CLK_SCLK 259 +#define TEGRA124_CLK_HCLK 260 +#define TEGRA124_CLK_PCLK 261 +/* 262 */ +/* 263 */ +#define TEGRA124_CLK_DFLL_REF 264 +#define TEGRA124_CLK_DFLL_SOC 265 +#define TEGRA124_CLK_VI_SENSOR2 266 +#define TEGRA124_CLK_PLL_P_OUT5 267 +#define TEGRA124_CLK_CML0 268 +#define TEGRA124_CLK_CML1 269 +#define TEGRA124_CLK_PLL_C4 270 +#define TEGRA124_CLK_PLL_DP 271 +#define TEGRA124_CLK_PLL_E_MUX 272 +#define TEGRA124_CLK_PLL_D_DSI_OUT 273 +/* 274 */ +/* 275 */ +/* 276 */ +/* 277 */ +/* 278 */ +/* 279 */ +/* 280 */ +/* 281 */ +/* 282 */ +/* 283 */ +/* 284 */ +/* 285 */ +/* 286 */ +/* 287 */ + +/* 288 */ +/* 289 */ +/* 290 */ +/* 291 */ +/* 292 */ +/* 293 */ +/* 294 */ +/* 295 */ +/* 296 */ +/* 297 */ +/* 298 */ +/* 299 */ +#define TEGRA124_CLK_AUDIO0_MUX 300 +#define TEGRA124_CLK_AUDIO1_MUX 301 +#define TEGRA124_CLK_AUDIO2_MUX 302 +#define TEGRA124_CLK_AUDIO3_MUX 303 +#define TEGRA124_CLK_AUDIO4_MUX 304 +#define TEGRA124_CLK_SPDIF_MUX 305 +#define TEGRA124_CLK_CLK_OUT_1_MUX 306 +#define TEGRA124_CLK_CLK_OUT_2_MUX 307 +#define TEGRA124_CLK_CLK_OUT_3_MUX 308 +/* 309 */ +/* 310 */ +#define TEGRA124_CLK_SOR0_LVDS 311 +#define TEGRA124_CLK_XUSB_SS_DIV2 312 + +#define TEGRA124_CLK_PLL_M_UD 313 +#define TEGRA124_CLK_PLL_C_UD 314 + +#endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H */ diff --git a/include/dt-bindings/clock/tegra124-car.h b/include/dt-bindings/clock/tegra124-car.h index fd8d62ac7f..2860737f04 100644 --- a/include/dt-bindings/clock/tegra124-car.h +++ b/include/dt-bindings/clock/tegra124-car.h @@ -1,342 +1,19 @@ /* - * This header provides constants for binding nvidia,tegra124-car. - * - * The first 192 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - * registers. These IDs often match those in the CAR's RST_DEVICES registers, - * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - * this case, those clocks are assigned IDs above 185 in order to highlight - * this issue. Implementations that interpret these clock IDs as bit values - * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - * explicitly handle these special cases. - * - * The balance of the clocks controlled by the CAR are assigned IDs of 185 and - * above. + * This header provides Tegra124-specific constants for binding + * nvidia,tegra124-car. */ +#include <dt-bindings/clock/tegra124-car-common.h> + #ifndef _DT_BINDINGS_CLOCK_TEGRA124_CAR_H #define _DT_BINDINGS_CLOCK_TEGRA124_CAR_H -/* 0 */ -/* 1 */ -/* 2 */ -#define TEGRA124_CLK_ISPB 3 -#define TEGRA124_CLK_RTC 4 -#define TEGRA124_CLK_TIMER 5 -#define TEGRA124_CLK_UARTA 6 -/* 7 (register bit affects uartb and vfir) */ -/* 8 */ -#define TEGRA124_CLK_SDMMC2 9 -/* 10 (register bit affects spdif_in and spdif_out) */ -#define TEGRA124_CLK_I2S1 11 -#define TEGRA124_CLK_I2C1 12 -#define TEGRA124_CLK_NDFLASH 13 -#define TEGRA124_CLK_SDMMC1 14 -#define TEGRA124_CLK_SDMMC4 15 -/* 16 */ -#define TEGRA124_CLK_PWM 17 -#define TEGRA124_CLK_I2S2 18 -/* 20 (register bit affects vi and vi_sensor) */ -/* 21 */ -#define TEGRA124_CLK_USBD 22 -#define TEGRA124_CLK_ISP 23 -/* 26 */ -/* 25 */ -#define TEGRA124_CLK_DISP2 26 -#define TEGRA124_CLK_DISP1 27 -#define TEGRA124_CLK_HOST1X 28 -#define TEGRA124_CLK_VCP 29 -#define TEGRA124_CLK_I2S0 30 -/* 31 */ - -/* 32 */ -/* 33 */ -#define TEGRA124_CLK_APBDMA 34 -/* 35 */ -#define TEGRA124_CLK_KBC 36 -/* 37 */ -/* 38 */ -/* 39 (register bit affects fuse and fuse_burn) */ -#define TEGRA124_CLK_KFUSE 40 -#define TEGRA124_CLK_SBC1 41 -#define TEGRA124_CLK_NOR 42 -/* 43 */ -#define TEGRA124_CLK_SBC2 44 -/* 45 */ -#define TEGRA124_CLK_SBC3 46 -#define TEGRA124_CLK_I2C5 47 -#define TEGRA124_CLK_DSIA 48 -/* 49 */ -#define TEGRA124_CLK_MIPI 50 -#define TEGRA124_CLK_HDMI 51 -#define TEGRA124_CLK_CSI 52 -/* 53 */ -#define TEGRA124_CLK_I2C2 54 -#define TEGRA124_CLK_UARTC 55 -#define TEGRA124_CLK_MIPI_CAL 56 -#define TEGRA124_CLK_EMC 57 -#define TEGRA124_CLK_USB2 58 -#define TEGRA124_CLK_USB3 59 -/* 60 */ -#define TEGRA124_CLK_VDE 61 -#define TEGRA124_CLK_BSEA 62 -#define TEGRA124_CLK_BSEV 63 - -/* 64 */ -#define TEGRA124_CLK_UARTD 65 -#define TEGRA124_CLK_UARTE 66 -#define TEGRA124_CLK_I2C3 67 -#define TEGRA124_CLK_SBC4 68 -#define TEGRA124_CLK_SDMMC3 69 -#define TEGRA124_CLK_PCIE 70 -#define TEGRA124_CLK_OWR 71 -#define TEGRA124_CLK_AFI 72 -#define TEGRA124_CLK_CSITE 73 -/* 74 */ -/* 75 */ -#define TEGRA124_CLK_LA 76 -#define TEGRA124_CLK_TRACE 77 -#define TEGRA124_CLK_SOC_THERM 78 -#define TEGRA124_CLK_DTV 79 -#define TEGRA124_CLK_NDSPEED 80 -#define TEGRA124_CLK_I2CSLOW 81 -#define TEGRA124_CLK_DSIB 82 -#define TEGRA124_CLK_TSEC 83 -/* 84 */ -/* 85 */ -/* 86 */ -/* 87 */ -/* 88 */ -#define TEGRA124_CLK_XUSB_HOST 89 -/* 90 */ -#define TEGRA124_CLK_MSENC 91 -#define TEGRA124_CLK_CSUS 92 -/* 93 */ -/* 94 */ -/* 95 (bit affects xusb_dev and xusb_dev_src) */ - -/* 96 */ -/* 97 */ -/* 98 */ -#define TEGRA124_CLK_MSELECT 99 -#define TEGRA124_CLK_TSENSOR 100 -#define TEGRA124_CLK_I2S3 101 -#define TEGRA124_CLK_I2S4 102 -#define TEGRA124_CLK_I2C4 103 -#define TEGRA124_CLK_SBC5 104 -#define TEGRA124_CLK_SBC6 105 -#define TEGRA124_CLK_D_AUDIO 106 -#define TEGRA124_CLK_APBIF 107 -#define TEGRA124_CLK_DAM0 108 -#define TEGRA124_CLK_DAM1 109 -#define TEGRA124_CLK_DAM2 110 -#define TEGRA124_CLK_HDA2CODEC_2X 111 -/* 112 */ -#define TEGRA124_CLK_AUDIO0_2X 113 -#define TEGRA124_CLK_AUDIO1_2X 114 -#define TEGRA124_CLK_AUDIO2_2X 115 -#define TEGRA124_CLK_AUDIO3_2X 116 -#define TEGRA124_CLK_AUDIO4_2X 117 -#define TEGRA124_CLK_SPDIF_2X 118 -#define TEGRA124_CLK_ACTMON 119 -#define TEGRA124_CLK_EXTERN1 120 -#define TEGRA124_CLK_EXTERN2 121 -#define TEGRA124_CLK_EXTERN3 122 -#define TEGRA124_CLK_SATA_OOB 123 -#define TEGRA124_CLK_SATA 124 -#define TEGRA124_CLK_HDA 125 -/* 126 */ -#define TEGRA124_CLK_SE 127 - -#define TEGRA124_CLK_HDA2HDMI 128 -#define TEGRA124_CLK_SATA_COLD 129 -/* 130 */ -/* 131 */ -/* 132 */ -/* 133 */ -/* 134 */ -/* 135 */ -/* 136 */ -/* 137 */ -/* 138 */ -/* 139 */ -/* 140 */ -/* 141 */ -/* 142 */ -/* 143 (bit affects xusb_falcon_src, xusb_fs_src, */ -/* xusb_host_src and xusb_ss_src) */ -#define TEGRA124_CLK_CILAB 144 -#define TEGRA124_CLK_CILCD 145 -#define TEGRA124_CLK_CILE 146 -#define TEGRA124_CLK_DSIALP 147 -#define TEGRA124_CLK_DSIBLP 148 -#define TEGRA124_CLK_ENTROPY 149 -#define TEGRA124_CLK_DDS 150 -/* 151 */ -#define TEGRA124_CLK_DP2 152 -#define TEGRA124_CLK_AMX 153 -#define TEGRA124_CLK_ADX 154 -/* 155 (bit affects dfll_ref and dfll_soc) */ -#define TEGRA124_CLK_XUSB_SS 156 -/* 157 */ -/* 158 */ -/* 159 */ - -/* 160 */ -/* 161 */ -/* 162 */ -/* 163 */ -/* 164 */ -/* 165 */ -#define TEGRA124_CLK_I2C6 166 -/* 167 */ -/* 168 */ -/* 169 */ -/* 170 */ -#define TEGRA124_CLK_VIM2_CLK 171 -/* 172 */ -/* 173 */ -/* 174 */ -/* 175 */ -#define TEGRA124_CLK_HDMI_AUDIO 176 -#define TEGRA124_CLK_CLK72MHZ 177 -#define TEGRA124_CLK_VIC03 178 -/* 179 */ -#define TEGRA124_CLK_ADX1 180 -#define TEGRA124_CLK_DPAUX 181 -#define TEGRA124_CLK_SOR0 182 -/* 183 */ -#define TEGRA124_CLK_GPU 184 -#define TEGRA124_CLK_AMX1 185 -#define TEGRA124_CLK_AFC0 186 -#define TEGRA124_CLK_AFC1 187 -#define TEGRA124_CLK_AFC2 188 -#define TEGRA124_CLK_AFC3 189 -#define TEGRA124_CLK_AFC4 190 -#define TEGRA124_CLK_AFC5 191 -#define TEGRA124_CLK_UARTB 192 -#define TEGRA124_CLK_VFIR 193 -#define TEGRA124_CLK_SPDIF_IN 194 -#define TEGRA124_CLK_SPDIF_OUT 195 -#define TEGRA124_CLK_VI 196 -#define TEGRA124_CLK_VI_SENSOR 197 -#define TEGRA124_CLK_FUSE 198 -#define TEGRA124_CLK_FUSE_BURN 199 -#define TEGRA124_CLK_CLK_32K 200 -#define TEGRA124_CLK_CLK_M 201 -#define TEGRA124_CLK_CLK_M_DIV2 202 -#define TEGRA124_CLK_CLK_M_DIV4 203 -#define TEGRA124_CLK_PLL_REF 204 -#define TEGRA124_CLK_PLL_C 205 -#define TEGRA124_CLK_PLL_C_OUT1 206 -#define TEGRA124_CLK_PLL_C2 207 -#define TEGRA124_CLK_PLL_C3 208 -#define TEGRA124_CLK_PLL_M 209 -#define TEGRA124_CLK_PLL_M_OUT1 210 -#define TEGRA124_CLK_PLL_P 211 -#define TEGRA124_CLK_PLL_P_OUT1 212 -#define TEGRA124_CLK_PLL_P_OUT2 213 -#define TEGRA124_CLK_PLL_P_OUT3 214 -#define TEGRA124_CLK_PLL_P_OUT4 215 -#define TEGRA124_CLK_PLL_A 216 -#define TEGRA124_CLK_PLL_A_OUT0 217 -#define TEGRA124_CLK_PLL_D 218 -#define TEGRA124_CLK_PLL_D_OUT0 219 -#define TEGRA124_CLK_PLL_D2 220 -#define TEGRA124_CLK_PLL_D2_OUT0 221 -#define TEGRA124_CLK_PLL_U 222 -#define TEGRA124_CLK_PLL_U_480M 223 - -#define TEGRA124_CLK_PLL_U_60M 224 -#define TEGRA124_CLK_PLL_U_48M 225 -#define TEGRA124_CLK_PLL_U_12M 226 -#define TEGRA124_CLK_PLL_X 227 -#define TEGRA124_CLK_PLL_X_OUT0 228 -#define TEGRA124_CLK_PLL_RE_VCO 229 -#define TEGRA124_CLK_PLL_RE_OUT 230 -#define TEGRA124_CLK_PLL_E 231 -#define TEGRA124_CLK_SPDIF_IN_SYNC 232 -#define TEGRA124_CLK_I2S0_SYNC 233 -#define TEGRA124_CLK_I2S1_SYNC 234 -#define TEGRA124_CLK_I2S2_SYNC 235 -#define TEGRA124_CLK_I2S3_SYNC 236 -#define TEGRA124_CLK_I2S4_SYNC 237 -#define TEGRA124_CLK_VIMCLK_SYNC 238 -#define TEGRA124_CLK_AUDIO0 239 -#define TEGRA124_CLK_AUDIO1 240 -#define TEGRA124_CLK_AUDIO2 241 -#define TEGRA124_CLK_AUDIO3 242 -#define TEGRA124_CLK_AUDIO4 243 -#define TEGRA124_CLK_SPDIF 244 -#define TEGRA124_CLK_CLK_OUT_1 245 -#define TEGRA124_CLK_CLK_OUT_2 246 -#define TEGRA124_CLK_CLK_OUT_3 247 -#define TEGRA124_CLK_BLINK 248 -/* 249 */ -/* 250 */ -/* 251 */ -#define TEGRA124_CLK_XUSB_HOST_SRC 252 -#define TEGRA124_CLK_XUSB_FALCON_SRC 253 -#define TEGRA124_CLK_XUSB_FS_SRC 254 -#define TEGRA124_CLK_XUSB_SS_SRC 255 +#define TEGRA124_CLK_PLL_X 227 +#define TEGRA124_CLK_PLL_X_OUT0 228 -#define TEGRA124_CLK_XUSB_DEV_SRC 256 -#define TEGRA124_CLK_XUSB_DEV 257 -#define TEGRA124_CLK_XUSB_HS_SRC 258 -#define TEGRA124_CLK_SCLK 259 -#define TEGRA124_CLK_HCLK 260 -#define TEGRA124_CLK_PCLK 261 -#define TEGRA124_CLK_CCLK_G 262 -#define TEGRA124_CLK_CCLK_LP 263 -#define TEGRA124_CLK_DFLL_REF 264 -#define TEGRA124_CLK_DFLL_SOC 265 -#define TEGRA124_CLK_VI_SENSOR2 266 -#define TEGRA124_CLK_PLL_P_OUT5 267 -#define TEGRA124_CLK_CML0 268 -#define TEGRA124_CLK_CML1 269 -#define TEGRA124_CLK_PLL_C4 270 -#define TEGRA124_CLK_PLL_DP 271 -#define TEGRA124_CLK_PLL_E_MUX 272 -/* 273 */ -/* 274 */ -/* 275 */ -/* 276 */ -/* 277 */ -/* 278 */ -/* 279 */ -/* 280 */ -/* 281 */ -/* 282 */ -/* 283 */ -/* 284 */ -/* 285 */ -/* 286 */ -/* 287 */ +#define TEGRA124_CLK_CCLK_G 262 +#define TEGRA124_CLK_CCLK_LP 263 -/* 288 */ -/* 289 */ -/* 290 */ -/* 291 */ -/* 292 */ -/* 293 */ -/* 294 */ -/* 295 */ -/* 296 */ -/* 297 */ -/* 298 */ -/* 299 */ -#define TEGRA124_CLK_AUDIO0_MUX 300 -#define TEGRA124_CLK_AUDIO1_MUX 301 -#define TEGRA124_CLK_AUDIO2_MUX 302 -#define TEGRA124_CLK_AUDIO3_MUX 303 -#define TEGRA124_CLK_AUDIO4_MUX 304 -#define TEGRA124_CLK_SPDIF_MUX 305 -#define TEGRA124_CLK_CLK_OUT_1_MUX 306 -#define TEGRA124_CLK_CLK_OUT_2_MUX 307 -#define TEGRA124_CLK_CLK_OUT_3_MUX 308 -#define TEGRA124_CLK_DSIA_MUX 309 -#define TEGRA124_CLK_DSIB_MUX 310 -#define TEGRA124_CLK_SOR0_LVDS 311 -#define TEGRA124_CLK_PLL_M_UD 311 -#define TEGRA124_CLK_CLK_MAX 312 +#define TEGRA124_CLK_CLK_MAX 315 #endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_H */ diff --git a/include/dt-bindings/memory/tegra124-mc.h b/include/dt-bindings/memory/tegra124-mc.h new file mode 100644 index 0000000000..7d8ee798f3 --- /dev/null +++ b/include/dt-bindings/memory/tegra124-mc.h @@ -0,0 +1,31 @@ +#ifndef DT_BINDINGS_MEMORY_TEGRA124_MC_H +#define DT_BINDINGS_MEMORY_TEGRA124_MC_H + +#define TEGRA_SWGROUP_PTC 0 +#define TEGRA_SWGROUP_DC 1 +#define TEGRA_SWGROUP_DCB 2 +#define TEGRA_SWGROUP_AFI 3 +#define TEGRA_SWGROUP_AVPC 4 +#define TEGRA_SWGROUP_HDA 5 +#define TEGRA_SWGROUP_HC 6 +#define TEGRA_SWGROUP_MSENC 7 +#define TEGRA_SWGROUP_PPCS 8 +#define TEGRA_SWGROUP_SATA 9 +#define TEGRA_SWGROUP_VDE 10 +#define TEGRA_SWGROUP_MPCORELP 11 +#define TEGRA_SWGROUP_MPCORE 12 +#define TEGRA_SWGROUP_ISP2 13 +#define TEGRA_SWGROUP_XUSB_HOST 14 +#define TEGRA_SWGROUP_XUSB_DEV 15 +#define TEGRA_SWGROUP_ISP2B 16 +#define TEGRA_SWGROUP_TSEC 17 +#define TEGRA_SWGROUP_A9AVP 18 +#define TEGRA_SWGROUP_GPU 19 +#define TEGRA_SWGROUP_SDMMC1A 20 +#define TEGRA_SWGROUP_SDMMC2A 21 +#define TEGRA_SWGROUP_SDMMC3A 22 +#define TEGRA_SWGROUP_SDMMC4A 23 +#define TEGRA_SWGROUP_VIC 24 +#define TEGRA_SWGROUP_VI 25 + +#endif diff --git a/include/dt-bindings/reset/tegra124-car.h b/include/dt-bindings/reset/tegra124-car.h new file mode 100644 index 0000000000..070e4f6e74 --- /dev/null +++ b/include/dt-bindings/reset/tegra124-car.h @@ -0,0 +1,12 @@ +/* + * This header provides Tegra124-specific constants for binding + * nvidia,tegra124-car. + */ + +#ifndef _DT_BINDINGS_RESET_TEGRA124_CAR_H +#define _DT_BINDINGS_RESET_TEGRA124_CAR_H + +#define TEGRA124_RESET(x) (6 * 32 + (x)) +#define TEGRA124_RST_DFLL_DVCO TEGRA124_RESET(0) + +#endif /* _DT_BINDINGS_RESET_TEGRA124_CAR_H */ diff --git a/include/dt-bindings/thermal/tegra124-soctherm.h b/include/dt-bindings/thermal/tegra124-soctherm.h new file mode 100644 index 0000000000..85aaf66690 --- /dev/null +++ b/include/dt-bindings/thermal/tegra124-soctherm.h @@ -0,0 +1,13 @@ +/* + * This header provides constants for binding nvidia,tegra124-soctherm. + */ + +#ifndef _DT_BINDINGS_THERMAL_TEGRA124_SOCTHERM_H +#define _DT_BINDINGS_THERMAL_TEGRA124_SOCTHERM_H + +#define TEGRA124_SOCTHERM_SENSOR_CPU 0 +#define TEGRA124_SOCTHERM_SENSOR_MEM 1 +#define TEGRA124_SOCTHERM_SENSOR_GPU 2 +#define TEGRA124_SOCTHERM_SENSOR_PLLX 3 + +#endif diff --git a/include/env_flags.h b/include/env_flags.h index 8823fb9602..9e87e1b7db 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -143,7 +143,7 @@ int env_flags_validate_varaccess(const char *name, int check_mask); /* * Validate the parameters passed to "env set" for type compliance */ -int env_flags_validate_env_set_params(int argc, char * const argv[]); +int env_flags_validate_env_set_params(char *name, char *const val[], int count); #else /* !USE_HOSTCC */ diff --git a/include/fdtdec.h b/include/fdtdec.h index dd82916dc0..4caf3b6cbd 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -120,7 +120,6 @@ enum fdt_compat_id { COMPAT_NVIDIA_TEGRA20_EMC_TABLE, /* Tegra20 memory timing table */ COMPAT_NVIDIA_TEGRA20_NAND, /* Tegra2 NAND controller */ COMPAT_NVIDIA_TEGRA20_PWM, /* Tegra 2 PWM controller */ - COMPAT_NVIDIA_TEGRA124_DC, /* Tegra 124 Display controller */ COMPAT_NVIDIA_TEGRA124_SOR, /* Tegra 124 Serial Output Resource */ COMPAT_NVIDIA_TEGRA124_PMC, /* Tegra 124 power mgmt controller */ COMPAT_NVIDIA_TEGRA20_DC, /* Tegra 2 Display controller */ @@ -722,6 +721,15 @@ const u32 *fdtdec_locate_array(const void *blob, int node, */ int fdtdec_get_bool(const void *blob, int node, const char *prop_name); +/* + * Count child nodes of one parent node. + * + * @param blob FDT blob + * @param node parent node + * @return number of child node; 0 if there is not child node + */ +int fdtdec_get_child_count(const void *blob, int node); + /** * Look in the FDT for a config item with the given name and return its value * as a 32-bit integer. The property must have at least 4 bytes of data. The diff --git a/include/linux/linkage.h b/include/linux/linkage.h index efb04eeed4..8e2f15a635 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -1,5 +1,5 @@ /* - * U-boot - linkage.h + * U-Boot - linkage.h * * Copyright (c) 2005-2007 Analog Devices Inc. * diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index c1d039cb85..442316b4e2 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h @@ -5,7 +5,7 @@ * notably ethernet adapters and various modems. It's used mostly with * firmware based USB peripherals. * - * Ported to U-boot by: Thomas Smits <ts.smits@gmail.com> and + * Ported to U-Boot by: Thomas Smits <ts.smits@gmail.com> and * Remy Bohmer <linux@bohmer.net> */ diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 4adf35e3ae..b824f13477 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -11,7 +11,7 @@ * * This software is licensed under the GNU GPL version 2. * - * Ported to U-boot by: Thomas Smits <ts.smits@gmail.com> and + * Ported to U-Boot by: Thomas Smits <ts.smits@gmail.com> and * Remy Bohmer <linux@bohmer.net> */ diff --git a/include/pch.h b/include/pch.h index 79f49bd5f6..222e9081c3 100644 --- a/include/pch.h +++ b/include/pch.h @@ -8,12 +8,6 @@ #ifndef __pch_h #define __pch_h -enum pch_version { - PCHV_UNKNOWN, - PCHV_7, - PCHV_9, -}; - #define PCH_RCBA 0xf0 #define BIOS_CTRL_BIOSWE BIT(0) @@ -21,20 +15,13 @@ enum pch_version { /* Operations for the Platform Controller Hub */ struct pch_ops { /** - * get_sbase() - get the address of SPI base + * get_spi_base() - get the address of SPI base * * @dev: PCH device to check * @sbasep: Returns address of SPI base if available, else 0 * @return 0 if OK, -ve on error (e.g. there is no SPI base) */ - int (*get_sbase)(struct udevice *dev, ulong *sbasep); - - /** - * get_version() - get the PCH version - * - * @return version, or -ENOSYS if unknown - */ - enum pch_version (*get_version)(struct udevice *dev); + int (*get_spi_base)(struct udevice *dev, ulong *sbasep); /** * set_spi_protect() - set whether SPI flash is protected or not @@ -45,25 +32,36 @@ struct pch_ops { * @return 0 on success, -ENOSYS if not implemented */ int (*set_spi_protect)(struct udevice *dev, bool protect); + + /** + * get_gpio_base() - get the address of GPIO base + * + * @dev: PCH device to check + * @gbasep: Returns address of GPIO base if available, else 0 + * @return 0 if OK, -ve on error (e.g. there is no GPIO base) + */ + int (*get_gpio_base)(struct udevice *dev, u32 *gbasep); + + /** + * get_io_base() - get the address of IO base + * + * @dev: PCH device to check + * @iobasep: Returns address of IO base if available, else 0 + * @return 0 if OK, -ve on error (e.g. there is no IO base) + */ + int (*get_io_base)(struct udevice *dev, u32 *iobasep); }; #define pch_get_ops(dev) ((struct pch_ops *)(dev)->driver->ops) /** - * pch_get_sbase() - get the address of SPI base + * pch_get_spi_base() - get the address of SPI base * * @dev: PCH device to check * @sbasep: Returns address of SPI base if available, else 0 * @return 0 if OK, -ve on error (e.g. there is no SPI base) */ -int pch_get_sbase(struct udevice *dev, ulong *sbasep); - -/** - * pch_get_version() - get the PCH version - * - * @return version, or -ENOSYS if unknown - */ -enum pch_version pch_get_version(struct udevice *dev); +int pch_get_spi_base(struct udevice *dev, ulong *sbasep); /** * set_spi_protect() - set whether SPI flash is protected or not @@ -75,4 +73,22 @@ enum pch_version pch_get_version(struct udevice *dev); */ int pch_set_spi_protect(struct udevice *dev, bool protect); +/** + * pch_get_gpio_base() - get the address of GPIO base + * + * @dev: PCH device to check + * @gbasep: Returns address of GPIO base if available, else 0 + * @return 0 if OK, -ve on error (e.g. there is no GPIO base) + */ +int pch_get_gpio_base(struct udevice *dev, u32 *gbasep); + +/** + * pch_get_io_base() - get the address of IO base + * + * @dev: PCH device to check + * @iobasep: Returns address of IO base if available, else 0 + * @return 0 if OK, -ve on error (e.g. there is no IO base) + */ +int pch_get_io_base(struct udevice *dev, u32 *iobasep); + #endif diff --git a/include/pci.h b/include/pci.h index d0d152c00b..68548b00d9 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1050,6 +1050,11 @@ int dm_pci_write_config32(struct udevice *dev, int offset, u32 value); * functions, rather than byte/word/dword. But both are supported. */ int pci_write_config32(pci_dev_t pcidev, int offset, u32 value); +int pci_write_config16(pci_dev_t pcidev, int offset, u16 value); +int pci_write_config8(pci_dev_t pcidev, int offset, u8 value); +int pci_read_config32(pci_dev_t pcidev, int offset, u32 *valuep); +int pci_read_config16(pci_dev_t pcidev, int offset, u16 *valuep); +int pci_read_config8(pci_dev_t pcidev, int offset, u8 *valuep); #ifdef CONFIG_DM_PCI_COMPAT /* Compatibility with old naming */ @@ -1059,8 +1064,6 @@ static inline int pci_write_config_dword(pci_dev_t pcidev, int offset, return pci_write_config32(pcidev, offset, value); } -int pci_write_config16(pci_dev_t pcidev, int offset, u16 value); - /* Compatibility with old naming */ static inline int pci_write_config_word(pci_dev_t pcidev, int offset, u16 value) @@ -1068,8 +1071,6 @@ static inline int pci_write_config_word(pci_dev_t pcidev, int offset, return pci_write_config16(pcidev, offset, value); } -int pci_write_config8(pci_dev_t pcidev, int offset, u8 value); - /* Compatibility with old naming */ static inline int pci_write_config_byte(pci_dev_t pcidev, int offset, u8 value) @@ -1077,8 +1078,6 @@ static inline int pci_write_config_byte(pci_dev_t pcidev, int offset, return pci_write_config8(pcidev, offset, value); } -int pci_read_config32(pci_dev_t pcidev, int offset, u32 *valuep); - /* Compatibility with old naming */ static inline int pci_read_config_dword(pci_dev_t pcidev, int offset, u32 *valuep) @@ -1086,8 +1085,6 @@ static inline int pci_read_config_dword(pci_dev_t pcidev, int offset, return pci_read_config32(pcidev, offset, valuep); } -int pci_read_config16(pci_dev_t pcidev, int offset, u16 *valuep); - /* Compatibility with old naming */ static inline int pci_read_config_word(pci_dev_t pcidev, int offset, u16 *valuep) @@ -1095,15 +1092,12 @@ static inline int pci_read_config_word(pci_dev_t pcidev, int offset, return pci_read_config16(pcidev, offset, valuep); } -int pci_read_config8(pci_dev_t pcidev, int offset, u8 *valuep); - /* Compatibility with old naming */ static inline int pci_read_config_byte(pci_dev_t pcidev, int offset, u8 *valuep) { return pci_read_config8(pcidev, offset, valuep); } - #endif /* CONFIG_DM_PCI_COMPAT */ /** diff --git a/include/smsc_sio1007.h b/include/smsc_sio1007.h new file mode 100644 index 0000000000..805fa0ebb1 --- /dev/null +++ b/include/smsc_sio1007.h @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _SMSC_SIO1007_H_ +#define _SMSC_SIO1007_H_ + +/* + * The I/O base address of SIO1007 at power-up is determined by the SYSOPT0 + * and SYSOPT1 pins at the deasserting edge of PCIRST#. The combination of + * SYSOPT0 and SYSOPT1 determines one of the following addresses. + */ +#define SIO1007_IOPORT0 0x002e +#define SIO1007_IOPORT1 0x004e +#define SIO1007_IOPORT2 0x162e +#define SIO1007_IOPORT3 0x164e + +/* SIO1007 registers */ + +#define DEV_POWER_CTRL 0x02 +#define UART1_POWER_ON (1 << 3) +#define UART2_POWER_ON (1 << 7) + +#define UART1_IOBASE 0x24 +#define UART2_IOBASE 0x25 +#define UART_IRQ 0x28 + +#define RTR_IOBASE_HIGH 0x21 +#define RTR_IOBASE_LOW 0x30 + +#define GPIO0_DIR 0x31 +#define GPIO1_DIR 0x35 +#define GPIO_DIR_INPUT 0 +#define GPIO_DIR_OUTPUT 1 + +#define GPIO0_POL 0x32 +#define GPIO1_POL 0x36 +#define GPIO_POL_NO_INVERT 0 +#define GPIO_POL_INVERT 1 + +#define GPIO0_TYPE 0x33 +#define GPIO1_TYPE 0x37 +#define GPIO_TYPE_PUSH_PULL 0 +#define GPIO_TYPE_OPEN_DRAIN 1 + +#define DEV_ACTIVATE 0x3a +#define RTR_EN (1 << 1) + +/* Runtime register offset */ + +#define GPIO0_DATA 0xc +#define GPIO1_DATA 0xe + +/* Number of serial ports supported */ +#define SIO1007_UART_NUM 2 + +/* Number of gpio pins supported */ +#define GPIO_NUM_PER_GROUP 8 +#define GPIO_GROUP_NUM 2 +#define SIO1007_GPIO_NUM (GPIO_NUM_PER_GROUP * GPIO_GROUP_NUM) + +/** + * Configure the I/O port address of the specified serial device and + * enable the serial device. + * + * @port: SIO1007 I/O port address + * @num: serial device number (0 or 1) + * @iobase: processor I/O port address to assign to this serial device + * @irq: processor IRQ number to assign to this serial device + */ +void sio1007_enable_serial(int port, int num, int iobase, int irq); + +/** + * Configure the I/O port address of the runtime register block and + * enable the address decoding. + * + * @port: SIO1007 I/O port address + * @iobase: processor I/O port address to assign to the runtime registers + */ +void sio1007_enable_runtime(int port, int iobase); + +/** + * Configure the direction/polority/type of a specified GPIO pin + * + * @port: SIO1007 I/O port address + * @gpio: GPIO number (0-7 for GP10-GP17, 8-15 for GP30-GP37) + * @dir: GPIO_DIR_INPUT or GPIO_DIR_OUTPUT + * @pol: GPIO_POL_NO_INVERT or GPIO_POL_INVERT + * @type: GPIO_TYPE_PUSH_PULL or GPIO_TYPE_OPEN_DRAIN + */ +void sio1007_gpio_config(int port, int gpio, int dir, int pol, int type); + +/** + * Get a GPIO pin value. + * This will work whether the GPIO is an input or an output. + * + * @port: runtime register block I/O port address + * @gpio: GPIO number (0-7 for GP10-GP17, 8-15 for GP30-GP37) + * @return: 0 if low, 1 if high, -EINVAL if gpio number is invalid + */ +int sio1007_gpio_get_value(int port, int gpio); + +/** + * Set a GPIO pin value. + * This will only work when the GPIO is configured as an output. + * + * @port: runtime register block I/O port address + * @gpio: GPIO number (0-7 for GP10-GP17, 8-15 for GP30-GP37) + * @val: 0 if low, 1 if high + */ +void sio1007_gpio_set_value(int port, int gpio, int val); + +#endif /* _SMSC_SIO1007_H_ */ |