Xiaomi Mi Note 10 / Mi CC9 Pro (xiaomi-tucana)

== Maintainer(s) ==
* SanyaPilot
== Users owning this device ==
== How to enter flash mode ==
* Bootloader: Power on the device with both and buttons.
* Recovery: Power on the device with both and buttons.
== Installation ==
# Make sure pmbootstrap is installed and your bootloader is unlocked
# Run through pmbootstrap init and select xiaomi as the vendor and tucana as the device.
# Build the kernel yourself
# Generate the rootfs
#* For netbooting pmOS without flashing the phone, run pmbootstrap --extra-space 1000 install --no-sparse and pmbootstrap initfs hook_add netboot
#* If you want to flash pmOS to the phone, run pmbootstrap install
# Backup and erase the dtbo partition
#: To boot Linux, you'll have to erase the dtbo partition. It is recommended to back it up first if you want to boot Android again
## Run dd if=/dev/block/by-name/dtbo of=/sdcard/dtbo.img from a rooted shell on your phone and pull it with adb pull /sdcard/dtbo.img to your computer.
## Boot into bootloader mode
## Erase the dtbo partition with fastboot erase dtbo
#: To restore the partition flash it with fastboot flash dtbo dtbo.img
# Flash the rootfs
#* If you decided to go with netbooting, start the server with pmbootstrap netboot serve
#* If you want to install pmOS to the phones internal storage, run pmbootstrap flasher flash_rootfs
# Boot the kernel
#* To boot temporarily, without flashing run pmbootstrap flasher boot
#* To flash the kernel to the boot partition, run pmbootstrap flasher flash_kernel and reboot with fastboot reboot
After successfully following this guide, your phone should boot postmarketOS! If you have problems installing, feel free to ask in #sm7150-mainline:matrix.org
=== Building the latest kernel yourself ===
# Make sure you installed pmbootstrap from git, as the packaged versions do not include envkernel.sh, which needed for compiling the kernel. Follow this guide to install pmbootstrap from git.
# Go through $ pmbootstrap init and select xiaomi-tucana as the device. The UI can be choosen as desired.
# Clone the sm7150-mainline kernel fork: $ cd ~/Downloads && git clone https://github.com/sm7150-mainline/linux.git && cd linux.
# Prepare envkernel: $ source ~/.local/share/pmbootstrap/helpers/envkernel.sh
# Generate the kernel config: $ make defconfig sm7150.config
# Build the kernel: $ make -j$(nproc)
# After the build has finished, package the built kernel for postmarketOS: $ pmbootstrap build linux-postmarketos-qcom-sm7150 --force --envkernel
Now you can follow the installation guide above.
== Mainline ==
A work in progress mainline kernel is being developed here.
=== Hardware status ===
Feature table for SM7150 </br>
Device feature table:
Component 	Model 	Status	Notes
Display 	Visionox G2647FB105 	Y 	Works from here
Display 	Tianma TA065FXWF01 	N 	Probably exists only as a spare part
Touchscreen 	STMicroelectronics FTS 	Y 	Connected via I2C. Downstream driver adapted here
Touchscreen 	Goodix GT9886 	 	Should work, driver exists, needs testing
Charging 	Texas Instruments bq2597x 	N 	
Fuel gauge 	qcom,pm6150-qg 	P 	
Accelerometer and gyroscope	STMicroelectronics LSM6DSO 	Y 	Managed by SSC
Ambient light 	AMS TCS3701 	Y 	Managed by SSC
Magnetometer 	Asahi Kasei AK0991X 	Y 	Managed by SSC
Proximity sensor 	Elliptic Labs virtual sensor	N 	Requires a driver and a proper sound support (uses ultrasonic)
Haptics / Vibrator 	Texas Instruments drv2605l 	Y 	
Speakers 	NXP tfa9874 (SPK) 	Y 	
Speakers 	? (EAR) 	N 	
Fingerprint sensor 	Goodix Optical FOD 	N 	
Camera flash 	qcom,pm6150l-flash-led 	Y 	Main
Camera flash 	Awinic AW3644 	Y 	Soft light. Downstream driver adapted here
Camera sensors 	Samsung S5KHMX 	N 	Main
Camera sensors 	Samsung S5K2L7 	N 	Tele 2x
Camera sensors 	OmniVision OV08A10 	N 	Tele 3.7x
Camera sensors 	Sony IMX350 	N 	Ultrawide
Camera sensors 	? 2 MP 	N 	Macro
Camera sensors 	Samsung S5KGD1 	N 	Front
NFC 	NXP NCI 	Y 	
== Known issues ==
* Microphones, 3.5 mm jack and a call speaker are broken
* Modem can't work, if there are two SIM cards installed (userspace issue)
* Voice call audio isn't working
* Weak WiFi signal, slow speeds
* Sensors work and can checked through ssccli, but iio-sensors-proxy segfaults on startup, so no sensors in the userspace (fixed in the latest pmOS snapshots)
* Randomly I/O errors can appear and break everything (kernel bug) (fixed in the 6.13 kernel)
* Bluetooth works, but needs setting a MAC address manually via btmgmt on every boot (6.9+ kernel issue) (fixed by the bootmac package)
== See also ==
* Device Info HW database entry
* GSMArena page