Coder Social home page Coder Social logo

simpleperipheralbusprobe's People

Contributors

bentiss avatar enaut avatar papsou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

enaut shedlona

simpleperipheralbusprobe's Issues

Trekstor C13 Touchpad logging.

Thank you for writing this guide and driver!

related bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312

Background

Problem/why we want to log:

The Linux i2c driver does not seem to work with the touchpad of this laptop although it uses the default microsoft driver. Since we did not find the root cause of the issue we want to probe the windows driver.

what was done

The DSDT and SSDT tables have been extracted with a tool called rwanything and recompiled with iasl. There were some external definitions missing so the following refs.txt was used:

External(MDBG, MethodObj, 1)

External(_GPE.MMTB, MethodObj, 0)

External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)

The Patch used for the DSDT file is:

*** C:/Users/enaut/Downloads/DSDT.dsl	Wed Mar 07 20:59:04 2018
--- C:/Users/enaut/Downloads/DSDT-mod2.dsl	Wed Mar 07 21:07:29 2018
***************
*** 18,24 ****
   *     Compiler ID      "INTL"
   *     Compiler Version 0x20120913 (538052883)
   */
! DefinitionBlock ("", "DSDT", 2, "ALASKA", "A M I ", 0x01072009)
  {
      /*
       * External declarations were imported from
--- 18,24 ----
   *     Compiler ID      "INTL"
   *     Compiler Version 0x20120913 (538052883)
   */
! DefinitionBlock ("", "DSDT", 2, "ALASKA", "A M I ", 0x01072010)
  {
      /*
       * External declarations were imported from
***************
*** 4422,4427 ****
--- 4422,4444 ----
                  {
                      Return (RBUF) /* \_SB_.PCI0.I2C2.RBUF */
                  }
+ 				
+ 				Device(SPB1)
+ 				{
+ 					Name(_HID, "DEBDEBD")
+ 					Name(_UID, 1)
+ 					Method(_CRS, 0x0, NotSerialized)
+ 					{
+ 						Name (RBUF, ResourceTemplate ()
+ 						{
+                         I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0,
+                             AddressingMode7Bit, "\\_SB.PCI0.I2C2",
+                             0x00, ResourceConsumer, , Exclusive,
+                             )
+ 						})
+ 						Return(RBUF)
+ 					}
+ 				}
  
                  Device (TPD0)
                  {
***************
*** 4433,4439 ****
                      Name (SBFB, ResourceTemplate ()
                      {
                          I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0,
!                             AddressingMode7Bit, "\\_SB.PCI0.I2C2",
                              0x00, ResourceConsumer, , Exclusive,
                              )
                      })
--- 4450,4456 ----
                      Name (SBFB, ResourceTemplate ()
                      {
                          I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0,
!                             AddressingMode7Bit, "\\_SB.PCI0.SPB1",
                              0x00, ResourceConsumer, , Exclusive,
                              )
                      })

Adjustments not in the instructions

Note: The name spbProbe was not working so I used DEBDEBD (conditions were: 6-7 Letters, only capitals, only hexadecimal). I don't understand the last one since there are lots of non hexadecimal names around.

Since the driver did not install to the probing device I changed the name in the drivers .inf too:

line 45: %spbProbe.DeviceDesc%=spbProbe_Device, ACPI\spbProbe
to
line 45: %spbProbe.DeviceDesc%=spbProbe_Device, ACPI\DEBDEBD

The current problem:

  1. The driver is installed and listed in Device manager->System devices with no error.
  2. The touchpad is not working and the error in the Device manager reads:
    This device cannot find enough free resources that it can use. (Code 12)
    If you want to use this device, you will need to disable one of the other devices on this system.
    
    This error is not in the HID-compatible Touchpad device but in I2C HID-Device. The original touchpad device vanished. Without the DSDT overload this device is there and occupies the resource IRQ 0x00000400 (1024)
  3. The Problem code in the I2C HID-Device driver is 0000000C
  4. The Problem status is Object Name not found. C0000034

I suspect I did something wrong with my changes of either the ASL or the drivers inf. But as I only came that far using educated guesses and pattern matching I do understand nothing of the language.

Can you help me identify the problem?

Make a new release

The latest changes in the README made the current release a little bit difficult to use as users need to update some files themselves.

An release would be a good idea to fix that.

Question regarding SMBus communication

Hello,

I find this project very intresting, but i kinda dont understand how to use it for my purpose.
I want to Read/Write Block (SMBus functions/protocols) from Windows OS.
My intel I7 silicon is connected to Embedded Controller (which is again connected to 2 devices via SMBus). I want to read/write/probe those SDA and SCL lines of those two devices.

Can this be done using this project?

Regards.

Tong Fang GK5CN5Z touchpad logging not working

I'm in a very similar situation to @enaut from #1 in that I'm trying to get an i2c touchpad working under Linux. This time on a Tong Fang GK5CN5Z.

I've been trying to run through the steps in the redhat bug, which is how I ended up here. - I've opened a bug for this particular issue in the kernel bug tracker but so far it hasn't had any attention. (It doesn't help that I ran into a different bug first, but that isn't related at this point because the touchpad works fine under windows and my current holdup is not being able to get an i2c trace.)

I've followed the steps used there, including the renaming of the device to DEBDEBD in the dsdl and .inf file. I ran into the same symptoms as that bug: This device cannot find enough free resources that it can use. (Code 12) - however, the steps there didn't completely fix my problems.

I now have an issue with the touchpad (i2c hid device) saying:

This device cannot start. (Code 10)

A request for the HID descriptor failed.

I had to extract the dsdt with iasl.exe, and recompile it with the same. I've checked, and I can use the touchpad using a recompiled dsdt without modification except for incrementing the serial number. So, I suspect that I've done something wrong with my modificaition of the dsdt.

The extracted code for the i2c controlled with the touchpad originally looked like this:

    Scope (_SB.PCI0.I2C0)
    {
        Device (TPAD)
        {
            Name (SADR, 0x2C)
            Name (HADR, 0x0020)
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, "UNIW0001")  // _HID: Hardware ID
            Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)  // _CID: Compatible ID
            Name (_UID, One)  // _UID: Unique ID
            Name (_S0W, Zero)  // _S0W: S0 Device Wake State
            Name (SBFB, ResourceTemplate ()
            {
                I2cSerialBusV2 (0x0000, ControllerInitiated, 0x00061A80,
                    AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                    0x00, ResourceConsumer, _Y60, Exclusive,
                    )
            })
            CreateByteField (SBFB, \_SB.PCI0.I2C0.TPAD._Y60._ADR, BADR)  // _ADR: Address
            Name (SBFI, ResourceTemplate ()
            {
                GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000,
                    "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x0000
                    }
            })
            CreateWordField (SBFI, 0x17, INTA)
            Method (_INI, 0, NotSerialized)  // _INI: Initialize
            {
                BADR = SADR /* \_SB_.PCI0.I2C0.TPAD.SADR */
                INTA = GNUM (0x03040007)
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If ((OTPM != 0x02))
                {
                    Return (Zero)
                }

                Return (0x0F)
            }

            Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
            {
                Return (ConcatenateResTemplate (SBFB, SBFI))
            }

            Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
            {
                If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
                {
                    If ((Arg2 == Zero))
                    {
                        If ((Arg1 == One))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                             // .
                            })
                        }
                        Else
                        {
                            Return (Buffer (One)
                            {
                                 0x00                                             // .
                            })
                        }
                    }

                    If ((Arg2 == One))
                    {
                        Return (HADR) /* \_SB_.PCI0.I2C0.TPAD.HADR */
                    }
                }

                Return (Buffer (One)
                {
                     0x00                                             // .
                })
            }
        }
    }

Here is the diff for the file:

--- dsdt-new.dsl        2018-08-19 16:02:40.724674100 +0100
+++ dsdt-inject.dsl     2018-08-20 00:25:49.093439100 +0100
@@ -18,7 +18,7 @@
  *     Compiler ID      "INTL"
  *     Compiler Version 0x20160527 (538314023)
  */
-DefinitionBlock ("", "DSDT", 2, "PCS", "laptop", 0x01072009)
+DefinitionBlock ("", "DSDT", 2, "PCS", "laptop", 0x01072013)
 {
     External (_GPE.AL6F, MethodObj)    // 0 Arguments
     External (_GPE.HLVT, MethodObj)    // 0 Arguments
@@ -52782,6 +52782,23 @@

     Scope (_SB.PCI0.I2C0)
     {
+               Device(SPB1)
+               {
+                       Name(_HID, "DEBDEBD")
+                       Name(_UID, 1)
+                       Method(_CRS, 0x0, NotSerialized)
+                       {
+                               Name (RBUF, ResourceTemplate ()
+                               {
+                                       I2cSerialBusV2 (0x0000, ControllerInitiated, 0x00061A80,
+                                               AddressingMode7Bit, "\\_SB.PCI0.I2C0",
+                                               0x00, ResourceConsumer, , Exclusive,
+                                               )
+                               })
+                               Return(RBUF)
+                       }
+               }
+
         Device (TPAD)
         {
             Name (SADR, 0x2C)
@@ -52794,7 +52811,7 @@
             Name (SBFB, ResourceTemplate ()
             {
                 I2cSerialBusV2 (0x0000, ControllerInitiated, 0x00061A80,
-                    AddressingMode7Bit, "\\_SB.PCI0.I2C0",
+                    AddressingMode7Bit, "\\_SB.PCI0.I2C0.SPB1",
                     0x00, ResourceConsumer, _Y60, Exclusive,
                     )
             })

I'm not sure what _Y60 is in this context, but I've tried leaving it out and it doesn't seem to make any difference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.