Skip to contentSkip to conversation

Add support for NVIDIA Tegra114 SoC

PATCH Superseded Tom Warren 3 participants 22 messages Jan 18, 2013 – Jan 22, 2013

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Tom Warren

author
#0 lore raw

v2 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.

Changes in v2:
- Rework patchset as per feedback from Stephen and Allen.

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           |   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               |  315 ++++++
 arch/arm/cpu/armv7/tegra114/Makefile               |   40 +
 arch/arm/cpu/armv7/tegra114/config.mk              |   19 +
 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              | 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         |   58 +-
 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        |   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        |   31 +
 arch/arm/include/asm/arch-tegra20/clock.h         |    4 +
 arch/arm/include/asm/arch-tegra30/clock.h         |    4 +
 board/nvidia/common/board.c                        |    2 +-
 board/nvidia/dalmore/Makefile                     |   36 +
 board/nvidia/dalmore/dalmore.c                    |   32 +
 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                 |   79 ++
 39 files changed, 4108 insertions(+), 50 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
author
#1 lore raw

PATCH v2 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

 arch/arm/include/asm/arch-tegra/clk_rst.h         |   58 ++-
 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        |   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        |   31 +
 arch/arm/include/asm/arch-tegra20/clock.h         |    4 +
 arch/arm/include/asm/arch-tegra30/clock.h         |    4 +
 17 files changed, 1376 insertions(+), 7 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 -7
index 6a6e507..c754ec7 100644
@@ -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,6 @@ enum {
 };
 
 /* CLK_RST_CONTROLLER_OSC_CTRL_0 */
-#define OSC_FREQ_SHIFT		30
-#define OSC_FREQ_MASK		(3U << OSC_FREQ_SHIFT)
 #define OSC_XOBP_SHIFT		1
 #define OSC_XOBP_MASK		(1U << OSC_XOBP_SHIFT)
 
@@ -281,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
index e6085a0..209abf1 100644
@@ -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
index b1d47cd..252c0de 100644
@@ -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 +3 -0
index 013a3c5..2dbe6a3 100644
@@ -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 */
 };
 
 /*
@@ -86,6 +87,8 @@ enum {
 	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
new file mode 100644
index 0000000..abbefcd
@@ -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
new file mode 100644
index 0000000..c7eb051
@@ -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
new file mode 100644
index 0000000..7f48f25
@@ -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
new file mode 100644
index 0000000..21853b6
@@ -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
new file mode 100644
index 0000000..c21fbb6
@@ -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
new file mode 100644
index 0000000..c6e2381
@@ -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
new file mode 100644
index 0000000..ebb16fe
@@ -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 +31 -0
new file mode 100644
index 0000000..2255dde
@@ -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/>.
+ */
+
+#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 */
+
+#endif	/* TEGRA114_H */
arch/arm/include/asm/arch-tegra20/clock.h +4 -0
index f592b95..491c02c 100644
@@ -26,4 +26,8 @@
 
 #include <asm/arch-tegra/clock.h>
 
+/* CLK_RST_CONTROLLER_OSC_CTRL_0 */
+#define OSC_FREQ_SHIFT          30
+#define OSC_FREQ_MASK           (3U << OSC_FREQ_SHIFT)
+
 #endif	/* _TEGRA20_CLOCK_H */
arch/arm/include/asm/arch-tegra30/clock.h +4 -0
index 61fc4c8..2f24a75 100644
@@ -21,4 +21,8 @@
 
 #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	/* _TEGRA30_CLOCK_H_ */
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH v2 1/7 Tegra114: Add arch-tegra114 include files

Quoted 10 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-tegra/tegra.h +0 -0
index 013a3c5..2dbe6a3 100644

arch/arm/include/asm/arch-tegra/tegra.h enum { · line 76

Quoted 4 lines
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 */

I believe a SKU ID of 0 indicates an unfused or engineering part. I'll try to find the relevant email and forward it to you off-list. As such, I think it'll save us trouble in the future if you simply rename that SKU_ID_T114_UNFUSED/GENERIC/ENG/ENGINEERING to make it explicit what this means. You should probably talk to someone internally to confirm the best terminology to use here; probably whoever originally sent the email that I'll try to forward to you. I think you can make such a trivial symbol renaming change when you apply the patch, without reposting the patches, unless any other changes are needed.

author
#3 lore raw

PATCH v2 1/7 Tegra114: Add arch-tegra114 include files

Stephen,

Quoted 17 lines · Stephen Warren
Quoted 10 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-tegra/tegra.h +0 -0
index 013a3c5..2dbe6a3 100644

arch/arm/include/asm/arch-tegra/tegra.h enum { · line 76

Quoted 4 lines
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 */

I believe a SKU ID of 0 indicates an unfused or engineering part. I'll

Quoted 8 lines

try to find the relevant email and forward it to you off-list. As such, I think it'll save us trouble in the future if you simply rename that SKU_ID_T114_UNFUSED/GENERIC/ENG/ENGINEERING to make it explicit what this means. You should probably talk to someone internally to confirm the best terminology to use here; probably whoever originally sent the email that I'll try to forward to you. I think you can make such a trivial symbol renaming change when you apply the patch, without reposting the patches, unless any other changes are needed.

I can change this to SKU_ID_T114_ENG. Would that be sufficient?

#4 lore raw

PATCH v2 1/7 Tegra114: Add arch-tegra114 include files

Quoted 29 lines · Tom Warren

Stephen,

Quoted 17 lines · Stephen Warren
Quoted 10 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-tegra/tegra.h +0 -0
index 013a3c5..2dbe6a3 100644

arch/arm/include/asm/arch-tegra/tegra.h enum { · line 76

Quoted 4 lines
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 */

I believe a SKU ID of 0 indicates an unfused or engineering part. I'll

Quoted 8 lines

try to find the relevant email and forward it to you off-list. As such, I think it'll save us trouble in the future if you simply rename that SKU_ID_T114_UNFUSED/GENERIC/ENG/ENGINEERING to make it explicit what this means. You should probably talk to someone internally to confirm the best terminology to use here; probably whoever originally sent the email that I'll try to forward to you. I think you can make such a trivial symbol renaming change when you apply the patch, without reposting the patches, unless any other changes are needed.

Quoted 1 line

I can change this to SKU_ID_T114_ENG. Would that be sufficient?

That's probably reasonable, yes.

author
#5 lore raw

PATCH v2 2/7 Tegra114: Add AVP (arm720t) files

In reply to Tom Warren

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

 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     |  315 +++++++++++++++++++++++++++++++
 5 files changed, 421 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
index c32925b..b6ac0ef 100644
@@ -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
index 3e2ea3a..e8e05d7 100644
@@ -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
new file mode 100644
index 0000000..7947b50
@@ -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 +315 -0

315 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#6 lore raw

PATCH v2 2/7 Tegra114: Add AVP (arm720t) files

Quoted 17 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/tegra114/cpu.c new file +14 -0
+void powerup_cpus(void)
+{
+	debug("powerup_cpus entry\n");
+
+	/* Are we booting to the fast cluster? */
+	if (get_cluster_id() == 0) {
+		debug("powerup_cpus entry: G cluster\n");
+		/* Power up the fast cluster rail partition */
+		power_partition(CRAIL, CRAILID);
+
+		/* Power up the fast cluster non-CPU partition */
+		power_partition(C0NC, C0NCID);
+
+		/* Power up the fast cluster CPU0 partition */

arch/arm/cpu/arm720t/tegra114/cpu.c line 286

Quoted 10 lines
arch/arm/cpu/arm720t/tegra114/cpu.c new file +10 -0
+		power_partition(CE0, CE0ID);
+	} else {
+		debug("powerup_cpus entry: LP cluster\n");
+		/* Power up the slow cluster non-CPU partition */
+		power_partition(C1NC, C1NCID);
+
+		/* Power up the slow cluster CPU partition */
+		power_partition(CELP, CELPID);
+	}
+}

I strongly believe we should determine why that is needed rather than blindly upstreaming it.

#7 lore raw

PATCH v2 2/7 Tegra114: Add AVP (arm720t) files

Quoted 23 lines · Stephen Warren
Quoted 22 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/tegra114/cpu.c new file +19 -0
+void powerup_cpus(void)
+{
+	debug("powerup_cpus entry\n");
+
+	/* Are we booting to the fast cluster? */
+	if (get_cluster_id() == 0) {
+		debug("powerup_cpus entry: G cluster\n");
+		/* Power up the fast cluster rail partition */
+		power_partition(CRAIL, CRAILID);
+
+		/* Power up the fast cluster non-CPU partition */
+		power_partition(C0NC, C0NCID);
+
+		/* Power up the fast cluster CPU0 partition */
+		power_partition(CE0, CE0ID);
+	} else {
+		debug("powerup_cpus entry: LP cluster\n");
+		/* Power up the slow cluster non-CPU partition */
+		power_partition(C1NC, C1NCID);
Quoted 8 lines

arch/arm/cpu/arm720t/tegra114/cpu.c line 286

Quoted 5 lines
arch/arm/cpu/arm720t/tegra114/cpu.c new file +5 -0
+
+		/* Power up the slow cluster CPU partition */
+		power_partition(CELP, CELPID);
+	}
+}

I strongly believe we should determine why that is needed rather than blindly upstreaming it.

Thinking about this more, this makes even less sense. When Tegra boots, code runs on the AVP. That code is U-Boot. U-Boot then boots the A15 cores, and hence U-Boot is what decides whether to boot the LP or G cluster; it doesn't follow some decision by some other SW since there is no other SW.

The only possible exception to this might be resume from some low-power state where you want to restart the same A15 cluster as was running prior to entering sleep. But that would require the flow controller register read by get_cluster_id() to be in an always-on power domain. I'm not sure if that's true or not. (If it isnt', presumably the power-on state would always be static, hence there would be no need to read the register).

author
#8 lore raw

PATCH v2 2/7 Tegra114: Add AVP (arm720t) files

Stephen,

Quoted 39 lines · Stephen Warren
Quoted 23 lines · Stephen Warren
Quoted 22 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/tegra114/cpu.c new file +19 -0
+void powerup_cpus(void)
+{
+    debug("powerup_cpus entry\n");
+
+    /* Are we booting to the fast cluster? */
+    if (get_cluster_id() == 0) {
+            debug("powerup_cpus entry: G cluster\n");
+            /* Power up the fast cluster rail partition */
+            power_partition(CRAIL, CRAILID);
+
+            /* Power up the fast cluster non-CPU partition */
+            power_partition(C0NC, C0NCID);
+
+            /* Power up the fast cluster CPU0 partition */
+            power_partition(CE0, CE0ID);
+    } else {
+            debug("powerup_cpus entry: LP cluster\n");
+            /* Power up the slow cluster non-CPU partition */
+            power_partition(C1NC, C1NCID);
Quoted 8 lines

arch/arm/cpu/arm720t/tegra114/cpu.c line 286

Quoted 5 lines
arch/arm/cpu/arm720t/tegra114/cpu.c new file +5 -0
+
+            /* Power up the slow cluster CPU partition */
+            power_partition(CELP, CELPID);
+    }
+}

I strongly believe we should determine why that is needed rather than blindly upstreaming it.

Thinking about this more, this makes even less sense. When Tegra boots, code runs on the AVP. That code is U-Boot. U-Boot then boots the A15 cores, and hence U-Boot is what decides whether to boot the LP or G cluster; it doesn't follow some decision by some other SW since there is no other SW.

Quoted 7 lines

The only possible exception to this might be resume from some low-power state where you want to restart the same A15 cluster as was running prior to entering sleep. But that would require the flow controller register read by get_cluster_id() to be in an always-on power domain. I'm not sure if that's true or not. (If it isnt', presumably the power-on state would always be static, hence there would be no need to read the register).

I agree with your analysis. How about if I remove get_cluster_id(), and just set the power partitions for the fast cluster?

#9 lore raw

PATCH v2 2/7 Tegra114: Add AVP (arm720t) files

Quoted 50 lines · Tom Warren

Stephen,

Quoted 39 lines · Stephen Warren
Quoted 23 lines · Stephen Warren
Quoted 22 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/tegra114/cpu.c new file +19 -0
+void powerup_cpus(void)
+{
+    debug("powerup_cpus entry\n");
+
+    /* Are we booting to the fast cluster? */
+    if (get_cluster_id() == 0) {
+            debug("powerup_cpus entry: G cluster\n");
+            /* Power up the fast cluster rail partition */
+            power_partition(CRAIL, CRAILID);
+
+            /* Power up the fast cluster non-CPU partition */
+            power_partition(C0NC, C0NCID);
+
+            /* Power up the fast cluster CPU0 partition */
+            power_partition(CE0, CE0ID);
+    } else {
+            debug("powerup_cpus entry: LP cluster\n");
+            /* Power up the slow cluster non-CPU partition */
+            power_partition(C1NC, C1NCID);
Quoted 8 lines

arch/arm/cpu/arm720t/tegra114/cpu.c line 286

Quoted 5 lines
arch/arm/cpu/arm720t/tegra114/cpu.c new file +5 -0
+
+            /* Power up the slow cluster CPU partition */
+            power_partition(CELP, CELPID);
+    }
+}

I strongly believe we should determine why that is needed rather than blindly upstreaming it.

Thinking about this more, this makes even less sense. When Tegra boots, code runs on the AVP. That code is U-Boot. U-Boot then boots the A15 cores, and hence U-Boot is what decides whether to boot the LP or G cluster; it doesn't follow some decision by some other SW since there is no other SW.

Quoted 7 lines

The only possible exception to this might be resume from some low-power state where you want to restart the same A15 cluster as was running prior to entering sleep. But that would require the flow controller register read by get_cluster_id() to be in an always-on power domain. I'm not sure if that's true or not. (If it isnt', presumably the power-on state would always be static, hence there would be no need to read the register).

Quoted 2 lines

I agree with your analysis. How about if I remove get_cluster_id(), and just set the power partitions for the fast cluster?

I think that makes sense, yes.

author
#10 lore raw

PATCH v2 3/7 Tegra114: Add CPU (armv7) files

In reply to Tom Warren

These 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

 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
new file mode 100644
index 0000000..eb98c8e
@@ -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
new file mode 100644
index 0000000..cb1a19d
@@ -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
#11 lore raw

PATCH v2 3/7 Tegra114: Add CPU (armv7) files

Quoted 5 lines · Tom Warren

These 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.

Quoted 84 lines

---
Changes in v2:
- update all new copyright header dates to 2013

 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
new file mode 100644
index 0000000..eb98c8e
@@ -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 -1
new file mode 100644
index 0000000..cb1a19d
@@ -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
--

1.7.0.4

author
#12 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

In reply to Tom Warren

These 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

 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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
index aebe29e..05f5f14 100644
@@ -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:
+			return TEGRA_SOC_T114;
+		}
+		break;
 	}
 	/* unknown sku id */
 	return TEGRA_SOC_UNKNOWN;
arch/arm/cpu/tegra-common/board.c +18 -3
index 1ec6c06..08bfa64 100644
@@ -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 +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
#13 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

Hi Tom,

Quoted 8 lines · Tom Warren

These 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

Quoted 12 lines
 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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

I'm a bit concerned about the code duplication here. Isn't much of this code common?

Regards,
Simon

author
#14 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

Simon,

Quoted 24 lines · Simon Glass

Hi Tom,

Quoted 8 lines · Tom Warren

These 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

Quoted 12 lines
 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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
Quoted 5 lines

I'm a bit concerned about the code duplication here. Isn't much of this code common?

Regards,
Simon

funcmux.c differs almost entirely (different muxes for different UARTs used on the boards). Pinmux.c differs quite a bit, mostly in tables. And clock.c has a few minor name diffs (DVC vs I2C5), but there are extra enums for the additional RST/ENA bits on T114, plus the differences in clock_early_init WRT the PLL rates. And that's just for the T30 vs. T114 differences - T20 is vastly different in it's pinmux HW regs, and device RST/ENA bits.

I view it as a worthy exercise that could be applied after T114 baseline code is in, to see just how much more common code could be factored out and put into arm/cpu/tegra-common, but I don't see it as being a huge amount. T30 and T114 would share the most code, but where would it go? since it can't be shared w/T20?

Tom

#15 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

Hi Tom,

Quoted 33 lines · Tom Warren

Simon,

Quoted 24 lines · Simon Glass

Hi Tom,

Quoted 8 lines · Tom Warren

These 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

Quoted 12 lines
 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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
Quoted 5 lines

I'm a bit concerned about the code duplication here. Isn't much of this code common?

Regards,
Simon

Quoted 7 lines

funcmux.c differs almost entirely (different muxes for different UARTs used on the boards). Pinmux.c differs quite a bit, mostly in tables. And clock.c has a few minor name diffs (DVC vs I2C5), but there are extra enums for the additional RST/ENA bits on T114, plus the differences in clock_early_init WRT the PLL rates. And that's just for the T30 vs. T114 differences - T20 is vastly different in it's pinmux HW regs, and device RST/ENA bits.

I suppose I was mostly thinking of clock.c - most of that code looks very familiar.

Quoted 8 lines

I view it as a worthy exercise that could be applied after T114 baseline code is in, to see just how much more common code could be factored out and put into arm/cpu/tegra-common, but I don't see it as being a huge amount. T30 and T114 would share the most code, but where would it go? since it can't be shared w/T20?

Tom

We had the same discussion with T30. I suppose you could have clock.c for common stuff and clock-t20.c, clock-t30.c, etc. for the extra / unusual bits.

Regards,
Simon

author
#16 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

Simon,

Quoted 54 lines · Simon Glass

Hi Tom,

Quoted 33 lines · Tom Warren

Simon,

Quoted 24 lines · Simon Glass

Hi Tom,

Quoted 8 lines · Tom Warren

These 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

Quoted 12 lines
 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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
Quoted 5 lines

I'm a bit concerned about the code duplication here. Isn't much of this code common?

Regards,
Simon

Quoted 7 lines

funcmux.c differs almost entirely (different muxes for different UARTs used on the boards). Pinmux.c differs quite a bit, mostly in tables. And clock.c has a few minor name diffs (DVC vs I2C5), but there are extra enums for the additional RST/ENA bits on T114, plus the differences in clock_early_init WRT the PLL rates. And that's just for the T30 vs. T114 differences - T20 is vastly different in it's pinmux HW regs, and device RST/ENA bits.

I suppose I was mostly thinking of clock.c - most of that code looks very familiar.

Quoted 7 lines

I view it as a worthy exercise that could be applied after T114 baseline code is in, to see just how much more common code could be factored out and put into arm/cpu/tegra-common, but I don't see it as being a huge amount. T30 and T114 would share the most code, but where would it go? since it can't be shared w/T20?

Quoted 5 lines
Quoted 1 line

Tom

We had the same discussion with T30. I suppose you could have clock.c for common stuff and clock-t20.c, clock-t30.c, etc. for the extra / unusual bits.

OK, since I have to do a V3 patchset for T114 anyway, I'll take a pass at it. But only for clock code - I don't want to get too bogged down - there's too much backing up on the tracks behind me ;)

Tom

Quoted 3 lines

Regards,
Simon

#17 lore raw

PATCH v2 4/7 Tegra114: Add common CPU (shared) files

Hi Tom,

Quoted 59 lines · Tom Warren

Simon,

Quoted 56 lines · Simon Glass

Hi Tom,

Quoted 33 lines · Tom Warren

Simon,

Quoted 24 lines · Simon Glass

Hi Tom,

Quoted 8 lines · Tom Warren

These 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

Quoted 12 lines
 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   | 1150 ++++++++++++++++++++++++++++++++
 arch/arm/cpu/tegra114-common/funcmux.c |   63 ++
 arch/arm/cpu/tegra114-common/pinmux.c  |  506 ++++++++++++++
 6 files changed, 1786 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
Quoted 5 lines

I'm a bit concerned about the code duplication here. Isn't much of this code common?

Regards,
Simon

Quoted 7 lines

funcmux.c differs almost entirely (different muxes for different UARTs used on the boards). Pinmux.c differs quite a bit, mostly in tables. And clock.c has a few minor name diffs (DVC vs I2C5), but there are extra enums for the additional RST/ENA bits on T114, plus the differences in clock_early_init WRT the PLL rates. And that's just for the T30 vs. T114 differences - T20 is vastly different in it's pinmux HW regs, and device RST/ENA bits.

I suppose I was mostly thinking of clock.c - most of that code looks very familiar.

Quoted 8 lines

I view it as a worthy exercise that could be applied after T114 baseline code is in, to see just how much more common code could be factored out and put into arm/cpu/tegra-common, but I don't see it as being a huge amount. T30 and T114 would share the most code, but where would it go? since it can't be shared w/T20?

Tom

Quoted 7 lines
Quoted 3 lines

We had the same discussion with T30. I suppose you could have clock.c for common stuff and clock-t20.c, clock-t30.c, etc. for the extra / unusual bits.

OK, since I have to do a V3 patchset for T114 anyway, I'll take a pass at it. But only for clock code - I don't want to get too bogged down - there's too much backing up on the tracks behind me ;)

OK thanks. This sort of core code is sometimes hard to revisit later...

Regards,
Simon

Quoted 5 lines

Tom

Quoted 3 lines

Regards,
Simon

author
#18 lore raw

PATCH v2 5/7 Tegra114: Dalmore: Add DT files

In reply to 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.).

---
---
Changes in v2:
- change memory size to 2GB

 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
new file mode 100644
index 0000000..d06cd12
@@ -0,0 +1,5 @@
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "nvidia,tegra114";
+};
board/nvidia/dts/tegra114-dalmore.dts new file +13 -0
new file mode 100644
index 0000000..7315577
@@ -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
author
#19 lore raw

PATCH v2 6/7 Tegra114: Add generic Tegra114 build support

In reply to Tom Warren

This patch adds basic Tegra114 (T114) build support - no specific board is targeted.

---
Changes in v2: none

 board/nvidia/common/board.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/nvidia/common/board.c +1 -1
index a4af539..e986fcf 100644
@@ -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
author
#20 lore raw

PATCH v2 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)

In reply to Tom Warren

This 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

 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
new file mode 100644
index 0000000..699b9f6
@@ -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
new file mode 100644
index 0000000..aca3c7d
@@ -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
index b519bc4..bd2ae3d 100644
@@ -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
#21 lore raw

PATCH v2 7/7 Tegra114: Add/enable Dalmore build (T114 reference board)

Quoted 2 lines · Tom Warren

This build is stripped down. It boots to the command prompt. GPIO is the only peripheral supported. Others TBD.

Aside from the couple of comment I already made, the series briefly,