#
✕ nick:pipcet[m]
#asahi · 2021-08-09 07:16
pipcet[m]well, certainly the first ones since that new-fangled DT stuff happened ;-)
#asahi · 2021-08-09 06:56
pipcet[m]sven: please keep bringing on the "nits", they're great :-)
#asahi · 2021-08-08 14:08
pipcet[m]so I'll finish cleaning up the WDT driver and turn it into a github PR?
#asahi · 2021-08-08 14:08
pipcet[m]sven: sounds great!
#asahi · 2021-08-08 13:25
pipcet[m]sven: will the normal clks report a 24 MHz rate or should I hardcode it in the WDT driver?
#asahi · 2021-08-07 15:22
pipcet[m]there's probably a better way, but what I do is cd to m1n1/proxyclient, then python3 -m m1n1.shell
#asahi · 2021-08-07 14:16
pipcet[m]I think the wdt driver should work without the clk stuff, too, but we need those for the fpwm (keyboard backlight) driver.
#asahi · 2021-08-07 14:12
pipcet[m]definitely.
#asahi · 2021-08-07 14:06
pipcet[m]alyssa: will do once I can test it on the mainline kernel and see that it still works. Thanks! :-)
#asahi · 2021-08-07 14:04
pipcet[m](and it's been a really long time since I last got stuff included in the kernel)
#asahi · 2021-08-07 14:03
pipcet[m]j_ey: ideally, yes, but I certainly don't want to inconvenience anyone by getting incompatible changes included
#asahi · 2021-08-07 14:02
pipcet[m]sven: sorry, I'll try to be clearer next time
#asahi · 2021-08-07 14:01
pipcet[m]sven: (and I figured the way I decided to do it wouldn't fly anyway, so let's wait and see whether anything was really duplicated :P)
#asahi · 2021-08-07 14:00
pipcet[m]sven: no, I looked at yours first!
#asahi · 2021-08-07 13:50
pipcet[m]alyssa: there's code at https://github.com/pipcet/linux/commit/dd4c7abffd71318cb2a2c31514ae0ad29eeed3c3 if you want to have a look, but of course it's perfectly okay if you don't and do your own thing instead :-)
#asahi · 2021-08-07 13:48
pipcet[m]alyssa: figured out how to get ssh to work?
#asahi · 2021-08-07 08:12
pipcet[m]s/stop/start/, I think :-)
#asahi · 2021-08-07 01:51
pipcet[m]alyssa: uhm, I got a bit carried away, I was just going to write some pseudocode for the mailbox/ASC/DCP+SMC/brightness+gpio stack, but then I hacked on it a bit more and things actually work here now
#asahi · 2021-08-07 01:45
pipcet[m]force the roles?
#asahi · 2021-08-07 01:19
pipcet[m]I think that's a timeout?
#asahi · 2021-08-07 00:37
pipcet[m]you can always just move to a large initrd, though you need to change a few lines in the m1n1 proxyclient code to allow it...
#asahi · 2021-08-07 00:36
pipcet[m]I don't know, to be honest, I don't think I've done both at the same time.
#asahi · 2021-08-07 00:34
pipcet[m]don't need rootfs if you have nfsroot-over-usb! uh...
#asahi · 2021-08-07 00:34
pipcet[m]you need that for the keyboard, right?
#asahi · 2021-08-07 00:29
pipcet[m]quite possible :/
#asahi · 2021-08-07 00:19
pipcet[m]anything from the dwc3 driver in dmesg? it should probably complain about a DT/configuration mismatch...
#asahi · 2021-08-07 00:14
pipcet[m]tried unloading/reloading the driver?
#asahi · 2021-08-07 00:12
pipcet[m]502280000.dwc3
#asahi · 2021-08-07 00:11
pipcet[m]anything in /sys/class/udc?
#asahi · 2021-08-07 00:08
pipcet[m]anything in dmesg after you do the echo ...dwc... > .../UDC thing?
#asahi · 2021-08-07 00:07
pipcet[m]I think what's broken is the missing dropbear package in that image so you can't actually log in :-)
#asahi · 2021-08-07 00:06
pipcet[m]I'm running that code and I'm definitely seeing a USB device and a network interface from the Linux/Intel side
#asahi · 2021-08-06 23:54
pipcet[m]hmm. I think I used the non-preconfigured eem driver, and I still ended up using twenty lines of weird hex constants: https://github.com/pipcet/pearl/blob/main/local/hardware/pearl/bin/gadget#L3 through line 23. maybe this wasn't the best idea :-)
#asahi · 2021-08-06 23:50
pipcet[m]in the kernel config? yes, there is, it just depends on usb role switching IIRC
#asahi · 2021-08-06 23:45
pipcet[m]did you select the preconfigured gadget or the configfs one?
#asahi · 2021-08-06 23:42
pipcet[m]it'll go blind
#asahi · 2021-08-06 23:40
pipcet[m]and you're using a C-C cable? that setup always scares me because I'm afraid they'll start charging each other and all of my computers blow up at the same time ;-)
#asahi · 2021-08-06 23:38
pipcet[m]it might be easier to do it the other way around, if your chromebook has usb c and gadget support...
#asahi · 2021-08-06 23:36
pipcet[m]sorry, I'm not sure I'm thinking of the right situation. If you have the M1 running Linux with Sven's patches you should be able to configure in eem support, and then you can run TCP/IP over the same cable you presumably use to talk to m1n1?
#asahi · 2021-08-06 23:34
pipcet[m]sorry, what I meant was making the USB gadget pretend to be an ethernet adapter
#asahi · 2021-08-06 23:31
pipcet[m]i'm confused, where are you trying to get ssh? if you have USB the ethernet-over-usb stuff used to work :-)
#asahi · 2021-08-06 17:36
pipcet[m]j_ey: I think it was a restart handler that grew a WDT "driver" (not much of one, admittedly), if there's any interest in it I'll obviously clean it up :-)
#asahi · 2021-08-06 17:33
pipcet[m]j_ey: I think you're right, thanks!
#asahi · 2021-08-06 17:09
pipcet[m]alyssa: I think the SMC stuff is a mess, frankly, they go digging around in nvmem and the device tree for the poweroff sequence. Reboot is easier, there's apple_wdt_restart here https://github.com/pipcet/linux/blob/543af4a24f5561522e8a52aa6bd6bec692d2e93b/drivers/watchdog/apple_wdt.c#L72. Literally four writel()s :-)
#asahi · 2021-08-06 17:03
pipcet[m]well, isb is sometimes necessary, but that's not really noncoherent
#asahi · 2021-08-06 09:17
pipcet[m]they all read or write properties, some need interrupts which are provided by the SMC
#asahi · 2021-08-06 09:04
pipcet[m]the ones I know about are battery/power supply, usb, pci (for the power pin), power switch, lid switch, backlight (the on/off switch, not the PWM which goes through DCP), hwmon of course, gpio for when you really want to blow up your mac, system shutdown, (I think the way macos uses the WDT also makes use of the SMC)
#asahi · 2021-08-06 08:37
pipcet[m](mailboxes are designed to have a few channels. The SMC has ~4000 "properties" that can be read and set. but, anyway, it's quite possible we'll go with a mailbox-based hack in the end)
#asahi · 2021-08-06 08:35
pipcet[m](we should probably have a nice DT-based API for sharing the SMC between all the drivers that use it, anyway. Currently working on something but it's not quite ready yet.)
#asahi · 2021-08-06 08:29
pipcet[m](you set the "NTAP" flag in the SMC, then you get messages on EP20 with the low byte set to 0x18)

plus ›