| tmlind | freemangordon: there are the gpios, uart/n_gsm, and usb | 05:44 |
|---|---|---|
| freemangordon | tmlind: ok. so, disabling PM on the modem USB device makes QMI notifications work | 07:27 |
| freemangordon | tmlind: 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#L128 | 10:20 |
| freemangordon | unless I am missing something | 10:21 |
| freemangordon | it uses "mdm6600_usb_rwkup" | 10:22 |
| freemangordon | gpio-115 (mdm6600_usb_rwkup ) in hi | 10:54 |
| freemangordon | tmlind: root@devuan-droid4:/sys/class/gpio/gpio627# inotifywait -m value | 11:24 |
| freemangordon | Setting up watches. | 11:24 |
| freemangordon | Watches established. | 11:24 |
| freemangordon | value MODIFY | 11:25 |
| freemangordon | value MODIFY | 11:25 |
| freemangordon | value MODIFY | 11:25 |
| freemangordon | this is what happens on incoming call | 11:25 |
| freemangordon | so it seems we have a wake gpio that's dedicated to USB interface | 11:28 |
| freemangordon | but nobody uses it ATM | 11:29 |
| freemangordon | tmlind: I will need your help to modify DTS to make that gpio wake-up source | 12:48 |
| freemangordon | ok, I am able to get "RING" on AT interface :) | 15:14 |
| tmlind | oh nice :) | 15:33 |
| tmlind | so where did you configure the rwkup gpio then? | 15:33 |
| freemangordon | sec, will pastebin the patch | 15:33 |
| tmlind | ok | 15:34 |
| freemangordon | this https://pastebin.com/zJj9vc3b | 15:35 |
| freemangordon | tmlind: but, not sure if usb_disable_autosuspend() is the proper way to resume the device | 15:36 |
| freemangordon | it seems to work for USB->serial, but not for cdc-wdm | 15:37 |
| tmlind | ok great | 15:37 |
| freemangordon | which is strange, given that those are just different interfaces | 15:37 |
| tmlind | so eventually best to configure the rwkup to use the padconf interrupt instead of the gpio, just a dts change | 15:38 |
| freemangordon | no idea how to do that :) | 15:38 |
| tmlind | i'll help | 15:38 |
| freemangordon | please do | 15:38 |
| freemangordon | I will test | 15:38 |
| tmlind | so maybe you need to find the other usb interfaces too to kick? | 15:38 |
| freemangordon | but at least we found the missing piece: gpio_115 | 15:38 |
| tmlind | yeah great | 15:38 |
| freemangordon | I am kicking 'main' device | 15:39 |
| tmlind | if this can be done in the phy, it keeps the usb code clean from non-standard wiring | 15:39 |
| freemangordon | I am doing from the phy, as you can see from the patch | 15:39 |
| tmlind | yeh cool | 15:41 |
| tmlind | so have you tried finding the other devices to kick? | 15:41 |
| freemangordon | would 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 |
| tmlind | not sure, seems like best to use the usb calls for usb devices | 15:43 |
| freemangordon | ok, but do I need usb_mark_last_busy()? | 15:43 |
| tmlind | seems like unless usb maybe does that automatically for you? | 15:43 |
| freemangordon | ok, lemme try it then | 15:43 |
| tmlind | the plan is to make it automatic in general fyi so no need to call mark_last_busy eventually | 15:44 |
| freemangordon | pm_runtime_allow(&udev->dev); | 15:46 |
| freemangordon | that's what usb_enable_autosuspend does | 15:46 |
| tmlind | would be nice if this will also make the qmi usb events work :) | 15:46 |
| freemangordon | yes, exactly | 15:46 |
| freemangordon | I was expecting them to work too | 15:47 |
| freemangordon | as it is the same device | 15:47 |
| freemangordon | what does xxx_mark_last_busy() do? | 15:47 |
| tmlind | just updates the timestamp for calculating next autosuspend | 15:48 |
| freemangordon | maybe that's the issue, rebooting to try | 15:48 |
| tmlind | if usb is not doing it you should update it to prevent immediate autosuspend | 15:48 |
| freemangordon | mhm | 15:49 |
| tmlind | so is qmi_wwan.c the main device with subdevices? | 15:49 |
| freemangordon | I guess that's what happens somehow | 15:49 |
| freemangordon | yes | 15:49 |
| freemangordon | and also option1 | 15:49 |
| freemangordon | option1 is for serial | 15:49 |
| tmlind | so maybe qmi_wwan.c should also wake the subdevices too? | 15:49 |
| freemangordon | yes, but why option1 does it? | 15:51 |
| freemangordon | oh, you mean that qmi_wwan does not resume child devices? | 15:51 |
| tmlind | yeah maybe | 15:52 |
| freemangordon | so, I am resuming /sys/bus/usb/devices/2-1 | 15:54 |
| freemangordon | oh, mark_last_busy seems to help | 15:54 |
| tmlind | cool | 15:55 |
| freemangordon | yes!!!! | 15:55 |
| freemangordon | it rings | 15:55 |
| tmlind | nice! hmm so did you try just kicking the usb devices from phy_mdm6600_wakeirq_thread() that's there already? | 15:55 |
| freemangordon | no | 15:55 |
| freemangordon | bu I don;t want to | 15:55 |
| tmlind | ok worth checking, maybe they both trigger | 15:56 |
| freemangordon | as it is another gpio related to the serial interface | 15:56 |
| tmlind | yeah | 15:56 |
| freemangordon | I think if we don;t register on n_gsm, it will not trigger | 15:56 |
| tmlind | anyways, great news as now the only blocker is the voice call audio mixer for volume control | 15:56 |
| freemangordon | so better use the correct interface | 15:56 |
| freemangordon | to get rid of n_gsm you mean? | 15:57 |
| * freemangordon checks sms | 15:57 | |
| tmlind | yeah sure, you could just make it call phy_mdm6600_wakeirq_thread() i think though using the rwkup too | 15:57 |
| freemangordon | please provide dts and I will test | 15:57 |
| tmlind | right seems like your solution is upstreamable for ofono and kernel | 15:57 |
| tmlind | have to do it later when i get a chance, work conf call coming up | 15:58 |
| freemangordon | ok, sure | 15:58 |
| freemangordon | hmm, sms didn't come | 15:58 |
| tmlind | hmm | 15:58 |
| freemangordon | weird | 15:58 |
| freemangordon | because calls are working | 15:59 |
| tmlind | yeah | 15:59 |
| tmlind | rmmod the n_gsm stuff? | 15:59 |
| freemangordon | oh, now calls don;t work too | 15:59 |
| tmlind | hmm anyways, nice findings, bbl | 15:59 |
| freemangordon | somehow it got stuck | 15:59 |
| freemangordon | yeah | 15:59 |
| tmlind | the gpio won't trigger if the soc is idle, that's why it should use the padconf interrupt | 16:00 |
| tmlind | if screen blanks for example | 16:00 |
| freemangordon | ok, I'll wait for you to provide dts | 16:00 |
| tmlind | yeah can be done later best to verify with the gpio set up you have first | 16:01 |
| freemangordon | actually irq get triggered | 16:01 |
| freemangordon | but qmi_wwan does not resume properly | 16:01 |
| freemangordon | or, maybe I shall keep it resumed until gpio goes back to 0 | 16:06 |
| kiva | at 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 |
| kiva | ok..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 |
| Wizzup | yes, we need to change that text | 17:26 |
| sicelo | or not even mention it ... just say Devuan :-) | 17:26 |
| sicelo | nice work freemangordon, tmlind | 17:26 |
| kiva | sicelo, that is true, not have to fix soon :) | 17:27 |
| freemangordon | seems that doing 'echo enabled > wakeup' makes it work properly | 17:27 |
| freemangordon | hmm, no | 18:05 |
| freemangordon | tmlind: 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 system | 22:33 |
| freemangordon | hmm, scratch gat, I think I got it properly working by registering phy as wake-up source | 23:22 |
| freemangordon | *scratch that | 23:22 |
| freemangordon | this https://pastebin.com/tMwHKfmD | 23:41 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!