diff options
author | Tom Warren <twarren@nvidia.com> | 2011-09-01 16:49:30 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-09-15 12:42:37 -0700 |
commit | 615217e1f756332820e3aed926a26ede9451a2be (patch) | |
tree | ab93ea89979666e020b66948937c07a1f1f22c31 /arch | |
parent | e26a6be71dd36659af343b9f0ec14ea981d23692 (diff) |
tegra3: Add basic Tegra30 support
This adds the most basic Tegra30 support to U-Boot, by making use of
existing tegra2 code and adding what is necessary to build.
BUG=chromium-os:19004
TEST=build and boot on T30 board
Change-Id: If75599b2e76dbec3281fffb8a244b6145e9648cc
Reviewed-on: http://gerrit.chromium.org/gerrit/7130
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/tegra3/Makefile | 52 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra3/board.c | 36 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra3/sys_info.c | 35 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra/tegra.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra2/tegra.h | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra3/clock.h | 22 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra3/fuse.h | 39 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra3/sys_proto.h | 24 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra3/tegra.h | 36 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra3/timer.h | 24 |
10 files changed, 276 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv7/tegra3/Makefile b/arch/arm/cpu/armv7/tegra3/Makefile new file mode 100644 index 0000000000..98468450c8 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra3/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2010,2011 Nvidia Corporation. +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +# The AVP is ARMv4T architecture so we must use special compiler +# flags for any files it might use. + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(SOC).o + +COBJS-y := board.o sys_info.o + +COBJS := $(COBJS-y) + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/arch/arm/cpu/armv7/tegra3/board.c b/arch/arm/cpu/armv7/tegra3/board.c new file mode 100644 index 0000000000..861174e89e --- /dev/null +++ b/arch/arm/cpu/armv7/tegra3/board.c @@ -0,0 +1,36 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/sys_proto.h> +#include <asm/arch/tegra.h> +#include <asm/arch-tegra/board.h> + +DECLARE_GLOBAL_DATA_PTR; + +unsigned int board_query_sdram_size(void) +{ + /* TBD - check odmdata in PMC scratch reg */ + return 0x40000000; /* Cardhu = 1GB */ +} diff --git a/arch/arm/cpu/armv7/tegra3/sys_info.c b/arch/arm/cpu/armv7/tegra3/sys_info.c new file mode 100644 index 0000000000..a9ee6cdb2a --- /dev/null +++ b/arch/arm/cpu/armv7/tegra3/sys_info.c @@ -0,0 +1,35 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <common.h> + +#ifdef CONFIG_DISPLAY_CPUINFO +/* Print CPU information */ +int print_cpuinfo(void) +{ + puts("TEGRA3\n"); + + /* TBD: Add printf of major/minor rev info, stepping, etc. */ + return 0; +} +#endif /* CONFIG_DISPLAY_CPUINFO */ diff --git a/arch/arm/include/asm/arch-tegra/tegra.h b/arch/arm/include/asm/arch-tegra/tegra.h index 023e441f15..28079021a7 100644 --- a/arch/arm/include/asm/arch-tegra/tegra.h +++ b/arch/arm/include/asm/arch-tegra/tegra.h @@ -51,10 +51,6 @@ #define NV_PA_USB1_BASE 0xC5000000 #define NV_PA_USB3_BASE 0xC5008000 -#define NV_PA_SDMMC1_BASE 0xC8000000 -#define NV_PA_SDMMC2_BASE 0xC8000200 -#define NV_PA_SDMMC3_BASE 0xC8000400 -#define NV_PA_SDMMC4_BASE 0xC8000600 #define TEGRA_SDRC_CS0 NV_PA_SDRAM_BASE #define LOW_LEVEL_SRAM_STACK 0x4000FFFC @@ -79,11 +75,14 @@ enum { SKU_ID_T25 = 0x18, SKU_ID_AP25E = 0x1b, SKU_ID_T25E = 0x1c, + + SKU_ID_T30 = 0x81, /* TBD use real Cardhu value */ }; enum { TEGRA_SOC_T20, TEGRA_SOC_T25, + TEGRA_SOC_T30, TEGRA_SOC_COUNT, TEGRA_SOC_UNKNOWN = -1, diff --git a/arch/arm/include/asm/arch-tegra2/tegra.h b/arch/arm/include/asm/arch-tegra2/tegra.h index 2ef29374dd..68b424a9bf 100644 --- a/arch/arm/include/asm/arch-tegra2/tegra.h +++ b/arch/arm/include/asm/arch-tegra2/tegra.h @@ -27,6 +27,11 @@ #define NV_PA_SDRAM_BASE 0x00000000 #define TEGRA_SPI_BASE 0x7000C380 +#define NV_PA_SDMMC1_BASE 0xC8000000 +#define NV_PA_SDMMC2_BASE 0xC8000200 +#define NV_PA_SDMMC3_BASE 0xC8000400 +#define NV_PA_SDMMC4_BASE 0xC8000600 + #include <asm/arch-tegra/tegra.h> #endif diff --git a/arch/arm/include/asm/arch-tegra3/clock.h b/arch/arm/include/asm/arch-tegra3/clock.h new file mode 100644 index 0000000000..c11066760e --- /dev/null +++ b/arch/arm/include/asm/arch-tegra3/clock.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include "asm/arch-tegra/clock.h" diff --git a/arch/arm/include/asm/arch-tegra3/fuse.h b/arch/arm/include/asm/arch-tegra3/fuse.h new file mode 100644 index 0000000000..b7e3808a4f --- /dev/null +++ b/arch/arm/include/asm/arch-tegra3/fuse.h @@ -0,0 +1,39 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _FUSE_H_ +#define _FUSE_H_ + +/* FUSE registers */ +struct fuse_regs { + u32 reserved0[64]; /* 0x00 - 0xFC: */ + u32 production_mode; /* 0x100: FUSE_PRODUCTION_MODE */ + u32 reserved1[3]; /* 0x104 - 0x10c: */ + u32 sku_info; /* 0x110 */ + u32 reserved2[13]; /* 0x114 - 0x144: */ + u32 fa; /* 0x148: FUSE_FA */ + u32 reserved3[21]; /* 0x14C - 0x19C: */ + u32 security_mode; /* 0x1A0: FUSE_SECURITY_MODE */ +}; + +#endif /* ifndef _FUSE_H_ */ diff --git a/arch/arm/include/asm/arch-tegra3/sys_proto.h b/arch/arm/include/asm/arch-tegra3/sys_proto.h new file mode 100644 index 0000000000..c460762908 --- /dev/null +++ b/arch/arm/include/asm/arch-tegra3/sys_proto.h @@ -0,0 +1,24 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <asm/arch-tegra/sys_proto.h> diff --git a/arch/arm/include/asm/arch-tegra3/tegra.h b/arch/arm/include/asm/arch-tegra3/tegra.h new file mode 100644 index 0000000000..92a19703c3 --- /dev/null +++ b/arch/arm/include/asm/arch-tegra3/tegra.h @@ -0,0 +1,36 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _TEGRA3_H_ +#define _TEGRA3_H_ + +#define NV_PA_SDRAM_BASE 0x80000000 + +#define NV_PA_SDMMC1_BASE 0x78000000 +#define NV_PA_SDMMC2_BASE 0x78000200 +#define NV_PA_SDMMC3_BASE 0x78000400 +#define NV_PA_SDMMC4_BASE 0x78000600 + +#include <asm/arch-tegra/tegra.h> + +#endif diff --git a/arch/arm/include/asm/arch-tegra3/timer.h b/arch/arm/include/asm/arch-tegra3/timer.h new file mode 100644 index 0000000000..a4f3f674cb --- /dev/null +++ b/arch/arm/include/asm/arch-tegra3/timer.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* Tegra3 timer functions */ + +#include <asm/arch-tegra/timer.h> |