100a2749dSAllen Martin /* 200a2749dSAllen Martin * (C) Copyright 2010-2012 300a2749dSAllen Martin * NVIDIA Corporation <www.nvidia.com> 400a2749dSAllen Martin * 500a2749dSAllen Martin * See file CREDITS for list of people who contributed to this 600a2749dSAllen Martin * project. 700a2749dSAllen Martin * 800a2749dSAllen Martin * This program is free software; you can redistribute it and/or 900a2749dSAllen Martin * modify it under the terms of the GNU General Public License as 1000a2749dSAllen Martin * published by the Free Software Foundation; either version 2 of 1100a2749dSAllen Martin * the License, or (at your option) any later version. 1200a2749dSAllen Martin * 1300a2749dSAllen Martin * This program is distributed in the hope that it will be useful, 1400a2749dSAllen Martin * but WITHOUT ANY WARRANTY; without even the implied warranty of 1500a2749dSAllen Martin * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1600a2749dSAllen Martin * GNU General Public License for more details. 1700a2749dSAllen Martin * 1800a2749dSAllen Martin * You should have received a copy of the GNU General Public License 1900a2749dSAllen Martin * along with this program; if not, write to the Free Software 2000a2749dSAllen Martin * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 2100a2749dSAllen Martin * MA 02111-1307 USA 2200a2749dSAllen Martin */ 2300a2749dSAllen Martin 24*f01b631fSTom Warren #ifndef _TEGRA20_COMMON_H_ 25*f01b631fSTom Warren #define _TEGRA20_COMMON_H_ 26*f01b631fSTom Warren #include "tegra-common.h" 27*f01b631fSTom Warren 28*f01b631fSTom Warren /* 29*f01b631fSTom Warren * NS16550 Configuration 30*f01b631fSTom Warren */ 31*f01b631fSTom Warren #define V_NS16550_CLK 216000000 /* 216MHz (pllp_out0) */ 3200a2749dSAllen Martin 3300a2749dSAllen Martin /* 3400a2749dSAllen Martin * High Level Configuration Options 3500a2749dSAllen Martin */ 3600a2749dSAllen Martin #define CONFIG_TEGRA20 /* in a NVidia Tegra20 core */ 3700a2749dSAllen Martin 38*f01b631fSTom Warren /* Environment information, boards can override if required */ 39*f01b631fSTom Warren #define CONFIG_LOADADDR 0x00408000 /* def. location for kernel */ 4000a2749dSAllen Martin 41*f01b631fSTom Warren /* 42*f01b631fSTom Warren * Miscellaneous configurable options 43*f01b631fSTom Warren */ 44*f01b631fSTom Warren #define CONFIG_SYS_LOAD_ADDR 0x00A00800 /* default */ 45*f01b631fSTom Warren #define CONFIG_STACKBASE 0x02800000 /* 40MB */ 46*f01b631fSTom Warren 47*f01b631fSTom Warren /*----------------------------------------------------------------------- 48*f01b631fSTom Warren * Physical Memory Map 49*f01b631fSTom Warren */ 50*f01b631fSTom Warren #define CONFIG_SYS_TEXT_BASE 0x0010E000 51*f01b631fSTom Warren 52*f01b631fSTom Warren /* 53*f01b631fSTom Warren * Memory layout for where various images get loaded by boot scripts: 54*f01b631fSTom Warren * 55*f01b631fSTom Warren * scriptaddr can be pretty much anywhere that doesn't conflict with something 56*f01b631fSTom Warren * else. Put it above BOOTMAPSZ to eliminate conflicts. 57*f01b631fSTom Warren * 58*f01b631fSTom Warren * kernel_addr_r must be within the first 128M of RAM in order for the 59*f01b631fSTom Warren * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will 60*f01b631fSTom Warren * decompress itself to 0x8000 after the start of RAM, kernel_addr_r 61*f01b631fSTom Warren * should not overlap that area, or the kernel will have to copy itself 62*f01b631fSTom Warren * somewhere else before decompression. Similarly, the address of any other 63*f01b631fSTom Warren * data passed to the kernel shouldn't overlap the start of RAM. Pushing 64*f01b631fSTom Warren * this up to 16M allows for a sizable kernel to be decompressed below the 65*f01b631fSTom Warren * compressed load address. 66*f01b631fSTom Warren * 67*f01b631fSTom Warren * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for 68*f01b631fSTom Warren * the compressed kernel to be up to 16M too. 69*f01b631fSTom Warren * 70*f01b631fSTom Warren * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows 71*f01b631fSTom Warren * for the FDT/DTB to be up to 1M, which is hopefully plenty. 72*f01b631fSTom Warren */ 73*f01b631fSTom Warren #define MEM_LAYOUT_ENV_SETTINGS \ 74*f01b631fSTom Warren "scriptaddr=0x10000000\0" \ 75*f01b631fSTom Warren "kernel_addr_r=0x01000000\0" \ 76*f01b631fSTom Warren "fdt_addr_r=0x02000000\0" \ 77*f01b631fSTom Warren "ramdisk_addr_r=0x02100000\0" 78*f01b631fSTom Warren 79*f01b631fSTom Warren /* Defines for SPL */ 80*f01b631fSTom Warren #define CONFIG_SPL_TEXT_BASE 0x00108000 81*f01b631fSTom Warren #define CONFIG_SYS_SPL_MALLOC_START 0x00090000 82*f01b631fSTom Warren #define CONFIG_SPL_STACK 0x000ffffc 83*f01b631fSTom Warren 84*f01b631fSTom Warren #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/tegra20/u-boot-spl.lds" 8500a2749dSAllen Martin 86ad16617fSSimon Glass /* Align LCD to 1MB boundary */ 87ad16617fSSimon Glass #define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE 88ad16617fSSimon Glass 8929f3e3f2STom Warren #ifdef CONFIG_TEGRA_LP0 9000a2749dSAllen Martin #define TEGRA_LP0_ADDR 0x1C406000 9100a2749dSAllen Martin #define TEGRA_LP0_SIZE 0x2000 9200a2749dSAllen Martin #define TEGRA_LP0_VEC \ 9351926d5eSMarek Vasut "lp0_vec=" __stringify(TEGRA_LP0_SIZE) \ 9451926d5eSMarek Vasut "@" __stringify(TEGRA_LP0_ADDR) " " 9500a2749dSAllen Martin #else 9600a2749dSAllen Martin #define TEGRA_LP0_VEC 9700a2749dSAllen Martin #endif 9800a2749dSAllen Martin 9900a2749dSAllen Martin /* 10000a2749dSAllen Martin * This parameter affects a TXFILLTUNING field that controls how much data is 10100a2749dSAllen Martin * sent to the latency fifo before it is sent to the wire. Without this 10200a2749dSAllen Martin * parameter, the default (2) causes occasional Data Buffer Errors in OUT 10300a2749dSAllen Martin * packets depending on the buffer address and size. 10400a2749dSAllen Martin */ 10500a2749dSAllen Martin #define CONFIG_USB_EHCI_TXFIFO_THRESH 10 10600a2749dSAllen Martin #define CONFIG_EHCI_IS_TDI 10700a2749dSAllen Martin 10800a2749dSAllen Martin /* Total I2C ports on Tegra20 */ 10900a2749dSAllen Martin #define TEGRA_I2C_NUM_CONTROLLERS 4 11000a2749dSAllen Martin 11101ca2865SStephen Warren #define CONFIG_PARTITION_UUIDS 11201ca2865SStephen Warren #define CONFIG_CMD_PART 11300a2749dSAllen Martin 1140dd84084SSimon Glass #define CONFIG_SYS_NAND_SELF_INIT 115a833b950SLucas Stach #define CONFIG_SYS_NAND_ONFI_DETECTION 1160dd84084SSimon Glass 11719815399SStephen Warren /* Misc utility code */ 11819815399SStephen Warren #define CONFIG_BOUNCE_BUFFER 11919815399SStephen Warren 120*f01b631fSTom Warren #endif /* _TEGRA20_COMMON_H_ */ 121