#asahi-dev · 2022-11-27 12:43
povikthe issue is that SDZ is currently raised in probe of codec as a sound card component, but probably no issue in changing it for consistence#asahi-dev · 2022-11-27 12:41
povikthat could be the two stages to go with in the kettenis' approach#asahi-dev · 2022-11-27 12:40
povikwe could split it into resume of codec as kernel device and codec as sound card component#asahi-dev · 2022-11-27 12:40
chadmed_another 1UP over macos perhaps :D#asahi-dev · 2022-11-27 12:39
povikshouldn't matter :p#asahi-dev · 2022-11-27 12:39
povikno idea#asahi-dev · 2022-11-27 12:39
chadmed_do we know if macos puts them into hw shutdown? #asahi-dev · 2022-11-27 12:38
chadmed_we have the benefit of not officially supporting speakers yet (and probably for a while given we havent even started working on userspace safety) so theres time to work it out#asahi-dev · 2022-11-27 12:36
povikkettenis: i don't see how to convince ASoC of the two stages unfortunately#asahi-dev · 2022-11-27 12:35
povikthat would be one solution#asahi-dev · 2022-11-27 12:35
povikthere's been proposals on the list to create a reset controller representation out of such gpios#asahi-dev · 2022-11-27 12:35
povikbut this is a gpio without the reset subsystem involved#asahi-dev · 2022-11-27 12:34
povikthe issue is doing it nicely. reset subsystem does this for shared resets#asahi-dev · 2022-11-27 12:34
povikof course every codec is a separate device in kernel model#asahi-dev · 2022-11-27 12:33
chadmed_but sw shutdown quiescent current is 10x hw shutdown on two voltage rails so we really should get it working properly#asahi-dev · 2022-11-27 12:33
chadmed_aiui asoc spawns a tas2764 driver for each codec, so option 1 (the good option) would be quite hard#asahi-dev · 2022-11-27 12:33
povikah it's ASoC calling tas2764_codec_resume#asahi-dev · 2022-11-27 12:32
povikmeaning general kernel PM code#asahi-dev · 2022-11-27 12:32
povikright. will kernel let us easily do it though?#asahi-dev · 2022-11-27 12:32
kettenisfirst stage restores power; second stage restores the registers#asahi-dev · 2022-11-27 12:31
kettenisor the resume process should be done in two stages#asahi-dev · 2022-11-27 12:31
povikthe second option could be short term workaround#asahi-dev · 2022-11-27 12:30
povikor we shouldn't pull it down at all#asahi-dev · 2022-11-27 12:30
povikthere either needs to be a bit of logic that pulls SDZ low after all codecs agree on it (like is done elsewhere in kernel in dealing with shared resets)#asahi-dev · 2022-11-27 12:28
chadmed_so i take it that means pulling SDZ low will never work on suspend for us?#asahi-dev · 2022-11-27 12:25
povikbut it breaks down during the suspend/resume cycle#asahi-dev · 2022-11-27 12:25
povikthat works out during boot, since the first codec to probe pulls down the reset line for all#asahi-dev · 2022-11-27 12:24
povikso the first codec in probe wins in obtaining the gpio reference, others on the same line fail (but that's ok, since the gpio is optional)#asahi-dev · 2022-11-27 12:23
povikchadmed_: that's a known issue due to not properly handling the reset gpio line being shared between codecs#asahi-dev · 2022-11-27 12:21
povikjannau: yes. the sio PR should have a newer version#asahi-dev · 2022-11-27 11:52
jannaupovik: have you done any fixups for "m1n1.adt: Parse 'segment-ranges' of coprocessor nodes"? it seems to break HV boot due to what appears an adt parse problem for pmgr#asahi-dev · 2022-11-27 11:31
chadmed_resetting them before trying to restore the registers doesnt help#asahi-dev · 2022-11-27 11:30
chadmed_it looks like the chips just disappear off the bus. the regcache sync fails with -ENXIO, and tas2764->sdz_gpio doesnt exist upon resume...#asahi-dev · 2022-11-27 09:20
jannausigh, backlight brightness nits to dac mapping looks logarithmic but my fitted logarithm has an oscillating error in both directions#asahi-dev · 2022-11-27 09:04
chadmedonly the left tweeter and left woofer 1 make it through, the rest fail consistently#asahi-dev · 2022-11-27 09:03
chadmeds2idle is borked on tas2764. the same four codecs every single time fail on regcache_sync()#asahi-dev · 2022-11-26 22:23
ChaosPrincesstyvm#asahi-dev · 2022-11-26 22:22
jannauChaosPrincess: https://www.jannau.net/asahi/spi_keyboard_1.log only the raw SPI commincation and no SIO#asahi-dev · 2022-11-26 22:04
povikpushed the kboot.c segment-ranges code to https://github.com/AsahiLinux/m1n1/pull/266#asahi-dev · 2022-11-26 21:29
ChaosPrincessjannau: if you have a kb trace, mind throwing it my way?#asahi-dev · 2022-11-26 21:28
ChaosPrincessi can just drop the first line then?#asahi-dev · 2022-11-26 21:28
ChaosPrincessso, thats the beginning of the trace#asahi-dev · 2022-11-26 21:28
ChaosPrincesshttps://pst.klgrth.io/paste/6rtdn#asahi-dev · 2022-11-26 21:27
jannauChaosPrincess: looking at old keyboard traces macos seems to do that there as well. I don't think we do that spi_hid#asahi-dev · 2022-11-26 21:23
povik:)#asahi-dev · 2022-11-26 21:23
povik[ 0.500180] apple-sio 236400000.sio: RTKit: Initializing (protocol version 11)#asahi-dev · 2022-11-26 21:20
ChaosPrincessjannau: for touchbar its tx/rx a 64-bit zero, then send the firmware in yet-another-apple-encoding, then it sends hid events using 'z2' protocol. i figured out how the firmware upload works, but not sure where the 64bit zero comes from#asahi-dev · 2022-11-26 21:18
povikah i am not adding the memory-region prop to sio node *facepalm*#asahi-dev · 2022-11-26 21:18
jannaudoes the devicetree node contains already a reference to the dart iommu?#asahi-dev · 2022-11-26 21:17
jannauChaosPrincess: iirc the keyboard/trackpad starts sending data after power-on