Xiaomi Redmi Note 10 Pro (xiaomi-sweet)

== Contributors ==
* Zephyr1112
* Etn40ff
* atipls
== Maintainer(s) ==
* The sm7150-mainline team
== Users owning this device ==
== Port status ==
Downstream kernel compiles with pmOS's build system but the resulting artifact does not boot.
The same source code compiles also using android's build system and the resulting artifact boots. (See below for the required steps.)
== Flash modes ==
* Fastboot mode: + (adb reboot bootloader)
* Fastbootd mode: adb reboot fastboot
* Recovery mode: + (adb reboot recovery, fastboot reboot recovery)
== Installation Instructions ==
=== Unlock Bootloader (if not done) ===
* First unlock your device (if not done yet). Use MiUnlock to unlock (Windows only). // If MiUnlock doesn't detect your device, follow this: Google USB Drivers install guide
* Follow the Instructions on the selected site
* Note: After that do not log off your Mi Account on your phone or it won't work! It may take 7 days or more to be able to unlock your device! 
=== Install TWRP on Redmi Note 10 Pro ===
* Follow these Instructions. 
* Turn the device off (or restart also works)
* Note: You may need to connect your device to a computer with a USB cord or the phone will skip boot to recovery.
* Hold and button
* Keep holding until you see the TWRP recovery Logo.
=== Install pmOS===
* Mainline aport is currently available at: https://github.com/sm7150-mainline/pmaports
* Before installing, back up your dtbo partition (using twrp/android: on the device run dd if=/dev/block/by-name/dtbo of=/sdcard/dtbo.img and then adb pull /sdcard/dtbo.img on the host
* Reboot into the bootloader and erase the dtbo partition: adb reboot bootloader and fastboot erase dtbo if you do not do this, Linux will not boot due to the bootloader trying to merge the dtbo with mainline dtb, which will fail.
* Install pmOS like normal: pmbootstrap flasher flash_kernel/rootfs
=== Tips and tricks ===
If pmOS is installed on a removable SD card android will continuously want mount and to reformat it.
Unfortunately it does not look like it is possible to prevent this within
android. A somewhat heavy duty workaround is to unbind the device, this requires
root:
* First find out which is the driver responsible for the sdcard:
 
 # readlink /sys/block/mmcblk0
 ../devices/platform/soc/8804000.sdhci/mmc_host/mmc0/mmc0:0001/block/mmcblk0
 
* then unbind it
 
 # echo 8804000.sdhci > /sys/bus/platform/drivers/sdhci_msm/unbind
 
== Mainlining ==
NOT VERIFIED: sourced from deviceinfohw, status from sm7150-xiaomi-sweet DTS (UNTESTED!)
Hardware type 	Chip 	Mainline status
WiFi chip 	wcn3990 	Y
Charging IC 	TI bq2597x (early units) / LionSemi ln8000 (new units) 	Bringup in progress
Fuel gauge 	? 	?
GNSS 	? 	?
NFC 	? (nq-nci driver on Android) 	Bringup in progress
Audio 	Awinic aw882xx, sm6150idpsndcar 	Bringup in progress
Accelerometer 	TDK icm4x6xx 	N/A
Touchscreen 	Goodix GT9896 (gtx8 driver on Android) 	Y
Display panel 	Samsung E3 Super AMOLED (dsi_k6_38_0c_0a_fhd_dsc_video_display interface on Android)	Y (dsi0)
Ambient Light Sensor	rohm_bu27030 	?
Gyroscope 	icm4x6xx 	?
Magnetometer 	ak0991x 	?
Video 	Adreno 618 	N/A
UFS 	? (64GB) / Micron MT128GASAO4U21 (128GB) 	Y / Y
Memory 	SK Hynix H9HQ15AFAMBDAR 	Y
Haptics 	Awinic AW8624 	Y
SD Card Slot 	? 	Y
USB 	? 	Y
Flash 	? 	Y
=== Other ===
* Mainline kernel fork: https://github.com/sm7150-mainline/linux
* EDK II Port: https://github.com/dopaemon/edk2-sweet