Add support for NVIDIA Tegra114 SoC
Subsystems (2)
cover Add support for NVIDIA Tegra114 SoC
This patch series adds basic (boot to cmd prompt) support for Tegra114. This is based on the Tegra30 SPL, which inits the AVP (ARM7TDMI boot proc) first, then control is passed to the CPU (A15 quad cluster). It is based on current u-boot-tegra/next.
Future patches will add support/drivers for I2C, SPI, MMC, USB, etc. The Dalmore (E1611) T114 board is supported initially.
Tom Warren (7):
Tegra114: Add arch-tegra114 include files
Tegra114: Add AVP (arm720t) files
Tegra114: Add CPU (armv7) files
Tegra114: Add common CPU (shared) files
Tegra114: Dalmore: Add DT files
Tegra114: Add generic Tegra114 build support
Tegra114: Add/enable Dalmore build (T114 reference board)
arch/arm/cpu/arm720t/tegra-common/cpu.c | 23 +- arch/arm/cpu/arm720t/tegra-common/cpu.h | 13 +- arch/arm/cpu/arm720t/tegra114/Makefile | 42 + arch/arm/cpu/arm720t/tegra114/config.mk | 19 + arch/arm/cpu/arm720t/tegra114/cpu.c | 328 ++++++ arch/arm/cpu/armv7/tegra114/Makefile | 40 + arch/arm/cpu/armv7/tegra114/config.mk | 19 + arch/arm/cpu/tegra-common/ap.c | 8 +- arch/arm/cpu/tegra-common/board.c | 23 +- arch/arm/cpu/tegra114-common/Makefile | 41 + arch/arm/cpu/tegra114-common/clock.c | 1150 ++++++++++++++++++++ arch/arm/cpu/tegra114-common/funcmux.c | 63 ++ arch/arm/cpu/tegra114-common/pinmux.c | 506 +++++++++ arch/arm/dts/tegra114.dtsi | 5 + arch/arm/include/asm/arch-tegra/clk_rst.h | 61 +- arch/arm/include/asm/arch-tegra/gp_padctrl.h | 1 + arch/arm/include/asm/arch-tegra/pmc.h | 12 + arch/arm/include/asm/arch-tegra/tegra.h | 3 +- arch/arm/include/asm/arch-tegra114/clock-tables.h | 402 +++++++ arch/arm/include/asm/arch-tegra114/clock.h | 24 + 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 | 304 ++++++ 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 | 26 + board/nvidia/common/board.c | 2 +- board/nvidia/dalmore/Makefile | 44 + board/nvidia/dalmore/dalmore.c | 39 + board/nvidia/dalmore/pinmux-config-dalmore.h | 249 +++++ board/nvidia/dts/tegra114-dalmore.dts | 13 + boards.cfg | 1 + include/configs/dalmore.h | 50 + include/configs/tegra114-common.h | 89 ++ 37 files changed, 4360 insertions(+), 39 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 create mode 100644 arch/arm/cpu/armv7/tegra114/Makefile create mode 100644 arch/arm/cpu/armv7/tegra114/config.mk 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 create mode 100644 arch/arm/dts/tegra114.dtsi 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 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 board/nvidia/dts/tegra114-dalmore.dts create mode 100644 include/configs/dalmore.h create mode 100644 include/configs/tegra114-common.h
PATCH 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.).
--- arch/arm/include/asm/arch-tegra/clk_rst.h | 61 ++- arch/arm/include/asm/arch-tegra/gp_padctrl.h | 1 + arch/arm/include/asm/arch-tegra/pmc.h | 12 + arch/arm/include/asm/arch-tegra/tegra.h | 3 +- arch/arm/include/asm/arch-tegra114/clock-tables.h | 402 +++++++++++++ arch/arm/include/asm/arch-tegra114/clock.h | 24 + 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 | 304 ++++++++++ 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 | 26 + 15 files changed, 1637 insertions(+), 6 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 +56 -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 */
@@ -199,8 +226,13 @@ enum { };/* CLK_RST_CONTROLLER_OSC_CTRL_0 */ +#if defined(CONFIG_TEGRA20 )#define OSC_FREQ_SHIFT 30#define OSC_FREQ_MASK (3U << OSC_FREQ_SHIFT) +#else /* Tegra30, Tegra114 */ +#define OSC_FREQ_SHIFT 28 +#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +#endif #define OSC_XOBP_SHIFT 1#define OSC_XOBP_MASK (1U << OSC_XOBP_SHIFT)
@@ -281,4 +313,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 +12 -0
@@ -127,6 +127,18 @@ struct pmc_ctlr {#define PARTID_CP 0xFFFFFFF8#define START_CP (1 << 8) +#define CPUPWRREQ_POL (1 << 15)#define CPUPWRREQ_OE (1 << 16) +#define CRAILID (0) +#define CELPID (12) +#define CE0ID (14) +#define C0NCID (15) +#define C1NCID (16) +#define CRAIL (1 << CRAILID) +#define CELP (1 << CELPID) +#define CE0 (1 << CE0ID) +#define C0NC (1 << C0NCID) +#define C1NC (1 << C1NCID) +#endif /* PMC_H */
arch/arm/include/asm/arch-tegra/tegra.h +2 -1
@@ -73,6 +73,7 @@ enum {SKU_ID_AP25E =0x1b ,SKU_ID_T25E =0x1c ,SKU_ID_T30 =0x81 ,/* Cardhu value */ + SKU_ID_T114 = 0x00, /* Dalmore value */ };/*
@@ -85,7 +86,7 @@ enum {TEGRA_SOC_T20 ,TEGRA_SOC_T25 ,TEGRA_SOC_T30 , -TEGRA_SOC2_SLOW ,/* T2x needs to run@slow clock initially */ +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 +24 -0
@@ -0,0 +1,24 @@ +/* +* Copyright (c) 2010-2012, 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> + +#endif /* _TEGRA114_CLOCK_H_ */
arch/arm/include/asm/arch-tegra114/flow.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (c) 2010-2012, 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-2012, 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 +304 -0
304 lines not on this page · raw message
arch/arm/include/asm/arch-tegra114/hardware.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (c) 2010-2012, 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-2012, 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-2012, 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 +26 -0
@@ -0,0 +1,26 @@ +/* +* Copyright (c) 2010-2012, 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 6116/* 12 bytes from end of BCT */ + +#endif /* TEGRA114_H */
Signature · 1 line
1.7.0.4
PATCH 1/7 Tegra114: Add arch-tegra114 include files
arch/arm/include/asm/arch-tegra114/gpio.h
Quoted 6 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.).
arch/arm/include/asm/arch-tegra114/gpio.h +0
-0
I think the Tegra30 and Tegra114 GPIO controllers are basically identical. Can this file be shared at all?
arch/arm/include/asm/arch-tegra114/tegra.h
Quoted 3 lines
arch/arm/include/asm/arch-tegra114/tegra.h +1
-0+#define BCT_ODMDATA_OFFSET 6116/* 12 bytes from end of BCT */
That's the Tegra30 value. I'm pretty sure the Tegra30 and Tegra114 BCTs are laid out very differently, so this value isn't valid.
PATCH 1/7 Tegra114: Add arch-tegra114 include files
Stephen,
Quoted 11 lines · Stephen Warren
arch/arm/include/asm/arch-tegra114/gpio.h
Quoted 6 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.).
arch/arm/include/asm/arch-tegra114/gpio.h +0
-0I think the Tegra30 and Tegra114 GPIO controllers are basically identical. Can this file be shared at all?
gpio.h is identical for T30 and T114, but not for T20. I've already commonized what I could in arch-tegra/gpio.h, but to do the same for the gpio_ctlr struct and gpio_pin enums would involve #ifdefs, which is moving in the wrong direction, IMO. If you have a way to share one or two files between T20/T30/T114/future SoCs, I'll give it a try.
Quoted 7 lines
arch/arm/include/asm/arch-tegra114/tegra.h
Quoted 3 lines
arch/arm/include/asm/arch-tegra114/tegra.h +1
-0+#define BCT_ODMDATA_OFFSET 6116/* 12 bytes from end of BCT */ That's the Tegra30 value. I'm pretty sure the Tegra30 and Tegra114 BCTs are laid out very differently, so this value isn't valid.
True, and I have a fix (T114 BIT pointers moved, as did the BCT ODMDATA offset - I'd assumed they'd stay the same since T30 and T114 are so similar). It'll be in V2.
Thanks,
Tom
PATCH 1/7 Tegra114: Add arch-tegra114 include files
Quoted 15 lines · Tom Warren
Stephen,
Quoted 11 lines · Stephen Warren
arch/arm/include/asm/arch-tegra114/gpio.h
Quoted 6 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.).
arch/arm/include/asm/arch-tegra114/gpio.h +0
-0I think the Tegra30 and Tegra114 GPIO controllers are basically identical. Can this file be shared at all?
Quoted 5 lines
gpio.his identical for T30 and T114, but not for T20. I've already commonized what I could inarch-tegra/gpio.h, but to do the same for thegpio_ctlrstruct andgpio_pinenums would involve #ifdefs, which is moving in the wrong direction, IMO. If you have a way to share one or two files between T20/T30/T114/future SoCs, I'll give it a try.
This may not work well for U-Boot since it uses structs to define the register layouts rather than simply #defining the various register addresses, but:
We use the exact same driver code for Tegra20/30/114. The difference in register layout between Tegra20/30 can be described algorithmically with the following data:
Quoted 15 lines
struct tegra_gpio_soc_config { u32 bank_stride; u32 upper_offset; };static struct tegra_gpio_soc_config tegra20_gpio_config = { .bank_stride = 0x80, .upper_offset = 0x800, };static struct tegra_gpio_soc_config tegra30_gpio_config = { .bank_stride = 0x100, .upper_offset = 0x80, };
Quoted 5 lines
static struct of_device_id tegra_gpio_of_match[] = {
{ .compatible = "nvidia,tegra30-gpio", .data = &tegra30_gpio_config },
{ .compatible = "nvidia,tegra20-gpio", .data = &tegra20_gpio_config },
{ },
};which feeds into a few register offset #defines:
Quoted 1 line
#define
GPIO_REG(x)(GPIO_BANK(x)*tegra_gpio_bank_stride+ \
...
Quoted 1 line
#define
GPIO_CNF(x)(GPIO_REG(x)+0x00)
...
Quoted 1 line
#define
GPIO_MSK_CNF(x)(GPIO_REG(x)+tegra_gpio_upper_offset+0x00)
Alternatively, can the Tegra114 GPIO header simply #include the Tegra30 GPIO header and do nothing else, via some relative include or similar? I'm not sure how gross that'd turn out to be.
PATCH 1/7 Tegra114: Add arch-tegra114 include files
Stephen,
Quoted 54 lines · Stephen Warren
Quoted 15 lines · Tom Warren
Stephen,
Quoted 11 lines · Stephen Warren
arch/arm/include/asm/arch-tegra114/gpio.h
Quoted 6 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.).
arch/arm/include/asm/arch-tegra114/gpio.h +0
-0I think the Tegra30 and Tegra114 GPIO controllers are basically identical. Can this file be shared at all?
Quoted 5 lines
gpio.his identical for T30 and T114, but not for T20. I've already commonized what I could inarch-tegra/gpio.h, but to do the same for thegpio_ctlrstruct andgpio_pinenums would involve #ifdefs, which is moving in the wrong direction, IMO. If you have a way to share one or two files between T20/T30/T114/future SoCs, I'll give it a try.This may not work well for U-Boot since it uses structs to define the register layouts rather than simply #defining the various register addresses, but:
We use the exact same driver code for Tegra20/30/114. The difference in register layout between Tegra20/30 can be described algorithmically with the following data:
Quoted 15 lines
struct tegra_gpio_soc_config { u32 bank_stride; u32 upper_offset; };static struct tegra_gpio_soc_config tegra20_gpio_config = { .bank_stride = 0x80, .upper_offset = 0x800, };static struct tegra_gpio_soc_config tegra30_gpio_config = { .bank_stride = 0x100, .upper_offset = 0x80, };Quoted 5 lines
static struct of_device_id tegra_gpio_of_match[] = { { .compatible = "nvidia,tegra30-gpio", .data = &tegra30_gpio_config }, { .compatible = "nvidia,tegra20-gpio", .data = &tegra20_gpio_config }, { }, };which feeds into a few register offset #defines:
Quoted 1 line
#define
GPIO_REG(x)(GPIO_BANK(x)*tegra_gpio_bank_stride+ \
Quoted 8 lines
...
Quoted 1 line
#define
GPIO_CNF(x)(GPIO_REG(x)+0x00)...
Quoted 1 line
#define
GPIO_MSK_CNF(x)(GPIO_REG(x)+tegra_gpio_upper_offset+0x00)Alternatively, can the Tegra114 GPIO header simply #include the Tegra30 GPIO header and do nothing else, via some relative include or similar? I'm not sure how gross that'd turn out to be.
I don't see the value in rewriting the Tegra GPIO driver right now - maybe after T30 and T114 are more mature and there's more bandwidth.
#including the T30 gpio header is easier. I'll do that in V2.
Thanks
PATCH 1/7 Tegra114: Add arch-tegra114 include files
In reply to Tom WarrenQuoted 8 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.).
Signed-off-by Tom Warren <[email protected]>---
arch/arm/include/asm/arch-tegra/clk_rst.h enum { · line 235
Quoted 7 lines
arch/arm/include/asm/arch-tegra/clk_rst.h +5
-0+#if defined(CONFIG_TEGRA20 )#define OSC_FREQ_SHIFT 30#define OSC_FREQ_MASK (3U << OSC_FREQ_SHIFT) +#else /* Tegra30, Tegra114 */ +#define OSC_FREQ_SHIFT 28 +#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +#endif
Can this be a new define instead of a #ifdef? That makes it easier in the future to make a single u-boot to boot on all tegras.
arch/arm/include/asm/arch-tegra/tegra.h enum { · line 77
Quoted 9 lines
index 953936c..670745f 100644
arch/arm/include/asm/arch-tegra/tegra.h +1
-0@@ -73,6 +73,7 @@ enum {SKU_ID_AP25E =0x1b ,SKU_ID_T25E =0x1c ,SKU_ID_T30 =0x81 ,/* Cardhu value */ + SKU_ID_T114 = 0x00, /* Dalmore value */ };
Is that really the proper SKU id? Or is it just unprogrammed on the early chips?
arch/arm/include/asm/arch-tegra114/clock.h line 2
Quoted 8 lines
arch/arm/include/asm/arch-tegra114/clock.h new file +2
-0@@ -0,0 +1,24 @@ +/* +* Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
2013, here and all new files
-Allen
Signature · 1 line
nvpublic
PATCH 1/7 Tegra114: Add arch-tegra114 include files
Allen,
Quoted 9 lines · Allen Martin
Quoted 7 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.).
Signed-off-by Tom Warren <[email protected]>---
Quoted 10 lines
arch/arm/include/asm/arch-tegra/clk_rst.h enum { · line 235
Quoted 7 lines
arch/arm/include/asm/arch-tegra/clk_rst.h +5
-0+#if defined(CONFIG_TEGRA20 )#define OSC_FREQ_SHIFT 30#define OSC_FREQ_MASK (3U << OSC_FREQ_SHIFT) +#else /* Tegra30, Tegra114 */ +#define OSC_FREQ_SHIFT 28 +#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +#endif Can this be a new define instead of a #ifdef? That makes it easier in the future to make a single u-boot to boot on all tegras.
I could move it to a SoC-specific header (arch-tegraXX/clock.h, for instance). Would that do?
Quoted 14 lines
arch/arm/include/asm/arch-tegra/tegra.h enum { · line 77
Quoted 11 lines
index 953936c..670745f 100644
arch/arm/include/asm/arch-tegra/tegra.h +1
-0@@ -73,6 +73,7 @@ enum {SKU_ID_AP25E =0x1b ,SKU_ID_T25E =0x1c ,SKU_ID_T30 =0x81 ,/* Cardhu value */ + SKU_ID_T114 = 0x00, /* Dalmore value */ };Is that really the proper SKU id? Or is it just unprogrammed on the early chips?
AFAIK, it's unprogrammed - it's what I get when I read the sku_id reg on my board. I haven't found any documentation about what these'll be in the future or for other boards. This works for now - could you verify that your Dalmore has the same ID?
Quoted 13 lines
arch/arm/include/asm/arch-tegra114/clock.h line 2
Quoted 11 lines
arch/arm/include/asm/arch-tegra114/clock.h new file +2
-0@@ -0,0 +1,24 @@ +/* +* Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. 2013, here and all new files
Yeah, crap. Meant to do that before sending. I'll correct 'em all in V2 of the patchset.
Thanks!
Quoted 4 lines
-Allen
--
nvpublic
PATCH 2/7 Tegra114: Add AVP (arm720t) files
In reply to Tom WarrenThis provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
--- arch/arm/cpu/arm720t/tegra-common/cpu.c | 23 ++- arch/arm/cpu/arm720t/tegra-common/cpu.h | 13 +- arch/arm/cpu/arm720t/tegra114/Makefile | 42 ++++ arch/arm/cpu/arm720t/tegra114/config.mk | 19 ++ arch/arm/cpu/arm720t/tegra114/cpu.c | 328 +++++++++++++++++++++++++++++++ 5 files changed, 411 insertions(+), 14 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 +12 -11
@@ -40,7 +40,7 @@ enum tegra_family_t get_family(void) chip_id = reg >>8 ; chip_id &=0xff ;debug (" tegra_get_family: chip_id = %x\n" , chip_id); -if (chip_id ==0x30 ) +if (chip_id >=0x30 )return TEGRA_FAMILY_T3x;else return TEGRA_FAMILY_T2x;
@@ -56,6 +56,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 */
@@ -76,11 +77,11 @@ struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { { 700, 13, 0, 8}, }, -/* TEGRA_SOC2_SLOW: 312 MHz */ - {{ 312, 13, 0, 12}, /* OSC 13M */ - { 260, 16, 0, 8}, /* OSC 19.2M */ - { 312, 12, 0, 12}, /* OSC 12M */ - { 312, 26, 0, 12}, /* OSC 26M */ +/* T114: 1.4 GHz */ + {{ 862, 8, 0, 8}, + { 583, 8, 0, 4}, + { 696, 12, 0, 8}, + { 700, 13, 0, 8}, }, };
@@ -166,8 +167,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 ) {debug (" init_pllx: adjusting PLLP out freqs\n" );adjust_pllp_out_freqs (); }
@@ -203,7 +204,7 @@ void enable_cpu_clock(int enable)*/ clk =readl (&clkrst->crc_clk_cpu_cmplx); clk |=1 <<CPU1_CLK_STP_SHIFT ; -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 ) clk |=1 <<CPU2_CLK_STP_SHIFT ; clk |=1 <<CPU3_CLK_STP_SHIFT ;#endif
@@ -308,7 +309,7 @@ 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 ) +if (tegra_get_chip_type () >=TEGRA_SOC_T30 ) src =CLK_DIVIDER (NVBL_PLLP_KHZ ,204000 );else src =CLK_DIVIDER (NVBL_PLLP_KHZ ,144000 );
@@ -318,7 +319,7 @@ void clock_enable_coresight(int enable) rst =CORESIGHT_UNLOCK ;writel (rst,CSITE_CPU_DBG0_LAR );writel (rst,CSITE_CPU_DBG1_LAR ); -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 )writel (rst,CSITE_CPU_DBG2_LAR );writel (rst,CSITE_CPU_DBG3_LAR );#endif
arch/arm/cpu/arm720t/tegra-common/cpu.h +10 -3
@@ -22,14 +22,21 @@*/ #include <asm/types.h> +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif +/* Stabilization delays, in usec */ #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) +#else /* Tegra30/Tegra114 */ +#define NVBL_PLLP_KHZ (408000)#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-2012, 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 +328 -0
328 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 2/7 Tegra114: Add AVP (arm720t) files
arch/arm/cpu/arm720t/tegra-common/cpu.c enum tegra_family_t get_family(void) · line 46
Quoted 10 lines · Tom Warren
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1-if (chip_id ==0x30 ) +if (chip_id >=0x30 )return TEGRA_FAMILY_T3x;else return TEGRA_FAMILY_T2x;
Shouldn't that comparison use CHIPID_TEGRA30?
Shouldn't there be a TEGRA_FAMILY_T11x for Tegra114; anything that cares about >=Tegra30 can compare the family with >= not ==.
Hmm. It seems the only use of the FAMILY value is get_num_cpus() right below; why not have that just switch on the same chip_id variable that everything else uses?
arch/arm/cpu/arm720t/tegra-common/cpu.h line 30
Quoted 8 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +6
-0+#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif
Surely those are in a standard header somewhere; we shouldn't create yet another duplicate of them.
arch/arm/cpu/arm720t/tegra114/cpu.c line 234
Quoted 9 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +6
-0+static int is_partition_powered (u32 mask) + reg =readl (&pmc->pmc_pwrgate_status); +if ((reg & mask) == mask) +return TRUE; + +return FALSE;
The last 4 lines are just "return reg & mask;" or "return (reg & mask) == mask;". Same in the next function.
arch/arm/cpu/arm720t/tegra114/cpu.c line 281
Quoted 6 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +6
-0+void powerup_cpus (void ) +{ +debug ("powerup_cpus entry\n" ); + +/* Are we booting to the fast cluster? */ +if (get_cluster_id () ==0 ) {
Why would we ever boot on anything other than the fast cluster? I would assume that the kernel assume it will always get booted on the fast cluster, which would then imply that U-Boot had to boot on or switch to the fast cluster.
PATCH 2/7 Tegra114: Add AVP (arm720t) files
Stephen,
Quoted 12 lines · Stephen Warren
arch/arm/cpu/arm720t/tegra-common/cpu.c enum tegra_family_t get_family(void) · line 46
Quoted 10 lines · Tom Warren
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1-if (chip_id ==0x30 ) +if (chip_id >=0x30 )return TEGRA_FAMILY_T3x;else return TEGRA_FAMILY_T2x;
Quoted 8 lines
Shouldn't that comparison use
CHIPID_TEGRA30?Shouldn't there be a
TEGRA_FAMILY_T11xfor Tegra114; anything that cares about >=Tegra30 can compare the family with >= not ==.Hmm. It seems the only use of the FAMILY value is
get_num_cpus()right below; why not have that just switch on the samechip_idvariable that everything else uses?
Sure, I can refine this code. I didn't want to spend too much time obsessively polishing my 'precious' and miss the upstreaming dates I'd committed to.
But it's worth a look for V2.
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h line 30
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +6
-0+#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif Surely those are in a standard header somewhere; we shouldn't create yet another duplicate of them.
Couldn't find 'em on a quick search (grep define.TRUE) except in places like scsi.h and ext4_common.h and fpga.h. If you have a standard header that you know of, let me know.
Quoted 5 lines
Quoted 4 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +1
-0+static int is_partition_powered (u32 mask)
Quoted 8 lines
arch/arm/cpu/arm720t/tegra114/cpu.c line 234
Quoted 5 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +5
-0+ reg =readl (&pmc->pmc_pwrgate_status); +if ((reg & mask) == mask) +return TRUE; + +return FALSE;The last 4 lines are just "return reg & mask;" or "return (reg & mask) == mask;". Same in the next function.
I'm porting internal bootloader bringup code here, and trying to avoid unnecessary changes, but I can modify these to remove the TRUE/FALSE in V2.
Quoted 13 lines
arch/arm/cpu/arm720t/tegra114/cpu.c line 281
Quoted 7 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +6
-0+void powerup_cpus (void ) +{ +debug ("powerup_cpus entry\n" ); + +/* Are we booting to the fast cluster? */ +if (get_cluster_id () ==0 ) {Why would we ever boot on anything other than the fast cluster? I would assume that the kernel assume it will always get booted on the fast cluster, which would then imply that U-Boot had to boot on or switch to the fast cluster.
Again, this is from internal NV bootloader code that I know works. I don't know the circumstances where we might be booted on the LP cluster, but I figured if the internal bootloader code thought it worth checking, so should I. If you have unimpeachable evidence to the contrary, I can optimize this out.
Tom
PATCH 2/7 Tegra114: Add AVP (arm720t) files
Quoted 19 lines · Tom Warren
Stephen,
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Tom Warren
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
arch/arm/cpu/arm720t/tegra-common/cpu.h +0
-0Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h line 30
Quoted 6 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +6
-0+#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif Surely those are in a standard header somewhere; we shouldn't create yet another duplicate of them.
Quoted 3 lines
Couldn't find 'em on a quick search (grep define.TRUE) except in places like
scsi.handext4_common.handfpga.h. If you have a standard header that you know of, let me know.
Hmmm. Further investigation shows it is indeed once of those standard things that isn't actually defined anywhere standard:-(
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +6
-0+static int is_partition_powered (u32 mask) + reg =readl (&pmc->pmc_pwrgate_status); +if ((reg & mask) == mask) +return TRUE; + +return FALSE;
Quoted 6 lines
Quoted 2 lines
The last 4 lines are just "return reg & mask;" or "return (reg & mask) == mask;". Same in the next function.
I'm porting internal bootloader bringup code here, and trying to avoid unnecessary changes, but I can modify these to remove the TRUE/FALSE in V2.
I don't think our downstream code is relevant for upstreaming; changes sent upstream should be clean/minimal/standalone. In fact, I find upstreaming a good time to explicitly remove/clean-up all the cruft that has accumulated downstream, which wasn't always thought through thoroughly.
Quoted 12 lines
Quoted 11 lines
arch/arm/cpu/arm720t/tegra114/cpu.c line 281
Quoted 6 lines
arch/arm/cpu/arm720t/tegra114/cpu.c +6
-0+void powerup_cpus (void ) +{ +debug ("powerup_cpus entry\n" ); + +/* Are we booting to the fast cluster? */ +if (get_cluster_id () ==0 ) {Why would we ever boot on anything other than the fast cluster? I would assume that the kernel assume it will always get booted on the fast cluster, which would then imply that U-Boot had to boot on or switch to the fast cluster.
Quoted 5 lines
Again, this is from internal NV bootloader code that I know works. I don't know the circumstances where we might be booted on the LP cluster, but I figured if the internal bootloader code thought it worth checking, so should I. If you have unimpeachable evidence to the contrary, I can optimize this out.
I think it's more that if we don't have concrete evidence that the code is needed, we shouldn't bloat usptream with cruft.
PATCH 2/7 Tegra114: Add AVP (arm720t) files
In reply to Tom WarrenQuoted 20 lines · Tom Warren
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
Signed-off-by Tom Warren <[email protected]>--- arch/arm/cpu/arm720t/tegra-common/cpu.c | 23 ++- arch/arm/cpu/arm720t/tegra-common/cpu.h | 13 +- arch/arm/cpu/arm720t/tegra114/Makefile | 42 ++++ arch/arm/cpu/arm720t/tegra114/config.mk | 19 ++ arch/arm/cpu/arm720t/tegra114/cpu.c | 328 +++++++++++++++++++++++++++++++ 5 files changed, 411 insertions(+), 14 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.carch/arm/cpu/arm720t/tegra-common/cpu.c +0
-0
arch/arm/cpu/arm720t/tegra-common/cpu.c enum tegra_family_t get_family(void) · line 43
Quoted 5 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1@@ -40,7 +40,7 @@ enum tegra_family_t get_family(void) chip_id = reg >>8 ; chip_id &=0xff ;debug (" tegra_get_family: chip_id = %x\n" , chip_id); -if (chip_id ==0x30 ) +if (chip_id >=0x30 )
Should this be CHIPID_TEGRA30? And it would probably be better to do:
if (chipid == CHIPID_TEGRA30 || chipid == CHIPID_TEGRA114)
return TEGRA_FAMILY_T3x;
else if (chipid == CHIPID_TEGRA20)
return TEGRA_FAMILY_T2x;
else
fail;That forces the person doing the support for the next tegra chip to have to make a conscious decision about what to do here.
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-0return TEGRA_FAMILY_T3x; else return TEGRA_FAMILY_T2x;@@ -56,6 +56,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 */
arch/arm/cpu/arm720t/tegra-common/cpu.c struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { · line 83
Quoted 8 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +0
-5@@ -76,11 +77,11 @@ struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { { 700, 13, 0, 8}, }, -/* TEGRA_SOC2_SLOW: 312 MHz */ - {{ 312, 13, 0, 12}, /* OSC 13M */ - { 260, 16, 0, 8}, /* OSC 19.2M */ - { 312, 12, 0, 12}, /* OSC 12M */ - { 312, 26, 0, 12}, /* OSC 26M */
Removing TEGRA_SOC2_SLOW should probably be a separate patch, since it doesn't hae anything to do with t114.
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +5
-0+/* T114: 1.4 GHz */ + {{ 862, 8, 0, 8}, + { 583, 8, 0, 4}, + { 696, 12, 0, 8}, + { 700, 13, 0, 8}, }, };
arch/arm/cpu/arm720t/tegra-common/cpu.c void init_pllx(void) · line 171
Quoted 7 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +2
-2@@ -166,8 +167,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 ) {
same comment here about >= T30
arch/arm/cpu/arm720t/tegra-common/cpu.c void enable_cpu_clock(int enable) · line 207
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1debug (" init_pllx: adjusting PLLP out freqs\n" );adjust_pllp_out_freqs (); }@@ -203,7 +204,7 @@ void enable_cpu_clock(int enable)*/ clk =readl (&clkrst->crc_clk_cpu_cmplx); clk |=1 <<CPU1_CLK_STP_SHIFT ; -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 )
Can this be runtime instead of #ifdef?
arch/arm/cpu/arm720t/tegra-common/cpu.c void clock_enable_coresight(int enable) · line 312
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1clk |=1 <<CPU2_CLK_STP_SHIFT ; clk |=1 <<CPU3_CLK_STP_SHIFT ;#endif @@ -308,7 +309,7 @@ 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 ) +if (tegra_get_chip_type () >=TEGRA_SOC_T30 )
same comment here about >= T30
arch/arm/cpu/arm720t/tegra-common/cpu.c void clock_enable_coresight(int enable) · line 322
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1src =CLK_DIVIDER (NVBL_PLLP_KHZ ,204000 ); else src =CLK_DIVIDER (NVBL_PLLP_KHZ ,144000 );@@ -318,7 +319,7 @@ void clock_enable_coresight(int enable) rst =CORESIGHT_UNLOCK ;writel (rst,CSITE_CPU_DBG0_LAR );writel (rst,CSITE_CPU_DBG1_LAR ); -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 )
same comment here about runtime vs ifdef
Quoted 8 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +0
-0writel (rst,CSITE_CPU_DBG2_LAR );writel (rst,CSITE_CPU_DBG3_LAR );#endif arch/arm/cpu/arm720t/tegra-common/cpu.h +0
-0
arch/arm/cpu/arm720t/tegra-common/cpu.h line 31
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +7
-0@@ -22,14 +22,21 @@*/ #include <asm/types.h> +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif +
u-boot seems a little inconsistent here, but it looks like most of u-boot uses C99 "true" and "false"
arch/arm/cpu/arm720t/tegra-common/cpu.h line 40
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +3
-3/* Stabilization delays, in usec */ #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) +#else /* Tegra30/Tegra114 */ +#define NVBL_PLLP_KHZ (408000)#endif
Again here it's probably better to explicitly do:
#if defined(CONFIG_TEGRA20)
...
#elsif defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA114)
...
#else
#error "unknown tegra chip"
#endif
Or better yet, make it runtime if possible.
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 6 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +6
-0+ +/* Set polarity to 0 (normal) and enable CPUPWRREQ_OE */ + reg =readl (&pmc->pmc_cntrl); + reg &= ~(CPUPWRREQ_POL ); + reg |=CPUPWRREQ_OE ; +writel (reg, &pmc->pmc_cntrl);
clrsetbits_le32() instead?
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 11 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +11
-0+ +/* +* Set CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2_0_CAR2PMC_CPU_ACK_WIDTH +* to 408 to satisfy the requirement of having at least 16 CPU clock +* cycles before clamp removal. +*/ + + reg =readl (&clkrst->crc_cpu_softrst_ctrl2); + reg &=0xFFFFF000 ;/* bits 11:0 */ + reg |=408 ; +writel (reg, &clkrst->crc_cpu_softrst_ctrl2);
clrsetbits_le32() instead?
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 4 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +4
-0+ val = (0 <<CLK_SYS_RATE_HCLK_DISABLE_SHIFT ) | + (1 <<CLK_SYS_RATE_AHB_RATE_SHIFT ) | + (0 <<CLK_SYS_RATE_PCLK_DISABLE_SHIFT ) | + (0 <<CLK_SYS_RATE_APB_RATE_SHIFT );
Remove the 0's?
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 2 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +2
-0+writel (val, &clkrst->crc_clk_sys_rate); +
-Allen
Signature · 1 line
nvpublic
PATCH 2/7 Tegra114: Add AVP (arm720t) files
Allen,
Quoted 37 lines · Allen Martin
Quoted 20 lines · Tom Warren
This provides SPL support for T114 boards - AVP early init, plus CPU (A15) init/jump to main U-Boot.
Signed-off-by Tom Warren <[email protected]>--- arch/arm/cpu/arm720t/tegra-common/cpu.c | 23 ++- arch/arm/cpu/arm720t/tegra-common/cpu.h | 13 +- arch/arm/cpu/arm720t/tegra114/Makefile | 42 ++++ arch/arm/cpu/arm720t/tegra114/config.mk | 19 ++ arch/arm/cpu/arm720t/tegra114/cpu.c | 328 +++++++++++++++++++++++++++++++ 5 files changed, 411 insertions(+), 14 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.carch/arm/cpu/arm720t/tegra-common/cpu.c +0
-0arch/arm/cpu/arm720t/tegra-common/cpu.c enum tegra_family_t get_family(void) · line 43
Quoted 5 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1@@ -40,7 +40,7 @@ enum tegra_family_t get_family(void) chip_id = reg >>8 ; chip_id &=0xff ;debug (" tegra_get_family: chip_id = %x\n" , chip_id); -if (chip_id ==0x30 ) +if (chip_id >=0x30 )Should this be
CHIPID_TEGRA30? And it would probably be better to do:if (chipid ==
CHIPID_TEGRA30|| chipid ==CHIPID_TEGRA114)return TEGRA_FAMILY_T3x; else if (chipid == CHIPID_TEGRA20) return TEGRA_FAMILY_T2x; else fail;
Quoted 2 lines
That forces the person doing the support for the next tegra chip to have to make a conscious decision about what to do here.
Sounds good, will do in V2.
Quoted 17 lines
Quoted 17 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-0return TEGRA_FAMILY_T3x; else return TEGRA_FAMILY_T2x;@@ -56,6 +56,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 */ @@ -76,11 +77,11 @@ struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { { 700, 13, 0, 8}, },
Quoted 8 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c struct clk_pll_table tegra_pll_x_table[TEGRA_SOC_CNT][CLOCK_OSC_FREQ_COUNT] = { · line 83
Quoted 5 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +0
-5-/* TEGRA_SOC2_SLOW: 312 MHz */ - {{ 312, 13, 0, 12}, /* OSC 13M */ - { 260, 16, 0, 8}, /* OSC 19.2M */ - { 312, 12, 0, 12}, /* OSC 12M */ - { 312, 26, 0, 12}, /* OSC 26M */Removing
TEGRA_SOC2_SLOWshould probably be a separate patch, since it doesn't hae anything to do with t114.
I did this in one of my patchset revisions for the T30 baseline code, but it crept back in somehow when I got around to looking at T114 support.
I can make a separate patch and slip it in the /next on top of the current commits, before I apply the T114 stuff if it's cleaner for you.
Quoted 13 lines
Quoted 13 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +5
-0+/* T114: 1.4 GHz */ + {{ 862, 8, 0, 8}, + { 583, 8, 0, 4}, + { 696, 12, 0, 8}, + { 700, 13, 0, 8}, }, };@@ -166,8 +167,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);
Quoted 6 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c void init_pllx(void) · line 171
Quoted 4 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +2
-2-/* 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 ) {same comment here about >= T30
Will do.
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c void enable_cpu_clock(int enable) · line 207
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1debug (" init_pllx: adjusting PLLP out freqs\n" );adjust_pllp_out_freqs (); }@@ -203,7 +204,7 @@ void enable_cpu_clock(int enable)*/ clk =readl (&clkrst->crc_clk_cpu_cmplx); clk |=1 <<CPU1_CLK_STP_SHIFT ; -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 )Can this be runtime instead of #ifdef?
Not sure what you mean by runtime - this is common code. Are you asking to make it based on a num_cpus variable, etc.?
if (num_cpus > 2)
clk |= (1 << CPU2_CLK_STP_SHIFT) + (1 << CPU3_CLK_STP_SHIFT);
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c void clock_enable_coresight(int enable) · line 312
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1clk |=1 <<CPU2_CLK_STP_SHIFT ; clk |=1 <<CPU3_CLK_STP_SHIFT ;#endif @@ -308,7 +309,7 @@ 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 ) +if (tegra_get_chip_type () >=TEGRA_SOC_T30 )same comment here about >= T30
Will do.
Quoted 24 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c void clock_enable_coresight(int enable) · line 322
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +1
-1src =CLK_DIVIDER (NVBL_PLLP_KHZ ,204000 ); else src =CLK_DIVIDER (NVBL_PLLP_KHZ ,144000 );@@ -318,7 +319,7 @@ void clock_enable_coresight(int enable) rst =CORESIGHT_UNLOCK ;writel (rst,CSITE_CPU_DBG0_LAR );writel (rst,CSITE_CPU_DBG1_LAR ); -#if defined(CONFIG_TEGRA30 ) +#if defined(CONFIG_TEGRA30 ) || defined(CONFIG_TEGRA114 )same comment here about runtime vs ifdef
Quoted 11 lines
arch/arm/cpu/arm720t/tegra-common/cpu.c +0
-0writel (rst,CSITE_CPU_DBG2_LAR );writel (rst,CSITE_CPU_DBG3_LAR );#endif arch/arm/cpu/arm720t/tegra-common/cpu.h +0
-0@@ -22,14 +22,21 @@*/ #include <asm/types.h>
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h line 31
Quoted 7 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +7
-0+#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif +u-boot seems a little inconsistent here, but it looks like most of u-boot uses C99 "true" and "false"
Can you point to a header to include to get this? Or same code? Thanks.
Quoted 25 lines
Quoted 4 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +0
-0/* Stabilization delays, in usec */ #define PLL_STABILIZATION_DELAY (300)arch/arm/cpu/arm720t/tegra-common/cpu.h line 40
Quoted 10 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +3
-3#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) +#else /* Tegra30/Tegra114 */ +#define NVBL_PLLP_KHZ (408000)#endif Again here it's probably better to explicitly do:
#if
defined(CONFIG_TEGRA20)
...
#elsifdefined(CONFIG_TEGRA30)||defined(CONFIG_TEGRA114)
...
#else
#error "unknown tegra chip"
#endif
Quoted 1 line
Or better yet, make it runtime if possible.
Again, I always try to make changes as minimally as possible, but I haven't thought too much about the next SoC port (probably because I'll likely be doing it, too).
But it's probably worth changing this to flag things like that, so I'll do it in V2.
Quoted 9 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 7 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +6
-0+ +/* Set polarity to 0 (normal) and enable CPUPWRREQ_OE */ + reg =readl (&pmc->pmc_cntrl); + reg &= ~(CPUPWRREQ_POL ); + reg |=CPUPWRREQ_OE ; +writel (reg, &pmc->pmc_cntrl);
clrsetbits_le32()instead?
Yeah, I have a note to go thru the T30/T114 init code and change all of these to set/clrbits_le32() where possible. I'll do that for V2 for T114 and if any crop up in T30-only code, I'll submit a new patch for that.
Quoted 16 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 12 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +11
-0+ +/* +* Set CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2_0_CAR2PMC_CPU_ACK_WIDTH +* to 408 to satisfy the requirement of having at least 16 CPU clock +* cycles before clamp removal. +*/ + + reg =readl (&clkrst->crc_cpu_softrst_ctrl2); + reg &=0xFFFFF000 ;/* bits 11:0 */ + reg |=408 ; +writel (reg, &clkrst->crc_cpu_softrst_ctrl2);
clrsetbits_le32()instead?
Quoted 6 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 4 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +4
-0+ val = (0 <<CLK_SYS_RATE_HCLK_DISABLE_SHIFT ) | + (1 <<CLK_SYS_RATE_AHB_RATE_SHIFT ) | + (0 <<CLK_SYS_RATE_PCLK_DISABLE_SHIFT ) | + (0 <<CLK_SYS_RATE_APB_RATE_SHIFT );Remove the 0's?
Yeah, that'd be cleaner. Again, ported from internal bootloader code.
Quoted 7 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h
Quoted 3 lines
arch/arm/cpu/arm720t/tegra-common/cpu.h +2
-0+writel (val, &clkrst->crc_clk_sys_rate); +-Allen
--
nvpublic
Thanks,
Tom
PATCH 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.
--- 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-2012, 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-2012, 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 4/7 Tegra114: Add common CPU (shared) files
In reply to Tom WarrenThese files are used by both SPL and main U-Boot.
--- arch/arm/cpu/tegra-common/ap.c | 8 +- arch/arm/cpu/tegra-common/board.c | 23 +- arch/arm/cpu/tegra114-common/Makefile | 41 ++ arch/arm/cpu/tegra114-common/clock.c | 1150 ++++++++++++++++++++++++++++++++ arch/arm/cpu/tegra114-common/funcmux.c | 63 ++ arch/arm/cpu/tegra114-common/pinmux.c | 506 ++++++++++++++ 6 files changed, 1787 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 +7 -1
@@ -42,7 +42,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 +68,12 @@ int tegra_get_chip_type(void)return TEGRA_SOC_T30 ; }break ; +case CHIPID_TEGRA114 : +switch (tegra_sku_id) { +case SKU_ID_T114 : +return TEGRA_SOC_T114 ; + } +break ; }/* unknown sku id */ return TEGRA_SOC_UNKNOWN ;
arch/arm/cpu/tegra-common/board.c +20 -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 */ +#elif defined(CONFIG_TEGRA30)/* bits 31:28 in OdmData are used for RAM size on T30 */ switch ((reg) >>28 ) {case 0 :
@@ -84,6 +86,8 @@ unsigned int query_sdram_size(void)case 8 : return 0x7ff00000; /* 2GB - 1MB */ } +#else +return 0x7ff00000 ;/* 2GB - 1MB */ #endif }
@@ -117,12 +121,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 +148,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 +172,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 +1150 -0
1,150 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 4/7 Tegra114: Add common CPU (shared) files
Quoted 14 lines · Tom Warren
These files are used by both SPL and main U-Boot.
arch/arm/cpu/tegra-common/board.c +1
-1@@ -68,7 +70,7 @@ unsigned int query_sdram_size(void)case 3 : return 0x40000000; /* 1GB */ } -#else /* Tegra30 */ +#elif defined(CONFIG_TEGRA30)/* bits 31:28 in OdmData are used for RAM size on T30 */ switch ((reg) >>28 ) {case 0 :
arch/arm/cpu/tegra-common/board.c unsigned int query_sdram_size(void) · line 90
Quoted 5 lines
arch/arm/cpu/tegra-common/board.c +2
-0@@ -84,6 +86,8 @@ unsigned int query_sdram_size(void)case 8 : return 0x7ff00000; /* 2GB - 1MB */ } +#else +return 0x7ff00000 ;/* 2GB - 1MB */
Indentation looks wrong.
I doubt all Tegra114 systems have 2GB RAM; is there no ODMDATA field allocated for the RAM size? I know there was some discussion of removing it from ODMDATA and simply reading a memory controller register, since the information was duplicated there.
arch/arm/cpu/tegra114-common/pinmux.c
Quoted 2 lines
arch/arm/cpu/tegra114-common/clock.c +0
-0arch/arm/cpu/tegra114-common/pinmux.c +0
-0
I didn't review those two files.
PATCH 4/7 Tegra114: Add common CPU (shared) files
Stephen,
Quoted 23 lines · Stephen Warren
Quoted 14 lines · Tom Warren
These files are used by both SPL and main U-Boot.
arch/arm/cpu/tegra-common/board.c +1
-1@@ -68,7 +70,7 @@ unsigned int query_sdram_size(void)case 3 : return 0x40000000; /* 1GB */ } -#else /* Tegra30 */ +#elif defined(CONFIG_TEGRA30)/* bits 31:28 in OdmData are used for RAM size on T30 */ switch ((reg) >>28 ) {case 0 :arch/arm/cpu/tegra-common/board.c unsigned int query_sdram_size(void) · line 90
Quoted 5 lines
arch/arm/cpu/tegra-common/board.c +2
-0@@ -84,6 +86,8 @@ unsigned int query_sdram_size(void)case 8 : return 0x7ff00000; /* 2GB - 1MB */ } +#else +return 0x7ff00000 ;/* 2GB - 1MB */ Indentation looks wrong.
Quoted 4 lines
I doubt all Tegra114 systems have 2GB RAM; is there no ODMDATA field allocated for the RAM size? I know there was some discussion of removing it from ODMDATA and simply reading a memory controller register, since the information was duplicated there.
See my previous reply. I hadn't thought T114 BITs/BCTs would change, but they did, and I finally found the ODMDATA location and have a fix for this (in V2). RAM size is the same as T30, AFAICT. The ODMDATA field I've been flashing with is 0x80098000, which s/b 2GB.
I'll poke around bugs and wikis before I send V2 to make sure my Dalmore is really 2GB and that the ODMDATA RAM field hasn't changed (although I remember an email thread w/HW about not changing it).
Quoted 5 lines
arch/arm/cpu/tegra114-common/pinmux.c
Quoted 3 lines
arch/arm/cpu/tegra114-common/clock.c +0
-0arch/arm/cpu/tegra114-common/pinmux.c +0
-0I didn't review those two files.
OK.
Tom
PATCH 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.).
--- 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 0x40000000>; + }; +};
Signature · 1 line
1.7.0.4
PATCH 5/7 Tegra114: Dalmore: Add DT files
board/nvidia/dts/tegra114-dalmore.dts line 12
Quoted 10 lines · Tom Warren
These 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.).
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };
Indeed, that says just 1GB...
PATCH 5/7 Tegra114: Dalmore: Add DT files
Stephen,
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Tom Warren
These 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.).
Quoted 9 lines
board/nvidia/dts/tegra114-dalmore.dts line 12
Quoted 6 lines
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };Indeed, that says just 1GB...
True, but that's what's in current Cardhu DTS, and Harmony, Seaboard, and Ventana DTS files. Only Whistler has 0x20000000 (512MB).
How is this used, and how do we keep it in sync with what's really on the board/in the ODMDATA field?
Tom
PATCH 5/7 Tegra114: Dalmore: Add DT files
Quoted 15 lines · Tom Warren
Stephen,
Quoted 12 lines · Stephen Warren
Quoted 10 lines · Tom Warren
These 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.).
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };
Quoted 8 lines
Quoted 2 lines
Indeed, that says just 1GB...
True, but that's what's in current Cardhu DTS, and Harmony, Seaboard, and Ventana DTS files. Only Whistler has
0x20000000(512MB).How is this used, and how do we keep it in sync with what's really on the board/in the ODMDATA field?
I don't believe U-Boot uses that property from the DT. Probably the DT isn't parsed early enough for it to be useful. But if we add it to the .dts file, it may as well be correct even so. Or, perhaps we should just remove it from the U-Boot DT since it isn't useful.
PATCH 5/7 Tegra114: Dalmore: Add DT files
Stephen,
Quoted 22 lines · Stephen Warren
Quoted 21 lines · Tom Warren
Stephen,
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Tom Warren
These 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.).
Quoted 9 lines
board/nvidia/dts/tegra114-dalmore.dts line 12
Quoted 6 lines
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };Indeed, that says just 1GB...
True, but that's what's in current Cardhu DTS, and Harmony, Seaboard, and Ventana DTS files. Only Whistler has
0x20000000(512MB).
Quoted 7 lines
Quoted 2 lines
How is this used, and how do we keep it in sync with what's really on the board/in the ODMDATA field?
I don't believe U-Boot uses that property from the DT. Probably the DT isn't parsed early enough for it to be useful. But if we add it to the .dts file, it may as well be correct even so. Or, perhaps we should just remove it from the U-Boot DT since it isn't useful.
Another candidate for a clean-up pass patchset over all Tegra code. For now, I'll bump it to 2GB for Dalmore (and Cardhu), since that's what's on the sample boards.
Thanks,
Tom
PATCH 5/7 Tegra114: Dalmore: Add DT files
Quoted 28 lines · Tom Warren
Stephen,
Quoted 25 lines · Stephen Warren
Quoted 23 lines · Tom Warren
Stephen,
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Tom Warren
These 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.).
Quoted 9 lines
board/nvidia/dts/tegra114-dalmore.dts line 12
Quoted 6 lines
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };Indeed, that says just 1GB...
True, but that's what's in current Cardhu DTS, and Harmony, Seaboard, and Ventana DTS files. Only Whistler has
0x20000000(512MB).How is this used, and how do we keep it in sync with what's really on the board/in the ODMDATA field?
Quoted 8 lines
Quoted 4 lines
I don't believe U-Boot uses that property from the DT. Probably the DT isn't parsed early enough for it to be useful. But if we add it to the .dts file, it may as well be correct even so. Or, perhaps we should just remove it from the U-Boot DT since it isn't useful.
Another candidate for a clean-up pass patchset over all Tegra code. For now, I'll bump it to 2GB for Dalmore (and Cardhu), since that's what's on the sample boards.
1GB would be safer for Cardhu; there are certainly very commonly used Cardhu SKUs with only 1GB of RAM. I have one. In fact, I once heard that most Linux-oriented Cardhu were 1GB and the 2GB devices were mostly used for Windows development.
PATCH 5/7 Tegra114: Dalmore: Add DT files
Well, it's at 1GB now, so I'll leave it as is.
Thanks.
Quoted 42 lines · Stephen Warren
Quoted 28 lines · Tom Warren
Stephen,
Quoted 25 lines · Stephen Warren
Quoted 23 lines · Tom Warren
Stephen,
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Tom Warren
These 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.).
Quoted 9 lines
board/nvidia/dts/tegra114-dalmore.dts line 12
Quoted 6 lines
board/nvidia/dts/tegra114-dalmore.dts +4
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };Indeed, that says just 1GB...
True, but that's what's in current Cardhu DTS, and Harmony, Seaboard, and Ventana DTS files. Only Whistler has
0x20000000(512MB).How is this used, and how do we keep it in sync with what's really on the board/in the ODMDATA field?
Quoted 8 lines
Quoted 4 lines
I don't believe U-Boot uses that property from the DT. Probably the DT isn't parsed early enough for it to be useful. But if we add it to the .dts file, it may as well be correct even so. Or, perhaps we should just remove it from the U-Boot DT since it isn't useful.
Another candidate for a clean-up pass patchset over all Tegra code. For now, I'll bump it to 2GB for Dalmore (and Cardhu), since that's what's on the sample boards.
1GB would be safer for Cardhu; there are certainly very commonly used Cardhu SKUs with only 1GB of RAM. I have one. In fact, I once heard that most Linux-oriented Cardhu were 1GB and the 2GB devices were mostly used for Windows development.
PATCH 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.
--- 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 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.
--- board/nvidia/dalmore/Makefile | 44 +++++ board/nvidia/dalmore/dalmore.c | 39 ++++ board/nvidia/dalmore/pinmux-config-dalmore.h | 249 ++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dalmore.h | 50 +++++ include/configs/tegra114-common.h | 89 +++++++++ 6 files changed, 472 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 +44 -0
@@ -0,0 +1,44 @@ +# +# (C) Copyright 2010-2012 +# 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 $(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 +39 -0
@@ -0,0 +1,39 @@ +/* +* (C) Copyright 2010-2012 +* 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/arch/pinmux.h> +#include "pinmux-config-dalmore.h" + +/* +* Routine: pinmux_init +* Description: Do individual peripheral pinmux configs +*/ +void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_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 +89 -0
89 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
board/nvidia/dalmore/dalmore.c line 35
Quoted 9 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
board/nvidia/dalmore/dalmore.c +4
-0+void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_pinmux_common));
I assume that should say "tegra114" not "tegra3"?
include/configs/dalmore.h line 25
Quoted 4 lines
include/configs/dalmore.h +2
-0+/* Must be off for Dalmore to boot !?!? FIXME */ +#define CONFIG_SYS_DCACHE_OFF
Who knows if there is any A15 core/cache controller support in U-Boot yet?
Aside from any comments I've made, the series, briefly,
PATCH 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
Stephen,
Quoted 4 lines · Stephen Warren
Quoted 2 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
Quoted 9 lines
board/nvidia/dalmore/dalmore.c line 35
Quoted 6 lines
board/nvidia/dalmore/dalmore.c +4
-0+void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_pinmux_common));I assume that should say "tegra114" not "tegra3"?
Yep, good catch. Fixed in V2.
Quoted 7 lines
include/configs/dalmore.h line 25
Quoted 4 lines
include/configs/dalmore.h +2
-0+/* Must be off for Dalmore to boot !?!? FIXME */ +#define CONFIG_SYS_DCACHE_OFF Who knows if there is any A15 core/cache controller support in U-Boot yet?
None that I can see, but A15 is a hard keyword to grep for in U-Boot.
Albert?
Quoted 2 lines
Aside from any comments I've made, the series, briefly,
Reviewed-by Stephen Warren <[email protected]>
Thanks
PATCH 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
In reply to Stephen WarrenHi Stephen,
Quoted 13 lines · Stephen Warren
board/nvidia/dalmore/dalmore.c line 35
Quoted 9 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
board/nvidia/dalmore/dalmore.c +4
-0+void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_pinmux_common));I assume that should say "tegra114" not "tegra3"?
Quoted 6 lines
include/configs/dalmore.h line 25
Quoted 4 lines
include/configs/dalmore.h +2
-0+/* Must be off for Dalmore to boot !?!? FIXME */ +#define CONFIG_SYS_DCACHE_OFF Who knows if there is any A15 core/cache controller support in U-Boot yet?
Sort-of. It works ok for me on snow, so long as you have a patch to enable L2 support.
Regards,
Simon
Quoted 7 lines
Aside from any comments I've made, the series, briefly,
Reviewed-by Stephen Warren <[email protected]>_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
Simon,
Quoted 18 lines · Simon Glass
Hi Stephen,
Quoted 15 lines · Stephen Warren
board/nvidia/dalmore/dalmore.c line 35
Quoted 9 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
board/nvidia/dalmore/dalmore.c +4
-0+void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_pinmux_common));I assume that should say "tegra114" not "tegra3"?
Quoted 1 line
include/configs/dalmore.h +0
-0
Quoted 7 lines
Quoted 4 lines
include/configs/dalmore.h line 25
Quoted 2 lines
include/configs/dalmore.h +2
-0+/* Must be off for Dalmore to boot !?!? FIXME */ +#define CONFIG_SYS_DCACHE_OFF Who knows if there is any A15 core/cache controller support in U-Boot yet?
Sort-of. It works ok for me on snow, so long as you have a patch to enable L2 support.
Which patch, exactly, to enable L2 support? I'd like to test it on T114.
Thanks
Quoted 11 lines
Regards,
SimonQuoted 7 lines
Aside from any comments I've made, the series, briefly,
Reviewed-by Stephen Warren <[email protected]>_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)
Hi Tom,
Quoted 26 lines · Tom Warren
Simon,
Quoted 23 lines · Simon Glass
Hi Stephen,
Quoted 19 lines · Stephen Warren
board/nvidia/dalmore/dalmore.c line 35
Quoted 9 lines · Tom Warren
This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.
board/nvidia/dalmore/dalmore.c +4
-0+void pinmux_init (void ) +{ +pinmux_config_table (tegra3_pinmux_common, +ARRAY_SIZE (tegra3_pinmux_common));I assume that should say "tegra114" not "tegra3"?
include/configs/dalmore.h line 25
Quoted 4 lines
include/configs/dalmore.h +2
-0+/* Must be off for Dalmore to boot !?!? FIXME */ +#define CONFIG_SYS_DCACHE_OFF Who knows if there is any A15 core/cache controller support in U-Boot yet?
Quoted 4 lines
Quoted 2 lines
Sort-of. It works ok for me on snow, so long as you have a patch to enable L2 support.
Which patch, exactly, to enable L2 support? I'd like to test it on T114.
I was thinking about this one (it will need porting and perhaps can become partly common?)
http://patchwork.ozlabs.org/patch/202874/
Regards,
Simon
Quoted 13 lines
Thanks
Quoted 11 lines
Regards,
SimonQuoted 7 lines
Aside from any comments I've made, the series, briefly,
Reviewed-by Stephen Warren <[email protected]>_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot