100a2749dSAllen Martin /* 200a2749dSAllen Martin * (C) Copyright 2010-2012 300a2749dSAllen Martin * NVIDIA Corporation <www.nvidia.com> 400a2749dSAllen Martin * 51a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 600a2749dSAllen Martin */ 700a2749dSAllen Martin 8f01b631fSTom Warren #ifndef _TEGRA20_COMMON_H_ 9f01b631fSTom Warren #define _TEGRA20_COMMON_H_ 10f01b631fSTom Warren #include "tegra-common.h" 11f01b631fSTom Warren 12*0d79f4f4SThierry Reding /* Cortex-A9 uses a cache line size of 32 bytes */ 13*0d79f4f4SThierry Reding #define CONFIG_SYS_CACHELINE_SIZE 32 14*0d79f4f4SThierry Reding 15f01b631fSTom Warren /* 16c44bb3a3SStephen Warren * Errata configuration 17c44bb3a3SStephen Warren */ 1853612132SStephen Warren #define CONFIG_ARM_ERRATA_716044 19c44bb3a3SStephen Warren #define CONFIG_ARM_ERRATA_742230 20c44bb3a3SStephen Warren #define CONFIG_ARM_ERRATA_751472 21c44bb3a3SStephen Warren 22c44bb3a3SStephen Warren /* 23f01b631fSTom Warren * NS16550 Configuration 24f01b631fSTom Warren */ 25f01b631fSTom Warren #define V_NS16550_CLK 216000000 /* 216MHz (pllp_out0) */ 2600a2749dSAllen Martin 2700a2749dSAllen Martin /* 2800a2749dSAllen Martin * High Level Configuration Options 2900a2749dSAllen Martin */ 3000a2749dSAllen Martin #define CONFIG_TEGRA20 /* in a NVidia Tegra20 core */ 3100a2749dSAllen Martin 32f01b631fSTom Warren /* Environment information, boards can override if required */ 33f01b631fSTom Warren #define CONFIG_LOADADDR 0x00408000 /* def. location for kernel */ 3400a2749dSAllen Martin 35f01b631fSTom Warren /* 36f01b631fSTom Warren * Miscellaneous configurable options 37f01b631fSTom Warren */ 38f01b631fSTom Warren #define CONFIG_SYS_LOAD_ADDR 0x00A00800 /* default */ 39f01b631fSTom Warren #define CONFIG_STACKBASE 0x02800000 /* 40MB */ 40f01b631fSTom Warren 41f01b631fSTom Warren /*----------------------------------------------------------------------- 42f01b631fSTom Warren * Physical Memory Map 43f01b631fSTom Warren */ 44f01b631fSTom Warren #define CONFIG_SYS_TEXT_BASE 0x0010E000 45f01b631fSTom Warren 46f01b631fSTom Warren /* 47f01b631fSTom Warren * Memory layout for where various images get loaded by boot scripts: 48f01b631fSTom Warren * 49f01b631fSTom Warren * scriptaddr can be pretty much anywhere that doesn't conflict with something 50f01b631fSTom Warren * else. Put it above BOOTMAPSZ to eliminate conflicts. 51f01b631fSTom Warren * 52f01b631fSTom Warren * kernel_addr_r must be within the first 128M of RAM in order for the 53f01b631fSTom Warren * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will 54f01b631fSTom Warren * decompress itself to 0x8000 after the start of RAM, kernel_addr_r 55f01b631fSTom Warren * should not overlap that area, or the kernel will have to copy itself 56f01b631fSTom Warren * somewhere else before decompression. Similarly, the address of any other 57f01b631fSTom Warren * data passed to the kernel shouldn't overlap the start of RAM. Pushing 58f01b631fSTom Warren * this up to 16M allows for a sizable kernel to be decompressed below the 59f01b631fSTom Warren * compressed load address. 60f01b631fSTom Warren * 61f01b631fSTom Warren * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for 62f01b631fSTom Warren * the compressed kernel to be up to 16M too. 63f01b631fSTom Warren * 64f01b631fSTom Warren * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows 65f01b631fSTom Warren * for the FDT/DTB to be up to 1M, which is hopefully plenty. 66f01b631fSTom Warren */ 67f01b631fSTom Warren #define MEM_LAYOUT_ENV_SETTINGS \ 68f01b631fSTom Warren "scriptaddr=0x10000000\0" \ 69f01b631fSTom Warren "kernel_addr_r=0x01000000\0" \ 70f01b631fSTom Warren "fdt_addr_r=0x02000000\0" \ 71f01b631fSTom Warren "ramdisk_addr_r=0x02100000\0" 72f01b631fSTom Warren 73f01b631fSTom Warren /* Defines for SPL */ 74f01b631fSTom Warren #define CONFIG_SPL_TEXT_BASE 0x00108000 75f01b631fSTom Warren #define CONFIG_SYS_SPL_MALLOC_START 0x00090000 76f01b631fSTom Warren #define CONFIG_SPL_STACK 0x000ffffc 77f01b631fSTom Warren 78ad16617fSSimon Glass /* Align LCD to 1MB boundary */ 79ad16617fSSimon Glass #define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE 80ad16617fSSimon Glass 8129f3e3f2STom Warren #ifdef CONFIG_TEGRA_LP0 8200a2749dSAllen Martin #define TEGRA_LP0_ADDR 0x1C406000 8300a2749dSAllen Martin #define TEGRA_LP0_SIZE 0x2000 8400a2749dSAllen Martin #define TEGRA_LP0_VEC \ 8551926d5eSMarek Vasut "lp0_vec=" __stringify(TEGRA_LP0_SIZE) \ 8651926d5eSMarek Vasut "@" __stringify(TEGRA_LP0_ADDR) " " 8700a2749dSAllen Martin #else 8800a2749dSAllen Martin #define TEGRA_LP0_VEC 8900a2749dSAllen Martin #endif 9000a2749dSAllen Martin 9100a2749dSAllen Martin /* 9200a2749dSAllen Martin * This parameter affects a TXFILLTUNING field that controls how much data is 9300a2749dSAllen Martin * sent to the latency fifo before it is sent to the wire. Without this 9400a2749dSAllen Martin * parameter, the default (2) causes occasional Data Buffer Errors in OUT 9500a2749dSAllen Martin * packets depending on the buffer address and size. 9600a2749dSAllen Martin */ 9700a2749dSAllen Martin #define CONFIG_USB_EHCI_TXFIFO_THRESH 10 9800a2749dSAllen Martin #define CONFIG_EHCI_IS_TDI 9900a2749dSAllen Martin 10000a2749dSAllen Martin /* Total I2C ports on Tegra20 */ 10100a2749dSAllen Martin #define TEGRA_I2C_NUM_CONTROLLERS 4 10200a2749dSAllen Martin 1030dd84084SSimon Glass #define CONFIG_SYS_NAND_SELF_INIT 104a833b950SLucas Stach #define CONFIG_SYS_NAND_ONFI_DETECTION 1050dd84084SSimon Glass 106f01b631fSTom Warren #endif /* _TEGRA20_COMMON_H_ */ 107