Bug 217143

Summary: Adapting samsung-laptop to use ACPI interface
Product: Drivers Reporter: Jordi Torres (clubmajo)
Component: PlatformAssignee: drivers_platform (drivers_platform)
Status: NEW ---    
Severity: enhancement    
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 6.2.2 Subsystem:
Regression: No Bisected commit-id:
Attachments: DSDT table in source
AMLI when keyboard backlight is set to 30%
AMLI when keyboard backlight is set to 60%
AMLI when keyboard backlight is set to 100%
AMLI when keyboard backlight is set to 0%
AMLI when power on lid is activated
AMLI when power on lid is deactivated
AMLI when limit battery to 80% is activated
AMLI when limit battery to 80% is deactivated
AMLI when USB power while laptop off is activated
AMLI when USB power while laptop off is deactivated
AMLI when webcam and mic block is activated
AMLI when webcam and mic block is deactivated
AMLI when power profile is set to High Power
AMLI when power profile is set to Optimized
AMLI when power profile is set to Discreet
AMLI when power profile is set to Silent

Description Jordi Torres 2023-03-05 18:55:48 UTC
Created attachment 303860 [details]
DSDT table in source

I have a Samsung Galaxy Book 2 Pro 360 which is a model that doesn't have CSM so cannot boot using traditional BIOS. That makes samsung-laptop platform driver useless as there isn't any SABI interface to use. I captured communication between official driver on Windows and ACPI via amli debugger and I can provide information about how the new interface works.

Basically, there is a device called /_SB.SCAI that is used as a version of SABI over ACPI. Dumps shows calls to the CSFI function with buffers near identical to what samsung-laptop would generate if used SABI version 3 taking into account endianess things

There is functions like keyboard backlight that use the same commands as SABI 3 while functions like Protect Battery use non known commands.

/_SB.SCAI has a sizeable amount of methods which I don't know what they do and some features like performance profile use these methods like CSXI which sends a SABI command but with a size of 0x100 bytes.

As last note, I read in the line 40 or around of samsung-laptop.c that maybe somebody had access to a spec of SABI interface and I would like know if somebody knows about that a part of the corresponding mantainer

I will attach dumps of amli about activation of different functions and a copy of the DSDT where appears /_SB.SCAI
Comment 1 Jordi Torres 2023-03-05 19:20:50 UTC
Created attachment 303861 [details]
AMLI when keyboard backlight is set to 30%
Comment 2 Jordi Torres 2023-03-05 19:21:26 UTC
Created attachment 303862 [details]
AMLI when keyboard backlight is set to 60%
Comment 3 Jordi Torres 2023-03-05 19:21:54 UTC
Created attachment 303863 [details]
AMLI when keyboard backlight is set to 100%
Comment 4 Jordi Torres 2023-03-05 19:22:14 UTC
Created attachment 303864 [details]
AMLI when keyboard backlight is set to 0%
Comment 5 Jordi Torres 2023-03-05 19:23:02 UTC
Created attachment 303865 [details]
AMLI when power on lid is activated
Comment 6 Jordi Torres 2023-03-05 19:23:24 UTC
Created attachment 303866 [details]
AMLI when power on lid is deactivated
Comment 7 Jordi Torres 2023-03-05 19:25:04 UTC
Created attachment 303867 [details]
AMLI when limit battery to 80% is activated
Comment 8 Jordi Torres 2023-03-05 19:25:32 UTC
Created attachment 303868 [details]
AMLI when limit battery to 80% is deactivated
Comment 9 Jordi Torres 2023-03-05 19:28:43 UTC
Created attachment 303869 [details]
AMLI when USB power while laptop off is activated
Comment 10 Jordi Torres 2023-03-05 19:29:09 UTC
Created attachment 303870 [details]
AMLI when USB power while laptop off is deactivated
Comment 11 Jordi Torres 2023-03-05 19:29:53 UTC
Created attachment 303871 [details]
AMLI when webcam and mic block is activated
Comment 12 Jordi Torres 2023-03-05 19:30:14 UTC
Created attachment 303872 [details]
AMLI when webcam and mic block is deactivated
Comment 13 Jordi Torres 2023-03-05 19:31:09 UTC
Created attachment 303873 [details]
AMLI when power profile is set to High Power
Comment 14 Jordi Torres 2023-03-05 19:31:32 UTC
Created attachment 303874 [details]
AMLI when power profile is set to Optimized
Comment 15 Jordi Torres 2023-03-05 19:32:19 UTC
Created attachment 303875 [details]
AMLI when power profile is set to Discreet
Comment 16 Jordi Torres 2023-03-05 19:33:51 UTC
Created attachment 303876 [details]
AMLI when power profile is set to Silent