FreeCalypso > hg > freecalypso-docs
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 49:38bcb9425df0 | 50:da1a2a32c260 |
|---|---|
| 705 determining the state of charge from Vbat for the purpose of the bars icon is | 705 determining the state of charge from Vbat for the purpose of the bars icon is |
| 706 already somewhat challenging even with Li-ion, given the relatively flat middle | 706 already somewhat challenging even with Li-ion, given the relatively flat middle |
| 707 part of the discharge curve - and with NiMH we can only expect the problem to be | 707 part of the discharge curve - and with NiMH we can only expect the problem to be |
| 708 even worse, as their discharge curve is said to be even flatter. For these | 708 even worse, as their discharge curve is said to be even flatter. For these |
| 709 reasons, we are going to play it safe and stick with Li-ion. | 709 reasons, we are going to play it safe and stick with Li-ion. |
| 710 | |
| 711 1.11. Charging circuit | |
| 712 | |
| 713 Our FC Libre Dumbphone will feature a USB port (mini-B, device role only, no | |
| 714 OTG) that combines two logically separate functions: battery charging and | |
| 715 computer interface. The basic idea of this dual-function USB port comes from | |
| 716 Pirelli DP-L10, but we are applying significant refinements of our own to this | |
| 717 general idea, as the following description will make clear. This section | |
| 718 describes the charging function; the computer interface function is described | |
| 719 in section 1.12. | |
| 720 | |
| 721 One highly non-standard innovation that will appear on our FC handset will be a | |
| 722 user-visible mechanical slide switch that will turn the charging circuit on or | |
| 723 off. The purpose of this charging on/off switch is to make it possible to | |
| 724 connect USB and have the two ttyUSB devices appear (see section 1.12) without | |
| 725 presenting a 'charger plug' boot condition to the Calypso+Iota core chipset. | |
| 726 From an end user perspective, if you only use the USB port for charging and | |
| 727 don't care about the computer interface function, then leave the charging switch | |
| 728 always on - USB plug/unplug will mean charger plug/unplug like on any | |
| 729 conventional phone. Similarly, if you do use the computer interface function to | |
| 730 connect your phone to a host computer in regular operation, with the firmware | |
| 731 up and running normally, but you don't mind having the phone also charge from | |
| 732 your computer every time you connect USB, then likewise leave the charging | |
| 733 switch always on. However, if you are going to reflash phone firmware or do | |
| 734 other advanced manipulations using the computer interface, then you will need | |
| 735 to turn the charging switch off. With the switch off, the USB port becomes a | |
| 736 computer interface only, without charging. | |
| 737 | |
| 738 Past the switch, the battery charging circuit using USB +5V as the charging | |
| 739 power source will be the most classic one depicted in Figure 4-10 in the Iota | |
| 740 chip datasheet (TWL3025_SWRS021.pdf), same as in Pirelli DP-L10 and Motorola | |
| 741 C1xx phones. Presentation of USB +5V to Iota VCHG terminal past the charging | |
| 742 on/off switch is what will cause the chipset to boot in the 'charger plug' mode, | |
| 743 or to activate charging functions in the firmware if the phone is already on. | |
| 744 | |
| 745 1.12. Computer interface | |
| 746 | |
| 747 Our Calypso chip has no native USB, instead the host computer interface of all | |
| 748 Calypso-based systems consists of two UARTs. On our development boards starting | |
| 749 with FCDEV3B, we got used to interfacing to both of these UARTs by way of | |
| 750 FT2232x adapters, a USB to serial adapter that goes from one USB device to two | |
| 751 UARTs, presenting two ttyUSB devices to a Linux host. For low-level operations | |
| 752 like flash programming, having just one Calypso UART is sufficient (either of | |
| 753 the two), but once our regular firmware is up and running, then having both | |
| 754 Calypso UARTs gives maximum user empowerment: Modem UART carries a classic AT | |
| 755 command interface complete with CSD, GPRS and GSM 07.10 MUX capabilities, while | |
| 756 the other UART (IrDA) carries TI's RVTMUX debug and development interface. | |
| 757 | |
| 758 Before arriving at our current radical approach with the charging on/off switch, | |
| 759 for many years previously I was considering a more conservative approach. My | |
| 760 original idea was to bring out the two Calypso UARTs in very different ways: my | |
| 761 thought was to bring only the Modem UART to the built-in USB port (by way of a | |
| 762 built-in single-channel USB-serial chip), and have plugged-in USB always present | |
| 763 VCHG to the chipset, but route the debug UART (the one most useful in low-level | |
| 764 development and bring-up) to a special FPC connector that would interface to a | |
| 765 special debug board, just like Openmoko did on their Neo. Serious development | |
| 766 work would then require having that debug board attached, while more casual | |
| 767 users would be able to talk AT commands to the phone via the built-in USB port, | |
| 768 charging the battery at the same time. | |
| 769 | |
| 770 What made me change my mind about this design was the realization that I, as the | |
| 771 most principal user and developer, would end up wanting to have the debug board | |
| 772 attached all the time, and the need to have it hanging externally, or perhaps | |
| 773 glued or taped to the back of the phone, would be a huge blemish and | |
| 774 inconvenience. Back in the days of Openmoko, someone must have had a similar | |
| 775 experience, as I remember reading about a hack where someone built a debug board | |
| 776 functional equivalent that fits inside the Neo, in some otherwise unused space. | |
| 777 | |
| 778 Hence the new design for our planned FC Libre Dumbphone handset: the USB port | |
| 779 will have a built-in FT2232D subsystem (USB to two UARTs) connected to it, | |
| 780 interfacing to both Calypso UARTs, while the charging on/off switch will make it | |
| 781 possible to use this interface for low-level development and bring-up without | |
| 782 presenting VCHG to the chipset. In this architecture this FT2232D subsystem | |
| 783 should be considered the primary "owner" of the handset's USB port, while the | |
| 784 charging function is secondary and optional, enabled or disabled with a switch. | |
| 785 To put it another way, if our USB port is connected to a regular USB host (as | |
| 786 opposed to a Dedicated Charging Port power-only source), that USB host will | |
| 787 always enumerate the FT2232D and see two ttyUSB devices, whereas charging may | |
| 788 or may not take place depending on the switch setting. |
