[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [OpenOCD-devel] [PATCH]: c0a6902 Trim FTDI C232HM updates to make generic
From:       gerrit () openocd ! org (gerrit)
Date:       2019-09-27 2:05:15
Message-ID: 20190927020515.566C5252256F () mail ! openocd ! org
[Download RAW message or body]

This is an automated email from Gerrit.

Al Dyrius (aldyrius42@gmail.com) just uploaded a new patch set to Gerrit, which you \
can find at http://openocd.zylin.com/5308

-- gerrit

commit c0a69028c4b2734f7551ab6b0c31cf5e2a270325
Author: Al Dyrius <aldyrius42@gmail.com>
Date:   Thu Sep 26 20:05:03 2019 -0600

    Trim FTDI C232HM updates to make generic
    
    Change-Id: I6020cf2ca8940223fcfdfad2184270d90f2a2b1a
    Signed-off-by: Al Dyrius <aldyrius42@gmail.com>

diff --git a/tcl/board/kc100.cfg b/tcl/board/kc100.cfg
index 865e681..b2c718c 100644
--- a/tcl/board/kc100.cfg
+++ b/tcl/board/kc100.cfg
@@ -1,4 +1,3 @@
-# boards/kc100.cfg
 # Knovative KC-100 cable modem, ancient board used in research.
 
 # TNETC4401PYP, 208-QFP U3 
@@ -13,16 +12,12 @@ reset_config trst_and_srst separate
 # That is remapped to 0xB0000000 uncached, 0x90000000 cached.
 flash bank intel cfi 0xB0000000 0x200000 2 2 $_TARGETNAME
 
-# Dumping the 2MB will takes about 10 mins w/FTDI FT232H at 4MHz; faster errs out in \
testing...  # Perform this after a clean reboot, halt, and reset init (which should \
also leave it halted).  proc kc100_dump_flash {} {
 	echo "Probing 48 TSOP Intel CFI flash chip (2MB)..."
 	flash probe intel
-	echo "Dumping 0x2000 of 2MB chip to flashdump.bin.
-	# Whole 2MB flash takes about 10 minutes w/FT232H at adapter_khz 4000..."
-	c232hm_LED_on
-	flash read_bank 0 flashdump.bin 0 0x2000
-	c232hm_LED_off
+	echo "Dumping 2MB flash chip to flashdump.bin.
+	flash read_bank 0 flashdump.bin 0 0x200000
 }
 
 #TODO figure out memory init sequence to be able to dump from cached segment instead
@@ -34,6 +29,3 @@ proc kc100_dump_flash {} {
 # This modem in many ways appears to be essentially a clone of the SB5120. See \
usbjtag.com.  # The firmware/OS is also susceptible to many of the same procedures in \
"Hacking the Cable Modem"  # by DerEngel (Ryan Harris), available from No Starch \
                Press.
-
-# end boards/kc100.cfg
-
diff --git a/tcl/interface/ftdi/c232hm.cfg b/tcl/interface/ftdi/c232hm.cfg
index 3caf199..3151717 100644
--- a/tcl/interface/ftdi/c232hm.cfg
+++ b/tcl/interface/ftdi/c232hm.cfg
@@ -1,4 +1,3 @@
-# interface/ftdi/c232hm.cfg
 #
 # FTDI USB Hi-Speed to MPSSE Cable
 #
@@ -15,11 +14,6 @@
 # http://www.ftdichip.com/Support/Documents/AppNotes/AN_135_MPSSE_Basics.pdf
 # http://www.ftdichip.com/Support/Documents/AppNotes/AN_129_FTDI_Hi_Speed_USB_To_JTAG_Example.pdf
  #
-# This was tested with the 3.3V version adapter (FTDI part number C232HM-DDHSL-0). \
                It should also
-# work with the 5V version (C232HM-EDHSL-0), but this has not been tested.
-#
-# In testing, with adapter_khz at 26000 or 30000 MHz, read speed topped out around \
                2.2 KiB/s.
-# This allowed dumping a 4MB flash chip in about 30 minutes, for example.
 
 interface ftdi
 #ftdi_device_desc "C232HM-DDHSL-0"
@@ -29,43 +23,16 @@ interface ftdi
 ftdi_vid_pid 0x0403 0x6014
 
 # Layout
-# High data 0xff makes ACBUS (which includes LED on ACBUS6) initially high (off).
-# Low data byte 0xf8 makes TRST (AD4) and SRST (AD5) initially high (unasserted).
-# High direction 0x40 makes only ACBUS6 output (connected to red LED)
-# Low direction 0xfb makes GPIOL0/1 output; used for T/SRST signals below. Only TDO \
                is input (low).
-ftdi_layout_init 0xfff8 0x40fb
+ftdi_layout_init 0x0008 0x000b
 
-# Optional Signals (Comment out ftdi_layout_signal line(s) below if board doesn't \
                have T/SRST.)
-# ---A*BUS-------CCCCCCCC|DDDDDDDD
-# --------\______76543210|76543210
-# nTRST 0x0010 = 00000000|00010000 = ADBUS4 (gray)
-# nSRST 0x0020 = 00000000|00100000 = ADBUS5 (purple)
-# LED	0x4000 = 01000000|00000000 = ACBUS6
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
+# Red LED on ACBUS6
 ftdi_layout_signal LED -data 0x4000 -noe 0x4000
 
-# LED toggle procedures
-proc c232hm_LED_on {} {
-	ftdi_layout_signal LED -data 0x4000 -oe 0x4000
-}
-
-proc c232hm_LED_off {} {
-	ftdi_layout_signal LED -data 0x4000 -noe 0x4000
-}
-
 # C232HM		FT232H	JTAG
 # Num	Color	Name	Func
-# 1		Red		VCC		N/A - Do not connect
+# 1		Red		VCC		Optionally power the board if not using the board's own adapter.
 # 2		Orange	ADBUS0	TCK
 # 3		Yellow  ADBUS1	TDI
 # 4		Green	ADBUS2	TDO
 # 5		Brown   ADBUS3	TMS
-# 6		Grey	ADBUS4	(GPIOL0)/nTRST
-# 7		Purple	ADBUS5	(GPIOL1)/nSRST
-# 8		White   ADBUS6	(GPIOL2) - not used
-# 9		Blue	ADBUS7	(GPIOL3) - not used
 # 10	Black	GND		Connect to ground
-
-# end interface/ftdi/c232hm.cfg
-
diff --git a/tcl/target/tnetc4401.cfg b/tcl/target/tnetc4401.cfg
index d9eaf87..42df0f3 100644
--- a/tcl/target/tnetc4401.cfg
+++ b/tcl/target/tnetc4401.cfg
@@ -1,25 +1,17 @@
-# targets/tnetc4401.cfg
-
 # Texas Instruments (TI) TNETC4401, MIPS32 DOCSIS-tailored SoC (4Kc-based)
-# First found TNETC4401PYP on KC-100 CM used in research. Also used on Motorola \
Surfboard SB5120. +# Present in TNETC4401PYP Knovative KC-100 and Motorola Surfboard \
SB5120 cable modems.  # See https://brezn.muc.ccc.de/~mazzoo/DOCSIS/tnetc4401.pdf
 transport select jtag
 set _TARGETNAME tnetc4401
 set _CPUTAPID 0x0000100f
 jtag newtap $_TARGETNAME tap -irlen 5 -ircapture 0x01 -irmask 0x1f -expected-id \
$_CPUTAPID  target create $_TARGETNAME mips_m4k -chain-position $_TARGETNAME.tap \
                -endian big
-# end targets/tnetc4401.cfg
 
 # May need to halt manually before calling reset init
 $_TARGETNAME configure -event reset-init {
-	#reset_config trst_and_srst separate
 	halt
 	echo "reset-init: disabling watchdog..."
 	mwb phys 0xa8610b00 0 256
 	halt
 	wait_halt
-	echo "Done, check with:"
-	echo "targets"	
 }
-
-# end targets/tnetc4401.cfg

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic