Commit Graph

63 Commits

Author SHA1 Message Date
Werner Almesberger f1f900944b fw/common/Makefile.common (clean, spotless): allow overloading (with ::) 2011-09-04 12:31:13 -03:00
Werner Almesberger 405a0c8adc Moved ssop.fpd from f32xbase/c2usb to kicad-libs (deletions) 2011-08-14 05:05:15 -03:00
Werner Almesberger 619f4c8e6e c2usb/c2usb.pro: updated for move of ssop.fpd to kicad-libs 2011-08-14 05:05:15 -03:00
Werner Almesberger 6d750ee61e Moved usb-a-pcb.fpd from f32xbase/c2usb to kicad-libs (deletion) 2011-08-14 04:04:52 -03:00
Werner Almesberger b9bd712f37 c2usb/c2usb.pro: updated for usb-a-pcb.fpd move 2011-08-14 04:04:52 -03:00
Werner Almesberger ab915dd785 lib/Makefile.common: changed "clean:" to "clean::" to allow for additions 2011-01-19 17:53:36 -03:00
Werner Almesberger 4b8bcf9f4b c2brn.brd: updated all footprints to update pad types 2011-01-18 16:05:23 -03:00
Werner Almesberger a3a31f42b5 c2-ben.c: title comment still claimed the driver was for GTA01/02 2011-01-17 17:43:55 -03:00
Werner Almesberger d915463a82 c2ben.sch: finally, rename the title as well 2011-01-17 17:42:08 -03:00
Werner Almesberger b6cfb825af use 8_10-card.lib instead of usd-card.lib
- c2ben.pro (LibName3): use ../../kicad-libs/components/8_10-card instead
  of ../../kicad-libs/components/usd-card
- c2ben.sch: use symbol 8:10-CARD instead of USD-CARD
- c2ben.cmp, c2ben.brd: updated for renaming of usd-card.lib
2011-01-17 17:39:51 -03:00
Werner Almesberger 32946a56ab use 8_10-card.fpd instead of usd-card.fpd
- c2ben.pro (LibName1) : use ../../kicad-libs/modules/8_10-card instead of
      ../../kicad-libs/modules/usd-card
- c2ben.sch: use footprint "8:10-card" instead of "uSD-Card"
- c2ben.pro: let cvpcb add its configuration section (which seems to be
  necessary for it to recognize the pcbnew LibName settings)
- c2ben.cmp, c2ben.brd: updated for renaming of usd-card.fpd
2011-01-17 14:30:08 -03:00
Werner Almesberger 901998526e f32x/: renamed OpenWRT target from "ben" to "ben_openwrt" and added "ben_jlime"
- f32x/Makefile: set default target to ben_jlime instead of "ben"
- f32x/Makefile (CC_ben, CFLAGS_ben, LDFLAGS_ben, OBJS_ben, UPLOAD_ben):
  renamed to *_openwrt and added *_jlime equivalents
2011-01-10 12:39:43 -03:00
Werner Almesberger 6dbd844d0f f32x: open /dev/mem with O_SYNC to disable caching
- f32x/gpio-s3c24xx.c (gpio_init), f32x/gpio-xburst.c (gpio_init): open
  /dev/mem with O_SYNC to disable caching
2011-01-03 18:33:56 -03:00
Werner Almesberger 88fa3ad057 Improved chip identification, added C8051F34x support, some cleanup.
- f32x/f32x.c (identify_chip, identify, main): identify the chip and print
  its name
- f32x/f32x.c (identify): exit if communication is unstable already during
  chip identification
- f32x/f32x.c (chips): added the C8051F34x
- f32x/f32x.c (determine_layout, main): determine memory layout based on
  flash size
- f32x/f32x.c (usage, main): new option  -k flash_kb  to set/override the
  flash size
- f32x/f32x.c (LOCK_BYTE, protect, need_layout, main): use memory layout
  determined at run-time instead of hard-coded layout
- f32x/f32x.c (main): throw an error of -p is used without flashing
- f32x/f32x.c: added section titles and rearranged the order of some
  functions
2010-11-07 01:52:19 -03:00
Werner Almesberger 19e87df825 Add DFU to BOOKSHELF. Add MMC driver unloading instructions to f32x/README
- BOOKSHELF: added the DFU specification 1.1 as "dfu"
- f32x/README: the kernel's MMC driver has to be unloaded before using the
  uSD interface for bit-banging
2010-11-05 22:00:13 -03:00
Werner Almesberger 2951f9621c Moved c2ben/components/usd-card.lib to kicad-libs project
- c2ben/c2ben.pro: updated library path to usd-card.lib
- c2ben/components/usd-card.lib: deleted
2010-11-02 11:04:06 -03:00
Werner Almesberger 13aa36be2b Changed default target to "ben" and added Ben upload.
- f32x/Makefile: "ben" is now the default target
- f32x/Makefile: made upload process target-dependent
2010-10-22 14:50:13 -03:00
Werner Almesberger e614d15fef Cleaned up command-line parsing. Added option -n to disable target power.
- f32x/c2-ben.c: removed #include <stdio.h> left over from debugging
- f32x/f32x.c (main): command-line parsing now uses getopt() and is done
  before trying to talk to the target
- f32x/c2-drv.h (c2_ops), f32x/c2.h (c2_init), f32x/c2.c (c2_init),
  f32x/c2-om.c (om_init): pass "power" argument along the init call chain
- f32x/c2-ben.c (ben_init): added target power switching
- f32x/f32x.c (usage, main): new option -n to disable target power
2010-10-22 14:50:13 -03:00
Werner Almesberger 8325a06f61 Small board adjustments, mainly to improve room for isolation.
- c2ben/c2ben.sch: rename VDD net on the header board to VBUS, to prevent
  KiCad from considering it to be the same as VDD(nPD02)
- c2ben/c2ben.brd: make board 40 mil wider to have more room for applying
  isolation (silicone paste)
- c2ben/c2ben.brd: reduce distance from header pad to board edge by 5 mil
  to 40 mil, to increase overlap of pins and pads
- c2ben/cam/pcb.pl: adjusted board size and spacing between boards for
  above changes
2010-10-22 04:40:03 -03:00
Werner Almesberger b1d1fcc4ba c2usb/cam/pcb.pl: fix bogus tool parameters
Fixing it lest if gets copied and lives on elsewhere. Note that it may
still be necessary to add a small negative correction (in the order of
-0.1 mm) to compensate for deflection of the workpiece.

- c2usb/cam/pcb.pl ($d): there are 25.4 mm in an inch, not 2.54
- c2usb/cam/pcb.pl ($d): the endmill used has a diameter of 35 mil, not
  8 mil
- c2usb/cam/pcb.p ($r): don't apply correction for imagined mechanical
  issues (now what we're working with correct values)
2010-10-22 04:12:36 -03:00
Werner Almesberger df9fb5c338 Include gpio-s3c24xx.h in gpio-s3c24xx.c
- f32x/gpio-s3c24xx.c: include gpio-s3c24xx.h
- f32x/gpio-s3c24xx.c: fix declaration mismatch discovered this way
2010-10-21 20:25:17 -03:00
Werner Almesberger bb600dada5 f32x: added support for the c2ben adapter
- f32x/c2-ben.c: bitbang wrapper for the c2ben board
- f32x/Makefile: added "ben" target
- f32x/gpio-xburst.h, f32x/gpio-xburst.c: GPIO access primitives for XBurst
  CPUs
2010-10-21 20:15:07 -03:00
Werner Almesberger 80a0152663 Don't call gpio_init in c2_init, so that we can do additional setup work before
- f32x/c2-om.c: moved system includes to c2-bitbang.c
- f32x/c2-bitbang.c (c2_init): leave it to the upper layer to call gpio_init
- f32x/c2-om.c (om_init): call gpio_init, then c2_init
2010-10-21 19:28:00 -03:00
Werner Almesberger 4f743578ab Labeled the control signals with the Ben's GPIOs
- c2ben/c2ben.sch: added labels with the Ben's GPIOs to the control signals
- c2ben/c2ben.brd: imported updated netlist
2010-10-21 19:22:27 -03:00
Werner Almesberger 6a4da0eaef Moved C2 bitbang functions from c2-om.c to (#included) c2-bitbang.c
- f32x/c2-om.c: renamed C2 bitbang functions from om_* to c2_*
- f32x/c2-om.c,  f32x/c2-bitbang.c: moved most of the content of c2-om.c to
  c2-bitbang.c and #include c2-bitbang.c
- f32x/Makefile: c2-om.o depends on c2-bitbang.c now
2010-10-21 19:09:43 -03:00
Werner Almesberger 3c9abdc65a Renamed gpio.* to gpio-s3c24xx.*
- f32x/Makefile (OBJS_om): rename gpio.o to gpio-s3c24xx.o
- f32x/gpio-s3c24xx.h, f32x/gpio-s3c24xx.c, f32x/c2-om.c: renamed gpio.* to
  gpio-s3c24xx.* to
2010-10-21 18:30:02 -03:00
Werner Almesberger 3bbf318536 Switched from four-spaces to one-tab indentation. 2010-10-21 10:05:26 -03:00
Werner Almesberger de75051afa Support different targets. (Openmoko GTA01/02 with Dbgv3, soon c2ben.)
- f32x/Makefile: added support for building for different targets (for now,
  just TARGET=om)
- f32x/c2-drv.h: interface for C2 drivers
- f32x/c2-om.c: updated title
- f32x/c2-om.c: renamed all c2_* to om_* and made them "static"
- f32x/c2-om.c (c2_om): driver operations
- f32x/c2.c: call driver operations
- f32x/c2.h: moved protocol constants to c2-drv.h
2010-10-21 10:03:42 -03:00
Werner Almesberger ab35c6b518 Prepare abstraction of C2 communication.
- f32x/c2.c: renamed to c2-om.c
- f32x/Makefile (OBJS): changed c2.o to c2-om.o
2010-10-21 10:00:41 -03:00
Werner Almesberger 66a929a1f5 c2ben/c2ben.brd: changed track width from 8 to 10 mil 2010-10-21 03:10:22 -03:00
Werner Almesberger c1935d59d0 c2ben/: initial commit of passive C2 adapter board for the Ben's uSD slot. 2010-10-20 20:16:23 -03:00
Werner Almesberger 7829d4d569 Removed local copy of pads.fpd from c2usb
- c2usb/c2usb.pro: use "pads" from kicad-libs instead of local copy
- c2usb/modules/Makefile (MODULES): remove "pads"
- c2usb/modules/pads.fpd: removed
2010-10-20 14:01:07 -03:00
Werner Almesberger 07e96675f6 c2usb/c2usb.sch: mark design as suspended, due to FT232 being unfit for project 2010-10-20 11:05:35 -03:00
Werner Almesberger 8eaef6b062 Renamed hw/ to c2usb/, to make room for other hardware. 2010-10-20 10:57:42 -03:00
Werner Almesberger 77d684804c fw/c2usb.conf: USB product ID assignment is now official 2010-10-08 09:28:25 -03:00
Werner Almesberger 3fd1720e8f Added BOOKSELF and dsv setup procedure.
- BOOKSHELF: data sheets for the FT232RL and the C2 protocol
- Makefile: "make dsv" sets up the data sheet cache
2010-10-08 03:55:02 -03:00
Werner Almesberger 9777d88d5a Customize the FT232 EEPROM with the Qi Hardware ID and other parameters.
- hw/c2usb.conf: custom FT232 EEPROM configuration
- hw/Makefile (flash-eeprom): new target to customize the FT232 EEPROM
2010-10-08 02:51:27 -03:00
Werner Almesberger c9f4c9b3db hw/cam/: toolpath generation for cutting the PCB. 2010-10-08 02:05:51 -03:00
Werner Almesberger 807616f24b R1/R2 were very close to U1 - move them away. Some small cleanup.
- hw/c2usb.brd: make board 20 mil wider and moved R1/R2 by this distance
  away from U1
- hw/c2usb.sch (FB1): added value (33R) to bead
- hw/c2usb.sch (R1): put component reference on the left side
- hw/c2usb.sch, hw/c2usb.brd: increased version number to 1
2010-10-08 02:00:22 -03:00
Werner Almesberger c7a53e8736 Make the board a bit bigger for more relaxed spacing of traces and components.
- hw/c2usb.brd: made board 40 mil wider (we still have a lot of room before
  reaching the maximum width of a USB dongle)
- hw/c2usb.brd: moved R1 and R2 10 mil away from U1
- hw/c2usb.brd: moved the power circuit 10 mil to the left, to increase the
  clearance of FB1
2010-10-03 20:52:16 -03:00
Werner Almesberger ad0015d64e Increased clearance from 9 mil to 9.7 mil.
- hw/c2usb.brd: increased clearance from 9 mil to 9.7 mil
- hw/c2usb.brd: rerouted traces to board edge connector for better
  clearance
2010-10-03 08:13:34 -03:00
Werner Almesberger 88f3dcc8ab Firmware-free C2 programmer, with USB interface. 2010-10-03 03:06:30 -03:00
Werner Almesberger 79396b1777 lib/usb.c (open_usb): Stupid beginner's mistake: wrong operator precedence due
to missing parentheses in device selection caused it to just pick the first
device it found.
2010-08-25 17:26:43 -03:00
Werner Almesberger 5ce904b20f Introduce PLATFORM_ENTER, replacing the old PLATFORM_SETUP for DFU mode
setup. PLATFORM_SETUP now performs early general platform setup, such as
turning off the watchdog.

- fw/boot/boot.c (main): the first thing we do is to run PLATFORM_SETUP
- fw/boot/boot.c (boot_loader): instead of PLATFORM_SETUP, run
  PLATFORM_ENTER
2010-08-25 04:30:28 -03:00
Werner Almesberger a77a9a611f lib/usb.c (open_usb): libusb documentation claims that considerable
bureaucracy is needed before operations can be performed. This doesn't
seem to be the case, but let's put the code (commented out) anyway,
since it's been written. (This was done while trying to debug another
problem.)
2010-08-24 21:09:22 -03:00
Werner Almesberger fd09655773 Requests following a rejected SETUP requests failed too, which sometimes
produces user-visible errors and may confuse implementations. (E.g., when
probing for an unimplemented feature and subsequently being greeted by a
timeout.)

- fw/comon/usb.c (handle_setup): set SOPRDY when answering a request error
  with a stall, according to the example in AN139. This seems to eliminate
  the timeouts observed in requests following after bad requests.
- fw/boot/boot.c (run_payload): described how the host is expected to
  respond to the device resetting its USB stack
2010-08-24 19:12:22 -03:00
Werner Almesberger bc37839a3a f32xbase didn't build on ancient Gentoo due to missing include.
- include/f32xbase/usb.h: include stdint.h
2010-08-24 06:44:44 -03:00
Werner Almesberger d254ca8755 Minor comment cleanup.
- fw/boot/boot.c (boot_loader): removed GTA01/GTA02-specific comments
- fw/boot/boot.c (boot_loader, main): documented SYSCLK settings
2010-08-23 21:28:16 -03:00
Werner Almesberger d1b3966e5a Added timer register values.
- fw/common/regs-f32x.h: common values for TCON, TMOD, and CKCON
- fw/common/regs-f320.h: C8051F320-specific values for TMOD and CKCON
2010-08-23 18:11:51 -03:00
Werner Almesberger 0f1c0ea783 - fw/common/regs-f320.h: include mcs51/C8051F320.h, not mcs51/C8051F326.h 2010-08-23 14:31:33 -03:00