arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

tCover Linux support

I2C0 @ 0x00 Address 0x00 is general call address which makes Cover incompatible with standard I2C drivers.

hashtag
WDSA Table

Name(ABUF, ResourceTemplate()
{
    I2CSerialBus(0, ControllerInitiated, 0x61a80, AddressingMode7Bit, "\\_SB.I2C1", 0, ResourceConsumer, , )
    GpioInt(Level, ActiveLow, Shared, PullDefault, 0, "\\_SB.GPIO", 0, ResourceConsumer, , ) {0x59}
})
Name(EBUF, ResourceTemplate()
{
    I2CSerialBus(0, ControllerInitiated, 0x61a80, AddressingMode7Bit, "\\_SB.I2C1", 0, ResourceConsumer, , )
    GpioInt(Level, ActiveLow, SharedAndWake, PullDefault, 0, "\\_SB.GPIO", 0, ResourceConsumer, , ) {0x75}
})

Address 0x00; Speed 400kHz

GPIO Interrupts: 0x59 -> L1 0x75 -> O5

Captured HID Descriptor without tCover

From 5.1.1 HID Descriptor Format

All important information is set to 0x00. I guess standard I2C HID Driver will have a hard time.

HID Descriptor Address is 0x41. This makes all the Register fields seem legit.

hashtag
Whats wrong here?

It was tested without tCover. Connecting a tCover doesn't change anything.

This should be related to wrong power settings.

Surface RT2 turns on backlight on TypeCover2 when the kernel is booted from UEFI with ACPI.

ACPI does something right according to power settings. Now we need to capture the new HID Descriptor for UEFI boot on Surface RT. Results should show what to do next

hashtag
Observation

Booting Windows without tCover: Windows doesn't send a single byte to tCover. Booting Windows with tCover: Windows does send some non HID bytes before the HID Descriptor is read.

That leads to the conclusion that the SoC has a GPIO which acts as tCover detector.

Kernel module

Maybe we have to write a kenel module which will init the tCover IC and hand off controll to I2C-HID Driver

2

bcdVersion

2

01 00

Version 1.00

4

wReportDescLength

2

00 00

x

6

wReportDescRegister

2

00 42

maybe

8

wInputRegister

2

00 43

maybe

10

wMaxInputLength

2

00 00

x

12

wOutputRegister

2

00 44

maybe

14

wMaxOutputLength

2

00 00

x

16

wCommandRegister

2

00 45

maybe

18

wDataRegister

2

00 46

maybe

20

wVendorID

2

00 00

x

22

wProuctID

2

00 00

x

24

wVersionID

2

00 00

x

26

RESERVED

4

00 00 00 00

Offset

Field

Size

Actual Value

Comment

0

wHIDDescLength

2

00 1E

Dec: 30 -> 30 Bytes read

HIDI2C Device-Specific Method (_DSM) - Windows driversMicrosoftLearnchevron-right
Logo
HID Over I2C Protocol Specification - Windows 10 hardware devMicrosoftLearnchevron-right
Logo
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjW9vvHiZ7xAhWLh_0HHf3LC2kQFjAAegQIBRAD&url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F7%2Fd%2Fd%2F7dd44bb7-2a7a-4505-ac1c-7227d3d96d5b%2Fhid-over-i2c-protocol-spec-v1-0.docx&usg=AOvVaw32joJ2ViKHgpCbccKBdj2Awww.google.comchevron-right