Jump to content

Xiaomi Mi A2 Lite (xiaomi-daisy): Difference between revisions

From postmarketOS Wiki
Alikates (talk | contribs)
m Fix device owners
LesyCR (talk | contribs)
lk2nd working release
Line 88: Line 88:


Device tree and panel driver support added on msm8953-mainline ([https://github.com/msm8953-mainline/linux]).
Device tree and panel driver support added on msm8953-mainline ([https://github.com/msm8953-mainline/linux]).
Flashing lk2nd is needed. ([https://github.com/msm8953-mainline/lk2nd]).
Flashing lk2nd is needed. ([https://github.com/alikates/lk2nd/releases/tag/0.3.0]).


=== Modem ===
=== Modem ===

Revision as of 11:46, 5 October 2021

Xiaomi MI A2 Lite
Xiaomi-daisy Booting
Xiaomi-daisy Booting
Manufacturer Xiaomi
Name MI A2 Lite
Codename xiaomi-daisy
Released 2018
Hardware
Chipset Qualcomm MSM8953 Snapdragon 625
CPU 2 GHz 8 Core Cortex-A53
GPU Adreno 506
Display 1080 x 2280 IPS
Storage 32 GB
Memory 3/4 GB
Architecture aarch64
Software
Original software Android 8.1
postmarketOS
Category testing
Pre-built images no
Mainline partial
postmarketOS kernel 5.13-rc6
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Partial
Audio
Partial
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Partial
Bluetooth
Partial
GPS
No data
NFC
No data
Modem
Calls
Works
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Partial
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

  • Ash
  • Alikates

Users owning this device


Installation

Fastboot Mode

First make sure to enable USB debugging in Android ([1]) Then with device powered off, hold the Volume Down and Power buttons simultaneously for a few seconds, until Fastboot Mode screen appears.

OEM Unlock

Get device into Fastboot Mode, plug in USB cable, then:

$ sudo fastboot oem unlock

When prompted on device, use Volume-Up/Down buttons to highlight choice, then Power button to select it. The Fastboot Mode screen will appear again, and a message saying that the device isn't secure will appear briefly.

Installation

First build the image:

$ pmbootstrap init
$ pmbootstrap install

Then in order to flash it put your device in fastboot mode, and plug it in USB. Then do:

$ pmbootstrap flasher flash_rootfs --partition userdata
$ sudo fastboot format system
$ pmbootstrap flasher flash_kernel

Mainline Kernel

To use it select mainline kernel when running pmbootstrap init

Device tree and panel driver support added on msm8953-mainline ([2]). Flashing lk2nd is needed. ([3]).

Modem

Firmware loads and modem boots. It detects SIM card and can be unlocked and configured with qmicli. Need to test Ofono with patches for QRTR support.

Calls and SMS work on Phosh by using a modified device-xiaomi-daisy and ModemManager version 1.17.900. The changes for those packages can be found here.

Because audio needs more work i couldn't test audio quality on calls but with q6voiced it should work.

Mobile data

Mobile data works now. On kernel version >= 5.14 the following steps are not needed because the port data can be read from sysfs by ModemManger

Note This can crash the system and make it totally unresponsive,

The patches from pmaports!2496 merge request are needed.

To get mobile data working an interface must be enabled to send packets to the modem.

The parameters for it are found in the downstream kernel. They are IPA_CLIENT_APPS_LAN_WAN_PROD=4 and IPA_CLIENT_APPS_WAN_CONS=5.

To get it working:

  • Run: # qmicli -d qrtr://0 -p --dpm-open-port="hw-data-ep-type=embedded,hw-data-ep-iface-number=1,hw-data-rx-id=4,hw-data-tx-id=5"
  • Restart ModemManager: # killall ModemManager


To configure the mobile network settings, use NetworkManger (mobile network menu on phosh settings) so it sets up the network interface and IP routing.

After that, two new network interfaces should appear. The rmnet one is the connection to the modem, and the other one is virtual and the one that is used to transmit mobile data.

Wifi

Driver spams dmesg with wcn36xx: WARNING Bad TX complete indication and there are some crashes

GPU

Works fine but there may be a problem with the governor. It's a bit slow when waking up or when screen changes from idle to active graphics but a few seconds after it stabilizes.

Audio

Earpiece and headphones work almost with the default msm8916 UCM config fork. Speaker still not working.

Touchscreen

It works, but with the focaltech variant there seems to be a bug where the chip firmware is erased if not powered off properly and the touchscreen stops working.

Mainline driver lacks support for reflashing the firmware so it is needed to flash stock android to fix it.

FDE

FDE works fine, but the touchscreen does not work with the packaged kernel as the driver is enabled as a module.

Sensors

The sensors are managed by the DSP and configuration is made with QMI. Support must be added to libqmi.

Charger

Fuel gauge is working on msm8953-mainline. The charger on PMI8950 is really similar to PMI8994, a proper driver could be written to support both PMICs. Work will be uploaded here.

See also