Jump to content

Fairphone 3 (fairphone-fp3): Difference between revisions

From postmarketOS Wiki
Mtvec (talk | contribs)
Add link to vibration motor driver
Revamp page, clean up outdated or duplicated information, update remaining texts
 
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = Fairphone
| manufacturer = Fairphone
| name = Fairphone 3
| name = 3
| codename = fairphone-fp3
| codename = fairphone-fp3
| model = FP3
| image = File:Fairphone-fp3.jpg
| image = File:Fairphone-fp3.jpg
| imagecaption =
| imagecaption =
| releaseyear = 2019
| releaseyear = 2019
| originalsoftware = Android 9 on Linux 4.9
| category = testing
| chipset = Qualcomm SDM632 Snapdragon 632
| originalsoftware = Android
| originalversion = 9 (Linux 4.9)
| chipset = Qualcomm Snapdragon 632 (SDM632)
| cpu = 4x 1.8 GHz Kryo 250 Gold + 4x 1.8 GHz Kryo 250 Silver
| cpu = 4x 1.8 GHz Kryo 250 Gold + 4x 1.8 GHz Kryo 250 Silver
| gpu = Adreno 506
| gpu = Adreno 506
| display = 1080x2160
| storage = 64 GB
| storage = 64 GB
| display = 1080x2160
| memory = 4 GB
| memory = 4 GB
| architecture = aarch64
| architecture = aarch64
| type = handset
| whet_dhry = 0.0
<!-- Features -->
| status_usbnet = Y
| status_usbnet = Y
| status_flashing = Y
| status_flashing = Y
| status_touch = Y
| status_touch = Y
| status_screen = Y
| status_screen = Y
| status_3d = Y
| status_fde = Y
| status_emmc = Y
| status_wifi = Y
| status_wifi = Y
| status_xwayland =
| status_fde =
| status_mainline = Y
| status_mainline = Y
| status_battery = Y
| status_battery = N
| status_3d =  
| status_audio = N
| status_accel =  
| status_bluetooth = Y
| status_audio =
| status_camera = N
| status_bluetooth =
| status_gps =
| status_camera =
| status_mobiledata = Y
| status_gps =  
| status_sms = Y
| status_mobiledata =  
| status_calls = P
| status_sms =  
| status_otg = Y
| status_calls =  
| status_nfc = Y
| booting = Y
<!-- Sensors -->
| pmoskernel = 4.9.218
| status_accel = N
| status_magnet = N
| status_light = N
| status_proximity = N
| status_hall = -
| status_barometer = -
| status_powersensor = -
<!-- Misc -->
| status_dvb = -
| status_cameraflash = N
| status_keyboard = -
| status_touchpad = -
| status_usba = -
| status_sdcard = Y
| status_hdmidp = -
| status_irtx = -
| status_irrx = -
| status_stylus = -
| status_haptics = Y
| status_ethernet = -
| status_fossbootloader = -
| booting = yes
}}
}}


== Contributors ==
== Contributors ==
* [[User:Z3ntu|Z3ntu]]


== Maintainer(s) ==
== Users owning this device ==
 
== Device owners ==
{{Device owners}}
{{Device owners}}


== How to enter flash mode ==
== How to enter flash mode ==


Press Power Button and Volume Down at the same time to enter fastboot mode
For booting into fastboot, turn off the phone, hold volume down and press the power button or plug in the USB cable.
 
To unlock bootloader go to android and to settings. in developer option unlock oem commands.
Then In fastboot mode type:
 
<pre>fastboot oem unlock</pre>


== Installation ==
== Installation ==


=== Mainline ===
Unlock the bootloader according to the [https://support.fairphone.com/hc/en-us/articles/10492476238865 official instructions].
 
Follow the usual [[Installation guide]] but stop before flashing.
 
Download <code>dtbo.img</code> [https://github.com/z3ntu/dtbo-fp3/releases/tag/v1.0 here]. Enter fastboot mode and and flash the downloaded image to the dtbo partition:
 
<pre>
fastboot flash dtbo dtbo.img
</pre>
 
Install [https://github.com/msm8953-mainline/lk2nd lk2nd] and flash it to your device:
 
<pre>
pmbootstrap chroot -r -- apk add lk2nd-msm8953
pmbootstrap flasher flash_lk2nd
</pre>
 
Boot your device. Once you see the warning screen about the unlocked boot loader, press the power button twice and then immediately hold the volume down button. You should now see a flickering version of the fastboot screen. This is lk2nd's fastboot mode and you can now continue the normal flashing procedure.
 
Note that the boot process seems to hang without a USB cable connected.
 
 
=== Downstream ===
 
The normal [[Installation guide]] should work out of the box. However, if you flashed mainline before, the original <code>dtbo.img</code> needs to be restored. A working one can be found from the [https://images.ecloud.global/stable/FP3/ /e/ images]. Unzip it and flash <code>dtbo.img</code> as above.
 
== Mainlining ==
 
<code>/proc/device-tree/model</code> on the downstream kernel contains "MTB S3". The corresponding DTS file is <code>arch/arm64/boot/dts/qcom/sdm450-mtp-s3-overlay.dts</code>.
 
The mainline kernel used is [https://github.com/msm8953-mainline/linux msm8953-mainline], branch "msm8953-5.16". Note that branches of later kernel versions (e.g., 5.18) do not seem to work.
 
=== Component support table ===
 
{| class="wikitable"
! Description
! Component
! Mainline kernel
! Since when
|-
| Power button
| pm8953 pwrkey
| Working
| 5.16
|-
| Volume down button
| pm8953 resin
| Working
| 5.16
|-
| Volume up button
| gpio-keys
| Working
| 5.16
|-
| Internal storage
| sdhc_1
| Working
| 5.16
|-
| SD card
| sdhc_2
| Working
| 5.16
|-
| Display
| hx83112b
| Working
| 5.16
|-
| Touchscreen
| hx83112b
| Working
| [[#Touchscreen|unofficial]]
|-
| NFC
| NXP NCI
|
|
|-
| Vibration motor
| pmi632 qcom,vibrator@5700
|
| [[#Vibration motor|unofficial]]
|-
| Notification LED
| pmi632 qcom,leds@d000
|
|
|-
| Charger
| pmi632 qcom,qpnp-smb5
|
|
|-
| Fuel gauge
| pmi632 qpnp,qg
|
|
|-
| WiFi
| pronto
| Working
| 5.16
|-
| Bluetooth
| pronto
| Working
| 5.16
|-
| FP3 front camera
| S5K4H7YX
|
|
|-
| FP3 rear camera
| IMX363
|
|
|-
| FP3+ front camera
| S5K3P9SP
|
|
|-
| FP3+ rear camera
| S5KGM1SP03-FGX9
|
|
|-
| Camera flash
| pmi632 qcom,leds@d300
|
|
|-
| Audio codec
| WCD9326
|
|
|-
| FP3 speaker amp
| AW8898
|
|
|-
| FP3+ speaker amp
| TAS2557
|
|
|}
 
==== Touchscreen ====
 
A PR for a driver can be found [https://github.com/msm8953-mainline/linux/pull/43 here].
 
==== Vibration motor ====


The Android driver is copied into mainline [https://github.com/mtvec/msm8953-mainline-linux/tree/fp3-vibrator here]. Note that it exposes itself as an LED with some custom sysfs knobs so I don't know if user space can use it yet. You can test it by writing 1 or 0 to <code>/sys/class/leds/vibrator/activate</code>.
=== Using pmbootstrap ===
Follow [[Installation/Using pmbootstrap]]. When asked for the device's vendor/codename, select fairphone as the vendor and fp3 as the codename.


<span id="audio-path"></span>
To flash the image to the device:


==== Audio path ====
* Enter flashing mode (see [[#How to enter flash mode]])
* Download <code>dtbo.img</code> [https://github.com/z3ntu/dtbo-fp3/releases/tag/v1.0 here]
* Run <code>fastboot flash dtbo dtbo.img</code>
* Run <code>pmbootstrap flasher flash_lk2nd</code> to flash a secondary bootloader
* Run <code>pmbootstrap flasher flash_rootfs</code>


* CPU via I2S (quinary) to AW8898/TAS2557: speaker (and echo reference back)
In order to access lk2nd's menu, during bootup when you see the warning screen about the unlocked bootloader, press the power button twice and then immediately hold the Volume Down button. You should now see a different looking boot menu.
* CPU via SLIMbus to WCD9326: microphones, headphones, etc.


== Links ==
== See also ==
* {{MR|2158|pmaports}} Initial merge request
* {{MR|2158|pmaports}} Initial merge request
* [https://code.fairphone.com/projects/fp-osos/dev/fairphone-3-gpl.html Kernel source]
* [https://gitlab.com/knfr/pmaports/-/tree/device/fairphone-fp3 WIP pmaports branch]

Latest revision as of 18:55, 2 April 2025

Fairphone 3
Manufacturer Fairphone
Name 3
Codename fairphone-fp3
Model FP3
Released 2019
Type handset
Hardware
Chipset Qualcomm Snapdragon 632 (SDM632)
CPU 4x 1.8 GHz Kryo 250 Gold
4x 1.8 GHz Kryo 250 Silver
GPU Adreno 506
Display 1080x2160
Storage 64 GB
Memory 4 GB
Architecture aarch64
Software
Original software Android
Original version 9 (Linux 4.9)
postmarketOS
Category testing
Pre-built images no
Mainline yes
Unixbench Whet/Dhry score 0.0
Features
Flashing
Works
USB Networking
Works
Internal storage
Works
SD card
Works
Battery
Broken
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Broken
Camera Flash
Broken
Connectivity
WiFi
Works
Bluetooth
Works
GPS
No data
NFC
Works
Modem
Calls
Partial
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Works
USB OTG
Works
Sensors
Accelerometer
Broken
Magnetometer
Broken
Ambient Light
Broken
Proximity
Broken
Haptics
Works


Contributors

Users owning this device


How to enter flash mode

For booting into fastboot, turn off the phone, hold volume down and press the power button or plug in the USB cable.

Installation

Unlock the bootloader according to the official instructions.

Using pmbootstrap

Follow Installation/Using pmbootstrap. When asked for the device's vendor/codename, select fairphone as the vendor and fp3 as the codename.

To flash the image to the device:

  • Enter flashing mode (see #How to enter flash mode)
  • Download dtbo.img here
  • Run fastboot flash dtbo dtbo.img
  • Run pmbootstrap flasher flash_lk2nd to flash a secondary bootloader
  • Run pmbootstrap flasher flash_rootfs

In order to access lk2nd's menu, during bootup when you see the warning screen about the unlocked bootloader, press the power button twice and then immediately hold the Volume Down button. You should now see a different looking boot menu.

See also