8.8 KiB
pdx213-temp
Some notes on my work getting Mobian to run on the Xperia 10 III (codename pdx213).
Status
Device Tree Status
| Component | Status | sent to sm6350-mainline? | sent upstream? |
|---|---|---|---|
| ADSP | ✅ | ✅ | yes, needs review |
| Battery (percentage and temperature) | ✅ | ✅ | Luca Weiss wrote a driver for Fairphone 4, once that is upstreamed I can submit the patch for battery percentage |
| Bluetooth | ✅ | ✅ | yes, needs review |
| Calls | |||
| Camera | to do | ||
| CDSP | ✅ | ✅ | yes, needs review |
| Display Panel | ✅ | ✅ | Driver needs upstreaming, but not by me, looks like Marijn Suijten is working on that, idk |
| DP via USB-C | low priority | ||
| Fast Charging | to do, low priority | ||
| Fingerprint Reader | not interested in that part myself, probably not supported by the kernel anyway | - | - |
| Flashlight | ✅ | ✅ | yes, needs review |
| GPS | requires the modem to be up and then testing | ||
| IPA | ✅ | ✅ | yes, needs review |
| microSD | ✅ | was already part of upstream | - |
| Modem | ✅ (requires TA service to run) | ✅ | yes, needs review |
| NFC | to do, low priority | ||
| RTC | added, needs testing (how do I know it works?) | ✅ | |
| Sound | to do | ||
| SMS | should work when modem is up, needs testing | ||
| Thermals | |||
| Touch | ✅ | was already part of upstream | - |
| UFS | broken, need help | ||
| USB-C | idk, USB networking works, need to check whether host mode works by plugging in at least a USB stick | ||
| Wifi | ✅ (requires modem) | ✅ | yes, needs review |
| Vibration | to do, low priority |
No status means I haven't even had a look at that component.
So far no work has been put in supporting the sensors (accelerometer, magnetometer, ambient light, ...).
Where To Help
- Audio/Calls <-- currently top priority, this would allow me testing the phone as a daily driver
- Thermal Sensors / Thermal Zones (no idea what I need to do)
- PMIC
- Camera
- vibration module
- NFC
- UFS
- USB-C
Kernel Work
I'll submit all my patches to https://github.com/sm6350-mainline/linux and then later upstream them.
Current goal: Making the device usable Later goal: Trying to add everything else that can be added without writing new drivers and upstreaming
Note: I'm rebasing occasionally to make sure it does not become too chaotic, so pulling from that repo will lead to merge conflicts.
Issues To Solve
Touch
[ 63.964541] gpi 900000.dma-controller: Error in Transaction
[ 63.964562] geni_i2c 988000.i2c: DMA txn failed:3
[ 63.964594] geni_i2c 988000.i2c: GPI transfer failed: -5
[ 63.966484] s6sy761 0-0048: failed to turn off sensing
[ 64.599984] gpi 900000.dma-controller: Error in Transaction
[ 64.600041] geni_i2c 988000.i2c: DMA txn failed:3
[ 64.601254] geni_i2c 988000.i2c: GPI transfer failed: -5
When logging in, /dev/input/event2 disappears while Phosh starts... if no finger is on the touch screen (lol), seemingly needs this patch
Modem
[ 50.440514] qcom_q6v5_pas 4080000.remoteproc: fatal error received: dog_hal_common.c:180:DOG detects stalled initialization, triage with IMAGE OWNER
[ 50.440562] remoteproc remoteproc1: crash detected in modem: type fatal error
[ 50.440733] remoteproc remoteproc1: handling crash #1 in modem
[ 50.440744] remoteproc remoteproc1: recovering modem
[ 50.473165] ath10k_snoc 18800000.wifi: firmware crashed! (guid c1e5bbb2-ee6c-4853-9f47-ba65dbda4174)
[ 91.131777] qcom_q6v5_pas 4080000.remoteproc: fatal error received: dog_hal_common.c:180:DOG detects stalled initialization, triage with IMAGE OWNER
[ 91.131827] remoteproc remoteproc1: crash detected in modem: type fatal error
[ 91.131998] remoteproc remoteproc1: handling crash #2 in modem
[ 91.132009] remoteproc remoteproc1: recovering modem
[ 91.179283] ath10k_snoc 18800000.wifi: firmware crashed! (guid a814647c-fc5c-4ad6-b35e-8b88eec81fef)
Modem crashes. Reason is missing TA service. Modem works fine with TA service running.
Error message [ 50.440514] qcom_q6v5_pas 4080000.remoteproc: fatal error received: dog_hal_common.c:180:DOG detects stalled initialization, triage with IMAGE OWNER seems to come from drivers/remoteproc/qcom_q6v5.c, see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/remoteproc/qcom_q6v5.c?h=v6.19.12#n126
Error message [ 50.440562] remoteproc remoteproc1: crash detected in modem: type fatal error seems to come from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/remoteproc/remoteproc_core.c?h=v6.19.12#n2707
GPS
GPS likely also works via the modem. But the modem occasionally crashes:
[ 2792.695395] qcom_q6v5_pas 4080000.remoteproc: fatal error received: dog_hb.c:367:Task starvation: mmgsdi_1, ping: 4, triage with owner(d.dump 0x1ecf7180)
root@mobian:~# mmcli -m any --location-enable-gps-nmea
error: couldn't setup location gathering: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.PhoneFailure: QMI protocol error: Couldn't enable location 'gps-nmea' gathering: Couldn't start GPS engine: QMI protocol error (46): 'GeneralError''
Needs investigation, lower priority than some other parts for now.
Unlocked Achievements
- getting a first half broken Mobian build that boots
- getting the display to display stuff
- full graphics support (I can play an episode of Star Trek: Stange New Worlds, although without sound)
- playing a song via Bluetooth for the first time
- Wifi works! :D
- Modem starts
- Upstreaming some patches (waiting for review on LKML)
Mobian Work
Not much that is required in terms of changes, mainly adding the device to Mobian recipes.
To Do:
- Push changes for Mobian recipes to git
- Add droid-juicer config
- Amend qcom-phone-utils package (initramfs hooks, perhaps more)
Building the Kernel .deb
make defconfig pdx213_defconfig usb-gadget-network.config
make -j`nproc` bindeb-pkg
Obtaining firmware files
This should normally happen automatically using droid-juicer on first boot, however, as UFS is not supported yet, we have to boot a working system and obtain the files manually for now.
Easiest way to do that is to use SailfishOS. The licence is not required, the trial image works just fine.
Firmware files can be obtained from the partitions modem, vendor, bluetooth...
Recommendation:
- dump partitions to
.imgfiles - mount
.imgfiles and extract files - use pil-squasher to get the files into the right format the kernel expects
Building the Image
Clone my fork of mobian-recipes (temporary fork, will integrate changes once I get to it...)
git clone https://salsa.debian.org/erebion/mobian-recipes
git checkout wip/erebion/add-pdx213
Place kernel .deb at devices/qcom/packages/
Put firmware files into devices/qcom/firmware/, this is what I currently have in there:
a615_zap.mbn adsp.b05 adsp.b13 adsp.b20 adsp.b27 adsp.mbn apnv11.bin crnv20.bin modemst1.img
a619_gmu.bin adsp.b06 adsp.b14 adsp.b21 adsp.b28 adspr.jsn cdsp.mbn crnv21.bin modemst2.img
adsp.b00 adsp.b07 adsp.b15 adsp.b22 adsp.b29 adsps.jsn crbtfw11.tlv crnv32.bin qcom_firmware_tmp
adsp.b01 adsp.b08 adsp.b16 adsp.b23 adsp.b30 adspua.jsn crbtfw20.tlv crnv32u.bin venus.mbn
adsp.b02 adsp.b09 adsp.b17 adsp.b24 adsp.b31 apbtfw10.tlv crbtfw21.tlv egista.mbn wlanmdsp.mbn
adsp.b03 adsp.b10 adsp.b18 adsp.b25 adsp.b32 apbtfw11.tlv crbtfw32.tlv ipa_fws.mbn
adsp.b04 adsp.b12 adsp.b19 adsp.b26 adsp.b33 apnv10.bin crnv11.bin modem.mbn
Build image:
sudo ./build.sh -t qcom-wip -s -u mobian -p 1234 | tee mobian-build.log