comments for Luminary ICDI layout
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sun, 18 Jul 2010 21:29:25 +0000 (17:29 -0400)
committerDavid Brownell <db@helium.(none)>
Sun, 18 Jul 2010 21:29:25 +0000 (17:29 -0400)
Provide $defines for more of the signals involved in the
Luminary ICDI hardware, and comment some of what's going on.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/jtag/drivers/ft2232.c

index bf71fa3237de6831ef5e1115ef64954f0ed3ee1b..4dcc045cccdeda67b4a0e2859e0cd1e5c056818a 100644 (file)
@@ -318,6 +318,9 @@ static const struct ft2232_layout *layout;
 
 /** default bitmask values ddriven on DBUS: TCK/TDI/TDO/TMS and GPIOL(0..4) */
 static uint8_t                  low_output     = 0x0;
+
+/* note that direction bit == 1 means that signal is an output */
+
 /** default direction bitmask for DBUS: TCK/TDI/TDO/TMS and GPIOL(0..4) */
 static uint8_t                  low_direction  = 0x0;
 /** default value bitmask for CBUS GPIOH(0..4) */
@@ -2492,13 +2495,34 @@ static int icdi_jtag_init(void)
 
        /* Most Luminary eval boards support SWO trace output,
         * and should use this "luminary_icdi" layout.
+        *
+        * DBUS 0..3 are used for JTAG as usual.  GPIOs are used
+        * to switch between JTAG and SWD, or switch the ft2232 UART
+        * between (i) the target UART or (ii) SWO trace data.
+        *
+        * We come up in JTAG mode and may switch to SWD later (with
+        * SWO/trace option if SWD is active).
+        *
+        * DBUS == GPIO-Lx
+        * CBUS == GPIO-Hx
         */
+
+
+#define ICDI_JTAG_EN (1 << 7)          /* ADBUS 7 (a.k.a. DBGMOD) */
+#define ICDI_DBG_ENn (1 << 6)          /* ADBUS 6 */
+#define ICDI_SRST (1 << 5)             /* ADBUS 5 */
+#define ICDI_TDI (1 << 2)              /* ADBUS 2 (INPUT) */
+
+#define ICDI_SWO_EN (1 << 4)           /* BDBUS 4 */
+#define ICDI_TX_SWO (1 << 1)           /* BDBUS 1 */
+
        nTRST = 0x0;
        nTRSTnOE = 0x00;
-       nSRST = 0x20;
+       nSRST = ICDI_SRST;
        nSRSTnOE = 0x20;
-       low_output    = 0x88;
-       low_direction = 0xcb;
+
+       low_output    = 0x08 | ICDI_JTAG_EN;
+       low_direction = 0xcb | ICDI_JTAG_EN;
 
        return ftx232_dbus_write();
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)