linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 04/11] tegrarcm: Add Tegra124 support
Date: Mon, 9 Sep 2013 13:15:54 -0700	[thread overview]
Message-ID: <1378757761-20939-5-git-send-email-amartin@nvidia.com> (raw)
In-Reply-To: <1378757761-20939-1-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Add Tegra124 USB device id, miniloader, and chip SKU information.

Signed-off-by: Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 src/main.c        | 15 +++++++++++++++
 src/nv3p.h        |  3 +++
 src/tegrarcm.1.in |  4 +++-
 src/usb.c         |  3 ++-
 src/usb.h         |  1 +
 5 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 960eb4a..c898437 100644
--- a/src/main.c
+++ b/src/main.c
@@ -57,6 +57,9 @@
 // tegra114 miniloader
 #include "miniloader/tegra114-miniloader.h"
 
+// tegra124 miniloader
+#include "miniloader/tegra124-miniloader.h"
+
 static int wait_status(nv3p_handle_t h3p);
 static int send_file(nv3p_handle_t h3p, const char *filename);
 static int download_miniloader(usb_device_t *usb, uint8_t *miniloader,
@@ -208,6 +211,9 @@ int main(int argc, char **argv)
 	} else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA114) {
 		dprintf("initializing RCM version 35\n");
 		ret = rcm_init(RCM_VERSION_35);
+	} else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA124) {
+		dprintf("initializing RCM version 40\n");
+		ret = rcm_init(RCM_VERSION_40);
 	} else {
 		error(1, ENODEV, "unknown tegra device: 0x%x", devid);
 	}
@@ -249,6 +255,10 @@ int main(int argc, char **argv)
 		miniloader = miniloader_tegra114;
 		miniloader_size = sizeof(miniloader_tegra114);
 		miniloader_entry = TEGRA114_MINILOADER_ENTRY;
+	} else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA124) {
+		miniloader = miniloader_tegra124;
+		miniloader_size = sizeof(miniloader_tegra124);
+		miniloader_entry = TEGRA124_MINILOADER_ENTRY;
 	} else {
 		error(1, ENODEV, "unknown tegra device: 0x%x", devid);
 	}
@@ -481,6 +491,11 @@ static void dump_platform_info(nv3p_platform_info_t *info)
 		case TEGRA114_CHIP_SKU_T114: chip_name = "t114"; break;
 		default: chip_name = "unknown"; break;
 		}
+	} else if (info->chip_id.id == 0x40) {
+		switch (info->sku) {
+		case TEGRA124_CHIP_SKU_T124: chip_name = "t124"; break;
+		default: chip_name = "unknown"; break;
+		}
 	} else {
 		chip_name = "unknown";
 	}
diff --git a/src/nv3p.h b/src/nv3p.h
index 20cb93b..f57f510 100644
--- a/src/nv3p.h
+++ b/src/nv3p.h
@@ -68,6 +68,9 @@ typedef struct nv3p_state *nv3p_handle_t;
 // tegra114 chip sku
 #define TEGRA114_CHIP_SKU_T114   0x00
 
+// tegra124 chip sku
+#define TEGRA124_CHIP_SKU_T124   0x00
+
 // boot device type
 #define NV3P_DEV_TYPE_NAND              0x1
 #define NV3P_DEV_TYPE_EMMC              0x2
diff --git a/src/tegrarcm.1.in b/src/tegrarcm.1.in
index 4b9200d..011d169 100644
--- a/src/tegrarcm.1.in
+++ b/src/tegrarcm.1.in
@@ -24,6 +24,8 @@ device.
 .B Tegra30
 .IP \(bu
 .B Tegra114
+.IP \(bu
+.B Tegra124
 
 .SS How to use
 .IP \(em
@@ -53,7 +55,7 @@ the firmware file that will be downloaded and executed.
 .B \-\-loadaddr \fIloadaddr\fP
 Specify the address the bootloader will be loaded at.  This should be
 specified in hex and is typically 0x108000 for a Tegra20 device or
-0x80108000 for a Tegra30 or Tegra114 device.
+0x80108000 for a Tegra30, Tegra114, or Tegra124 device.
 .TP
 .B \-\-entryaddr \fIentryaddr\fP
 Specify the entry address that control will be passed to after the
diff --git a/src/usb.c b/src/usb.c
index 0b33de9..16f3d90 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -155,7 +155,8 @@ usb_device_t *usb_open(uint16_t venid, uint16_t *devid)
 		if (usb_match(device, venid, devid)) {
 			if ((*devid & 0xff) == USB_DEVID_NVIDIA_TEGRA20 ||
 			    (*devid & 0xff) == USB_DEVID_NVIDIA_TEGRA30 ||
-			    (*devid & 0xff) == USB_DEVID_NVIDIA_TEGRA114) {
+			    (*devid & 0xff) == USB_DEVID_NVIDIA_TEGRA114 ||
+			    (*devid & 0xff) == USB_DEVID_NVIDIA_TEGRA124) {
 				found = device;
 				break;
 			} else {
diff --git a/src/usb.h b/src/usb.h
index 03ba18c..a7b36af 100644
--- a/src/usb.h
+++ b/src/usb.h
@@ -35,6 +35,7 @@
 #define USB_DEVID_NVIDIA_TEGRA20 0x20
 #define USB_DEVID_NVIDIA_TEGRA30 0x30
 #define USB_DEVID_NVIDIA_TEGRA114 0x35
+#define USB_DEVID_NVIDIA_TEGRA124 0x40
 
 typedef struct {
 	libusb_device_handle *handle;
-- 
1.8.1.5

  parent reply	other threads:[~2013-09-09 20:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 20:15 [PATCH 00/11] tegrarcm: T124 and new command support Allen Martin
     [not found] ` <1378757761-20939-1-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 20:15   ` [PATCH 01/11] tegrarcm: Change NVIDIA license to apply to all miniloader files Allen Martin
2013-09-09 20:15   ` [PATCH 02/11] tegrarcm: Add support for RCM protocol version 40 Allen Martin
2013-09-09 20:15   ` Allen Martin [this message]
     [not found]     ` <1378757761-20939-5-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:38       ` [PATCH 04/11] tegrarcm: Add Tegra124 support Stephen Warren
     [not found]         ` <522E3FE7.8020503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-11 20:49           ` Allen Martin
2013-09-11 21:12             ` Stephen Warren
2013-09-09 20:15   ` [PATCH 05/11] tegrarcm: Add timeout to USB xfers Allen Martin
2013-09-09 20:15   ` [PATCH 06/11] tegrarcm: Assume nv3p server is running if RCM doesn't respond Allen Martin
     [not found]     ` <1378757761-20939-7-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:42       ` Stephen Warren
2013-09-09 20:15   ` [PATCH 07/11] tegrarcm: Clean up usage info Allen Martin
2013-09-09 20:15   ` [PATCH 08/11] tegrarcm: Add rip support Allen Martin
     [not found]     ` <1378757761-20939-9-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:50       ` Stephen Warren
2013-09-09 20:15   ` [PATCH 09/11] tegrarcm: Add support for odmdata command Allen Martin
     [not found]     ` <1378757761-20939-10-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:53       ` Stephen Warren
     [not found]         ` <522E436F.90402-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-11 21:12           ` Allen Martin
2013-09-11 21:15             ` Stephen Warren
     [not found]               ` <5230DD8F.4030703-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-16 20:28                 ` Allen Martin
2013-09-16 21:26                   ` Stephen Warren
2013-09-09 20:16   ` [PATCH 10/11] tegrarcm: Add command to pass miniloader in from file Allen Martin
     [not found]     ` <1378757761-20939-11-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:56       ` Stephen Warren
2013-09-09 20:16   ` [PATCH 11/11] tegrarcm: Bump version to 1.5 Allen Martin
     [not found]     ` <1378757761-20939-12-git-send-email-amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-09 21:57       ` Stephen Warren
     [not found]         ` <522E4441.8060906-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-11 20:42           ` Allen Martin
2013-09-09 21:57   ` [PATCH 00/11] tegrarcm: T124 and new command support Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378757761-20939-5-git-send-email-amartin@nvidia.com \
    --to=amartin-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).