| README.md | ||
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 | ✅ | ✅ | |
| Battery (percentage and temperature) | ✅ | ✅ | |
| Bluetooth | ✅ | ✅ | |
| Calls | |||
| Camera | to do | ||
| CDSP | ✅ | ✅ | |
| Display Panel | ✅ | ✅ | |
| DP via USB-C | low priority | ||
| Fast Charging | to do, low priority | ||
| Fingerprint Reader | low priority, probably not supported by the kernel anyway | ||
| Flashlight | ✅ | ✅ | |
| GPS | |||
| IPA | ✅ | ✅ | |
| microSD | ✅ | was already part of upstream | |
| Modem | ✅ (requires TA service to run) | ✅ | |
| NFC | to do, low priority | ||
| RTC | added, needs testing | ✅ | |
| Sound | to do | ||
| SMS | |||
| Thermals | |||
| Touch | occasionally does not work | was already part of upstream | |
| UFS | broken, need help | ||
| USB-C | ? | ||
| Wifi | ✅ (requires modem) | ✅ | |
| 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
And I will also need help with upstreaming the changes to the kernel, can someone else please do that? Thanks.
Kernel Work
I'll submit all my patches to https://github.com/sm6350-mainline/linux
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
Occasionally stops working after logging in, no idea why.
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
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 currently what I have in there:
a615_zap.mbn adsp.b03 adsp.b08 adsp.b14 adsp.b19 adsp.b24 adsp.b29 adsp.mbn apbtfw11.tlv crbtfw20.tlv crnv21.bin modem.mbn wlanmdsp.mbn
a619_gmu.bin adsp.b04 adsp.b09 adsp.b15 adsp.b20 adsp.b25 adsp.b30 adspr.jsn apnv10.bin crbtfw21.tlv crnv32.bin modemst1.img
adsp.b00 adsp.b05 adsp.b10 adsp.b16 adsp.b21 adsp.b26 adsp.b31 adsps.jsn apnv11.bin crbtfw32.tlv crnv32u.bin modemst2.img
adsp.b01 adsp.b06 adsp.b12 adsp.b17 adsp.b22 adsp.b27 adsp.b32 adspua.jsn cdsp.mbn crnv11.bin egista.mbn qcom_firmware_tmp
adsp.b02 adsp.b07 adsp.b13 adsp.b18 adsp.b23 adsp.b28 adsp.b33 apbtfw10.tlv crbtfw11.tlv crnv20.bin ipa_fws.mbn venus.mbn
Build image:
sudo ./build.sh -t qcom-wip -s -u mobian -p 1234 | tee mobian-build.log