Skip to content

Keyboard backlight - #1

Merged
amworsley merged 4 commits into
amworsley:asahi-keyboardfrom
pipcet:keyboard-backlight
Aug 10, 2021
Merged

amworsley merged 4 commits into
amworsley:asahi-keyboardfrom
pipcet:keyboard-backlight

Conversation

@pipcet

@pipcet pipcet commented Aug 10, 2021

Copy link
Copy Markdown

To test, you need to enable the sysfs/debugfs interface to the PWM...

pipcet added 4 commits August 10, 2021 07:33
This is a PWM found on the Apple M1 SoC. On at least some MacBook
Pros, it's connected to the keyboard backlight.

Signed-off-by: Pip Cet <[email protected]>
This PWM module on the Apple M1 SoC is connected to the keyboard
backlight on at least some MacBook Pros (J293).

Signed-off-by: Pip Cet <[email protected]>
Model number is J293, this is based on the 2020/2021 model.

Signed-off-by: Pip Cet <[email protected]>
@pipcet

pipcet commented Aug 10, 2021

Copy link
Copy Markdown
Author

Here's what I have in my adt.txt:

        fpwm {
            interrupt-parent = 109
            compatible = ListContainer: 
    fpwm,t8101
    fpwm,s5l8920x
            AAPL,phandle = 59
            interrupts = 633
            clock-gates = 37
            device_type = fpwm
            reg = [889470976, 16384]

            kbd-backlight {
                nits-to-pwm-percentage-part1 = b'\x8f\x02\x00\x00\xa40\x00\x00R\xb8\x01\x00\x85\xeb\x03\x00\\\x0f\x06\x00\xd7\xe3\x07\x00\x1f\x05\t\x00\xec\x11\n\x00)\x1c\x0b\x00R8\x0c\x00\xe1:\r\x0033\x0e\x00\xb8\x1e\x0f\x00\x1fE\x10\x00\x9a\xd9\x10\x00f\xe6\x11\x00\xcd\xcc\x12\x00\x85\xeb\x12\x00\xf6\xa8\x13\x00=\xca\x14\x00\xb8\x9e\x15\x00q}\x16\x00\nW\x17\x00f&\x18\x0033\x19\x00'
                reg = []
                AAPL,phandle = 60
                nits-to-pwm-percentage-part2 = b"\xcd\xcc\x02\x00\x9a\x99\x05\x00ff\x08\x0033\x0b\x00\x00\x00\x0e\x00\xcd\xcc\x10\x00\x9a\x99\x13\x00ff\x16\x0033\x19\x00\x00\x00\x1c\x00\xcd\xcc\x1e\x00\x9a\x99!\x00ff$\x0033'\x00\x00\x00*\x00\xcd\xcc,\x00\x9a\x99/\x00ff2\x00335\x00\x00\x008\x00\xcd\xcc:\x00\x9a\x99=\x00ff@\x0033C\x00\x00\x00F\x00"
                default-hz = 25000
                device_type = fpwm

            }
        }

modulo the bad formatting, that's my ADT dumper's fault :-)

@amworsley
amworsley merged commit b98e2ce into amworsley:asahi-keyboard Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants