ARM: tegra: add p2771-0000 board support
authorStephen Warren <swarren@nvidia.com>
Thu, 12 May 2016 19:32:56 +0000 (13:32 -0600)
committerTom Warren <twarren@nvidia.com>
Tue, 31 May 2016 18:22:59 +0000 (11:22 -0700)
P2771-0000 is a P3310 CPU board married to a P2597 I/O board. The
combination contains SoC, DRAM, eMMC, SD card slot, HDMI, USB micro-B
port, Ethernet, USB3 host port, SATA, PCIe, and two GPIO expansion
headers.

Currently, due to U-Boot's level of support for Tegra186, the only
features supported by U-Boot are the console UART and the on-board eMMC.
Additional features will be added over time.

U-Boot has so far been tested by replacing the kernel image on the device
with a U-Boot binary. It is anticipated that U-Boot will eventually
replace the CCPLEX bootloader binary, as on previous chips. This hasn't
yet been tested.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/dts/Makefile
arch/arm/dts/tegra186-p2771-0000.dts [new file with mode: 0644]
arch/arm/mach-tegra/tegra186/Kconfig
board/nvidia/p2771-0000/Kconfig [new file with mode: 0644]
board/nvidia/p2771-0000/MAINTAINERS [new file with mode: 0644]
board/nvidia/p2771-0000/Makefile [new file with mode: 0644]
board/nvidia/p2771-0000/p2771-0000.c [new file with mode: 0644]
configs/p2771-0000_defconfig [new file with mode: 0644]
include/configs/p2771-0000.h [new file with mode: 0644]

index 92c7545bb5a2d583f26607d2bab3381f5fb4f1c0..818d24eb69bdb2808f741a3d2e2599a5fe5ebcf8 100644 (file)
@@ -47,6 +47,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
        tegra124-jetson-tk1.dtb \
        tegra124-nyan-big.dtb \
        tegra124-venice2.dtb \
+       tegra186-p2771-0000.dtb \
        tegra210-e2220-1170.dtb \
        tegra210-p2371-0000.dtb \
        tegra210-p2371-2180.dtb \
diff --git a/arch/arm/dts/tegra186-p2771-0000.dts b/arch/arm/dts/tegra186-p2771-0000.dts
new file mode 100644 (file)
index 0000000..5f29ee4
--- /dev/null
@@ -0,0 +1,25 @@
+/dts-v1/;
+
+#include "tegra186.dtsi"
+
+/ {
+       model = "NVIDIA P2771-0000";
+       compatible = "nvidia,p2771-0000", "nvidia,tegra186";
+
+       chosen {
+               stdout-path = &uarta;
+       };
+
+       aliases {
+               sdhci0 = "/sdhci@3460000";
+       };
+
+       memory {
+               reg = <0x0 0x80000000 0x0 0x60000000>;
+       };
+
+       sdhci@3460000 {
+               status = "okay";
+               bus-width = <8>;
+       };
+};
index 124d8e5835926d01eaff8dd7b35fee3fdcad5e1b..97cf23f31f80b6525e0c84f1272b72eaef00440c 100644 (file)
@@ -7,9 +7,19 @@ if TEGRA186
 choice
        prompt "Tegra186 board select"
 
+config TARGET_P2771_0000
+       bool "NVIDIA Tegra186 P2771-0000 board"
+       help
+         P2771-0000 is a P3310 CPU board married to a P2597 I/O board. The
+         combination contains SoC, DRAM, eMMC, SD card slot, HDMI, USB
+         micro-B port, Ethernet, USB3 host port, SATA, PCIe, and two GPIO
+         expansion headers.
+
 endchoice
 
 config SYS_SOC
        default "tegra186"
 
+source "board/nvidia/p2771-0000/Kconfig"
+
 endif
diff --git a/board/nvidia/p2771-0000/Kconfig b/board/nvidia/p2771-0000/Kconfig
new file mode 100644 (file)
index 0000000..1b1116f
--- /dev/null
@@ -0,0 +1,16 @@
+# Copyright (c) 2016, NVIDIA CORPORATION.
+#
+# SPDX-License-Identifier: GPL-2.0
+
+if TARGET_P2771_0000
+
+config SYS_BOARD
+       default "p2771-0000"
+
+config SYS_VENDOR
+       default "nvidia"
+
+config SYS_CONFIG_NAME
+       default "p2771-0000"
+
+endif
diff --git a/board/nvidia/p2771-0000/MAINTAINERS b/board/nvidia/p2771-0000/MAINTAINERS
new file mode 100644 (file)
index 0000000..4fc4ebd
--- /dev/null
@@ -0,0 +1,6 @@
+P2771-0000 BOARD
+M:     Stephen Warren <swarren@nvidia.com>
+S:     Maintained
+F:     board/nvidia/p2771-0000/
+F:     include/configs/p2771-0000.h
+F:     configs/p2771-0000_defconfig
diff --git a/board/nvidia/p2771-0000/Makefile b/board/nvidia/p2771-0000/Makefile
new file mode 100644 (file)
index 0000000..b28a47d
--- /dev/null
@@ -0,0 +1,5 @@
+# Copyright (c) 2016, NVIDIA CORPORATION.
+#
+# SPDX-License-Identifier: GPL-2.0
+
+obj-y  += p2771-0000.o
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
new file mode 100644 (file)
index 0000000..4ba8ebc
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2016, NVIDIA CORPORATION
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
diff --git a/configs/p2771-0000_defconfig b/configs/p2771-0000_defconfig
new file mode 100644 (file)
index 0000000..9f2c418
--- /dev/null
@@ -0,0 +1,31 @@
+CONFIG_ARM=y
+CONFIG_TEGRA=y
+CONFIG_TEGRA186=y
+CONFIG_TARGET_P2771_0000=y
+CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000"
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="Tegra186 (P2771-0000) # "
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+# CONFIG_CMD_NFS is not set
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h
new file mode 100644 (file)
index 0000000..257283f
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013-2016, NVIDIA CORPORATION.
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef _P2771_0000_H
+#define _P2771_0000_H
+
+#include <linux/sizes.h>
+
+#include "tegra186-common.h"
+
+/* High-level configuration options */
+#define CONFIG_TEGRA_BOARD_STRING      "NVIDIA P2771-0000"
+
+/* SD/MMC */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_TEGRA_MMC
+
+/* Environment in eMMC, at the end of 2nd "boot sector" */
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV         0
+#define CONFIG_SYS_MMC_ENV_PART                2
+#define CONFIG_ENV_OFFSET              (-CONFIG_ENV_SIZE)
+
+#include "tegra-common-post.h"
+
+/* Crystal is 38.4MHz. clk_m runs at half that rate */
+#define COUNTER_FREQUENCY      19200000
+
+#endif