libera/#maemo-leste/ Monday, 2024-12-09

tmlindfreemangordon: there are the gpios, uart/n_gsm, and usb05:44
freemangordontmlind: ok. so, disabling PM on the modem USB device makes QMI notifications work07:27
freemangordontmlind: ok, it seems vendor driver uses it's own usb-to-serial driver which takes care of wake gpio https://github.com/NotKit/android_kernel_motorola_omap4-common/blob/hybris-11.0/drivers/usb/serial/mdm6600.c#L12810:20
freemangordonunless I am missing something10:21
freemangordonit uses   "mdm6600_usb_rwkup"10:22
freemangordon gpio-115 (mdm6600_usb_rwkup   ) in  hi10:54
freemangordontmlind: root@devuan-droid4:/sys/class/gpio/gpio627# inotifywait -m value11:24
freemangordonSetting up watches.11:24
freemangordonWatches established.11:24
freemangordonvalue MODIFY11:25
freemangordonvalue MODIFY11:25
freemangordonvalue MODIFY11:25
freemangordonthis is what happens on incoming call11:25
freemangordonso it seems we have a wake gpio that's dedicated to USB interface11:28
freemangordonbut nobody uses it ATM11:29
freemangordontmlind: I will need your help to modify DTS to make that gpio wake-up source12:48
freemangordonok, I am able to get "RING" on AT interface :)15:14
tmlindoh nice :)15:33
tmlindso where did you configure the rwkup gpio then?15:33
freemangordonsec, will pastebin the patch15:33
tmlindok15:34
freemangordonthis https://pastebin.com/zJj9vc3b15:35
freemangordontmlind: but, not sure if usb_disable_autosuspend() is the proper way to resume the device15:36
freemangordonit seems to work for USB->serial, but not for cdc-wdm15:37
tmlindok great15:37
freemangordonwhich is strange, given that those are just different interfaces15:37
tmlindso eventually best to configure the rwkup to use the padconf interrupt instead of the gpio, just a dts change15:38
freemangordonno idea how to do that :)15:38
tmlindi'll help15:38
freemangordonplease do15:38
freemangordonI will test15:38
tmlindso maybe you need to find the other usb interfaces too to kick?15:38
freemangordonbut at least we found the missing piece: gpio_11515:38
tmlindyeah great15:38
freemangordonI am kicking 'main' device15:39
tmlindif this can be done in the phy, it keeps the usb code clean from non-standard wiring15:39
freemangordonI am doing from the phy, as you can see from the patch15:39
tmlindyeh cool15:41
tmlindso have you tried finding the other devices to kick?15:41
freemangordonwould it be better to do   pm_runtime_get_sync() instead of usb_disable_autosuspend()? or, shall I call usb_mark_last_busy() between   usb_disable_autosuspend()/usb_enable_autosuspend()?15:42
tmlindnot sure, seems like best to use the usb calls for usb devices15:43
freemangordonok, but do I need usb_mark_last_busy()?15:43
tmlindseems like unless usb maybe does that automatically for you?15:43
freemangordonok, lemme try it then15:43
tmlindthe plan is to make it automatic in general fyi so no need to call mark_last_busy eventually15:44
freemangordonpm_runtime_allow(&udev->dev);15:46
freemangordonthat's what usb_enable_autosuspend does15:46
tmlindwould be nice if this will also make the qmi usb events work :)15:46
freemangordonyes, exactly15:46
freemangordonI was expecting them to work too15:47
freemangordonas it is the same device15:47
freemangordonwhat does xxx_mark_last_busy() do?15:47
tmlindjust updates the timestamp for calculating next autosuspend15:48
freemangordonmaybe that's the issue, rebooting to try15:48
tmlindif usb is not doing it you should update it to prevent immediate autosuspend15:48
freemangordonmhm15:49
tmlindso is qmi_wwan.c the main device with subdevices?15:49
freemangordonI guess that's what happens somehow15:49
freemangordonyes15:49
freemangordonand also option115:49
freemangordonoption1 is for serial15:49
tmlindso maybe qmi_wwan.c should also wake the subdevices too?15:49
freemangordonyes, but why option1 does it?15:51
freemangordonoh, you mean that qmi_wwan does not resume child devices?15:51
tmlindyeah maybe15:52
freemangordonso, I am resuming /sys/bus/usb/devices/2-115:54
freemangordonoh, mark_last_busy seems to help15:54
tmlindcool15:55
freemangordonyes!!!!15:55
freemangordonit rings15:55
tmlindnice! hmm so did you try just kicking the usb devices from phy_mdm6600_wakeirq_thread() that's there already?15:55
freemangordonno15:55
freemangordonbu I don;t want to15:55
tmlindok worth checking, maybe they both trigger15:56
freemangordonas it is another gpio related to the serial interface15:56
tmlindyeah15:56
freemangordonI think if we don;t register on n_gsm, it will not trigger15:56
tmlindanyways, great news as now the only blocker is the voice call audio mixer for volume control15:56
freemangordonso better use the correct interface15:56
freemangordonto get rid of n_gsm you mean?15:57
* freemangordon checks sms15:57
tmlindyeah sure, you could just make it call phy_mdm6600_wakeirq_thread() i think though using the rwkup too15:57
freemangordonplease provide dts and I will test15:57
tmlindright seems like your solution is upstreamable for ofono and kernel15:57
tmlindhave to do it later when i get a chance, work conf call coming up15:58
freemangordonok, sure15:58
freemangordonhmm, sms didn't come15:58
tmlindhmm15:58
freemangordonweird15:58
freemangordonbecause calls are working15:59
tmlindyeah15:59
tmlindrmmod the n_gsm stuff?15:59
freemangordonoh, now calls don;t work too15:59
tmlindhmm anyways, nice findings, bbl15:59
freemangordonsomehow it got stuck15:59
freemangordonyeah15:59
tmlindthe gpio won't trigger if the soc is idle, that's why it should use the padconf interrupt16:00
tmlindif screen blanks for example16:00
freemangordonok, I'll wait for you to provide dts16:00
tmlindyeah can be done later best to verify with the gpio set up you have first16:01
freemangordonactually irq get triggered16:01
freemangordonbut qmi_wwan does not resume properly16:01
freemangordonor, maybe I shall keep it resumed until gpio goes back to 016:06
kivaat maemo-leste.github.io there is info "Maemo Leste is based on Devuan Beowulf", but if you choose Download Now-button, there is only Devuan Chimaera images or older.17:20
kivaok..Beofulf is that older...but would i better than there text Maemo Leste is based Devuan Chimera, because all usefull images are that.17:25
Wizzupyes, we need to change that text17:26
siceloor not even mention it ... just say Devuan :-)17:26
sicelonice work freemangordon, tmlind17:26
kivasicelo, that is true, not have to fix soon :)17:27
freemangordonseems that doing 'echo enabled > wakeup' makes it work properly17:27
freemangordonhmm, no18:05
freemangordontmlind: ok, seems I have it properly working unless the system is suspended, you are right and we need that gpio set-up to wake the system22:33
freemangordonhmm, scratch gat, I think I got it properly working by registering phy as wake-up source23:22
freemangordon*scratch that23:22
freemangordonthis https://pastebin.com/tMwHKfmD23:41

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!