diff FC-handset-spec @ 50:da1a2a32c260

FC-handset-spec: USB description started
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 11 Jun 2021 05:52:58 +0000
parents 38bcb9425df0
children 7933c3a1b5e0
line wrap: on
line diff
--- a/FC-handset-spec	Fri Jun 11 04:34:26 2021 +0000
+++ b/FC-handset-spec	Fri Jun 11 05:52:58 2021 +0000
@@ -707,3 +707,82 @@
 part of the discharge curve - and with NiMH we can only expect the problem to be
 even worse, as their discharge curve is said to be even flatter.  For these
 reasons, we are going to play it safe and stick with Li-ion.
+
+1.11. Charging circuit
+
+Our FC Libre Dumbphone will feature a USB port (mini-B, device role only, no
+OTG) that combines two logically separate functions: battery charging and
+computer interface.  The basic idea of this dual-function USB port comes from
+Pirelli DP-L10, but we are applying significant refinements of our own to this
+general idea, as the following description will make clear.  This section
+describes the charging function; the computer interface function is described
+in section 1.12.
+
+One highly non-standard innovation that will appear on our FC handset will be a
+user-visible mechanical slide switch that will turn the charging circuit on or
+off.  The purpose of this charging on/off switch is to make it possible to
+connect USB and have the two ttyUSB devices appear (see section 1.12) without
+presenting a 'charger plug' boot condition to the Calypso+Iota core chipset.
+From an end user perspective, if you only use the USB port for charging and
+don't care about the computer interface function, then leave the charging switch
+always on - USB plug/unplug will mean charger plug/unplug like on any
+conventional phone.  Similarly, if you do use the computer interface function to
+connect your phone to a host computer in regular operation, with the firmware
+up and running normally, but you don't mind having the phone also charge from
+your computer every time you connect USB, then likewise leave the charging
+switch always on.  However, if you are going to reflash phone firmware or do
+other advanced manipulations using the computer interface, then you will need
+to turn the charging switch off.  With the switch off, the USB port becomes a
+computer interface only, without charging.
+
+Past the switch, the battery charging circuit using USB +5V as the charging
+power source will be the most classic one depicted in Figure 4-10 in the Iota
+chip datasheet (TWL3025_SWRS021.pdf), same as in Pirelli DP-L10 and Motorola
+C1xx phones.  Presentation of USB +5V to Iota VCHG terminal past the charging
+on/off switch is what will cause the chipset to boot in the 'charger plug' mode,
+or to activate charging functions in the firmware if the phone is already on.
+
+1.12. Computer interface
+
+Our Calypso chip has no native USB, instead the host computer interface of all
+Calypso-based systems consists of two UARTs.  On our development boards starting
+with FCDEV3B, we got used to interfacing to both of these UARTs by way of
+FT2232x adapters, a USB to serial adapter that goes from one USB device to two
+UARTs, presenting two ttyUSB devices to a Linux host.  For low-level operations
+like flash programming, having just one Calypso UART is sufficient (either of
+the two), but once our regular firmware is up and running, then having both
+Calypso UARTs gives maximum user empowerment: Modem UART carries a classic AT
+command interface complete with CSD, GPRS and GSM 07.10 MUX capabilities, while
+the other UART (IrDA) carries TI's RVTMUX debug and development interface.
+
+Before arriving at our current radical approach with the charging on/off switch,
+for many years previously I was considering a more conservative approach.  My
+original idea was to bring out the two Calypso UARTs in very different ways: my
+thought was to bring only the Modem UART to the built-in USB port (by way of a
+built-in single-channel USB-serial chip), and have plugged-in USB always present
+VCHG to the chipset, but route the debug UART (the one most useful in low-level
+development and bring-up) to a special FPC connector that would interface to a
+special debug board, just like Openmoko did on their Neo.  Serious development
+work would then require having that debug board attached, while more casual
+users would be able to talk AT commands to the phone via the built-in USB port,
+charging the battery at the same time.
+
+What made me change my mind about this design was the realization that I, as the
+most principal user and developer, would end up wanting to have the debug board
+attached all the time, and the need to have it hanging externally, or perhaps
+glued or taped to the back of the phone, would be a huge blemish and
+inconvenience.  Back in the days of Openmoko, someone must have had a similar
+experience, as I remember reading about a hack where someone built a debug board
+functional equivalent that fits inside the Neo, in some otherwise unused space.
+
+Hence the new design for our planned FC Libre Dumbphone handset: the USB port
+will have a built-in FT2232D subsystem (USB to two UARTs) connected to it,
+interfacing to both Calypso UARTs, while the charging on/off switch will make it
+possible to use this interface for low-level development and bring-up without
+presenting VCHG to the chipset.  In this architecture this FT2232D subsystem
+should be considered the primary "owner" of the handset's USB port, while the
+charging function is secondary and optional, enabled or disabled with a switch.
+To put it another way, if our USB port is connected to a regular USB host (as
+opposed to a Dedicated Charging Port power-only source), that USB host will
+always enumerate the FT2232D and see two ttyUSB devices, whereas charging may
+or may not take place depending on the switch setting.