Contribute
Register

(Help) DSDT & i2c support on Thinkpad L380 Yoga

Status
Not open for further replies.
Joined
Oct 14, 2015
Messages
36
Motherboard
Gigabyte Z370 AORUS Gaming 7
CPU
i7-8086K
Graphics
UHD 630, GTX 1080 TI
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hi all,

I am running High Sierra on this

Lenovo ThinkPad L380 Yoga
ProcessorIntel Core i5-8250U
Graphics adapterIntel UHD Graphics 620
Memory8192 MB
, DDR4-2400, one of two slots are occupied, maximum of 32 GB RAM
Display13.3 inch 16:9, 1920 x 1080 pixel 166 PPI, 10-Point, native pen support, M133NWF4-R3, IPS LED, glossy: yes
MainboardIntel Kaby Lake-U + iHDCP 2.2 Premium PCH
StorageSamsung PM961 MZVLW256HEHP, 256 GB
, M.2-2280, PCIe NVMe
SoundcardRealtek ALC3287
Connections4 USB 3.0 / 3.1 Gen1, 1 HDMI, 2 DisplayPort, 1 Kensington Lock, Audio Connections: Audio combo port, Card Reader: microSD
NetworkingIntel Ethernet Connection I219-V (10/100/1000MBit), Intel Dual Band Wireless-AC 8265 (a/b/g/n/ac), Bluetooth 4.2


I have the OS and most other things working, but I am confused and failing to properly patch DSDT for the use of i2cvoodoo. I hope to accomplish Elan trackpad support and possibly touch screen functionality.


I am using voodoops2 right now, but - maybe I'm wrong - would love to have some basic gestures like two finger scrolling.


As I am not sure if my DSDT patches following RehabMan are correct, and as the implementing of voodooi2c seems to be based upon this prior step, I am posting here and not in the i2c support thread. Hopefully @RehabMan and @alex.daoud can assist me here in clarifying some issues. Any help is appreciated. Error reporting files attached below... Thx in advance!



I have followed the DSDT guide and did the following:
  • extracted on Clover rehabman build 4444 boot screen with F4
  • built and installed latest iasl incl. MaciASL
  • copied only DSDT & SSDTs
  • disassemble to .dsl
  • download/install patchmatic to /usr/local/bin/patchmatic
  • add repository for rehabman fixes
  • load DSDT & SSDTs into MaciASL
  • save as "ACPI Machine Language Binary" with .aml

DSDT and all exported SSDTs are in EFI CLOVER ACPI PATCHED. System is working with this DSDT with the suggested patches:

"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix" win10
"Fix Mutex with non-zero SyncLevel"
"Fix PNOT/PPNT" (use only if you're dropping CPU related SSDTs)


Question: Any suggestions as far as the DSDT patches are concerned? All (sound, backlight, etc.) seems to be working fine.

Is it correct, to have all these SSDTs in usage?



---



According to

Ohne Titel.png Ohne Titel 2.png

and

Bild.jpeg
Bild 2.jpeg

my L380 Yoga seems to have i2c controller(s). I am having a hard time figuring out, if they control both the touchscreen and trackpad or either. Any idea?

According to the i2c guide I attempted to get the PDFW (is this even correct?) working in macOS...

After reading about the polling situation and GPIO i started to patch my DSDT but am stuck with compiling errors.

Here was my process based on my (limited) understanding of @RehabMan DSDT guide and @alex.daoud https://voodooi2c.github.io/#Installation/Installation guide ... short form, hope this in combination with error reporting makes any sense.

Pasted Graphic 1 Kopie.jpg

<50 00 00 00 02 00 00 00>
hexadecimal APIC pin number
0x50
less or equal
0X2F
Decimal: 47
0X50
Decimal: 80
NO

search for PDFW in my rehabman patched DSDT

ORIGINAL
Code:
Scope (I2C0)
        {
            Device (PDFW)
            {
                Name (HID2, 0x20)
                Name (SBFB, ResourceTemplate ()
                {
                    I2cSerialBusV2 (0x0038, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x003F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x0028, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x002F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                })
                Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x0000
                        }
                })
                Name (SBFI, ResourceTemplate ()
                {
                    Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive, ,, _Y49)
                    {
                        0x00000000,
                    }
                })
                CreateWordField (SBFG, 0x17, INT1)
                CreateDWordField (SBFI, \_SB.PCI0.I2C0.PDFW._Y49._INT, INT2)  // _INT: Interrupts
                Method (_INI, 0, NotSerialized)  // _INI: Initialize
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        SRXO (0x38, 0x01)
                    }

                    Store (GNUM (0x38), INT1)
                    Store (INUM (0x38), INT2)
                    If (LEqual (SDM0, 0x00))
                    {
                        SHPO (0x38, 0x01)
                    }
                }

          Name (_HID, "INT3515")  // _HID: Hardware ID
                Name (_CID, "PNP0C50")  // _CID: Compatible ID
                Name (_DDN, "PD FW Update")  // _DDN: DOS Device Name
                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                {
                    If (LEqual (Arg0, HIDG))
                    {
                        Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
                    }

                    Return (Buffer (0x01)
                    {
                         0x00                                         
                    })
                }

                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    Return (0x0F)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        Return (SBFI)
                    }

                    If (LEqual (SDM0, 0x00))
                    {
                        Return (ConcatenateResTemplate (SBFB, SBFG))
                    }

                    Return (ConcatenateResTemplate (SBFB, SBFI))
                }
            }
        }
    }

AFTER EDITS

Code:
 Scope (I2C0)
        {
            Device (PDFW)
            {
                Name (HID2, 0x20)
                Name (SBFB, ResourceTemplate ()
                {
                    I2cSerialBusV2 (0x0038, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x003F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x0028, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x002F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                })
                Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x0000
                        }
                })
                Name (SBFB, ResourceTemplate ()
                {
         
                })
                CreateWordField (SBFG, 0x17, INT1)
                CreateDWordField (SBFI, \_SB.PCI0.I2C0.PDFW._Y49._INT, INT2)  // _INT: Interrupts
                Method (_INI, 0, NotSerialized)  // _INI: Initialize
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        SRXO (0x38, 0x01)
                    }

                    Store (GNUM (0x38), INT1)
                    Store (INUM (0x38), INT2)
                    If (LEqual (SDM0, 0x00))
                    {
                        SHPO (0x38, 0x01)
                    }
                }

                Name (_HID, "INT3515")  // _HID: Hardware ID
                Name (_CID, "PNP0C50")  // _CID: Compatible ID
                Name (_DDN, "PD FW Update")  // _DDN: DOS Device Name
                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                {
                    If (LEqual (Arg0, HIDG))
                    {
                        Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
                    }

                    Return (Buffer (0x01)
                    {
                         0x00                                         
                    })
                }

                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    Return (0x0F)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        Return (SBFI)
                    }

                    If (LEqual (SDM0, 0x00))
                    {
                        Return (ConcatenateResTemplate (SBFB, SBFG))
                    }

                    Return (ConcatenateResTemplate (SBFB, SBFI))
                }
            }
        }
    }

then I went on in the GPIO pinning guide https://voodooi2c.github.io/#GPIO Pinning/GPIO Pinning.

Code:
              Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x0000
                        }
                })

appears in root & 0xzero —> root pinned
If your device is pinned but not well-pinned, proceed to Step 2c
Step 2c: Ensuring your device is well-pinned

Code:
Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        Return (SBFI)
                    }

                    If (LEqual (SDM0, 0x00))
                    {
                        Return (ConcatenateResTemplate (SBFB, SBFG))
                    }

                    Return (ConcatenateResTemplate (SBFB, SBFI))
                }

If you have now determined that your device is well-pinned, proceed to Step 2e.

Well pinned or not well pinned not clear to me...

look up hex apic pin 0x50

#define GPP_C8_IRQ 0x50
#define GPP_C8 56

decimal GPIO pin number 56
hex 0x38
between 92 and 119?
0x50 = 80

NO

#define GPD0_IRQ 0x50
152
#define GPP_C8_IRQ 0x50
56
decimal GPIO pin number

56
hex 0x38

OR

152
hex 0x98

You will need to repeat the lookup process for both occurences of your hexadecimal APIC pin to obtain two possible hexadecimal GPIO pins. You will then need to test both of them to see which one works.

To my understanding this results in either

Code:
Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x38
                        }
                })

or

Code:
Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x98
                        }
                })

Finally, make sure that there are no other Return statements in your _CRS method apart from the following at the end:
Return (ConcatenateResTemplate (SBFB, SBFG))

My end is:

Code:
  Return (ConcatenateResTemplate (SBFB, SBFG))
                    }

                    Return (ConcatenateResTemplate (SBFB, SBFI))

Very confusing for a layman like me...

After either edits which might be wrong in the first place my DSDT does not compile:

Code:
   Scope (I2C0)
        {
            Device (PDFW)
            {
                Name (HID2, 0x20)
                Name (SBFB, ResourceTemplate ()
                {
                    I2cSerialBusV2 (0x0038, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x003F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x0028, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                    I2cSerialBusV2 (0x002F, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                })
                Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
                        "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x38
                        }
                })
                Name (SBFB, ResourceTemplate ()
                {
         
                })
                CreateWordField (SBFG, 0x17, INT1)
                CreateDWordField (SBFI, \_SB.PCI0.I2C0.PDFW._Y49._INT, INT2)  // _INT: Interrupts
                Method (_INI, 0, NotSerialized)  // _INI: Initialize
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        SRXO (0x38, 0x01)
                    }

                    Store (GNUM (0x38), INT1)
                    Store (INUM (0x38), INT2)
                    If (LEqual (SDM0, 0x00))
                    {
                        SHPO (0x38, 0x01)
                    }
                }

                Name (_HID, "INT3515")  // _HID: Hardware ID
                Name (_CID, "PNP0C50")  // _CID: Compatible ID
                Name (_DDN, "PD FW Update")  // _DDN: DOS Device Name
                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                {
                    If (LEqual (Arg0, HIDG))
                    {
                        Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
                    }

                    Return (Buffer (0x01)
                    {
                         0x00                                         
                    })
                }

                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    Return (0x0F)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    If (LLess (OSYS, 0x07DC))
                    {
                        Return (SBFI)
                    }

                    If (LEqual (SDM0, 0x00))
                    {
                        Return (ConcatenateResTemplate (SBFB, SBFG))
                    }

                }
            }
        }
    }

Pasted Graphic 4 Kopie.jpg

I might get several things wrong at the same time :( Sorry for the messy post, hope problem reporting is correct. Thank you very much for any input!
 

Attachments

  • debug_897.zip
    3.1 MB · Views: 108
  • DSDTs.zip
    271.9 KB · Views: 93
  • thinkpad l380 yoga hwinfo64 report WINDOWS.HTM.zip
    15.8 KB · Views: 96
Have you tried polling mode?
 
MacBookPro14,1 is probably a better choice than 14,2.

There's no need to patch SSDTs for your hardware (you only have IGPU). You've also patched some dynamic SSDTs that you didn't need to patch anyway.

That PDFW device is named "PD FW Update", doesn't seem like a trackpad to me...
Couldn't find another I2C device in IOReg.
You can check the pointing devices (or something similar?) section in Device Manager and see if your trackpad is connected via PS2 or I2C.
You can also try a BIOS update if available, or find a possibly-related BIOS option to change.
 
thanks all, decided to abandon the thinkpad hack project for now. might look for a laptop sometime that uses a synaptic touchpad for better compatibility with voodooPS2..
 
Hi everyone. Tried to install 10.12.6 on Lenovo Thinkpad L380 Yoga. I prefer Sierra for my jobs.

WARNING: Sierra is not recommended for this device & works incorrectly, please check out my next post with Mojave install.

Used https://github.com/kk1987/T480s-hackintosh config & files for booting.

What's Working:
  • Keyboard
  • Trackpad (but no gestures)
  • Audio (Out)
  • Graphics acceleration
  • WLAN & BT (changed to Broadcom)
  • USB ports
  • Camera
  • Sleep/resume (takes 25-30s to sleep)
  • Reboot

What's not working:
  • Shutdown (Causes reboot)

  • Battery indicator Screen Shot 2019-05-20 at 11.07.53 PM.png


  • Wrong CPU speed? My one is 1.6 GHz Screen Shot 2019-05-20 at 11.08.34 PM.png


  • No hardware info from HWMonitor. (Put FakeSMC kexts to EFI/Clover/Kext/Other causes crash kernel in the boot) Screen Shot 2019-05-20 at 11.08.00 PM.png


  • Built-in display isn't recognized.However, it works well on 10.13 High Sierra.Screen Shot 2019-05-20 at 11.08.12 PM.png

I saw in this thread thats no need to patch SSDT, i selected macbook 14,1 in clover config.
Which patches should i apply to DSDT to get non-working features work?

UPD: applied patches from repo via add-on SSDTs in ACPI/patched, no effect, debug files can be found in attached debug_patched_ssdt.zip

Attaching debug files, thank to @black.dragon74 script.
 

Attachments

  • debug_30506.zip
    6 MB · Views: 70
  • debug_patched_ssdt.zip
    5.2 MB · Views: 101
Last edited:
Status
Not open for further replies.
Back
Top