Nexus S (I902x) serial¶
- Table of contents
- Nexus S (I902x) serial
The Nexus S (I902x) allows accessing an UART serial port through the USB connector. A FSA9480 switch is in charge of switching the USB connector between UART and USB (among other choices).
The UART signal can itself be switched between the S5PC110 SoC UART and the XMM6160 modem UART by the MAX8998 PMIC. It is switched to the S5PC110 SoC UART by default.
According to the Nexus S (I902x) Schematics:
Depending on the resistor value between the USB connector ID and GND pins, the FSA9480 will automatically switch the USB connector to the selected device, as mentioned on the FSA9480 datasheet. A resistor value of 150k Ohm will switch the USB connector to UART.
In order to switch the USB connector to UART, a 150 kOhm resistor has to be placed between the ID and GND pins of the USB connector.
According to the FSA9480 datasheet, table 3 (Accessory auto configuration table), UART Rx is routed to USB DP (D+) and UART Tx is routed to USB DM (D-).
Hence, the USB DP (D+) has to be connected to the UART adapter's Tx pin and the USB DM (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.
The USB connector can then be connected to the device at any time (the FSA9480 will automatically switch the USB connector to UART, even when the device is already on).
USB connector switch¶
Alternatively, it is possible to switch the USB connector to UART at run-time, without using any resistor between the ID and GND pins (the ID pin can be left open).
Any USB cable has to be disconnected from the device before manually switching the USB connector to UART:
# echo UART > /sys/devices/platform/i2c-gpio.7/i2c-7/7-0025/switch
According to the FSA9480 datasheet, table 26 (Manual S/W 1), the USB connector's VBUS must be present (connected to a 5V voltage source) for manual configuration to be taken in account.
The USB connector can then be connected to the device.
By default, the Linux console is set to the FIQ debugger.
Kernel messages can be displayed over UART by setting the cmdline console argument to ttySAC2. The cmdline console argument is set on the crespo device files:
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 2892480..c3134b7 100755 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -62,7 +62,7 @@ BOARD_NAND_SPARE_SIZE := 128 BOARD_KERNEL_BASE := 0x30000000 BOARD_KERNEL_PAGESIZE := 4096 -BOARD_KERNEL_CMDLINE := console=ttyFIQ0 no_console_suspend +BOARD_KERNEL_CMDLINE := console=ttySAC2,115200 no_console_suspend TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" TARGET_RECOVERY_UI_LIB := librecovery_ui_crespo
The FIQ debugger has to be disabled in the kernel configuration:
diff --git a/arch/arm/configs/crespo_defconfig b/arch/arm/configs/crespo_defconfig index 4f3997b..c60ea92 100644 --- a/arch/arm/configs/crespo_defconfig +++ b/arch/arm/configs/crespo_defconfig @@ -406,10 +406,10 @@ CONFIG_ARM_VIC=y CONFIG_ARM_VIC_NR=4 CONFIG_PL330=y CONFIG_FIQ_GLUE=y -CONFIG_FIQ_DEBUGGER=y +# CONFIG_FIQ_DEBUGGER is not set # CONFIG_FIQ_DEBUGGER_NO_SLEEP is not set # CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set -CONFIG_FIQ_DEBUGGER_CONSOLE=y +# CONFIG_FIQ_DEBUGGER_CONSOLE is not set # CONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE is not set #
- Nexus S (I902x) Service Manual and Schematics: http://www.cpkb.org/wiki/Samsung_GT-i9023_Google_Nexus_S_service_manual
- S5PC110 User Manual: S5PC110_EVT1_UM10.pdf
These documents are the propriety of Samsung Electronics 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.
- FSA9480 datasheet: FSA9480.pdf