Huawei Honor 5X/GR5 (2016) (huawei-kiwi)

== What works ==
There are ~23 variants of this device. Yours might not be fully supported yet
* Buttons
* Display (CMI_NT35532 and TIANMA_NT35596 are supported for now, but not AUO_OTM1901A,BOE_OTM1901A or TRULY_HX8399A.)
* WIFI/Bluetooth
* SD Card slot
* Touch (cyttsp5_i2c_adapter)
* Magnetometer (ak09911)
* Ambient Light/Proximity Sensor (apds9930)
* Audio / Microphone
* Vibrator
* Hall effect sensor
* Notification LED
* Accelerometer (kx0231025)
* Full disk encryption (with the supported panel; hardware acceleration could probably be added)
hwtest:
Category 	Model 	Path 	Status
framebuffer 	msmdrmfb 	/sys/class/graphics/fb0 	working
drm 	- 	/sys/class/drm/card0-DSI-1 	working
magnetometer 	ak09911 	/sys/bus/iio/devices/iio:device1	working
accelerometer	kx0231025 	/sys/bus/iio/devices/iio:device2	working
illuminance 	apds9930 	/sys/bus/iio/devices/iio:device3	working
input 	cyttsp5 	/dev/input/event6 	working
input 	samsung-a2015 Headset Jack	/dev/input/event5 	working
input 	GPIO Buttons 	/dev/input/event3 	working
input 	GPIO Hall Effect Sensor 	/dev/input/event2 	working
input 	pm8941_pwrkey 	/dev/input/event1 	working
input 	pm8941_pwrkey 	/dev/input/event0 	working
== What does NOT work ==
* AUO,BOE,TRULY panel can't work now
Add panel driver in kerneldir/drivers/gpu/drm/panel/msm8916-generated is useless of enable auo panel,the reason is AUO panel has ESD (electrostatic discharge)
* Battery fuel gauge
Can be found here https://gitlab.com/msm8939-mainline/linux/-/blob/v5.18-msm8916+msm8939-v2/arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts#L108-124
Uncertain whether the values are correct.
* Torch/Flash missing
* Modem starts and is detected, but every ~40s it crashes with following error. Should work just like any other msm8916 device.
Probably requires rmt_oeminfo and other services. Similar error described in Google_Nexus_6P_(huawei-angler)#Modem and https://github.com/msm8916-mainline/linux/pull/192, help appreciated.
dmesg error:
[ 91.795192] qcom-q6v5-mss 4080000.remoteproc: fatal error received: dog.c:1503:Watchdog detects stalled initialization
[ 91.795231] remoteproc remoteproc0: crash detected in 4080000.remoteproc: type fatal error
[ 91.795322] remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc
[ 91.795350] remoteproc remoteproc0: recovering 4080000.remoteproc
[ 91.910476] snd-malloc: invalid device type 0
[ 93.595751] qcom-wcnss-pil a204000.remoteproc: unexpected response to sysmon event
[ 93.595764] remoteproc remoteproc0: stopped remote processor 4080000.remoteproc
Using Xiaomi_Mi_4i_(xiaomi-ferrari)s modem firmware prevents this crash. And with User:TravMurav/Dual-Sim_QMI_draft the sim card can be unlocked.
But getting the modem online does not work.
* GPS: Probably requires modem to run and config like in https://github.com/msm8916-mainline/linux/pull/158
== How to enter flash mode ==
Hold + at the same time.
== Installation ==
# Unlock the bootloader. See Bootloader#Huawei
# Install lk2nd. Although Huawei already provides a Fastboot interface, lk2nd contains various quirks for booting mainline.
# Please follow the Installation guide. Enable nonfree firmware for WIFI/BT/GPU
# Follow the steps displayed at the end of output the previous command to finally flash postmarketOS.
== Audio ==
== Users owning this device ==
== Photos ==
File:Photo_2020-11-19_15-48-06.jpg
File:Huawei-honor-5x-0.jpg
== Links ==
* 
* Unmaintained downstream 
* TWRP image