Skip to contentSkip to conversation

ARM: tegra: Add support for norrin board

PATCH New Allen Martin 2 participants 2 messages Aug 4, 2014 – Aug 5, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: tegra: Add support for norrin board

Norrin (PM370) is a Tegra124 clamshell board that is very similar to venice2, but it has a different panel, the sdcard cd and wp sense are flipped, and it has a different revision of the AS3722 PMIC. This board is also refered to as "nyan" in the ChromeOS trees.

---
Changes from v2:
-Rebased to u-boot/master
-Changed from boards.cfg to Kconfig based configuration -Added MAINTAINERS file for Norrin board
Changes from v1:
-Generated pinmux with tegra-pinmux-scripts directly from pinmux
spreadsheet.
-Don't try to reuse venice2 board files

---
 arch/arm/Kconfig                           |   4 +
 arch/arm/dts/Makefile                      |   1 +
 arch/arm/dts/tegra124-norrin.dts           |  91 +++++++++
 board/nvidia/norrin/Kconfig                |  24 +++
 board/nvidia/norrin/MAINTAINERS            |   6 +
 board/nvidia/norrin/Makefile               |   9 +
 board/nvidia/norrin/norrin.c               |  29 +++
 board/nvidia/norrin/pinmux-config-norrin.h | 287 +++++++++++++++++++++++++++++
 board/nvidia/venice2/as3722_init.h         |   2 +-
 configs/norrin_defconfig                   |   4 +
 include/configs/norrin.h                   |  81 ++++++++
 11 files changed, 537 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/tegra124-norrin.dts
 create mode 100644 board/nvidia/norrin/Kconfig
 create mode 100644 board/nvidia/norrin/MAINTAINERS
 create mode 100644 board/nvidia/norrin/Makefile
 create mode 100644 board/nvidia/norrin/norrin.c
 create mode 100644 board/nvidia/norrin/pinmux-config-norrin.h
 create mode 100644 configs/norrin_defconfig
 create mode 100644 include/configs/norrin.h
arch/arm/Kconfig +4 -0
index e385eda94cdf..f4e0f5a42c14 100644
@@ -716,6 +716,9 @@ config TARGET_DALMORE
 config TARGET_JETSON_TK1
 	bool "Support jetson-tk1"
 
+config TARGET_NORRIN
+	bool "Support norrin"
+
 config TARGET_VENICE2
 	bool "Support venice2"
 
@@ -912,6 +915,7 @@ source "board/nvidia/cardhu/Kconfig"
 source "board/nvidia/dalmore/Kconfig"
 source "board/nvidia/harmony/Kconfig"
 source "board/nvidia/jetson-tk1/Kconfig"
+source "board/nvidia/norrin/Kconfig"
 source "board/nvidia/seaboard/Kconfig"
 source "board/nvidia/venice2/Kconfig"
 source "board/nvidia/ventana/Kconfig"
arch/arm/dts/Makefile +1 -0
index 6e2e313829c1..e61e306c5c23 100644
@@ -24,6 +24,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra30-tec-ng.dtb \
 	tegra114-dalmore.dtb \
 	tegra124-jetson-tk1.dtb \
+	tegra124-norrin.dtb \
 	tegra124-venice2.dtb
 dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
 	zynq-zc706.dtb \
arch/arm/dts/tegra124-norrin.dts new file +91 -0

91 lines not on this page · raw message

board/nvidia/norrin/Kconfig new file +24 -0
new file mode 100644
index 000000000000..cea652818991
@@ -0,0 +1,24 @@
+if TARGET_NORRIN
+
+config SYS_CPU
+	string
+	default "arm720t" if SPL_BUILD
+	default "armv7" if !SPL_BUILD
+
+config SYS_BOARD
+	string
+	default "norrin"
+
+config SYS_VENDOR
+	string
+	default "nvidia"
+
+config SYS_SOC
+	string
+	default "tegra124"
+
+config SYS_CONFIG_NAME
+	string
+	default "norrin"
+
+endif
board/nvidia/norrin/MAINTAINERS new file +6 -0
new file mode 100644
index 000000000000..e1463ae19a6f
@@ -0,0 +1,6 @@
+NORRIN BOARD
+M:	Allen Martin <[email protected]>
+S:	Maintained
+F:	board/nvidia/norrin/
+F:	include/configs/norrin.h
+F:	configs/norrin_defconfig
board/nvidia/norrin/Makefile new file +9 -0
new file mode 100644
index 000000000000..5e490bb38f30
@@ -0,0 +1,9 @@
+#
+# (C) Copyright 2014
+# NVIDIA Corporation <www.nvidia.com>
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y	+= ../venice2/as3722_init.o
+obj-y	+= norrin.o
board/nvidia/norrin/norrin.c new file +29 -0
new file mode 100644
index 000000000000..6f0050c4cd2f
@@ -0,0 +1,29 @@
+/*
+ * (C) Copyright 2014
+ * NVIDIA Corporation <www.nvidia.com>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/pinmux.h>
+#include "pinmux-config-norrin.h"
+
+/*
+ * Routine: pinmux_init
+ * Description: Do individual peripheral pinmux configs
+ */
+void pinmux_init(void)
+{
+	pinmux_set_tristate_input_clamping();
+
+	gpio_config_table(norrin_gpio_inits,
+			  ARRAY_SIZE(norrin_gpio_inits));
+
+	pinmux_config_pingrp_table(norrin_pingrps,
+				   ARRAY_SIZE(norrin_pingrps));
+
+	pinmux_config_drvgrp_table(norrin_drvgrps,
+				   ARRAY_SIZE(norrin_drvgrps));
+}
board/nvidia/norrin/pinmux-config-norrin.h new file +287 -0

287 lines not on this page · raw message

board/nvidia/venice2/as3722_init.h +1 -1
index a7b24039f6aa..7c80ef09387b 100644
@@ -18,7 +18,7 @@
 #define AS3722_LDO6VOLTAGE_REG	0x16	/* VDD_SDMMC */
 #define AS3722_LDCONTROL_REG	0x4E
 
-#ifdef CONFIG_BOARD_JETSON_TK1
+#if defined(CONFIG_BOARD_JETSON_TK1) || defined(CONFIG_BOARD_NORRIN)
 #define AS3722_SD0VOLTAGE_DATA	(0x3C00 | AS3722_SD0VOLTAGE_REG)
 #else
 #define AS3722_SD0VOLTAGE_DATA	(0x2800 | AS3722_SD0VOLTAGE_REG)
configs/norrin_defconfig new file +4 -0
new file mode 100644
index 000000000000..d934e04c7153
@@ -0,0 +1,4 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="BOARD_NORRIN="
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_NORRIN=y
include/configs/norrin.h new file +81 -0

81 lines not on this page · raw message

Signature · 1 line
1.8.1.5
#1 lore raw

PATCH v3 1/1 ARM: tegra: Add support for norrin board

Quoted 10 lines · Allen Martin

Norrin (PM370) is a Tegra124 clamshell board that is very similar to venice2, but it has a different panel, the sdcard cd and wp sense are flipped, and it has a different revision of the AS3722 PMIC. This board is also refered to as "nyan" in the ChromeOS trees.

arch/arm/Kconfig +0 -0
index e385eda94cdf..f4e0f5a42c14 100644

arch/arm/Kconfig config TARGET_DALMORE · line 721

Quoted 6 lines
arch/arm/Kconfig +3 -0
@@ -716,6 +716,9 @@ config TARGET_DALMORE
  config TARGET_JETSON_TK1
  	bool "Support jetson-tk1"
 
+config TARGET_NORRIN
+	bool "Support norrin"
+

Note that this patch is going to conflict with:
http://patchwork.ozlabs.org/patch/376287/
tegra: kconfig: move board select menu and common settings

... since that moves all the Tegra board options into sub-menus. At some point, this or that patch will need to be rebased on the other, or merged with each-other

arch/arm/Kconfig source "board/nvidia/cardhu/Kconfig" · line 918

Quoted 5 lines
arch/arm/Kconfig +1 -0
@@ -912,6 +915,7 @@ source "board/nvidia/cardhu/Kconfig"
  source "board/nvidia/dalmore/Kconfig"
  source "board/nvidia/harmony/Kconfig"
  source "board/nvidia/jetson-tk1/Kconfig"
+source "board/nvidia/norrin/Kconfig"

Indentation looks wrong there.

board/nvidia/venice2/as3722_init.h line 21

Quoted 4 lines
board/nvidia/venice2/as3722_init.h +1 -1
 
-#ifdef CONFIG_BOARD_JETSON_TK1
+#if defined(CONFIG_BOARD_JETSON_TK1) || defined(CONFIG_BOARD_NORRIN)

Let's use CONFIG_TARGET_NORRIN directly here. This is the variable that's set up by Kconfig. It means that norrin_defconfig won't have to set up the extra/custom CONFIG_BOARD_NORRIN.

I've already sent a patch to fix this same issue for Jetson TK1:

http://patchwork.ozlabs.org/patch/375467/
ARM: tegra: remove custom define for Jetson TK1

configs/norrin_defconfig

Quoted 3 lines
configs/norrin_defconfig +1 -0
 
+CONFIG_SYS_EXTRA_OPTIONS="BOARD_NORRIN="

Per my comment above, you can remove that one line.

Aside from those issues, this patch looks fine.