https://wiki.postmarketos.org/api.php?action=feedcontributions&user=Alula&feedformat=atompostmarketOS - User contributions [en]2024-03-29T07:17:32ZUser contributionsMediaWiki 1.39.6https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_4X_(xiaomi-santoni)&diff=12455Xiaomi Redmi 4X (xiaomi-santoni)2020-06-09T03:50:22Z<p>Alula: add link to stk3310 ALSPS driver</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi 4x<br />
| codename = xiaomi-santoni<br />
| image = File:xiaomi-santoni.jpg<br />
| imagecaption = xiaomi-santoni running pmOS demos<br />
| releaseyear = 2017<br />
| originalsoftware = Android 6.0 (can be upgradable to 7.1)<br />
| chipset = Qualcomm MSM8940 Snapdragon 435<br />
| cpu = Octa-core 1.4 GHz Cortex-A53<br />
| gpu = Adreno 505<br />
| storage = 16 GB / 32 GB / 64GB<br />
| display = 720x1280<br />
| memory = 2 GB / 3 GB / 4 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = P<br />
| status_mainline =<br />
| status_battery = Y<br />
| status_3d = <br />
| status_accel = <br />
| status_audio = Y<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = Y<br />
| pmoskernel = 3.18.140<br />
| whet_dhry = 1526.7<br />
| booting = yes<br />
}}<br />
<br />
== Contributors ==<br />
* pinoaffe<br />
* asriel-danctnix<br />
* Danct12<br />
<br />
== Maintainer(s) ==<br />
* Danct12<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== What works ==<br />
* Install to SD Card<br />
* Boots<br />
* Flashing<br />
* Touch<br />
* Wayland<br />
* XWayland<br />
* USB Ethernet/Internet<br />
* WiFi<br />
* Vibrator<br />
* Audio<br />
* Xorg<br />
* USB OTG<br />
* charging-sdl<br />
<br />
== What does not work ==<br />
* Camera<br />
* GPS<br />
* Mobile Data<br />
* SMS<br />
* Calls<br />
* Accelerometers<br />
* Bluetooth (partially)<br />
* 3D Acceleration (possible on mainline)<br />
* Display Power Management on Wayland<br />
* Full Disk Encryption (does unlock, but failed to look up the partition after booting)<br />
<br />
== Bugs? ==<br />
* alsamixer doesn't work, will result in a error telling mixer controls doesn't exist, workaround to control the volume is to use PulseAudio.<br />
<br />
== Mainline kernel? ==<br />
There's ongoing effort to bring up mainline kernel on MSM8937 platform, with initial focus on santoni: [https://github.com/dreemurrs-embedded/santoni-linux].<br />
<br />
MSM8937/40 is pretty close to [https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_410/412_(MSM8916) MSM8916], so a lot of drivers can be re-used with proper device tree and minimal address remapping in some places.<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Parts<br />
! scope="col"| Components<br />
! scope="col"| In Torvalds tree?<br />
|-<br />
| scope="row"| Chipset<br />
| MSM8940<br />
| No<br />
|-<br />
| scope="row"| GPU<br />
| Adreno 505<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/msm/adreno/a5xx_gpu.c a5xx_gpu.c])<br />
|-<br />
| scope="row"| Touch Screen<br />
| FT5X06<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/edt-ft5x06.c edt-ft5x06.c])<br />
|-<br />
| scope="row"| Fingerprint Sensor<br />
| FPC1020/Goodix<br />
| No<br />
|-<br />
| scope="row"| Accelerometer + Gyroscope<br />
| ICM20607/BMI120<br />
| No/Yes ([https://github.com/torvalds/linux/blob/master/drivers/iio/imu/bmi160/bmi160_i2c.c bmi160_i2c.c])<br />
|-<br />
| scope="row"| ALSPS<br />
| STK3X1X<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/iio/light/stk3310.c stk3310.c])<br />
|-<br />
| scope="row"| Magnetometer<br />
| YAS537<br />
| No<br />
|-<br />
| scope="row"| Sound<br />
| AW87319<br />
| No<br />
|-<br />
| scope="row"| Notifications LED<br />
| AW2013<br />
| No<br />
|-<br />
| scope="row"| Front Camera<br />
| OV5675<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/media/i2c/ov5675.c ov5675.c])<br />
|-<br />
| scope="row"| Back Camera<br />
| S5K3L8<br />
| No<br />
|}<br />
<br />
== More information on this port ==<br />
* The upstream msm-3.18 kernel is a fork of https://github.com/bitrvmpd/msm-3.18<br />
* Most of this work was done for my project ([https://github.com/danct12/arch-linux-santoni Arch Linux on Redmi 4X]), and the progress are backported to postmarketOS in order to help development.<br />
<br />
== Bootloader Unlocking ==<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on)<br />
<br />
== Key combinations for entering Recovery/Fastboot ==<br />
=== Recovery ===<br />
* Turn the device off (or restart also works)<br />
* Hold both volume buttons (+ and -) and power button<br />
* Keep holding until you got to recovery.<br />
<br />
=== Fastboot ===<br />
* Same as recovery, but this time hold the volume down key instead of both keys.<br />
<br />
== Installation ==<br />
Installation over fastboot works, Android recovery zip installation is untested.<br />
<br />
== Bluetooth ==<br />
Bluetooth on this phone is using the WCNSS chip, which provides two SMD channels to the BT core, one for command and one for event packets. Support for Bluetooth HCI SMD can be added using [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-xiaomi-santoni/bt-hci-smd.patch this patch].<br />
<br />
With that patch applied, the Bluetooth interface can be bring up by set /sys/module/hci_smd/parameters/hcismd_set to 1. Then install bluez, start the service and use bluetoothctl to control it.<br />
<br />
As right now, it seems to connect, but disconnect very quickly, it doesn't ask for pair code when connecting, so this needs to be investigated.<br />
<br />
== libhybris ==<br />
Hybris implementation for this device has been added in [https://gitlab.com/postmarketOS/pmaports/merge_requests/420 !420]. test_hwcomposer_7_caf passes, and even hwcomposer driver for X11 works!<br />
<br />
You can download Halium image for use here:<br />
https://github.com/dreemurrs-embedded/halium-santoni<br />
<br />
[[File:Hybris-santoni-howto.png]]<br />
<br />
After downloading the system image, drop it to '''/var/lib/lxc/android/system.img''' in the device's rootfs.<br />
<br />
As for the HWcomposer implementation for X11, it's not that fast and there are artifacts on the screen, and [https://user-images.githubusercontent.com/13084776/49331880-06657c00-f5b5-11e8-915a-a33be2b15bc7.jpg kwin on this device gives repeating texture].<br />
<br />
== Photos ==<br />
<gallery><br />
File:Pmos_msm-318_santoni.png|thumb|left|Weston with msm-3.18 upstream kernel<br />
File:Santoni-chargingsdl.png|thumb|left|charging-sdl on Xiaomi Redmi 4X<br />
File:Youtube-santoni.jpg|thumb|left|YouTube on Redmi 4X<br />
File:Santoni_mainline_boot_log.jpg|thumb|left|Redmi 4X booting mainline kernel<br />
</gallery><br />
<br />
== See also ==<br />
* [https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php GSMArena page]<br />
* [https://twrp.me/xiaomi/xiaomiredmi4x.html Official TWRP image for Redmi 4X (santoni)]<br />
* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/santoni-n-oss Xiaomi Redmi 4X Official Kernel Source]<br />
* [https://github.com/Danct12/msm-3.18/tree/rel/msm-3.18-gnulinux msm-3.18 upstreamed kernel for santoni]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/289 Pull request for msm-3.18 upstreamed kernel]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/335 Pull request !335 for osk-sdl]</div>Alulahttps://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_4X_(xiaomi-santoni)&diff=12365Xiaomi Redmi 4X (xiaomi-santoni)2020-06-03T15:58:44Z<p>Alula: add mainline boot pic</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi 4x<br />
| codename = xiaomi-santoni<br />
| image = File:xiaomi-santoni.jpg<br />
| imagecaption = xiaomi-santoni running pmOS demos<br />
| releaseyear = 2017<br />
| originalsoftware = Android 6.0 (can be upgradable to 7.1)<br />
| chipset = Qualcomm MSM8940 Snapdragon 435<br />
| cpu = Octa-core 1.4 GHz Cortex-A53<br />
| gpu = Adreno 505<br />
| storage = 16 GB / 32 GB / 64GB<br />
| display = 720x1280<br />
| memory = 2 GB / 3 GB / 4 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = P<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = <br />
| status_accel = <br />
| status_audio = Y<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = Y<br />
| pmoskernel = 3.18.140<br />
| whet_dhry = 1526.7<br />
| booting = yes<br />
}}<br />
<br />
== Contributors ==<br />
* pinoaffe<br />
* asriel-danctnix<br />
* Danct12<br />
<br />
== Maintainer(s) ==<br />
* Danct12<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== What works ==<br />
* Install to SD Card<br />
* Boots<br />
* Flashing<br />
* Touch<br />
* Wayland<br />
* XWayland<br />
* USB Ethernet/Internet<br />
* WiFi<br />
* Vibrator<br />
* Audio<br />
* Xorg<br />
* USB OTG<br />
* charging-sdl<br />
<br />
== What does not work ==<br />
* Camera<br />
* GPS<br />
* Mobile Data<br />
* SMS<br />
* Calls<br />
* Accelerometers<br />
* Bluetooth (partially)<br />
* 3D Acceleration (possible on mainline)<br />
* Display Power Management on Wayland<br />
* Full Disk Encryption (does unlock, but failed to look up the partition after booting)<br />
<br />
== Bugs? ==<br />
* alsamixer doesn't work, will result in a error telling mixer controls doesn't exist, workaround to control the volume is to use PulseAudio.<br />
<br />
== Mainline kernel? ==<br />
There's ongoing effort to bring up mainline kernel on MSM8937 platform, with initial focus on santoni: [https://github.com/dreemurrs-embedded/santoni-linux].<br />
<br />
MSM8937/40 is pretty close to [https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_410/412_(MSM8916) MSM8916], so a lot of drivers can be re-used with proper device tree and minimal address remapping in some places.<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Parts<br />
! scope="col"| Components<br />
! scope="col"| In Torvalds tree?<br />
|-<br />
| scope="row"| Chipset<br />
| MSM8940<br />
| No<br />
|-<br />
| scope="row"| GPU<br />
| Adreno 505<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/msm/adreno/a5xx_gpu.c a5xx_gpu.c])<br />
|-<br />
| scope="row"| Touch Screen<br />
| FT5X06<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/edt-ft5x06.c edt-ft5x06.c])<br />
|-<br />
| scope="row"| Fingerprint Sensor<br />
| FPC1020/Goodix<br />
| No<br />
|-<br />
| scope="row"| Accelerometer + Gyroscope<br />
| ICM20607/BMI120<br />
| No/Yes ([https://github.com/torvalds/linux/blob/master/drivers/iio/imu/bmi160/bmi160_i2c.c bmi160_i2c.c])<br />
|-<br />
| scope="row"| ALSPS<br />
| STK3X1X<br />
| No<br />
|-<br />
| scope="row"| Magnetometer<br />
| YAS537<br />
| No<br />
|-<br />
| scope="row"| Sound<br />
| AW87319<br />
| No<br />
|-<br />
| scope="row"| Notifications LED<br />
| AW2013<br />
| No<br />
|-<br />
| scope="row"| Front Camera<br />
| OV5675<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/media/i2c/ov5675.c ov5675.c])<br />
|-<br />
| scope="row"| Back Camera<br />
| S5K3L8<br />
| No<br />
|}<br />
<br />
== More information on this port ==<br />
* The upstream msm-3.18 kernel is a fork of https://github.com/bitrvmpd/msm-3.18<br />
* Most of this work was done for my project ([https://github.com/danct12/arch-linux-santoni Arch Linux on Redmi 4X]), and the progress are backported to postmarketOS in order to help development.<br />
<br />
== Bootloader Unlocking ==<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on)<br />
<br />
== Key combinations for entering Recovery/Fastboot ==<br />
=== Recovery ===<br />
* Turn the device off (or restart also works)<br />
* Hold both volume buttons (+ and -) and power button<br />
* Keep holding until you got to recovery.<br />
<br />
=== Fastboot ===<br />
* Same as recovery, but this time hold the volume down key instead of both keys.<br />
<br />
== Installation ==<br />
Installation over fastboot works, Android recovery zip installation is untested.<br />
<br />
== Bluetooth ==<br />
Bluetooth on this phone is using the WCNSS chip, which provides two SMD channels to the BT core, one for command and one for event packets. Support for Bluetooth HCI SMD can be added using [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-xiaomi-santoni/bt-hci-smd.patch this patch].<br />
<br />
With that patch applied, the Bluetooth interface can be bring up by set /sys/module/hci_smd/parameters/hcismd_set to 1. Then install bluez, start the service and use bluetoothctl to control it.<br />
<br />
As right now, it seems to connect, but disconnect very quickly, it doesn't ask for pair code when connecting, so this needs to be investigated.<br />
<br />
== libhybris ==<br />
Hybris implementation for this device has been added in [https://gitlab.com/postmarketOS/pmaports/merge_requests/420 !420]. test_hwcomposer_7_caf passes, and even hwcomposer driver for X11 works!<br />
<br />
You can download Halium image for use here:<br />
https://github.com/dreemurrs-embedded/halium-santoni<br />
<br />
[[File:Hybris-santoni-howto.png]]<br />
<br />
After downloading the system image, drop it to '''/var/lib/lxc/android/system.img''' in the device's rootfs.<br />
<br />
As for the HWcomposer implementation for X11, it's not that fast and there are artifacts on the screen, and [https://user-images.githubusercontent.com/13084776/49331880-06657c00-f5b5-11e8-915a-a33be2b15bc7.jpg kwin on this device gives repeating texture].<br />
<br />
== Photos ==<br />
<gallery><br />
File:Pmos_msm-318_santoni.png|thumb|left|Weston with msm-3.18 upstream kernel<br />
File:Santoni-chargingsdl.png|thumb|left|charging-sdl on Xiaomi Redmi 4X<br />
File:Youtube-santoni.jpg|thumb|left|YouTube on Redmi 4X<br />
File:Santoni_mainline_boot_log.jpg|thumb|left|Redmi 4X booting mainline kernel<br />
</gallery><br />
<br />
== See also ==<br />
* [https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php GSMArena page]<br />
* [https://twrp.me/xiaomi/xiaomiredmi4x.html Official TWRP image for Redmi 4X (santoni)]<br />
* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/santoni-n-oss Xiaomi Redmi 4X Official Kernel Source]<br />
* [https://github.com/Danct12/msm-3.18/tree/rel/msm-3.18-gnulinux msm-3.18 upstreamed kernel for santoni]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/289 Pull request for msm-3.18 upstreamed kernel]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/335 Pull request !335 for osk-sdl]</div>Alulahttps://wiki.postmarketos.org/index.php?title=File:Santoni_mainline_boot_log.jpg&diff=12364File:Santoni mainline boot log.jpg2020-06-03T15:57:34Z<p>Alula: pic of santoni booting mainline 5.7.0 kernel</p>
<hr />
<div>== Summary ==<br />
pic of santoni booting mainline 5.7.0 kernel<br />
== Licensing ==<br />
{{self|cc-by-sa-4.0|GFDL|migration=redundant}}</div>Alulahttps://wiki.postmarketos.org/index.php?title=User:Alula&diff=12352User:Alula2020-06-02T21:44:49Z<p>Alula: fix owns devices</p>
<hr />
<div><div style="float: right;"><br />
{{User mainline attempts}}<br />
{{User GitLab|alulalol}}<br />
</div><br />
== Julia K. ==<br />
=== Contacts: ===<br />
Matrix: @alula:hackerspaces.be<br />
<br />
Telegram: [https://t.me/alulalol @alulalol]<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
<br />
{{Owns device|Xiaomi_Redmi_4X_(xiaomi-santoni)}}<br />
{{Owns device|Samsung_Galaxy_S6_(samsung-zerofltexx)}}<br />
{{Owns device|Nokia_Lumia_520_(nokia-fame)}}</div>Alulahttps://wiki.postmarketos.org/index.php?title=User:Alula&diff=12351User:Alula2020-06-02T21:43:01Z<p>Alula: Created page with "<div style="float: right;"> {{User mainline attempts}} {{User GitLab|alulalol}} </div> == Julia K. == === Contacts: === Matrix: @alula:hackerspaces.be Telegram: [https://t.me..."</p>
<hr />
<div><div style="float: right;"><br />
{{User mainline attempts}}<br />
{{User GitLab|alulalol}}<br />
</div><br />
== Julia K. ==<br />
=== Contacts: ===<br />
Matrix: @alula:hackerspaces.be<br />
<br />
Telegram: [https://t.me/alulalol @alulalol]<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Xiaomi_Redmi_4X_(xiaomi-santoni)}}<br />
{{Owns device|Samsung_Galaxy_S6_(samsung-zerofltexx)}}<br />
{{Owns device|Nokia_Lumia_520_(nokia-fame)}}</div>Alulahttps://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_4X_(xiaomi-santoni)&diff=12348Xiaomi Redmi 4X (xiaomi-santoni)2020-06-02T12:16:31Z<p>Alula: add link to close-to-mainline kernel repo</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi 4x<br />
| codename = xiaomi-santoni<br />
| image = File:xiaomi-santoni.jpg<br />
| imagecaption = xiaomi-santoni running pmOS demos<br />
| releaseyear = 2017<br />
| originalsoftware = Android 6.0 (can be upgradable to 7.1)<br />
| chipset = Qualcomm MSM8940 Snapdragon 435<br />
| cpu = Octa-core 1.4 GHz Cortex-A53<br />
| gpu = Adreno 505<br />
| storage = 16 GB / 32 GB / 64GB<br />
| display = 720x1280<br />
| memory = 2 GB / 3 GB / 4 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = P<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = <br />
| status_accel = <br />
| status_audio = Y<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = Y<br />
| pmoskernel = 3.18.140<br />
| whet_dhry = 1526.7<br />
| booting = yes<br />
}}<br />
<br />
== Contributors ==<br />
* pinoaffe<br />
* asriel-danctnix<br />
* Danct12<br />
<br />
== Maintainer(s) ==<br />
* Danct12<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== What works ==<br />
* Install to SD Card<br />
* Boots<br />
* Flashing<br />
* Touch<br />
* Wayland<br />
* XWayland<br />
* USB Ethernet/Internet<br />
* WiFi<br />
* Vibrator<br />
* Audio<br />
* Xorg<br />
* USB OTG<br />
* charging-sdl<br />
<br />
== What does not work ==<br />
* Camera<br />
* GPS<br />
* Mobile Data<br />
* SMS<br />
* Calls<br />
* Accelerometers<br />
* Bluetooth (partially)<br />
* 3D Acceleration (possible on mainline)<br />
* Display Power Management on Wayland<br />
* Full Disk Encryption (does unlock, but failed to look up the partition after booting)<br />
<br />
== Bugs? ==<br />
* alsamixer doesn't work, will result in a error telling mixer controls doesn't exist, workaround to control the volume is to use PulseAudio.<br />
<br />
== Mainline kernel? ==<br />
There's ongoing effort to bring up mainline kernel on MSM8937 platform, with initial focus on santoni: [https://github.com/dreemurrs-embedded/santoni-linux].<br />
<br />
MSM8937/40 is pretty close to [https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_410/412_(MSM8916) MSM8916], so a lot of drivers can be re-used with proper device tree and minimal address remapping in some places.<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Parts<br />
! scope="col"| Components<br />
! scope="col"| In Torvalds tree?<br />
|-<br />
| scope="row"| Chipset<br />
| MSM8940<br />
| No<br />
|-<br />
| scope="row"| GPU<br />
| Adreno 505<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/msm/adreno/a5xx_gpu.c a5xx_gpu.c])<br />
|-<br />
| scope="row"| Touch Screen<br />
| FT5X06<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/edt-ft5x06.c edt-ft5x06.c])<br />
|-<br />
| scope="row"| Fingerprint Sensor<br />
| FPC1020/Goodix<br />
| No<br />
|-<br />
| scope="row"| Accelerometer + Gyroscope<br />
| ICM20607/BMI120<br />
| No/Yes ([https://github.com/torvalds/linux/blob/master/drivers/iio/imu/bmi160/bmi160_i2c.c bmi160_i2c.c])<br />
|-<br />
| scope="row"| ALSPS<br />
| STK3X1X<br />
| No<br />
|-<br />
| scope="row"| Magnetometer<br />
| YAS537<br />
| No<br />
|-<br />
| scope="row"| Sound<br />
| AW87319<br />
| No<br />
|-<br />
| scope="row"| Notifications LED<br />
| AW2013<br />
| No<br />
|-<br />
| scope="row"| Front Camera<br />
| OV5675<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/media/i2c/ov5675.c ov5675.c])<br />
|-<br />
| scope="row"| Back Camera<br />
| S5K3L8<br />
| No<br />
|}<br />
<br />
== More information on this port ==<br />
* The upstream msm-3.18 kernel is a fork of https://github.com/bitrvmpd/msm-3.18<br />
* Most of this work was done for my project ([https://github.com/danct12/arch-linux-santoni Arch Linux on Redmi 4X]), and the progress are backported to postmarketOS in order to help development.<br />
<br />
== Bootloader Unlocking ==<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on)<br />
<br />
== Key combinations for entering Recovery/Fastboot ==<br />
=== Recovery ===<br />
* Turn the device off (or restart also works)<br />
* Hold both volume buttons (+ and -) and power button<br />
* Keep holding until you got to recovery.<br />
<br />
=== Fastboot ===<br />
* Same as recovery, but this time hold the volume down key instead of both keys.<br />
<br />
== Installation ==<br />
Installation over fastboot works, Android recovery zip installation is untested.<br />
<br />
== Bluetooth ==<br />
Bluetooth on this phone is using the WCNSS chip, which provides two SMD channels to the BT core, one for command and one for event packets. Support for Bluetooth HCI SMD can be added using [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-xiaomi-santoni/bt-hci-smd.patch this patch].<br />
<br />
With that patch applied, the Bluetooth interface can be bring up by set /sys/module/hci_smd/parameters/hcismd_set to 1. Then install bluez, start the service and use bluetoothctl to control it.<br />
<br />
As right now, it seems to connect, but disconnect very quickly, it doesn't ask for pair code when connecting, so this needs to be investigated.<br />
<br />
== libhybris ==<br />
Hybris implementation for this device has been added in [https://gitlab.com/postmarketOS/pmaports/merge_requests/420 !420]. test_hwcomposer_7_caf passes, and even hwcomposer driver for X11 works!<br />
<br />
You can download Halium image for use here:<br />
https://github.com/dreemurrs-embedded/halium-santoni<br />
<br />
[[File:Hybris-santoni-howto.png]]<br />
<br />
After downloading the system image, drop it to '''/var/lib/lxc/android/system.img''' in the device's rootfs.<br />
<br />
As for the HWcomposer implementation for X11, it's not that fast and there are artifacts on the screen, and [https://user-images.githubusercontent.com/13084776/49331880-06657c00-f5b5-11e8-915a-a33be2b15bc7.jpg kwin on this device gives repeating texture].<br />
<br />
== Photos ==<br />
<gallery><br />
File:Pmos_msm-318_santoni.png|thumb|left|Weston with msm-3.18 upstream kernel<br />
File:Santoni-chargingsdl.png|thumb|left|charging-sdl on Xiaomi Redmi 4X<br />
File:Youtube-santoni.jpg|thumb|left|YouTube on Redmi 4X<br />
</gallery><br />
<br />
== See also ==<br />
* [https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php GSMArena page]<br />
* [https://twrp.me/xiaomi/xiaomiredmi4x.html Official TWRP image for Redmi 4X (santoni)]<br />
* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/santoni-n-oss Xiaomi Redmi 4X Official Kernel Source]<br />
* [https://github.com/Danct12/msm-3.18/tree/rel/msm-3.18-gnulinux msm-3.18 upstreamed kernel for santoni]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/289 Pull request for msm-3.18 upstreamed kernel]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/335 Pull request !335 for osk-sdl]</div>Alulahttps://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_4X_(xiaomi-santoni)&diff=12347Xiaomi Redmi 4X (xiaomi-santoni)2020-06-02T11:55:23Z<p>Alula: mainline: add drivers</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi 4x<br />
| codename = xiaomi-santoni<br />
| image = File:xiaomi-santoni.jpg<br />
| imagecaption = xiaomi-santoni running pmOS demos<br />
| releaseyear = 2017<br />
| originalsoftware = Android 6.0 (can be upgradable to 7.1)<br />
| chipset = Qualcomm MSM8940 Snapdragon 435<br />
| cpu = Octa-core 1.4 GHz Cortex-A53<br />
| gpu = Adreno 505<br />
| storage = 16 GB / 32 GB / 64GB<br />
| display = 720x1280<br />
| memory = 2 GB / 3 GB / 4 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = P<br />
| status_mainline = <br />
| status_battery = Y<br />
| status_3d = <br />
| status_accel = <br />
| status_audio = Y<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = Y<br />
| pmoskernel = 3.18.140<br />
| whet_dhry = 1526.7<br />
| booting = yes<br />
}}<br />
<br />
== Contributors ==<br />
* pinoaffe<br />
* asriel-danctnix<br />
* Danct12<br />
<br />
== Maintainer(s) ==<br />
* Danct12<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== What works ==<br />
* Install to SD Card<br />
* Boots<br />
* Flashing<br />
* Touch<br />
* Wayland<br />
* XWayland<br />
* USB Ethernet/Internet<br />
* WiFi<br />
* Vibrator<br />
* Audio<br />
* Xorg<br />
* USB OTG<br />
* charging-sdl<br />
<br />
== What does not work ==<br />
* Camera<br />
* GPS<br />
* Mobile Data<br />
* SMS<br />
* Calls<br />
* Accelerometers<br />
* Bluetooth (partially)<br />
* 3D Acceleration (will never happen due to downstream kernel)<br />
* Display Power Management on Wayland<br />
* Full Disk Encryption (does unlock, but failed to look up the partition after booting)<br />
<br />
== Bugs? ==<br />
* alsamixer doesn't work, will result in a error telling mixer controls doesn't exist, workaround to control the volume is to use PulseAudio.<br />
<br />
== Mainline kernel? ==<br />
Not yet, as MSM8937 isn't in mainline. MSM8940 is similar to MSM8937.<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Parts<br />
! scope="col"| Components<br />
! scope="col"| In Torvalds tree?<br />
|-<br />
| scope="row"| Chipset<br />
| MSM8940<br />
| No<br />
|-<br />
| scope="row"| GPU<br />
| Adreno 505<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/msm/adreno/a5xx_gpu.c a5xx_gpu.c])<br />
|-<br />
| scope="row"| Touch Screen<br />
| FT5X06<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/edt-ft5x06.c edt-ft5x06.c])<br />
|-<br />
| scope="row"| Fingerprint Sensor<br />
| FPC1020/Goodix<br />
| No<br />
|-<br />
| scope="row"| Accelerometer + Gyroscope<br />
| ICM20607/BMI120<br />
| No/Yes ([https://github.com/torvalds/linux/blob/master/drivers/iio/imu/bmi160/bmi160_i2c.c bmi160_i2c.c])<br />
|-<br />
| scope="row"| ALSPS<br />
| STK3X1X<br />
| No<br />
|-<br />
| scope="row"| Magnetometer<br />
| YAS537<br />
| No<br />
|-<br />
| scope="row"| Sound<br />
| AW87319<br />
| No<br />
|-<br />
| scope="row"| Notifications LED<br />
| AW2013<br />
| No<br />
|-<br />
| scope="row"| Front Camera<br />
| OV5675<br />
| Yes ([https://github.com/torvalds/linux/blob/master/drivers/media/i2c/ov5675.c ov5675.c])<br />
|-<br />
| scope="row"| Back Camera<br />
| S5K3L8<br />
| No<br />
|}<br />
<br />
== More information on this port ==<br />
* The upstream msm-3.18 kernel is a fork of https://github.com/bitrvmpd/msm-3.18<br />
* Most of this work was done for my project ([https://github.com/danct12/arch-linux-santoni Arch Linux on Redmi 4X]), and the progress are backported to postmarketOS in order to help development.<br />
<br />
== Bootloader Unlocking ==<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on)<br />
<br />
== Key combinations for entering Recovery/Fastboot ==<br />
=== Recovery ===<br />
* Turn the device off (or restart also works)<br />
* Hold both volume buttons (+ and -) and power button<br />
* Keep holding until you got to recovery.<br />
<br />
=== Fastboot ===<br />
* Same as recovery, but this time hold the volume down key instead of both keys.<br />
<br />
== Installation ==<br />
Installation over fastboot works, Android recovery zip installation is untested.<br />
<br />
== Bluetooth ==<br />
Bluetooth on this phone is using the WCNSS chip, which provides two SMD channels to the BT core, one for command and one for event packets. Support for Bluetooth HCI SMD can be added using [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-xiaomi-santoni/bt-hci-smd.patch this patch].<br />
<br />
With that patch applied, the Bluetooth interface can be bring up by set /sys/module/hci_smd/parameters/hcismd_set to 1. Then install bluez, start the service and use bluetoothctl to control it.<br />
<br />
As right now, it seems to connect, but disconnect very quickly, it doesn't ask for pair code when connecting, so this needs to be investigated.<br />
<br />
== libhybris ==<br />
Hybris implementation for this device has been added in [https://gitlab.com/postmarketOS/pmaports/merge_requests/420 !420]. test_hwcomposer_7_caf passes, and even hwcomposer driver for X11 works!<br />
<br />
You can download Halium image for use here:<br />
https://github.com/dreemurrs-embedded/halium-santoni<br />
<br />
[[File:Hybris-santoni-howto.png]]<br />
<br />
After downloading the system image, drop it to '''/var/lib/lxc/android/system.img''' in the device's rootfs.<br />
<br />
As for the HWcomposer implementation for X11, it's not that fast and there are artifacts on the screen, and [https://user-images.githubusercontent.com/13084776/49331880-06657c00-f5b5-11e8-915a-a33be2b15bc7.jpg kwin on this device gives repeating texture].<br />
<br />
== Photos ==<br />
<gallery><br />
File:Pmos_msm-318_santoni.png|thumb|left|Weston with msm-3.18 upstream kernel<br />
File:Santoni-chargingsdl.png|thumb|left|charging-sdl on Xiaomi Redmi 4X<br />
File:Youtube-santoni.jpg|thumb|left|YouTube on Redmi 4X<br />
</gallery><br />
<br />
== See also ==<br />
* [https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php GSMArena page]<br />
* [https://twrp.me/xiaomi/xiaomiredmi4x.html Official TWRP image for Redmi 4X (santoni)]<br />
* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/santoni-n-oss Xiaomi Redmi 4X Official Kernel Source]<br />
* [https://github.com/Danct12/msm-3.18/tree/rel/msm-3.18-gnulinux msm-3.18 upstreamed kernel for santoni]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/289 Pull request for msm-3.18 upstreamed kernel]<br />
* [https://gitlab.com/postmarketOS/pmaports/merge_requests/335 Pull request !335 for osk-sdl]</div>Alula