#
✕ nick:pipcet[m]
#asahi · 2021-08-12 13:32
pipcet[m] Recommended suffixes are listed at
#asahi · 2021-08-12 13:12
pipcet[m]sure!
#asahi · 2021-08-12 13:11
pipcet[m]I am, but I won't have access to the M1 for an hour or so :-)
#asahi · 2021-08-12 11:00
pipcet[m]what I'm doing right now is booting the stage2 system with init=/bin/bash, which is annoying because only a few things work. The right thing to do is to run it with the right init, which will set up a debian system in RAM and give you a login prompt (that part works) and allow you to log in (that part doesn't, because passwd isn't set up)
#asahi · 2021-08-12 10:58
pipcet[m]AFAIUI, debootstrap downloads and unpacks .debs, then remembers which of those were included so the native system can run "stage2", which runs the setup scripts.
#asahi · 2021-08-12 10:55
pipcet[m]I set up github CI to build a debootstrap image, need to change that so it actually includes that in published "releases" (but it's probably too large for m1n1 to handle without my other patches)
#asahi · 2021-08-12 10:52
pipcet[m]i mean, you can also include an xserver that way but I only got x to work by making the framebuffer x8r8g8b8
#asahi · 2021-08-12 10:52
pipcet[m]it's debian package gpm if you just want to include it in a debootstrap
#asahi · 2021-08-12 10:50
pipcet[m]gpm? :-)
#asahi · 2021-08-12 10:48
pipcet[m]I've had timing issue with the touchpad, but the only timing issue I had with the keyboard is when I changed the delay to 100 ms rather than 100 us, and it worked then, just slowly :P
#asahi · 2021-08-12 10:40
pipcet[m]and I believe the keyboard SPI controller needs a delay both before and after transmission, during which !CS is held low.
#asahi · 2021-08-12 10:40
pipcet[m]stan mentioned some timing problems with the SPI driver, particularly on MBAs
#asahi · 2021-08-12 10:35
pipcet[m]ooh, I think I'm going to bake myself an everything-asahi-can-do-now kernel :-)
#asahi · 2021-08-11 15:53
pipcet[m]speaking of insufficient voltages, my MBP just gave me the red battery just as I was about to test&push the fast-ipi thing. works now, code at https://github.com/pipcet/linux/tree/apple-fast-ipi, but I'm taking it as a sign that it's time to do something else prior to cleanup+checking it masks things at the vipi layer+serializing+PRing :-)
#asahi · 2021-08-11 15:44
pipcet[m]or a GPIO pin at sufficient voltage to zap your finger ;-)
#asahi · 2021-08-11 15:43
pipcet[m]an LED is all you need, right? :-)
#asahi · 2021-08-11 15:39
pipcet[m]it does, it works with the fb here (but without the pcie hacks :/)
#asahi · 2021-08-11 15:34
pipcet[m]old serial lib?
#asahi · 2021-08-10 14:02
pipcet[m]all that graphics nonsen...hi, alyssa, how's the DCP work going?
#asahi · 2021-08-10 14:02
pipcet[m]in my day, that's all we needed to get a system up and running, but now you kids have fancy frame buffers and all that
#asahi · 2021-08-10 14:00
pipcet[m]oh, btw, and this is a lot simpler, does the caps lock LED work? that gives us a grand total of two user-controllable LEDs!
#asahi · 2021-08-10 13:59
pipcet[m]nope, displays the alt text. Maybe my browser doesn't understand your fancy new mp4s :-)
#asahi · 2021-08-10 13:37
pipcet[m]thank you very much, that's great. One last thing before I shut up; can you test a period of 1000000000 (that's a US billion) and a duty_cycle of half a US billion and see whether it flashes once per second, roughly?
#asahi · 2021-08-10 13:33
pipcet[m]er, it's nanoseconds, try 100000 and 30000?
#asahi · 2021-08-10 13:32
pipcet[m]what did you set the duty cycle to?
#asahi · 2021-08-10 13:31
pipcet[m]that would be "memtool mw 0x23b7001d8 0xf 0xf 0xf", which I'm going to try here...
#asahi · 2021-08-10 13:30
pipcet[m]it's 0x23b7001e0 here, I think, though I'd enable the gate before and after that just to be sure.
#asahi · 2021-08-10 13:29
pipcet[m]you can enable it with memtool if you know the address...
#asahi · 2021-08-10 13:23
pipcet[m](that's part of the reason I'm trying to push the fpwm driver: it actually needs a clock and will do something visibly wrong if it's disabled while it's on)
#asahi · 2021-08-10 13:21
pipcet[m]pmgr_adt_clocks_enable("arm-io/fpwm") in the shell, I think.
#asahi · 2021-08-10 13:19
pipcet[m]no clock -> nothing decoding the MMIO address -> SErr
#asahi · 2021-08-10 13:19
pipcet[m]yeah, the clk gate. you can enable that in m1n1, I think.
#asahi · 2021-08-10 13:16
pipcet[m]did you set duty cycle and period first? if the duty cycle is longer than the period the pwm code will fail to enable.
#asahi · 2021-08-10 13:15
pipcet[m]though now I look at it, the missing clk gate might get you
#asahi · 2021-08-10 13:14
pipcet[m]you should see a device in /sys/class/pwm; cd to /sys/class/pwm/pwmchip0; echo 0 > export; then a directory shows up with "enable", "duty_cycle" and so on. You can play with those (units in nanoseconds) :-)
#asahi · 2021-08-10 13:13
pipcet[m]that's okay, that's the SPI keyboard backlight code in the applespi driver, for intel macs
#asahi · 2021-08-10 13:00
pipcet[m](there's another patch which exposes the PWM as a brightness control for an LED, but that's just DT magic)
#asahi · 2021-08-10 12:59
pipcet[m]PWM_SYSFS too
#asahi · 2021-08-10 12:58
pipcet[m](it's called t8103-j293, but it's just t8103-j274 plus the keyboard backlight)
#asahi · 2021-08-10 12:57
pipcet[m]just make sure you use the right dtb if you test.
#asahi · 2021-08-10 12:56
pipcet[m]nah, we're not using the interrupts
#asahi · 2021-08-10 12:56
pipcet[m]j_ey was right, it's the same (is it possible the macbook pro is really just an overpriced mba without function keys? ;-) )
#asahi · 2021-08-10 12:49
pipcet[m]I suspect the initial message is just the weird boot mode the keyboard is in. It also sends an interrupt when the first key is hit, even when there is no driver.
#asahi · 2021-08-10 12:48
pipcet[m]amw: https://github.com/amworsley/AsahiLinux/pull/1#issuecomment-895998452
#asahi · 2021-08-10 12:43
pipcet[m]amw: oh, any chance you could check your ADT first? I don't feel good about just writing to MMIO that I really have no reason to believe is there or does the same thing on MBA...
#asahi · 2021-08-10 12:42
pipcet[m][ 3.793436] applespi spi1.0: Received corrupted packet (invalid message length 8 - num-fingers 0, tp-len 48)
#asahi · 2021-08-10 12:42
pipcet[m][ 3.759822] applespi spi1.0: Received corrupted packet (crc mismatch)
#asahi · 2021-08-10 12:41
pipcet[m]I see that too, though usually it's a CRC error...
#asahi · 2021-08-10 12:39
pipcet[m]that's for input. For output there's a display controller behind its own dart, plus the phy driver
#asahi · 2021-08-10 12:39
pipcet[m]it's an SPI device that responds nonsensically until you complete a lengthy initialization sequence, when it sends lots of data that needs to be interpreted...

plus ›