Tegra114: Add arch-tegra114 include files
Subsystems (2)
PATCH v3 1/7 Tegra114: Add arch-tegra114 include files
Common Tegra files are in arch-tegra, shared between T20/T30/T114. Tegra114-specific headers are in arch-tegra114. Note that some of these will be filled in as more T114 support is added (drivers, WB/LP0 support, etc.).
---
Changes in v2:
- update all new copyright header dates to 2013
- put OSC_FREQ defines in SoC-specific headers
- use correct BIT/BCT offsets for T114 ODMDATA
- use T30 gpio header for T114
Changes in v3:
- Add MAX_NUM_CPU for common clock code use.
arch/arm/include/asm/arch-tegra/clk_rst.h | 56 ++- arch/arm/include/asm/arch-tegra/gp_padctrl.h | 1 + arch/arm/include/asm/arch-tegra/pmc.h | 8 + arch/arm/include/asm/arch-tegra/tegra.h | 2 + arch/arm/include/asm/arch-tegra114/clock-tables.h | 402 +++++++++++++ arch/arm/include/asm/arch-tegra114/clock.h | 28 + arch/arm/include/asm/arch-tegra114/flow.h | 35 ++ arch/arm/include/asm/arch-tegra114/funcmux.h | 31 + arch/arm/include/asm/arch-tegra114/gp_padctrl.h | 59 ++ arch/arm/include/asm/arch-tegra114/gpio.h | 30 + arch/arm/include/asm/arch-tegra114/hardware.h | 22 + arch/arm/include/asm/arch-tegra114/pinmux.h | 618 +++++++++++++++++++++ arch/arm/include/asm/arch-tegra114/pmu.h | 23 + arch/arm/include/asm/arch-tegra114/spl.h | 22 + arch/arm/include/asm/arch-tegra114/tegra.h | 33 ++ 15 files changed, 1365 insertions(+), 5 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra114/clock-tables.h create mode 100644 arch/arm/include/asm/arch-tegra114/clock.h create mode 100644 arch/arm/include/asm/arch-tegra114/flow.h create mode 100644 arch/arm/include/asm/arch-tegra114/funcmux.h create mode 100644 arch/arm/include/asm/arch-tegra114/gp_padctrl.h create mode 100644 arch/arm/include/asm/arch-tegra114/gpio.h create mode 100644 arch/arm/include/asm/arch-tegra114/hardware.h create mode 100644 arch/arm/include/asm/arch-tegra114/pinmux.h create mode 100644 arch/arm/include/asm/arch-tegra114/pmu.h create mode 100644 arch/arm/include/asm/arch-tegra114/spl.h create mode 100644 arch/arm/include/asm/arch-tegra114/tegra.h
arch/arm/include/asm/arch-tegra/clk_rst.h +51 -5
@@ -121,16 +121,43 @@ struct clk_rst_ctlr {uint crc_clk_cpug_cmplx;/* _CLK_CPUG_CMPLX_0, 0x378 */ uint crc_clk_cpulp_cmplx;/* _CLK_CPULP_CMPLX_0, 0x37C */ uint crc_cpu_softrst_ctrl;/* _CPU_SOFTRST_CTRL_0, 0x380 */ -uint crc_reserved33[11 ];/* _reserved_33, 0x384-3ac */ +uint crc_cpu_softrst_ctrl1;/* _CPU_SOFTRST_CTR1L_0, 0x384 */ +uint crc_cpu_softrst_ctrl2;/* _CPU_SOFTRST_CTRL2_0, 0x388 */ +uint crc_reserved33[9 ];/* _reserved_33, 0x38c-3ac */ uint crc_clk_src_vw[TEGRA_CLK_SOURCES_VW ];/* _G3D2_0..., 0x3b0-0x42c */ /* _RST_DEV_V/W_SET_0 0x430 ~ 0x43c */ struct clk_set_clr crc_rst_dev_ex_vw[TEGRA_CLK_REGS_VW ];/* _CLK_ENB_V/W_CLR_0 0x440 ~ 0x44c */ struct clk_set_clr crc_clk_enb_ex_vw[TEGRA_CLK_REGS_VW ]; -uint crc_reserved40[12 ];/* _reserved_40, 0x450-47C */ -uint crc_pll_cfg0;/* _PLL_CFG0_0, 0x480 */ -uint crc_pll_cfg1;/* _PLL_CFG1_0, 0x484 */ -uint crc_pll_cfg2;/* _PLL_CFG2_0, 0x488 */ +/* Additional (T114) registers */ +uint crc_rst_cpug_cmplx_set;/* _RST_CPUG_CMPLX_SET_0, 0x450 */ +uint crc_rst_cpug_cmplx_clr;/* _RST_CPUG_CMPLX_CLR_0, 0x454 */ +uint crc_rst_cpulp_cmplx_set;/* _RST_CPULP_CMPLX_SET_0, 0x458 */ +uint crc_rst_cpulp_cmplx_clr;/* _RST_CPULP_CMPLX_CLR_0, 0x45C */ +uint crc_clk_cpug_cmplx_set;/* _CLK_CPUG_CMPLX_SET_0, 0x460 */ +uint crc_clk_cpug_cmplx_clr;/* _CLK_CPUG_CMPLX_CLR_0, 0x464 */ +uint crc_clk_cpulp_cmplx_set;/* _CLK_CPULP_CMPLX_SET_0, 0x468 */ +uint crc_clk_cpulp_cmplx_clr;/* _CLK_CPULP_CMPLX_CLR_0, 0x46C */ +uint crc_cpu_cmplx_status;/* _CPU_CMPLX_STATUS_0, 0x470 */ +uint crc_reserved40[1 ];/* _reserved_40, 0x474 */ +uint crc_intstatus;/* __INTSTATUS_0, 0x478 */ +uint crc_intmask;/* __INTMASK_0, 0x47C */ +uint crc_utmip_pll_cfg0;/* _UTMIP_PLL_CFG0_0, 0x480 */ +uint crc_utmip_pll_cfg1;/* _UTMIP_PLL_CFG1_0, 0x484 */ +uint crc_utmip_pll_cfg2;/* _UTMIP_PLL_CFG2_0, 0x488 */ + +uint crc_plle_aux;/* _PLLE_AUX_0, 0x48C */ +uint crc_sata_pll_cfg0;/* _SATA_PLL_CFG0_0, 0x490 */ +uint crc_sata_pll_cfg1;/* _SATA_PLL_CFG1_0, 0x494 */ +uint crc_pcie_pll_cfg0;/* _PCIE_PLL_CFG0_0, 0x498 */ + +uint crc_prog_audio_dly_clk;/* _PROG_AUDIO_DLY_CLK_0, 0x49C */ +uint crc_audio_sync_clk_i2s0;/* _AUDIO_SYNC_CLK_I2S0_0, 0x4A0 */ +uint crc_audio_sync_clk_i2s1;/* _AUDIO_SYNC_CLK_I2S1_0, 0x4A4 */ +uint crc_audio_sync_clk_i2s2;/* _AUDIO_SYNC_CLK_I2S2_0, 0x4A8 */ +uint crc_audio_sync_clk_i2s3;/* _AUDIO_SYNC_CLK_I2S3_0, 0x4AC */ +uint crc_audio_sync_clk_i2s4;/* _AUDIO_SYNC_CLK_I2S4_0, 0x4B0 */ +uint crc_audio_sync_clk_spdif;/* _AUDIO_SYNC_CLK_SPDIF_0, 0x4B4 */ };/* CLK_RST_CONTROLLER_CLK_CPU_CMPLX_0 */
@@ -279,4 +306,23 @@ enum {#define CLK_SYS_RATE_APB_RATE_SHIFT 0#define CLK_SYS_RATE_APB_RATE_MASK (3 << CLK_SYS_RATE_AHB_RATE_SHIFT) +/* CLK_RST_CONTROLLER_RST_CPUxx_CMPLX_CLR */ +#define CLR_CPURESET0 (1 << 0) +#define CLR_CPURESET1 (1 << 1) +#define CLR_CPURESET2 (1 << 2) +#define CLR_CPURESET3 (1 << 3) +#define CLR_DBGRESET0 (1 << 12) +#define CLR_DBGRESET1 (1 << 13) +#define CLR_DBGRESET2 (1 << 14) +#define CLR_DBGRESET3 (1 << 15) +#define CLR_CORERESET0 (1 << 16) +#define CLR_CORERESET1 (1 << 17) +#define CLR_CORERESET2 (1 << 18) +#define CLR_CORERESET3 (1 << 19) +#define CLR_CXRESET0 (1 << 20) +#define CLR_CXRESET1 (1 << 21) +#define CLR_CXRESET2 (1 << 22) +#define CLR_CXRESET3 (1 << 23) +#define CLR_NONCPURESET (1 << 29) +#endif /* _TEGRA_CLK_RST_H_ */
arch/arm/include/asm/arch-tegra/gp_padctrl.h +1 -0
@@ -35,5 +35,6 @@/* CHIPID field returned from APB_MISC_GP_HIDREV register */ #define CHIPID_TEGRA20 0x20#define CHIPID_TEGRA30 0x30 +#define CHIPID_TEGRA114 0x35#endif /* _TEGRA_GP_PADCTRL_H_ */
arch/arm/include/asm/arch-tegra/pmc.h +8 -0
@@ -128,5 +128,13 @@ struct pmc_ctlr {#define START_CP (1 << 8)#define CPUPWRREQ_OE (1 << 16) +#define CPUPWRREQ_POL (1 << 15) + +#define CRAILID (0) +#define CE0ID (14) +#define C0NCID (15) +#define CRAIL (1 << CRAILID) +#define CE0 (1 << CE0ID) +#define C0NC (1 << C0NCID)#endif /* PMC_H */
arch/arm/include/asm/arch-tegra/tegra.h +2 -0
@@ -73,6 +73,7 @@ enum {SKU_ID_AP25E =0x1b ,SKU_ID_T25E =0x1c ,SKU_ID_T30 =0x81 ,/* Cardhu value */ + SKU_ID_T114_ENG = 0x00, /* Dalmore value, unfused */ };/*
@@ -85,6 +86,7 @@ enum {TEGRA_SOC_T20 ,TEGRA_SOC_T25 ,TEGRA_SOC_T30 , +TEGRA_SOC_T114 ,TEGRA_SOC_CNT , TEGRA_SOC_UNKNOWN = -1,
arch/arm/include/asm/arch-tegra114/clock-tables.h new file +402 -0
402 lines not on this page · raw message
arch/arm/include/asm/arch-tegra114/clock.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +/* Tegra114 clock control functions */ + +#ifndef _TEGRA114_CLOCK_H_ +#define _TEGRA114_CLOCK_H_ + +#include <asm/arch-tegra/clock.h> + +/* CLK_RST_CONTROLLER_OSC_CTRL_0 */ +#define OSC_FREQ_SHIFT 28 +#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) + +#endif /* _TEGRA114_CLOCK_H_ */
arch/arm/include/asm/arch-tegra114/flow.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _TEGRA114_FLOW_H_ +#define _TEGRA114_FLOW_H_ + +struct flow_ctlr { +u32 halt_cpu_events; +u32 halt_cop_events; +u32 cpu_csr; +u32 cop_csr; +u32 xrq_events; +u32 halt_cpu1_events; +u32 cpu1_csr; +u32 halt_cpu2_events; +u32 cpu2_csr; +u32 halt_cpu3_events; +u32 cpu3_csr; +u32 cluster_control; +}; + +#endif /* _TEGRA114_FLOW_H_ */
arch/arm/include/asm/arch-tegra114/funcmux.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +/* Tegra114 high-level function multiplexing */ + +#ifndef _TEGRA114_FUNCMUX_H_ +#define _TEGRA114_FUNCMUX_H_ + +#include <asm/arch-tegra/funcmux.h> + +/* Configs supported by the func mux */ +enum { +FUNCMUX_DEFAULT =0 ,/* default config */ + +/* UART configs */ +FUNCMUX_UART4_GMI =0 , +}; +#endif /* _TEGRA114_FUNCMUX_H_ */
arch/arm/include/asm/arch-tegra114/gp_padctrl.h new file +59 -0
59 lines not on this page · raw message
arch/arm/include/asm/arch-tegra114/gpio.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _TEGRA114_GPIO_H_ +#define _TEGRA114_GPIO_H_ + +/* +* The Tegra114 GPIO controller has 246 GPIOS in 8 banks of 4 ports, +* each with 8 GPIOs. +*/ +#define TEGRA_GPIO_PORTS 4/* number of ports per bank */ +#define TEGRA_GPIO_BANKS 8/* number of banks */ + +#include <asm/arch-tegra/gpio.h> +#include <asm/arch-tegra30/gpio.h> + +#endif /* _TEGRA114_GPIO_H_ */
arch/arm/include/asm/arch-tegra114/hardware.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _TEGRA114_HARDWARE_H_ +#define _TEGRA114_HARDWARE_H_ + +/* include tegra specific hardware definitions */ + +#endif /* _TEGRA114_HARDWARE_H_ */
arch/arm/include/asm/arch-tegra114/pinmux.h new file +618 -0
618 lines not on this page · raw message
arch/arm/include/asm/arch-tegra114/pmu.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _TEGRA114_PMU_H_ +#define _TEGRA114_PMU_H_ + +/* Set core and CPU voltages to nominal levels */ +int pmu_set_nominal (void ); + +#endif /* _TEGRA114_PMU_H_ */
arch/arm/include/asm/arch-tegra114/spl.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _ASM_ARCH_SPL_H_ +#define _ASM_ARCH_SPL_H_ + +#define BOOT_DEVICE_RAM 1 + +#endif
arch/arm/include/asm/arch-tegra114/tegra.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _TEGRA114_H_ +#define _TEGRA114_H_ + +#define NV_PA_SDRAM_BASE 0x80000000/* 0x80000000 for real T114 */ + +#include <asm/arch-tegra/tegra.h> + +#define BCT_ODMDATA_OFFSET 1752/* offset to ODMDATA word */ + +#undef NVBOOTINFOTABLE_BCTSIZE +#undef NVBOOTINFOTABLE_BCTPTR +#define NVBOOTINFOTABLE_BCTSIZE 0x48/* BCT size in BIT in IRAM */ +#define NVBOOTINFOTABLE_BCTPTR 0x4C/* BCT pointer in BIT in IRAM */ + +#define MAX_NUM_CPU 4 + +#endif /* TEGRA114_H */
Signature · 1 line
1.7.0.4
PATCH v3 2/7 Tegra114: Add AVP (arm720t) files
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
---
Changes in v2:
- update all new copyright header dates to 2013
- use CHIPID directly to figure num cpus
- set CPU2/3 bits at runtime using num cpus instead of ifdef
- remove private TRUE/FALSE defines, not needed now
- clrbits/setbits_le32 used instead of reg read/&/|/write Changes in v3:
- only need to powerup the fast cluster
arch/arm/cpu/arm720t/tegra-common/cpu.c | 75 ++++---- arch/arm/cpu/arm720t/tegra-common/cpu.h | 8 +- arch/arm/cpu/arm720t/tegra114/Makefile | 42 +++++ arch/arm/cpu/arm720t/tegra114/config.mk | 19 ++ arch/arm/cpu/arm720t/tegra114/cpu.c | 297 +++++++++++++++++++++++++++++++ 5 files changed, 403 insertions(+), 38 deletions(-) create mode 100644 arch/arm/cpu/arm720t/tegra114/Makefile create mode 100644 arch/arm/cpu/arm720t/tegra114/config.mk create mode 100644 arch/arm/cpu/arm720t/tegra114/cpu.c
arch/arm/cpu/arm720t/tegra-common/cpu.c +40 -35
@@ -25,30 +25,24 @@#include <asm/arch-tegra/scu.h> #include "cpu.h" -enum tegra_family_t { - TEGRA_FAMILY_T2x, - TEGRA_FAMILY_T3x, -}; - - -enum tegra_family_t get_family (void ) -{ -u32 reg, chip_id; - - reg =readl (NV_PA_APB_MISC_BASE +GP_HIDREV ); - - chip_id = reg >>8 ; - chip_id &=0xff ; -debug (" tegra_get_family: chip_id = %x\n" , chip_id); -if (chip_id ==0x30 ) -return TEGRA_FAMILY_T3x; -else -return TEGRA_FAMILY_T2x; -} -int get_num_cpus (void ) { -return get_family () == TEGRA_FAMILY_T3x ?4 :2 ; +struct apb_misc_gp_ctlr *gp; +uint rev; + + gp = (struct apb_misc_gp_ctlr *)NV_PA_APB_MISC_GP_BASE ; + rev = (readl (&gp->hidrev) &HIDREV_CHIPID_MASK ) >>HIDREV_CHIPID_SHIFT ; + +switch (rev) { +case CHIPID_TEGRA20 : +return 2 ; +break ; +case CHIPID_TEGRA30 : +case CHIPID_TEGRA114 : +default : +return 4 ; +break ; + } }/*
@@ -56,6 +50,7 @@ int get_num_cpus(void)*/ struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT ][CLOCK_OSC_FREQ_COUNT ] = {/* T20: 1 GHz */ +/* n, m, p, cpcon */ {{1000 ,13 ,0 ,12 },/* OSC 13M */ {625 ,12 ,0 ,8 },/* OSC 19.2M */ {1000 ,12 ,0 ,12 },/* OSC 12M */
@@ -75,6 +70,13 @@ struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { { 700, 6, 0, 8}, { 700, 13, 0, 8}, }, + +/* T114: 1.4 GHz */ + {{ 862, 8, 0, 8}, + { 583, 8, 0, 4}, + { 696, 12, 0, 8}, + { 700, 13, 0, 8}, + }, };void adjust_pllp_out_freqs (void )
@@ -159,8 +161,8 @@ void init_pllx(void) sel = &tegra_pll_x_table[chip_type][osc];pllx_set_rate (pll, sel->n, sel->m, sel->p, sel->cpcon); -/* adjust PLLP_out1-4 on T30 */ -if (chip_type ==TEGRA_SOC_T30 ) { +/* adjust PLLP_out1-4 on T30/T114 */ +if (chip_type ==TEGRA_SOC_T30 || chip_type ==TEGRA_SOC_T114 ) {debug (" init_pllx: adjusting PLLP out freqs\n" );adjust_pllp_out_freqs (); }
@@ -196,10 +198,9 @@ void enable_cpu_clock(int enable)*/ clk =readl (&clkrst->crc_clk_cpu_cmplx); clk |=1 <<CPU1_CLK_STP_SHIFT ; -#if defined(CONFIG_TEGRA30 ) - clk |=1 <<CPU2_CLK_STP_SHIFT ; - clk |=1 <<CPU3_CLK_STP_SHIFT ; -#endif +if (get_num_cpus () ==4 ) + clk |= (1 <<CPU2_CLK_STP_SHIFT ) + (1 <<CPU3_CLK_STP_SHIFT ); +/* Stop/Unstop the CPU clock */ clk &= ~CPU0_CLK_STP_MASK ; clk |= !enable <<CPU0_CLK_STP_SHIFT ;
@@ -285,7 +286,8 @@ void reset_A9_cpu(int reset)void clock_enable_coresight (int enable) { -u32 rst, src; +u32 rst, src =2 ; +int chip;debug ("clock_enable_coresight entry\n" );clock_set_enable (PERIPH_ID_CORESIGHT , enable);
@@ -301,20 +303,23 @@ void clock_enable_coresight(int enable)* Clock divider request for 204MHz would setup CSITE clock as * 144MHz for PLLP base 216MHz and 204MHz for PLLP base 408MHz */ -if (tegra_get_chip_type () ==TEGRA_SOC_T30 ) + chip =tegra_get_chip_type (); +if (chip ==TEGRA_SOC_T30 || chip ==TEGRA_SOC_T114 ) src =CLK_DIVIDER (NVBL_PLLP_KHZ ,204000 ); -else +else if (chip ==TEGRA_SOC_T20 || chip ==TEGRA_SOC_T25 ) src =CLK_DIVIDER (NVBL_PLLP_KHZ ,144000 ); +else +printf ("%s: Unknown chip type %X!\n" , __func__, chip);clock_ll_set_source_divisor (PERIPH_ID_CSI ,0 , src);/* Unlock the CPU CoreSight interfaces */ rst =CORESIGHT_UNLOCK ;writel (rst,CSITE_CPU_DBG0_LAR );writel (rst,CSITE_CPU_DBG1_LAR ); -#if defined(CONFIG_TEGRA30 ) -writel (rst,CSITE_CPU_DBG2_LAR ); -writel (rst,CSITE_CPU_DBG3_LAR ); -#endif +if (get_num_cpus () ==4 ) { +writel (rst,CSITE_CPU_DBG2_LAR ); +writel (rst,CSITE_CPU_DBG3_LAR ); + } } }
arch/arm/cpu/arm720t/tegra-common/cpu.h +5 -3
@@ -26,10 +26,12 @@#define PLL_STABILIZATION_DELAY (300)#define IO_STABILIZATION_DELAY (1000) -#if defined(CONFIG_TEGRA30 ) -#define NVBL_PLLP_KHZ (408000) -#else /* Tegra20 */ +#if defined(CONFIG_TEGRA20 )#define NVBL_PLLP_KHZ (216000) +#elif defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 ) +#define NVBL_PLLP_KHZ (408000) +#else +#error "Unknown Tegra chip!"#endif #define PLLX_ENABLED (1 << 30)
arch/arm/cpu/arm720t/tegra114/Makefile new file +42 -0
42 lines not on this page · raw message
arch/arm/cpu/arm720t/tegra114/config.mk new file +19 -0
@@ -0,0 +1,19 @@ +# +# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, <[email protected]> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +# +USE_PRIVATE_LIBGCC = yes
arch/arm/cpu/arm720t/tegra114/cpu.c new file +297 -0
297 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 3/7 Tegra114: Add CPU (armv7) files
In reply to Tom WarrenThese files are for code that runs on the CPU (A15) on T114 boards. At this time, there is no A15-specific code here.
As T114-specific run-time code is added, it'll go here.
---
Changes in v2:
- update all new copyright header dates to 2013
Changes in v3:
- none
arch/arm/cpu/armv7/tegra114/Makefile | 40 +++++++++++++++++++++++++++++++++ arch/arm/cpu/armv7/tegra114/config.mk | 19 +++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra114/Makefile create mode 100644 arch/arm/cpu/armv7/tegra114/config.mk
arch/arm/cpu/armv7/tegra114/Makefile new file +40 -0
@@ -0,0 +1,40 @@ +# +# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(SOC).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 + +#########################################################################
arch/arm/cpu/armv7/tegra114/config.mk new file +19 -0
@@ -0,0 +1,19 @@ +# +# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, <[email protected]> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +# +CONFIG_ARCH_DEVICE_TREE := tegra114
Signature · 1 line
1.7.0.4
PATCH v3 4/7 Tegra114: Add common CPU (shared) files
In reply to Tom WarrenThese files are used by both SPL and main U-Boot.
---
Changes in v2:
- update all new copyright header dates to 2013
- use ODMDATA correctly in query_dram_size
Changes in v3:
- rename T114 SKU ID
- use common clock code
arch/arm/cpu/tegra-common/ap.c | 9 +- arch/arm/cpu/tegra-common/board.c | 21 +- arch/arm/cpu/tegra114-common/Makefile | 41 ++ arch/arm/cpu/tegra114-common/clock.c | 655 ++++++++++++++++++++++++++++++++ arch/arm/cpu/tegra114-common/funcmux.c | 63 +++ arch/arm/cpu/tegra114-common/pinmux.c | 506 ++++++++++++++++++++++++ 6 files changed, 1291 insertions(+), 4 deletions(-) create mode 100644 arch/arm/cpu/tegra114-common/Makefile create mode 100644 arch/arm/cpu/tegra114-common/clock.c create mode 100644 arch/arm/cpu/tegra114-common/funcmux.c create mode 100644 arch/arm/cpu/tegra114-common/pinmux.c
arch/arm/cpu/tegra-common/ap.c +8 -1
@@ -31,6 +31,7 @@#include <asm/arch-tegra/fuse.h> #include <asm/arch-tegra/pmc.h> #include <asm/arch-tegra/scu.h> +#include <asm/arch-tegra/tegra.h> #include <asm/arch-tegra/warmboot.h> int tegra_get_chip_type (void )
@@ -42,7 +43,7 @@ int tegra_get_chip_type(void)/* * This is undocumented, Chip ID is bits 15:8 of the register * APB_MISC + 0x804, and has value 0x20 for Tegra20, 0x30 for -* Tegra30 +* Tegra30, and 0x35 for T114. */ gp = (struct apb_misc_gp_ctlr *)NV_PA_APB_MISC_GP_BASE ; rev = (readl (&gp->hidrev) &HIDREV_CHIPID_MASK ) >>HIDREV_CHIPID_SHIFT ;
@@ -68,6 +69,12 @@ int tegra_get_chip_type(void)return TEGRA_SOC_T30 ; }break ; +case CHIPID_TEGRA114 : +switch (tegra_sku_id) { +case SKU_ID_T114_ENG : +return TEGRA_SOC_T114 ; + } +break ; }/* unknown sku id */ return TEGRA_SOC_UNKNOWN ;
arch/arm/cpu/tegra-common/board.c +18 -3
@@ -37,8 +37,10 @@ enum {/* UARTs which we can enable */ UARTA =1 <<0 ,UARTB =1 <<1 , +UARTC =1 <<2 ,UARTD =1 <<3 , - UART_COUNT = 4, +UARTE =1 <<4 , + UART_COUNT = 5, };/*
@@ -68,7 +70,7 @@ unsigned int query_sdram_size(void)case 3 : return 0x40000000; /* 1GB */ } -#else /* Tegra30 */ +#else /* Tegra30/Tegra114 */ /* bits 31:28 in OdmData are used for RAM size on T30 */ switch ((reg) >>28 ) {case 0 :
@@ -117,12 +119,18 @@ static int uart_configs[] = { -1, FUNCMUX_UART4_GMC, -1, -#else /* Tegra30 */ +#elif defined(CONFIG_TEGRA30)FUNCMUX_UART1_ULPI ,/* UARTA */ -1 ,-1 ,-1 ,-1 , +#else /* Tegra114 */ +-1 , +-1 , +-1 , +FUNCMUX_UART4_GMI ,/* UARTD */ + -1, #endif };
@@ -138,6 +146,7 @@ static void setup_uarts(int uart_ids)PERIPH_ID_UART2 ,PERIPH_ID_UART3 ,PERIPH_ID_UART4 , + PERIPH_ID_UART5, };size_t i;
@@ -161,9 +170,15 @@ void board_init_uart_f(void)#ifdef CONFIG_TEGRA_ENABLE_UARTB uart_ids |=UARTB ;#endif +#ifdef CONFIG_TEGRA_ENABLE_UARTC + uart_ids |=UARTC ; +#endif #ifdef CONFIG_TEGRA_ENABLE_UARTD uart_ids |=UARTD ;#endif +#ifdef CONFIG_TEGRA_ENABLE_UARTE + uart_ids |=UARTE ; +#endif setup_uarts (uart_ids); }
arch/arm/cpu/tegra114-common/Makefile new file +41 -0
41 lines not on this page · raw message
arch/arm/cpu/tegra114-common/clock.c new file +655 -0
655 lines not on this page · raw message
arch/arm/cpu/tegra114-common/funcmux.c new file +63 -0
63 lines not on this page · raw message
arch/arm/cpu/tegra114-common/pinmux.c new file +506 -0
506 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 5/7 Tegra114: Dalmore: Add DT files
In reply to Tom WarrenThese are stripped down for bringup, They'll be filled out later to match-up with the kernel DT contents, and/or as devices are brought up (mmc, usb, spi, etc.).
---
Changes in v2:
- change memory size to 2GB
Changes in v3:
- none
arch/arm/dts/tegra114.dtsi | 5 +++++ board/nvidia/dts/tegra114-dalmore.dts | 13 +++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 arch/arm/dts/tegra114.dtsi create mode 100644 board/nvidia/dts/tegra114-dalmore.dts
arch/arm/dts/tegra114.dtsi new file +5 -0
@@ -0,0 +1,5 @@ +/include/ "skeleton.dtsi" + +/ { + compatible = "nvidia,tegra114"; +};
board/nvidia/dts/tegra114-dalmore.dts new file +13 -0
@@ -0,0 +1,13 @@ +/dts-v1/; + +/include/ ARCH_CPU_DTS + +/ { + model = "NVIDIA Dalmore"; + compatible = "nvidia,dalmore", "nvidia,tegra114"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x80000000>; + }; +};
Signature · 1 line
1.7.0.4
PATCH v3 6/7 Tegra114: Add generic Tegra114 build support
In reply to Tom WarrenThis patch adds basic Tegra114 (T114) build support - no specific board is targeted.
---
Changes in v2:
- none
Changes in v3:
- none
board/nvidia/common/board.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/nvidia/common/board.c +1 -1
@@ -196,7 +196,7 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));int board_early_init_f (void ) { -#if defined(CONFIG_TEGRA30 ) +#if !defined(CONFIG_TEGRA20 )pinmux_init ();#endif board_init_uart_f ();
Signature · 1 line
1.7.0.4
PATCH v3 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
In reply to Tom WarrenThis build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
---
Changes in v2:
- update all new copyright header dates to 2013
- use correct table names in pinmux_init
Changes in v3:
- none
board/nvidia/dalmore/Makefile | 36 ++++ board/nvidia/dalmore/dalmore.c | 32 ++++ board/nvidia/dalmore/pinmux-config-dalmore.h | 249 ++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dalmore.h | 50 +++++ include/configs/tegra114-common.h | 79 ++++++++ 6 files changed, 447 insertions(+), 0 deletions(-) create mode 100644 board/nvidia/dalmore/Makefile create mode 100644 board/nvidia/dalmore/dalmore.c create mode 100644 board/nvidia/dalmore/pinmux-config-dalmore.h create mode 100644 include/configs/dalmore.h create mode 100644 include/configs/tegra114-common.h
board/nvidia/dalmore/Makefile new file +36 -0
@@ -0,0 +1,36 @@ +# +# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := $(BOARD).o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/nvidia/dalmore/dalmore.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>. +*/ + +#include <common.h> +#include <asm/arch/pinmux.h> +#include "pinmux-config-dalmore.h" + +/* +* Routine: pinmux_init +* Description: Do individual peripheral pinmux configs +*/ +void pinmux_init (void ) +{ +pinmux_config_table (tegra114_pinmux_common, +ARRAY_SIZE (tegra114_pinmux_common)); + +pinmux_config_table (unused_pins_lowpower, +ARRAY_SIZE (unused_pins_lowpower)); +}
board/nvidia/dalmore/pinmux-config-dalmore.h new file +249 -0
249 lines not on this page · raw message
boards.cfg +1 -0
@@ -291,6 +291,7 @@ seaboard arm armv7:arm720t seaboard nvidia ventana arm armv7:arm720t ventana nvidia tegra20 whistler arm armv7:arm720t whistler nvidia tegra20 cardhu arm armv7:arm720t cardhu nvidia tegra30 +dalmore arm armv7:arm720t dalmore nvidia tegra114 colibri_t20_iris arm armv7:arm720t colibri_t20_iris toradex tegra20 u8500_href arm armv7 u8500 st-ericsson u8500 snowball arm armv7 snowball st-ericsson u8500
include/configs/dalmore.h new file +50 -0
50 lines not on this page · raw message
include/configs/tegra114-common.h new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
Quoted 13 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
Signed-off-by Tom Warren <[email protected]>---
Changes in v2:
- update all new copyright header dates to 2013
- use correct table names inpinmux_init
Changes in v3:
- none...
include/configs/dalmore.h line 47
Quoted 3 lines
include/configs/dalmore.h new file +3
-0+ +#define MACH_TYPE_DALMORE 4304/* not yet in mach-types.h */ +
Why not just update mach-types.h?
-Allen
Signature · 1 line
nvpublic
PATCH v3 1/7 Tegra114: Add arch-tegra114 include files
In reply to Tom WarrenQuoted 4 lines · Tom Warren
Common Tegra files are in arch-tegra, shared between T20/T30/T114. Tegra114-specific headers are in arch-tegra114. Note that some of these will be filled in as more T114 support is added (drivers, WB/LP0 support, etc.).
The series briefly,