Samsung Galaxy S II (samsung-i9100g)

From postmarketOS Wiki
Samsung Galaxy S II (GT-I9100G)
Samsung Galaxy S II (GT-I9100G) running Xfce4
Samsung Galaxy S II (GT-I9100G) running Xfce4
Manufacturer Samsung
Name Galaxy S II (GT-I9100G)
Codename samsung-i9100g
Released 2011
Type handset
Hardware
Chipset TI OMAP 4430
CPU Dual-core 1.2 GHz Cortex-A9
GPU PowerVR SGX540
Display 480x800 AMOLED
Storage 16 GB
Memory 1 GB
Architecture armv7
Software
Original software Android
Original version 2.3.4 (TouchWiz UI v4.0)
postmarketOS
Category testing
Pre-built images no
Mainline partial
postmarketOS kernel 3.0.101
Unixbench Whet/Dhry score 517.2
Features
Flashing
Works
USB Networking
Works
Internal storage
SD card
Battery
Partial
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Audio
Broken
Camera
Broken
Camera Flash
Connectivity
WiFi
Partial
Bluetooth
Broken
GPS
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Works
USB OTG
Works
HDMI/DP
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer
This device is based on the TI OMAP 4430.
See the SoC page for common tips, guides and troubleshooting steps

Contributors

Users owning this device

  • Bastindo (Notes: Good condition, running Android 6)
  • Ungeskriptet (Notes: I LOVE how small it is and the old TouchWiz makes me feel nostalgic too)


How to enter flash mode

  • Download mode: While the device is off hold Power, Volume Down and Home button to boot it into download mode, afterwards confirm the operation by pressing Volume Up.
  • Recovery mode: While the device is off hold Power, Volume Up and Home button to boot it into recovery mode.

Installation

Follow the installation guide.

WiFi

NetworkManager doesn't work on this phone, so to get Wi-Fi working you must use wpa_supplicant only.

Mainline status

Component Model Status Notes
USB USB 2.0 Micro-B
eMMC Sandisk SEM16G Y 16 GB
SD card microSDXC Y
Charging Maxim MAX17040 N
PMIC Texas Instrumemts TWL6030 N
MUIC Fairchild FSA9480 N
Volume/Power/Home keys GPIO Y
Touchscreen Atmel MXT224 Y Powered by vaux2 regulator and fixed regulator on GPIO_54 (<&gpio2 22 GPIO_ACTIVE_HIGH>)
Touchkeys (Cypress?) Touchkey N
Accelerometer Kionix KXTF9 Y
Gyroscope TDK InvenSense MPU3050 N
Magnetometer AKM (Asahi Kasei Microdevices) AK8975 N
Light and proximity sensor Capella Microsystems CM3663 N
Display Samsung LD9040 AMOLED panel N Powered by vaux3 and v1v8 regulators. LCD type "SM2 A2"
Audio Texas Instruments TWL 6040 N
GPU PowerVR SGX 540 N PowerVR SGX 540 needs out-of-tree kernel module, patched mesa, and some proprietary blobs
Wi-Fi Broadcom BCM4330 Y Wi-Fi connected to mmc5 with SDIO and powered with 2V fixed regulator
Bluetooth Broadcom BCM4330 N Bluetooth connected to UART2
Front camera Samsung S5K5BAF N OMAP4 devices have Ducati firmware for cameras
Main camera Samsung S5K3H2 N OMAP4 devices have Ducati firmware for cameras
HDMI/MHL Silicon Image sii9234 N Driver available in mainline
Modem Intel XMM6260 N

Miscellaneous mainline info

GPIO map
GPIOs 0-31, gpio1
Pin Function Number
gpio-0 ear_jack_detect 0
gpio-1 fsa9840_external_id 1
gpio-2 CP_RST 2
gpio-3 gpio_kp_in 3
gpio-4 - 4
gpio-5 - 5
gpio-6 SYS_DRM_MSEC 6
gpio-7 - 7
gpio-8 gpio_kp_in 8
gpio-9 - 9
gpio-10 - 10
gpio-11 CHG_ING_N 11
gpio-12 TA_nCONNECTED 12
gpio-13 CHG_EN 13
gpio-14 - 14
gpio-15 - 15
gpio-16 - 16
gpio-17 - 17
gpio-18 - 18
gpio-19 - 19
gpio-20 - 20
gpio-21 - 21
gpio-22 - 22
gpio-23 - 23
gpio-24 - 24
gpio-25 - 25
gpio-26 - 26
gpio-27 - 27
gpio-28 - 28
gpio-29 BAT_REMOVAL 29
gpio-30 gpio_kp_in 30
gpio-31 gpio_kp_in 31
GPIOs 32-63, gpio2
Pin Function Number
gpio-32 3_TOUCH_INT 0
gpio-33 cm3663_irq 1
gpio-34 CP_USB_ON 2
gpio-35 MLCD_RST 3
gpio-36 CP_ON 4
gpio-37 PS_ON 5
gpio-38 - 6
gpio-39 - 7
gpio-40 FM_INT 8
gpio-41 - 9
gpio-42 FM_RST 10
gpio-43 - 11
gpio-44 - 12
gpio-45 GYRO_INT 13
gpio-46 TOUCH_nINT 14
gpio-47 UART_SEL 15
gpio-48 MICBIAS_EN 16
gpio-49 EAR_MICBIAS_EN 17
gpio-50 RESET_REQ_N 18
gpio-51 - 19
gpio-52 - 20
gpio-53 SENSOR_EN 21
gpio-54 TOUCH_EN 22
gpio-55 - 23
gpio-56 CP_DUMP_INT 24
gpio-57 - 25
gpio-58 - 26
gpio-59 MHL_SEL 27
gpio-60 MHL_RST 28
gpio-61 scl 29
gpio-62 sda 30
gpio-63 HDMI_HPD 31
GPIOs 64-95, gpio3
Pin Function Number
gpio-64 - 0
gpio-65 - 1
gpio-66 - 2
gpio-67 - 3
gpio-68 - 4
gpio-69 - 5
gpio-70 - 6
gpio-71 - 7
gpio-72 - 8
gpio-73 HW_REV3 9
gpio-74 HW_REV2 10
gpio-75 HW_REV1 11
gpio-76 HW_REV0 12
gpio-77 - 13
gpio-78 - 14
gpio-79 - 15
gpio-80 - 16
gpio-81 WLAN_HOST_WAKE 17
gpio-82 BT_nRST 18
gpio-83 BT_HOST_WAKE 19
gpio-84 - 20
gpio-85 - 21
gpio-86 - 22
gpio-87 - 23
gpio-88 - 24
gpio-89 - 25
gpio-90 - 26
gpio-91 - 27
gpio-92 - 28
gpio-93 BT_WAKE 29
gpio-94 - 30
gpio-95 MOTOR_EN 31
GPIOs 96-127, gpio4
Pin Function Number
gpio-96 - 0
gpio-97 - 1
gpio-98 sda 2
gpio-99 scl 3
gpio-100 HDMI_EN 4
gpio-101 3_TOUCH_EN 5
gpio-102 3_TOUCH_LED_EN 6
gpio-103 BT_EN 7
gpio-104 vwl1271 8
gpio-105 - 9
gpio-106 - 10
gpio-107 - 11
gpio-108 - 12
gpio-109 - 13
gpio-110 - 14
gpio-111 - 15
gpio-112 - 16
gpio-113 - 17
gpio-114 - 18
gpio-115 - 19
gpio-116 - 20
gpio-117 - 21
gpio-118 - 22
gpio-119 PDA_ACTIVE 23
gpio-120 PHONE_ACTIVE 24
gpio-121 - 25
gpio-122 - 26
gpio-123 - 27
gpio-124 - 28
gpio-125 - 29
gpio-126 - 30
gpio-127 audpwron 31
GPIOs 128-159, gpio5
Pin Function Number
gpio-128 - 0
gpio-129 - 1
gpio-130 - 2
gpio-131 - 3
gpio-132 - 4
gpio-133 - 5
gpio-134 - 6
gpio-135 - 7
gpio-136 - 8
gpio-137 - 9
gpio-138 - 10
gpio-139 scl 11
gpio-140 sda 12
gpio-141 - 13
gpio-142 - 14
gpio-143 - 15
gpio-144 - 16
gpio-145 - 17
gpio-146 - 18
gpio-147 - 19
gpio-148 - 20
gpio-149 - 21
gpio-150 - 22
gpio-151 LCD_SCLK 23
gpio-152 LCD_SDI 24
gpio-153 - 25
gpio-154 LCD_nCS 26
gpio-155 - 27
gpio-156 - 28
gpio-157 - 29
gpio-158 - 30
gpio-159 - 31
GPIOs 160-191, gpio6
Pin Function Number
gpio-160 - 0
gpio-161 - 1
gpio-162 - 2
gpio-163 - 3
gpio-164 - 4
gpio-165 - 5
gpio-166 - 6
gpio-167 - 7
gpio-168 - 8
gpio-169 host_notifier 9
gpio-170 - 10
gpio-171 USB_OTG_EN 11
gpio-172 AP_AGPS_TSYNC 12
gpio-173 GPS_PWR_EN 13
gpio-174 - 14
gpio-175 MHL_INT 15
gpio-176 - 16
gpio-177 SUB_MICBIAS_EN 17
gpio-178 GPS_nRST 18
Panel init seqeunce
/* seq_user_set */
[    0.791839] ld9040: Sending init_seq: 0
[    0.791870] LD9040 command: 0xF0, data: 0x5A
[    0.819519] LD9040 command: 0xFF, data: 0x5A

/* seq_displayctl_set */
[    0.847015] LD9040: Sending init_seq: 1
[    0.847015] LD9040 command: 0xF2, data: 0x02
[    0.849151] LD9040 command: 0xFF, data: 0x06
[    0.855224] LD9040 command: 0xFF, data: 0x0A
[    0.865264] LD9040 command: 0xFF, data: 0x10
[    0.881317] LD9040 command: 0xFF, data: 0x10

/* seq_gtcon_set */
[    0.897338] LD9040: Sending init_seq: 2
[    0.897369] LD9040 command: 0xF7, data: 0x09

/* acl_on */
[    0.906463] LD9040: Sending init_seq: 3
[    0.906494] LD9040 command: 0xC1, data: 0x4D
[    0.921081] LD9040 command: 0xFF, data: 0x96
[    0.946075] LD9040 command: 0xFF, data: 0x1D
[    0.975067] LD9040 command: 0xFF, data: 0x00
[    0.975158] LD9040 command: 0xFF, data: 0x00
[    0.975250] LD9040 command: 0xFF, data: 0x01
[    0.976318] LD9040 command: 0xFF, data: 0xDF
[    0.980651] LD9040 command: 0xFF, data: 0x00
[    0.980712] LD9040 command: 0xFF, data: 0x00
[    0.980804] LD9040 command: 0xFF, data: 0x03
[    0.983886] LD9040 command: 0xFF, data: 0x1F
[    1.014862] LD9040 command: 0xFF, data: 0x00
[    1.014953] LD9040 command: 0xFF, data: 0x00
[    1.015045] LD9040 command: 0xFF, data: 0x00
[    1.015136] LD9040 command: 0xFF, data: 0x00
[    1.015197] LD9040 command: 0xFF, data: 0x00
[    1.015289] LD9040 command: 0xFF, data: 0x01
[    1.016357] LD9040 command: 0xFF, data: 0x08
[    1.024414] LD9040 command: 0xFF, data: 0x0F
[    1.039459] LD9040 command: 0xFF, data: 0x16
[    1.061462] LD9040 command: 0xFF, data: 0x1D
[    1.090454] LD9040 command: 0xFF, data: 0x24
[    1.095275] LD9040 command: 0xFF, data: 0x2A
[    1.106079] LD9040 command: 0xFF, data: 0x31
[    1.123870] LD9040 command: 0xFF, data: 0x38
[    1.148620] LD9040 command: 0xFF, data: 0x3F
[    1.149200] LD9040 command: 0xFF, data: 0x46
[    1.156768] LD9040 command: 0xC0, data: 0x01

/* seq_panelcondition_set *
[    1.157897] LD9040: Sending init_seq: 4
[    1.157928] LD9040 command: 0xF8, data: 0x05
[    1.163055] LD9040 command: 0xFF, data: 0x5E
[    1.163391] LD9040 command: 0xFF, data: 0x96
[    1.188385] LD9040 command: 0xFF, data: 0x6B
[    1.201690] LD9040 command: 0xFF, data: 0x7D
[    1.232910] LD9040 command: 0xFF, data: 0x0D
[    1.245941] LD9040 command: 0xFF, data: 0x3F
[    1.246520] LD9040 command: 0xFF, data: 0x00
[    1.246612] LD9040 command: 0xFF, data: 0x00
[    1.246704] LD9040 command: 0xFF, data: 0x32
[    1.265472] LD9040 command: 0xFF, data: 0x00
[    1.265563] LD9040 command: 0xFF, data: 0x00
[    1.265625] LD9040 command: 0xFF, data: 0x00
[    1.265716] LD9040 command: 0xFF, data: 0x00
[    1.265808] LD9040 command: 0xFF, data: 0x00
[    1.265869] LD9040 command: 0xFF, data: 0x00
[    1.265960] LD9040 command: 0xFF, data: 0x07
[    1.273040] LD9040 command: 0xFF, data: 0x05
[    1.278076] LD9040 command: 0xFF, data: 0x1F
[    1.309082] LD9040 command: 0xFF, data: 0x1F
[    1.340057] LD9040 command: 0xFF, data: 0x1F
[    1.371032] LD9040 command: 0xFF, data: 0x00
[    1.371124] LD9040 command: 0xFF, data: 0x00

/* sleep_out */
[    1.371215] LD9040: Sending init_seq: 5
[    1.371215] LD9040 command: 0x11, data: 0xFE
[    1.375305] LD9040 command: 0x1000, data: 0x78
[    1.375305] LD9040 sleep: 120000

/* elvss_on */
[    1.401458] LD9040: Sending init_seq: 6
[    1.401458] LD9040 command: 0xB1, data: 0x0F
[    1.416564] LD9040 command: 0xFF, data: 0x00
[    1.416656] LD9040 command: 0xFF, data: 0x16

/* seq_sm2_a2_pwrctl_set */
[    1.438659] LD9040: Sending init_seq: 7
[    1.438690] LD9040 command: 0xF4, data: 0x0A
[    1.448791] LD9040 command: 0xFF, data: 0xA7
[    1.459594] LD9040 command: 0xFF, data: 0x25
[    1.465393] LD9040 command: 0xFF, data: 0x6A
[    1.477691] LD9040 command: 0xFF, data: 0x44
[    1.483276] LD9040 command: 0xFF, data: 0x02

/* seq_gamma_set1 */
[    1.485351] LD9040: Sending init_seq: 8
[    1.485351] LD9040 command: 0xF9, data: 0x0C
[    1.497467] LD9040 command: 0xFF, data: 0xA9
[    1.510253] LD9040 command: 0xFF, data: 0xB0
[    1.530029] LD9040 command: 0xFF, data: 0xA3
[    1.536834] LD9040 command: 0xFF, data: 0xC3
[    1.544403] LD9040 command: 0xFF, data: 0x00
[    1.544464] LD9040 command: 0xFF, data: 0x87
[    1.554534] LD9040 command: 0xFF, data: 0x0C
[    1.566589] LD9040 command: 0xFF, data: 0xA7
[    1.577392] LD9040 command: 0xFF, data: 0xAF
[    1.596160] LD9040 command: 0xFF, data: 0xA2
[    1.601959] LD9040 command: 0xFF, data: 0xC2
[    1.608520] LD9040 command: 0xFF, data: 0x00
[    1.608612] LD9040 command: 0xFF, data: 0x9F
[    1.611450] LD9040 command: 0xFF, data: 0x0C
[    1.623474] LD9040 command: 0xFF, data: 0xB3
[    1.646240] LD9040 command: 0xFF, data: 0xB4
[    1.669982] LD9040 command: 0xFF, data: 0xA5
[    1.678802] LD9040 command: 0xFF, data: 0xC0
[    1.683380] LD9040 command: 0xFF, data: 0x00
[    1.683471] LD9040 command: 0xFF, data: 0xA4

/* gamma_ctrl */
[    1.691253] LD9040: Sending init_seq: 9
[    1.691284] LD9040 command: 0xFB, data: 0x02
[    1.693420] LD9040 command: 0xFF, data: 0x5A
[    1.720916] LD9040: Successfully initialized

/* ld9040_ldi_enable */
[    1.720916] LD9040 command: 0x29, data: 0xFE
[    1.724975] LD9040: Successfully enabled
SimpleFB

To get SimpleFB working add this to omap4-samsung-t1.dts:

/ {
	/* ... */
	chosen {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		bootargs = "console=tty0";

		framebuffer@bef00000 {
			compatible = "simple-framebuffer";
			reg = <0xbef00000 (480 * 800 * 4)>;
			width = <480>;
			height = <800>;
			stride = <(480 * 4)>;
			format = "a8r8g8b8";

			vci-supply = <&vaux3>;
			vdd3-supply = <&v1v8>;

			/*
			 * That's a lot of clocks, but it's necessary due
			 * to unused clk cleanup & no panel driver yet..
			 */
			clocks = <&l3_dss_clkctrl OMAP4_DSS_CORE_CLKCTRL 0>,
				 <&l3_dss_clkctrl OMAP4_DSS_CORE_CLKCTRL 8>,
				 <&l3_dss_clkctrl OMAP4_DSS_CORE_CLKCTRL 9>,
				 <&l3_dss_clkctrl OMAP4_DSS_CORE_CLKCTRL 10>,
				 <&l3_dss_clkctrl OMAP4_DSS_CORE_CLKCTRL 11>,
				 <&l3_div_ck>;
		};
	};
};

Now disable the following node in omap4.dtsi:

/ {
	/* ... */
	ocp {
		/* ... */
		target-module@58000000 {
			/* ... */
			status = "disabled";
		};
	};
};

If CONFIG_FB_SIMPLE is enabled, SimpleFB should work now and you should be able to see kernel logs on the phone.

JTAG

Pin 10 is TX and pin 12 is RX.

Samsung-i9100g jtag.png

Note: The phone won't output much through UART, all it outputs is this:

Texas Instruments X-Loader 1.41 (Jan 25 2013 - 22:48:41)
Uboot-loading from Emmc
Starting OS Bootloader from EMMC ...

AST_POWERON

BOOTING COMPLETED

See also