[U-Boot] [PATCH] ARM: tegra: Add support for norrin board
Allen Martin
amartin at nvidia.com
Mon Jun 30 22:53:31 CEST 2014
Norrin (PM370) is a Tegra124 clamshell board that is very similar to
venice2, but it has a different panel, the sdcard cd sense is flipped,
and it has a different revision of the AS3722 PMIC. Reuse the venice2
config with a norrin dtb. This board is also refered to as "nyan" in
the ChromeOS trees.
Signed-off-by: Allen Martin <amartin at nvidia.com>
---
arch/arm/dts/Makefile | 3 +-
arch/arm/dts/tegra124-norrin.dts | 91 ++++++++++++++++++++++++++++++++++++++
board/nvidia/venice2/as3722_init.h | 2 +-
boards.cfg | 1 +
include/configs/venice2.h | 9 ++++
5 files changed, 104 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/dts/tegra124-norrin.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 55546152b94b..414f206cb6f0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -23,7 +23,8 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
tegra30-tec-ng.dtb \
tegra114-dalmore.dtb \
tegra124-jetson-tk1.dtb \
- tegra124-venice2.dtb
+ tegra124-venice2.dtb \
+ tegra124-norrin.dtb
dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
zynq-zc706.dtb \
zynq-zed.dtb \
diff --git a/arch/arm/dts/tegra124-norrin.dts b/arch/arm/dts/tegra124-norrin.dts
new file mode 100644
index 000000000000..fdf000cf75ec
--- /dev/null
+++ b/arch/arm/dts/tegra124-norrin.dts
@@ -0,0 +1,91 @@
+/dts-v1/;
+
+#include "tegra124.dtsi"
+
+/ {
+ model = "NVIDIA Norrin";
+ compatible = "nvidia,norrin", "nvidia,tegra124";
+
+ aliases {
+ i2c0 = "/i2c at 7000d000";
+ i2c1 = "/i2c at 7000c000";
+ i2c2 = "/i2c at 7000c400";
+ i2c3 = "/i2c at 7000c500";
+ i2c4 = "/i2c at 7000c700";
+ i2c5 = "/i2c at 7000d100";
+ sdhci0 = "/sdhci at 700b0600";
+ sdhci1 = "/sdhci at 700b0400";
+ spi0 = "/spi at 7000d400";
+ spi1 = "/spi at 7000da00";
+ usb0 = "/usb at 7d000000";
+ usb1 = "/usb at 7d008000";
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x80000000 0x80000000>;
+ };
+
+ i2c at 7000c000 {
+ status = "okay";
+ clock-frequency = <100000>;
+ };
+
+ i2c at 7000c400 {
+ status = "okay";
+ clock-frequency = <100000>;
+ };
+
+ i2c at 7000c500 {
+ status = "okay";
+ clock-frequency = <100000>;
+ };
+
+ i2c at 7000c700 {
+ status = "okay";
+ clock-frequency = <100000>;
+ };
+
+ i2c at 7000d000 {
+ status = "okay";
+ clock-frequency = <400000>;
+ };
+
+ i2c at 7000d100 {
+ status = "okay";
+ clock-frequency = <400000>;
+ };
+
+ spi at 7000d400 {
+ status = "okay";
+ spi-max-frequency = <25000000>;
+ };
+
+ spi at 7000da00 {
+ status = "okay";
+ spi-max-frequency = <25000000>;
+ };
+
+ sdhci at 700b0400 {
+ status = "okay";
+ cd-gpios = <&gpio 170 1>; /* gpio PV2 */
+ power-gpios = <&gpio 136 0>; /* gpio PR0 */
+ bus-width = <4>;
+ };
+
+ sdhci at 700b0600 {
+ status = "okay";
+ bus-width = <8>;
+ };
+
+ usb at 7d000000 {
+ status = "okay";
+ dr_mode = "otg";
+ nvidia,vbus-gpio = <&gpio 108 0>; /* gpio PN4, USB_VBUS_EN0 */
+ };
+
+ usb at 7d008000 {
+ status = "okay";
+ nvidia,vbus-gpio = <&gpio 109 0>; /* gpio PN5, USB_VBUS_EN1 */
+ };
+};
diff --git a/board/nvidia/venice2/as3722_init.h b/board/nvidia/venice2/as3722_init.h
index a7b24039f6aa..7c80ef09387b 100644
--- a/board/nvidia/venice2/as3722_init.h
+++ b/board/nvidia/venice2/as3722_init.h
@@ -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)
diff --git a/boards.cfg b/boards.cfg
index 5a85fad48095..3950688ba30b 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -395,6 +395,7 @@ Active arm armv7 zynq xilinx zynq
Active arm armv7:arm720t tegra114 nvidia dalmore dalmore - Tom Warren <twarren at nvidia.com>
Active arm armv7:arm720t tegra124 nvidia jetson-tk1 jetson-tk1 jetson-tk1:BOARD_JETSON_TK1= Stephen Warren <swarren at nvidia.com>
Active arm armv7:arm720t tegra124 nvidia venice2 venice2 - Tom Warren <twarren at nvidia.com>
+Active arm armv7:arm720t tegra124 nvidia venice2 norrin venice2:BOARD_NORRIN Tom Warren <twarren at nvidia.com>
Active arm armv7:arm720t tegra20 avionic-design medcom-wide medcom-wide - Alban Bedel <alban.bedel at avionic-design.de>
Active arm armv7:arm720t tegra20 avionic-design plutux plutux - Alban Bedel <alban.bedel at avionic-design.de>
Active arm armv7:arm720t tegra20 avionic-design tec tec - Alban Bedel <alban.bedel at avionic-design.de>
diff --git a/include/configs/venice2.h b/include/configs/venice2.h
index c4a1b94b98e1..7162d2e4bd47 100644
--- a/include/configs/venice2.h
+++ b/include/configs/venice2.h
@@ -13,13 +13,22 @@
#include "tegra124-common.h"
/* Enable fdt support for Venice2. Flash the image in u-boot-dtb.bin */
+#ifdef CONFIG_BOARD_NORRIN
+#define CONFIG_DEFAULT_DEVICE_TREE tegra124-norrin
+#else
#define CONFIG_DEFAULT_DEVICE_TREE tegra124-venice2
+#endif
#define CONFIG_OF_CONTROL
#define CONFIG_OF_SEPARATE
/* High-level configuration options */
+#ifdef CONFIG_BOARD_NORRIN
+#define V_PROMPT "Tegra124 (Norrin) # "
+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA Norrin"
+#else
#define V_PROMPT "Tegra124 (Venice2) # "
#define CONFIG_TEGRA_BOARD_STRING "NVIDIA Venice2"
+#endif
/* Board-specific serial config */
#define CONFIG_SERIAL_MULTI
--
1.8.1.5
More information about the U-Boot
mailing list