OptimusBlackSerial » History » Revision 9
Revision 8 (Paul Kocialkowski, 12/29/2015 03:15 PM) → Revision 9/25 (Paul Kocialkowski, 12/29/2015 09:12 PM)
h1. Optimus Black (P970) serial The Optimus Black (P970) allows accessing an UART serial port through the USB connector. A MAX14526 MUIC is in charge of switching between the USB and UART lines. The UART line can be muxed either to the main processor's debug UART (*UART3*), to the modem's UART or to the modem's USB lines via a FSUSB63 DP3T switch. The modem's UART line can also be switched directly to the main processor via an analog switch. Thus, a working configuration to access the serial port through the USB connector is to route the USB connector to the UART line with the MAX14526 MUIC and to route the UART line to the main processor's debug UART (UART3) with the FSUSB63 DP3T switch. Block diagram of the USB and UART connection, according to the Optimus Black (P970) service manual: !p970_usb_mux.jpg! On the other hand, the main processor's debug UART (*UART3*) can be accessed directly on the board, via the pins of the debug connector or via the pins of the FSUSB63 DP3T switch. h2. Hardware setup h3. USB connector According to the FSUSB63 DP3T switch and the Optimus Black (P970) service manual, *UART Rx* is routed to *USB DM (D-)* and *UART Tx* is routed to *USB DP (D+)*. Hence, the *USB DM (D-)* has to be connected to the UART adapter's *Tx* pin and the *USB DP (D+)* has to be connected to the UART adapter's *Rx* pin. *GND* has to be made common between the USB connector and the UART adapter. There is no need to connect the USB connector's VBUS to a positive voltage. Note that there is no automatic software switching (yet) with [[OptimusBlackP970U-Boot|U-Boot]], *so make sure that the USB connector is switched to UART before connecting the UART receiver to it*. h3. UART to USB converters It appears that UART to USB converters using the *PL2303* chip don't work properly with the device's UART. On the other hand, converters based on the *CP210x* chip were tested to work properly. h2. Software setup h3. Bootloader Some development versions of [[OptimusBlackP970U-Boot|U-Boot]] allow switching the USB connector to UART by pressing the *G* key (on the side) at boot. LG's downstream version of U-Boot, that ships with Android version prior to 4.0, allows switching the USB connector to UART by placing a *56 kOhm* resistor between the *ID* and *GND* pins of the connector and pressing the *volume down* key at boot. However, it does not print anything on serial. LG's downstream version of LK, that ships with Android 4.0, may behave the same. It does print some information on serial. h3. Kernel h3. References * Optimus Black (P970) Service Manual and Schematics: http://www.cpkb.org/wiki/LG_P970_Optimus_Black_service_manual * OMAP36xx Technical Reference Manual: "swpu177aa.pdf":http://www.ti.com/lit/pdf/swpu177 *These documents are the propriety of LG Electronics and Texas Instruments and are not hosted by the Replicant project.* *However, some excerpts from these documents are provided, for the purpose of providing technical evidence of the facts that are mentioned in this page. We believe that this particular use of the copyrighted work is fair use.*