libera/#maemo-leste/ Sunday, 2024-12-08

Wizzupfreemangordon: sry for not responding wrt ofono, looks like youre on it12:57
freemangordonyes, I just sent a patch12:58
freemangordonyou are in CC12:58
freemangordonI think that's the correct way of fixing it, but please have a look if you have some time12:58
freemangordonsicelo: Wizzup: https://github.com/maemo-leste-upstream-forks/ofono/commits/upstream-wip/13:13
freemangordonwith this outgoing calls work, incoming not (as expected)13:57
freemangordonhave to check if we can get wake-ups via AT interface13:58
Wizzupand checking some of the usb ifaces for any data whatsoever doesn't work as wake up?14:22
freemangordonchecking, like polling?14:27
Wizzupselect?14:27
freemangordonofono already does that14:27
freemangordonbut usb itself does not wake-up14:28
freemangordonhmm, unfortunately snd_soc is also using n_gsm14:30
freemangordonotherwise we can use modem wake-up gpio14:30
* dsc_ strangles QHeaderView15:04
sicelofreemangordon: yay, about to build, thanks16:44
sicelowhat parent was this? i was working off leste/maemo/chimaera-devel, and have no plugins/droid* file. there is plugins/motmdm.c16:46
freemangordonno16:46
freemangordoncheck the branch16:46
freemangordonhttps://github.com/maemo-leste-upstream-forks/ofono/commits/upstream-wip/16:46
siceloah, i see now16:48
siceloi never realized that there was already something of D4 in upstream ofono16:50
freemangordonthere is16:52
freemangordonnever tried it though16:52
freemangordonhmm I wonder if we can simply export wake-up gpio to userspace and call it a day16:55
sicelo(btw, ofono dropped support for mbpi a couple of versions back, so we may want to drop it from list of deps)16:58
freemangordonwip branch has no packaging at all16:58
freemangordonI want to fix wake-up issue first16:58
freemangordontmlind:  https://github.com/maemo-leste-upstream-forks/ofono/commits/upstream-wip/16:59
freemangordontmlind: even (outgoing) voice calls seem to work, however, as expected, incoming calls, sms, etc do not work17:00
tmlindfreemangordon: that's cool, so only the wakeup is missing? :)17:00
sicelowhat is the wakeup issue btw? apologies i've never really followed the quirks of droid 4 modem17:00
freemangordontmlind: what about exporting wake-up gpio?17:00
freemangordonand teaching ofono driver on it17:00
tmlindhmm yeah interesting idea17:00
freemangordonisimmodem already deals with gpios, so support seems to be there already17:01
tmlindall it needs is a wake up to kick the usb modem..17:01
freemangordonmhm17:01
tmlindyup worth a try for sure17:01
freemangordonwill do17:01
freemangordonjust wanted to hear from you17:01
tmlindthe missing 1 bit of data17:01
freemangordon:)17:01
tmlindso which gpio though? the rx line on uart1?17:01
freemangordonno, phy wake-up17:02
freemangordon611 or something17:02
tmlindusb phy wake? oh sure if that generates anything17:02
tmlindsicelo: the issue is that usb modem never sees any events as they are only routed to the uart17:03
freemangordonat least count in /proc/interrupts increases for mdm6600-wake when I send sms17:03
tmlindoh that's great17:03
tmlindmight as well use the padconf interrupt unless the interrupt is in the first gpio bank17:04
freemangordontmlind: BTW, do you know, can we use USB4 to control modem volume etc?17:04
freemangordonttyUSB4 that is17:04
tmlindno idea, but let's hope so17:04
freemangordonAT interfcae17:04
freemangordonhmm17:05
tmlindthe usb qmi gps interface used to work years ago, then it at some point stopped working17:05
freemangordonany idea how to try it?17:05
freemangordonas now I have LocationReporting with qmimodem driver17:06
freemangordonactually...17:06
freemangordonhmm, starting maep does not create any event in ofono17:07
freemangordonwhat interface do we use?17:07
tmlindsome qmicli command used to work for gps data17:09
freemangordonWizzup: any idea how do we use gps on d4? through ofono?17:09
sicelono, gpsd17:13
freemangordonand how does it communicate with the modem?17:14
tmlindprobably over n_gsm17:19
tmlindfreemangordon: qmicli --loc-start followed by qmicli --loc-follow-nmea or some similar command used to eventually produce gps info17:22
freemangordonno17:22
freemangordonthis modem does not export LOC service17:22
freemangordonbut PDS17:22
freemangordon"Position Determination Service"17:23
tmlindah ok yeah anyways some commands listed in the qmicli man page17:23
freemangordonand qmicli does not seem to support it17:23
freemangordontried already, they fail17:23
tmlindhmm it used to long time ago17:23
freemangordonmaybe they used PDS back then17:24
tmlindcan't find my old test scripts though17:24
tmlindheh found something, it's using mmcli though17:29
tmlindhas these lines:17:29
tmlindsudo mmcli -m ${modem} --enable17:29
tmlindsudo mmcli -m ${modem} --location-enable-gps-raw17:29
tmlindsudo chmod a+r /dev/cdc-wdm017:29
tmlindecho "Now configure and start gpsd to read /dev/cdc-wdm0"17:29
freemangordonhmm, weird17:30
freemangordontrying to enable loc here using qmicli results in 'invalid service'17:30
freemangordonbut with ofono I get "disabled'17:30
tmlindyeah it might be some long term regression17:31
tmlindbut mmcli is for modemmanager, no?17:31
freemangordonyes17:31
freemangordonbut afaik it ises libqmi too17:31
freemangordon*uses17:31
tmlindyeah17:31
freemangordonlemme check if I can make it work with ofono17:32
tmlindanyways, that used to work, but would take quite a while to produce data17:32
tmlindprobably some way to inject the a-gps data over qmi too..17:32
freemangordonwhat concerns me more is wake-up17:32
tmlindyeah17:33
freemangordonso, I admit I lack the knowledge, but which device should wake-up? musb?17:33
tmlindgood find if you see some phy interrupts, maybe try with the gpio phy interrupt first, then let's figure out the related padconf interrupt to use for wake-up from any state17:33
freemangordonsorry, not sure I understand - I see "3090 4805b000.gpio  21 Edge      mdm6600-wake"17:34
tmlindhmm yeah.. something should wake up and do a qmi query, so maybe the qmi device on the ohci bus?17:35
freemangordonyeah, that's my question: which device shall we wake-up17:35
tmlindonly the first gpio bank can wake up the soc from idle state, others need to use the related padconf interrupt17:35
tmlindisn't there some qmi network device?17:35
freemangordonI don;t think soc is idle17:35
freemangordonor at least - it is not soc being idle that stops the data flow17:36
freemangordonIIUC17:36
tmlindyeah the soc could idle between the usb events but probably does not right now..17:36
freemangordonwe have /dev/cdc-wdmN17:37
freemangordon1..417:37
freemangordonofono uses cdc-wdm017:37
freemangordonlemme check where it lives17:37
tmlindyeah so maybe that device.. unless the phy driver can kick something with no understanding of the qmi17:37
freemangordoncdc-wdm0 is on "Bus 002 Device 002: ID 22b8:2a70 Motorola PCS Flash MZ600"17:40
freemangordonso it is on the phy, no?17:40
freemangordonhmm, how wake-up yourself?17:41
freemangordonlike, it already calls   pm_runtime_get_sync() on wake-up irq?17:41
tmlindyeah but nothing kicks the usb modem, not sure what is needed for that17:42
freemangordonpulse on AP gpio?17:43
freemangordonok, wait, lemme see if I get that right17:43
freemangordonmodem triggers wake-up but expect 'we' to wake it up as well?17:44
tmlindmaybe..17:44
freemangordonugh17:44
freemangordonlemme check17:44
freemangordonthat shall be easy17:44
tmlindworth a try17:45
freemangordonmhm17:45
freemangordonlemme first see if I can get gps working though ofono17:45
freemangordonand then will try17:45
freemangordonwill let you know17:45
tmlindthe mdm6600 usb phy is physically on the mdm6600 afaik17:45
freemangordonah17:45
tmlindsounds like the usb host needs to scan something over the usb based on the wake-up gpio event17:47
tmlindusually usb gadgets signal the wake-up with the data lines pulled into some position17:49
freemangordonyeah, it seems to be part of the specs17:49
freemangordonbut, if mdm6600 phy is suspended, it will not do anything17:50
freemangordonso, we shall find a way to trigger remote wake-up from the why driver17:50
freemangordonlike, writing some NOP or dunno17:50
tmlindor fake the usb gadget wake-up event to the host with the internal pulls on the data lines17:53
freemangordonyes17:53
freemangordonbut how to do that from the phy driver17:53
tmlindbut that may not be the issue as the wake-up events never propagate to the qmi17:53
freemangordonI think it is not that our devices are suspended17:53
tmlindto me it seems we need to somehow signal the qmi layer about the event17:54
freemangordonbut that remote device (usb in the modem) is suspeneded17:54
tmlindwell the usb modem will respond to host queries though17:54
tmlindthe only thing the usb modem can signal is the gadget wake over the data lines17:55
tmlindwe need to somehow wake the usb host qmi layer..17:55
freemangordonok, lemme disable power-management to see if events will start coming17:55
tmlindkind of what we do in ofono for the kick function17:56
freemangordonI disabled PM of all USB ports18:00
freemangordonto no use18:00
tmlindyeah ok18:01
freemangordonso it seems that *remote* side needs a kick18:01
tmlindremote to what side?18:02
tmlindusb peripheral?18:02
freemangordonmodem itself seems asleep18:02
freemangordonso 'we' are AP (soc side) and 'remote' is BP (modem side)18:03
freemangordonto me it seems BP USB is sleeping, that's why we don't receive anything18:03
tmlindyeah ok could be18:03
freemangordonany idea how to send some NOP URB?18:05
tmlindfrom which driver?18:05
freemangordon  p, li { white-space: pre-wrap; }  phy-mapphone-mdm660018:06
freemangordonthat's the one that receives wake-up irq18:06
tmlindthe only thing phy-mapphone-mdm6600 can play with is the gpios and pulls for them18:07
freemangordonhmm, ok18:07
freemangordonso which driver it is then? cpcap-usb?18:08
freemangordonmusb?18:08
tmlindno, ohci-platform18:08
freemangordonok18:08
tmlindohci-platform or qmi cdc whatever could also claim that gpio wake-up interrupt as a shared interrupt18:09
freemangordonmhm18:09
freemangordonhmm, seems I was able to enable *something* on d4 in regards to gps :)18:38
tmlindcool18:47
freemangordontmlind: it seems I actually get gps data with ofono19:02
tmlindfreemangordon: nice, so no fixes needed then for gps?19:11
tmlindfreemangordon: hmm so what if the mdm6600 phy sends a KEY_PHONE event, can ofono listen for it?19:18
freemangordonperhaps yes, but sounds like a hack19:26
freemangordonlike, what would ofono do? kick the modem?19:26
tmlindheh yeah19:28
freemangordonwell...19:28
freemangordonlemme check if phy kicking the gpio will have any effect19:28
tmlindok19:29
freemangordontmlind: https://pastebin.com/aFfGBqQi19:37
freemangordoncode https://pastebin.com/L1U12yid19:37
freemangordonthis is with d4 connected in BP mode19:38
* freemangordon is building d4 kernel19:42
tmlindok19:44
freemangordondid you see paste ^^^? does it look like a proper data?19:45
siceloto me, yes19:45
freemangordoncool19:45
tmlindlooks like the right data before satellites are seen19:49
freemangordonok19:49
tmlindyou may need to online the modem if not online though19:52
freemangordonyeah19:53
tmlindfreemangordon: not sure if this helps, but see usb_autopm_get_interface() in drivers/net/usb/qmi_wwan.c.. if qmi_wwan.c added support for oob gpio interrupts, that could be called?20:08
freemangordonok, thanks20:09
tmlindheh not sure if we have usb devices with gpio interrupts though :)20:09
freemangordontmlind: oh, phy-mapphone-mdm6600 already kicks mode_gpio0 (BP wake)20:55
freemangordontmlind: do I get it right that there is a real serial interface between modem and soc?21:27
freemangordonnot serial over usb?21:27

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