arrow-left

All pages
gitbookPowered by GitBook
1 of 25

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

0x5B - ATMEL: mXT1386E - TouchController

hashtag
I2C Specs

  • HID over I2C

  • Address: 0x5b

  • Bus speed: 400kHz

  • HID_Descriptor: 0x0000

  • ACPI Device: TOUA

hashtag
Address

ACPI tells that the device TOUA uses I2C-2@400kHz with an address of 0x5b

hashtag
HID Descriptor

hashtag
GPIOs

HID Interrupt: K2

http://ww1.microchip.com/downloads/en/DeviceDoc/mXT1386E_2v4_Datasheet_BX.pdfarrow-up-right

MMC

SPI Flash

hashtag
Flash Chip

Boot loader for the RT1 is written on a Winbond W25Q32VIP. This is a 32MBit (4K Byte) SPI flash chip that operates in Single mode and comes in an 8 pin WSON 6X5-MM package. Its contents are locked in because of the P variation in its name that specifies the OTP (Write Once) feature in the chip. This means the contents can't be replaced. We can however replace the entire chip.

hashtag
Pinout

Below is the pinout for Single mode operation of the chip.

hashtag
Naming Convention

hashtag
Replacing the flash

Before starting it is recommended to dump the contents of the chip as it contains unique configuration aspects for the device. Check the on how to do this

Replacing the chip is not to be taken lightly. It requires a hot air station to remove as it is a surface mounted package with a big ground pane in the center. Beside this there are multiple components close to the chip that need to stay in place.

hashtag
Removing the shielding

Begin by the shield covering the SOC, Memory and flash chips. This will come of very easily with little force. Take your time doing this.

Once removed we have an overview over the most important components

hashtag
Removing the chip

To make the flash chip better accessible, the metal that held the shield in place can be bent back slightly. To help the desoldering the back of the PCB should be pre-heated at a low temp before starting work on the front. This will help with removing the chip and its big ground pane. Then start heating the flash chip itself at a low flow to not disturb the components around it. Make sure to heat it properly as forcing the chip off will break the pads on the PCB.

DO

O

Data Output

3

/WP

I

Write Protect Input

4

GND

Ground

5

DI

I

Data Input

6

CLK

I

Serial Clock Input

7

/HOLD

I

Hold Input

8

VCC

Power Supply (3.3V)

Pin

Name

I/O

Function

1

/CS

I

Chip Select Input

firmware section
W25Q32 WSON 6X5-MM
Chip Series Naming
Removing the shield
Removing the shield
Overview
Highlighted Ground Pane
Accessing the flash chip
Chip Removed

2

0x28 - [WIP] Microsoft: ?SensorCollection?

  • HID over I2C

  • Address: 0x28

  • Bus speed: 400kHz

  • HID_Descriptor: 0x0001

  • ACPI Device: SNMU

https://www.microchip.com/wwwproducts/en/at32uc3l0256arrow-up-right

4 - eMMC

32/64GB internal eMMC

3 - WIFI SDIO: Marvell: 88W8797

1 - ÎĽSD Card

hashtag
GPIOs

Power: D7 Card Detect: I5 WriteProtect: T3

Hotplug GPIO in action

hashtag
Power

uSD Card is powered by PMIC LowDropout regaultor 5 (LDO5) It switches between 3.3V and 1.8V.

TBC - Ambient Light Sensor

Bus 0 - MS HID

I2C Bus

hashtag
Devices

i2cdetect -y -a -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 00 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- 28 -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

hashtag
Physical Access

Access to I2C Bus 0 can be found on J14.

I2C devices

I2C Devices which can be found in the Surface RT

i2c-0 i2c 7000c000.i2c I2C adapter - LVDS DDC (according to cardhu devicetree) - access on J14 i2c-1 i2c 7000c400.i2c I2C adapter - daughter board (touch controller; touch/typeCover) - access MAYBE on DaughterBoard Testpoints i2c-2 i2c 7000c500.i2c I2C adapter - nothing - dont care i2c-3 i2c 7000c700.i2c I2C adapter - HDMI DDC - Via HDMI-port i2c-4 i2c 7000d000.i2c I2C adapter - PMIC - not found :(

I2C addresses on Bus - 0: 0x00; 0x28 - 1: 0x2D; 0x39; 0x5B - 2: - 3: depends on HDMI display - 4: 0x0A; 0x1A; 0x2D; 0x4A; 0x4C; 0x60

hashtag
HID knowledge

hashtag
VendorID / ProdcutID

hashtag
HID Descriptor

hashtag
Device Specific Method

TBC - Kionix: KXTJ9 - Accelerometer

circle-exclamation

To be confirmed

hashtag
I2C Specs

  • Normal I2C

  • Address: 0x?

  • Bus speed: 400kHz

  • ACPI Device: ?

https://en.wikipedia.org/wiki/Extended_Display_Identification_Dataarrow-up-right
https://kionixfs.kionix.com/en/document/KXTJ9%20Sell%20Sheet.pdfarrow-up-right

0x2D

related to Surface Home Buttone Driver

Cypress touch sensor config?? MSP430??

Bus 1 - 2nd Board

hashtag
Devices

i2cdetect -y -a -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- -- 
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- 5b -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

hashtag
Physical Access

Access to I2C Bus 0 can be found on the back of the daughterboard. Use MTP52 & MTP53

0x00 - Microsoft: Type/Touch Cover

Technical information about Type/Touch Covers for Surface RT/2

hashtag
I2C Specs

  • HID over I2C

  • Address: 0x00

  • Bus speed: 400kHz

  • HID_Descriptor: 0x0041

  • ACPI Device: SNMU

  • Power:

    • Bridge IC: PMIC.REG1: 1.8V

    • tCover Power: PMIC.REG3: 2.8V

hashtag
GPIO

HID Interrupt: O5 Hotplug Interrupt: S0

hashtag
Issue

The tCover I2C address is 0x00. This address is reserved for general call. Linux doesn't allow I2C Slaves to use this address therefore the I2C driver must be patched to allow 0x00 as valid Slave address.

hashtag
Implementation

i2c-hotplug-gpio is a grate driver and doesn't work in mainline.

hashtag
VendorID / ProductID

1

045E

079C

Touch

2

045E

07A7

Type

2

045E

07A9

Power

1

045E - tbc

07DA - tbc

Cover

Generation

VendorID / hex

ProductID / hex

Touch

1

045E

079A

Type

Bus 2 - CAMs

Bus 3 - HDMI DDC

hashtag
Physical Access

Access to I2C Bus 3 can be found on the micro-HDMI connector

0x39 - Display Panel ThermalZone

0x2D - TI: TPS659110 - PMIC

PMIC or Power Managment IC (PMIC) is an IC that contains a lot of regulators which power the CPU, Sensors and other components of Surface RT

hashtag
I2C Specs

  • Normal I2C

  • Address: 0x2d

https://www.ti.com/lit/ds/symlink/tps65911.pdfarrow-up-right
https://elinux.org/images/2/26/PMIC_ELCE_2019.pdfarrow-up-right

Bus 4 - System

hashtag
Bus speed

400 kHz

hashtag
Devices

i2cdetect -y -a -r 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- 0a -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- 4a -- 4c -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

hashtag
Physical Access

Access to I2C Bus 4 is not known right now.

0x1A - Wolfson: WM8962 - AudioCodec

hashtag
I2C Specs

  • Normal I2C

  • Address: 0x1A

The I2C address seems to be 0x34 but that's the 8 Bit address. Shift the address 1 to the right (>>1) and you get 0x1A as 7Bit address

hashtag
Digital Stereo Microphone

Wolfson WM7220 Microphones

https://statics.cirrus.com/pubs/proDatasheet/WM8962_Rev4.4.pdfarrow-up-right
http://datasheet.elcodis.com/pdf2/85/22/852275/wm7220.pdfarrow-up-right

0x0A - ACPI: Control Method Battery

hashtag
I2C Specs

  • Normal I2c

  • Address: 0x0A

hashtag
What is it?

Surface RT uses the Topology. The controller is located at 0xa. That means that there must be an IC somewhere which interacts with the Charger and the Fuelgauge and provide an interface to both of them to the SoC. The and the are exposed through 0xa which provides an ACPI interface. The ACPI BAT0 device deals with the Fuelgauge. The ACPI ADP0 device deals with the Charger.

The ACPI methods like _BIX, _BTS, ... provide all the necessary information about the battery and the charger. They can be decrypted by reading the p. 492 10.2 Control Method Batteries

"(Control Method) Batteries and ACPI are tied together in quite a complex way. Generally, the battery state information is transmitted over a SMBUS bus to the embedded controller, a.k.a. EC, which in turn interfaces to the OS via ACPI methods. These methods can interrogate the embedded controller for battery state information ..."

Battery <-- EC <--> BIOS ACPI Methods <--> OS

Since there is no ACPI implementation for ARM32 and we need to replace the ACPI Methods with a custom driver. all Necessary information can be found in the SSDT0000 ACPI table

hashtag
Embedded Controller

The Embedded Controller directly interacts with the Charger and the Fuelgauge.

hashtag
Fuelgauge

BQ28400

hashtag
Charger

BQ24725A

hashtag
Critic

The Embedded Controller topology prevents the use of SmartBatterySystem (SBS) and requires an ACPI or custom driver. ACPI isn't (fully) implemented on ARM32 therefore we need a custom driver which resembels the ACPI methods.

hashtag
Dump

Embedded Controllerarrow-up-right
Charger
Fuelgauge
ACPI Specarrow-up-right
https://wiki.ubuntu.com/Kernel/Reference/Batteryarrow-up-right
https://www.ti.com/lit/ug/sluu431/sluu431.pdfarrow-up-right
https://www.ti.com/lit/ds/symlink/bq28400.pdf?ts=1625607689401&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FBQ28400arrow-up-right
https://www.ti.com/lit/ds/symlink/bq24725a.pdf?ts=1625636278558&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FBQ24725Aarrow-up-right
https://uefi.org/sites/default/files/resources/ACPI_5_0_Errata_B.pdfarrow-up-right

IC's

ICs which are used in the Surface RT

IC

Datasheet(s)

Cypress Semiconductor CY8C20466A

TI MSP430G2402 Microcontroller

3x

belongs to "ATMEL: mXT1386E - TouchController"

Atmel UC3L microprocessor

Wolfson 8962E low power audio codec
http://www.farnell.com/datasheets/1812050.pdfarrow-up-right
https://www.infinite-electronic.cz/datasheet/d6-CY8C20466A-24LQXIT.pdfarrow-up-right
https://www.cypress.com/part/cy8c20466a-24lqxitarrow-up-right
https://www.ti.com/product/MSP430G2402arrow-up-right
Marvell 88W8797-BMP2 Wifi
https://dtsheet.com/doc/1285471/marvell-avastar-88w8797-integrated-2x2-wlan-bluetooth-fmarrow-up-right
https://www.datasheets360.com/pdf/5802983509201174538arrow-up-right
Integrated Device Technology V103
https://datasheetspdf.com/pdf-file/696938/IntegratedDeviceTechnology/V103/1arrow-up-right
https://www.renesas.com/eu/en/document/dst/v103arrow-up-right
Texas Instruments TPS659110
https://www.ti.com/lit/ds/symlink/tps65911.pdfarrow-up-right
ATMEL: mXT1386E - TouchController
http://ww1.microchip.com/downloads/en/DeviceDoc/mXT1386E_2v4_Datasheet_BX.pdfarrow-up-right
Atmel MXT154E touchscreen controller
Winbond W25Q32BV
https://www.winbond.com/resource-files/w25q32bv_revi_100413_wo_automotive.pdfarrow-up-right

0x60 - TI: TPS62361B - Processor Supply

hashtag
I2C Specs

  • Normal I2C

  • Address: 0x60

https://www.ti.com/lit/ds/symlink/tps62361b.pdfarrow-up-right

0x4C - onsemi: NCT1008 - Temperatur sensor

hashtag
I2C Specs

  • SMBus SBS

  • Address: 0x4C

The Slave address and the ManufacturerID register do match. + This sensor is also found on Cardhu.

hashtag
I2C Dump

https://www.onsemi.com/pdf/datasheet/nct1008-d.pdfarrow-up-right
HIDI2C Device-Specific Method (_DSM) - Windows driversMicrosoftLearnchevron-right
Logo

LVDS Encoder

Integrated Device Technology V103 LVDS encoder - IDTV103

Tegra 3 only supports a parallel interface or SPI LCD, DVI, an HDMI HDTV, RGB monitor or a MIPI DSI LCD.

Surface RT uses a LVDS Display. Therefore an translator is needed.

They used a Integrated Device Technology V103 LVDS encoder https://datasheetspdf.com/pdf-file/696938/IntegratedDeviceTechnology/V103/1arrow-up-right

The converter is transparent to the SoC and does its job without any configuration. It only needs power and the PowerDown pin set to LOW

hashtag
GPIOs

B2 - power down

If we set this pin to LOW from UEFI Shell new information can't be send from the SoC to the display. In this case the image fades out.

file-pdf
179KB
V103_IntegratedDeviceTechnology.pdf
PDF
arrow-up-right-from-squareOpen
Required HID Descriptors (touchpad-required-hid-descriptors)MicrosoftLearnchevron-right
Logo
USB ID Databasethe_sz_devchevron-right
Logo
Battery and chargingMicrosoftLearnchevron-right
Logo
WM7220 PDFpdf1.alldatasheet.comchevron-right
Logo
WIP: ARM: tegra: Support for Surface RT Type/Touch/Power-Cover; Display fix by jonasschwoebel · Pull Request #45 · grate-driver/linuxGitHubchevron-right
Logo
ACPI battery and power subsystem firmware implementationMicrosoftLearnchevron-right
Logo