Difference between revisions of "Sony Debug Assist board"

From eLinux.org
Jump to: navigation, search
(add info about using board with xperia phone)
Line 9: Line 9:
  
 
The board allows for:
 
The board allows for:
1. control of power to the device
+
# control of power to the device
2. serial debug uart (access to kernel serial console)
+
# serial debug uart (access to kernel serial console)
3. control of button presses to 3 different buttons
+
# control of button presses to 3 different buttons
 
** e.g. for a phone, this could control the power, volume up, and volume down buttons
 
** e.g. for a phone, this could control the power, volume up, and volume down buttons
4. control of USB connection between host and phone
+
# control of USB connection between host and phone
 
** vbus power on/off (to simulate connecting and disconnecting the USB connection from device to host)
 
** vbus power on/off (to simulate connecting and disconnecting the USB connection from device to host)
  

Revision as of 15:06, 4 November 2014

Here is information about the Sony Debug Assist board.

Description

This board is used internally at Sony Mobile for remotely managing phones and phone development boards. Internally, it also goes by the name "CDB assist".

This board connects to the host using 2 USB cables and the the device under control via a USB cable, multiple jumper wires, and two power connectors (banana plugs).

The board allows for:

  1. control of power to the device
  2. serial debug uart (access to kernel serial console)
  3. control of button presses to 3 different buttons
    • e.g. for a phone, this could control the power, volume up, and volume down buttons
  1. control of USB connection between host and phone
    • vbus power on/off (to simulate connecting and disconnecting the USB connection from device to host)

Connections

The debug assist board is connected to the host using 2 USB cables. One USB cable presents to the host 2 interfaces:

  • a control interface for viewing the status and adjusting the settings of the debug assist board
  • a USB-serial interface for the phone's debug uart

These interfaces show up on the Linux host as /dev/ttyACM0 and /dev/ttyACM1 respectively

The second USB cable presents to the host the USB connection from the phone's USB port.

Here is ASCII art diagram for a normal debug setup:

 device to test                     Sony debug board                    Host computer
 +------------+                                                  +-----------------------------------------+
 |     power+ |----+           +-------------------------+       | /dev/ttyACM0  (control interface)       |
 |     power- |----+-----------|power +/- ------+-> usb0 |-------|    display and control power, buttons   |
 |            |                |                |        |       |    and vusb                             |
 |    button1 |----------------|button A wire --+        |       | /dev/ttyACM1  (serial port for device)  |
 |    button2 |----------------|button B wire --+        |       |    usually has kernel serial console    |
 |    button3 |----------------|button C wire --+        |       |                                         |
 |     ground |----------------|ground          |        |       |                                         |
 |    uart TX |----------------|uart TX wire  --+        |       |                                         |
 |    uart RX |----------------|uart RX wire  --+        |       |                                         |
 |            |                |        +-vusb--+        |       |                                         |
 |            |                |        |                |       |                                         |
 |    usb port|----------------|usb up -+---------- usb1 |-------| /dev/??? - (usb connection with device) |
 |            |                +-------------------------+       |                                         |
 +------------+                                                  |                                         |
                                                                 +-----------------------------------------

Using the Sony Debug Assist board

To see the status and control screen for the debug assist board, connect a USB cable from the "control" connector on the board to your Linux host machine, and on the host machine, access /dev/ttyACM0.

ex: minicom -o -D /dev/ttyACM0

The interface should look like this:

 WJ CDB Assist HW v2.1 / SW r52
 
 Voltage Setpoint/Actual           Current Setpoint/Actual
04000mV/00000mV  2500mA/0000mA
04000mV/00000mV  2500mA/0000mA
 
 [P/p] VBAT:off  [u] Set VBAT voltage  [i] Set VBAT current
 [A/a] Btn1:ON   [B/b] Btn2:off  [C/c] Btn3:off
 [V/v] VBus:ON   UART Vref=0000mV

This shows the voltage and current for the VBAT (power) outputs from the board, as well as the status of the lines that can be controlled from the board.

You can manually control the settings by entering the letter for the a particular function. Most line-control settings have dual-letter combination with upper-case to turn the line on and lower-case to turn the line off.

For example, to turn the power on to the phone, type 'P' (capital-P). This corresponds to the VBAT power output lines from the debug board.

To turn the power off, type 'p' (lower-case-p).

On some terminals, the voltage and current display are shown in a double-tall font. But on other terminals, the voltage and current display are shown as two duplicate lines (shown in this example).

Specific actions for Sony phones

Here are some descriptions of how to use the debug board to perform specific operations on Sony phones:

Sony Xperia Z1

For the Z1 phone:

  • Btn1 (A) is the power button
  • Btn2 (B) is the volume up button
  • Btn3 (C) is the volume down button

The VBAT voltage for the phone should be set to 04000mV and the VBAT current should be set to 2500 mA.

The phone can be booted directly to the installed kernel, or placed in one of two different bootloader modes, depending on the buttons held when the power button is pushed.

To boot to the installed kernel, do the following:

  • apply power (turn on VBAT: press 'P')
  • "press" the power button (turn on Btn1: press 'A', then press 'a')
    • only "press" the button momentarily ('a' releases the button)

To reset (soft power down) the phone:

  • make sure phone has VBAT power
  • hold power and volume up for 3 seconds (press 'AB', wait for phone to vibrate 3 times, then press 'ab')

To turn all power off:

  • turn VBAT off (press 'p')
  • turn VUSB off (press 'v')

To reboot into fastboot mode:

  • make sure phone has VBAT power (press 'P')
  • make sure phone starts with VBus off (press 'v')
  • hold volume up (press 'B')
  • apply VBus (press 'V')
    • wait for fastboot mode to initialize
  • (summary: P v B V b )

Messages

The serial port messages for an Xperia Z phone cold-booting into fastboot mode should look something like the following:

[160] TA config read fro BOOT (1270-3115 S1_Boot_MSM8974_LA1.0_67)
[180] GPIO HW_ID[3:0]: [0010]
[190] soc_ver: 0x20001, pmic_ver: 3.1
[190] die_id: 0x2c0d56, oem_product_id: 0x4, otp_lock: 0x155
PBA ID: 1271-5063 (2)
Startup flags: [USB INSERTED]Warmboot reason: [COLDBOOT][200] TriLED: probed
[WARNING IN FAC 0x7 CODE 0x6 @ S1/boot/src/s1boot_lib_api.c:762]:
  Device key handling failed!
[WARNING IN FAC 0x8 CODE 0xA @ S1/boot/src/s1boot_lib_api.c:239]:
  MiscTA data not accepted by security manager!
Rooting status is: Done[ERROR @ S1/boot/src/s1boot_config_parser.c:578]:
  MiscTA unit 2473 could not be read!
[260] USB ID: 1787
[270] OTG State is invalid
[550] charertype: 0
[550] VBUS is valid
Service mode detected: [FASTBOOT][550] S1 decisions complete, image to boot is 4.
[680] USB init ept @ 0x7c85e000
[700] fastboot_init()
[1070] fastboot: processing commands