Jump to content

Qualcomm Snapdragon 835 (MSM8998): Difference between revisions

From postmarketOS Wiki
Deathmist (talk | contribs)
Add information about testing the PM8XXX compatible RTC module
Confirmation that diag-router is required for WiFi to function properly.
 
(43 intermediate revisions by 16 users not shown)
Line 2: Line 2:
| manufacturer = Qualcomm
| manufacturer = Qualcomm
| name = MSM8998
| name = MSM8998
| image = File:Qualcomm_MSM8998.jpg
| imagecaption = MSM8998 in ceramic package
| codenames = msmcobalt/apqcobalt
| arch = aarch64
| arch = aarch64
| cpu = 4x 2.45 GHz Kryo 280 Gold, 4x 1.9 GHz Kryo 280 Silver
| cpu = 4x 2.45 GHz Kryo 280 Gold, 4x 1.9 GHz Kryo 280 Silver
| community_page = https://gitlab.com/msm8998-mainline
| gpu = Adreno 540
| gpu = Adreno 540
| year = 2017
| year = 2017
| process = 10
| process = 10
| mainline = yes
| mainline = yes
| status_cpu = Y
| status_cpu = P
| status_uart =  
| status_uart = Y
| status_storage = Y
| status_storage = Y
| status_usb = P
| status_usb = N
| status_display = P
| status_display = P
| status_gpu =  
| status_gpu = N
| status_pinctrl = Y
| status_pinctrl = Y
| status_i2c = Y
| status_i2c = Y
| status_audio =  
| status_audio = Y
| status_video =  
| status_video =  
| status_thermal =  
| status_thermal = Y
| status_wifi = P
| status_wifi = Y
| status_bluetooth = Y
| status_bluetooth = Y
| status_modem =  
| status_modem = P
| status_gps = Y
| status_camera =  
| status_camera =  
| status_suspend =
}}
}}


Line 30: Line 36:
{{#cargo_query:
{{#cargo_query:
tables=Devices
tables=Devices
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,Category
|order by=Devices.Manufacturer, Devices.Name
|order by=Devices.Manufacturer, Devices.Name
|format=table
|format=table
|limit=9999
|limit=9999
|where=Booting AND Devices.chipset='Qualcomm MSM8998 Snapdragon 835'
|where=Devices.chipset='Qualcomm Snapdragon 835 (MSM8998)'
|more results text=
|more results text=
}}
}}
== Booting ==
Assuming you derived your board DTS from the MSM8998 MTP ones, you'll likely notice a built kernel doesn't actually boot without any changes. This has been [https://patchwork.kernel.org/project/linux-arm-msm/patch/20191003064449.2201-1-saiprakash.ranjan@codeaurora.org/ tracked down to CoreSight tracing activating], which seems to cause kernel panics on retail hardware. As per the linked patch, simply delete the added <code>etf</code>, <code>etm*</code>, <code>etr</code>, <code>funnel*</code>, <code>replicator1</code> & <code>stm</code> nodes from your DTS.
Additionally enabling some options such as <code>CONFIG_MSM_GPUCC_8998</code> may still cause the kernel to panic anyway. To avoid disabling "unused clocks" during <code>late_initcall()</code>, append <code>clk_ignore_unused</code> to your cmdline which can be done via [https://github.com/ggrandou/abootimg modifying the bootimg], [https://www.kernel.org/doc/Documentation/devicetree/usage-model.txt bootargs on DTS] or [https://cateee.net/lkddb/web-lkddb/CMDLINE.html setting CONFIG_CMDLINE in defconfig].
== Display ==
Support for displays is currently marked as partial since mainline MSM8998 is completely missing device tree bindings for the [https://lore.kernel.org/patchwork/patch/1151028/ MMCC], MDSS, MDP5 & DSI (as of 2020-11-16). However, unofficial patches for these [https://github.com/JamiKettunen/linux-mainline-oneplus5/commits/5ec1add02a6b1b617b90fc556b76a07db9cca3c4 are floating around] and they seem to be fully working (as tested on the OnePlus 5 with a Samsung S6E3FA5 DSI cmd mode panel on Linux 5.10)!
For starters your best bet would be to setup <code>simplefb</code> though which utilizes the device framebuffer left active by the UEFI bootloader (Qualcomm XBL).
{{note|<b>NOTE:</b> Devices using DSC (Display Stream Compression) like the Pixel 2 XL will mostly likely not support simplefb!}}
1. Enable <code>CONFIG_FB_SIMPLE</code> in your defconfig
2. Apply a patch like this one to <b>your</b> board DTS while (as needed) replacing <code>1080</code> with the screen width and <code>1920</code> with the screen height (in pixels):
<div class="toccolours mw-collapsible mw-collapsed" style="width: 900px; overflow: auto;">
<code>$ cat msm8998-simplefb.patch</code>
<div class="mw-collapsible-content">
--- a/arch/arm64/boot/dts/qcom/msm8998-oneplus-cheeseburger.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-oneplus-cheeseburger.dtsi
@@ -10,10 +10,36 @@
  aliases {
  serial0 = &blsp2_uart1;
  serial1 = &blsp1_uart3;
+ display0 = &framebuffer0;
  };
 
  chosen {
- stdout-path = "serial0:115200n8";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* HACK: Use "display0" for simplefb; for UART console use "serial0:115200n8" instead */
+ stdout-path = "display0";
+
+ /*
+ * Address and size extracted on-device using the following:
+ * # strings /dev/block/bootdevice/by-name/xbl | grep 'Display Reserved'
+ */
+ framebuffer0: framebuffer@9d400000 {
+ compatible = "simple-framebuffer";
+ reg = <0 0x9d400000 0 0x2400000>;
+ width = <1080>;
+ height = <1920>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+ };
+
+ reserved-memory {
+ cont_splash_mem: memory@9d400000 {
+ reg = <0 0x9d400000 0 0x2400000>;
+ no-map;
+ };
  };
 
  vph_pwr: vph-pwr-regulator {
</div>
</div>
== USB ==
Attention, currently USB is not working with actual Mainline Kernel. it under investigation (Masterplexus, any help welcome).
Enabling USB on MSM8998 boards will differ between devices which use a USB 3.0 and USB 2.0 port.
Needed modules on defconfig side should include the following (and even <code>QUSB2</code> can be dropped later if it turns out your device doesn't use this):
CONFIG_USB_CONFIGFS=y
CONFIG_PHY_QCOM_QMP=y
CONFIG_PHY_QCOM_QUSB2=y
In general (and for USB 3.0 devices) the following in your DTS should be enough and you'll hopefully see the device detected on your host (assuming the kernel is configured with the needed modules):
&usb3_dwc3 {
dr_mode = "peripheral"; /* Force to peripheral until we have Type-C hooked up */
};
For USB 2.0 devices utilizing the QUSB PHY however that alone isn't enough and you should <b>remove</b> the <code>usb3phy</code> node entirely from your DTS & add the following configuration:
<div class="toccolours mw-collapsible mw-collapsed" style="width: 500px; overflow: auto;">
MSM8998 USB 2.0 configuration (DTS)
<div class="mw-collapsible-content">
&usb3 {
/* Disable USB3 pipe_clk requirement */
qcom,select-utmi-as-pipe-clk;
};
&usb3_dwc3 {
/* Drop the unused USB 3 SuperSpeed PHY */
phys = <&qusb2phy>;
phy-names = "usb2-phy";
/* We can only operate at USB 2.0 speeds */
maximum-speed = "high-speed";
};
</div>
</div>
In case you've adjusted the <code>l24</code> regulator minimum value below <code>3088000</code> μV to match downstream and USB doesn't work with no (obvious) issues on device <code>dmesg</code>, try setting it back to to this higher 3.08V value to see if it helps; [https://github.com/JamiKettunen/linux-mainline-oneplus5/commit/489b48b2aba961737a3c435c3333780c2f54050a this was the case on the OnePlus 5] for example.


== UFS internal storage ==
== UFS internal storage ==
{{warning|IF YOUR DEVICE IS A SONY XPERIA DO NOT NEVER EVER EVER TRY TO ENABLE UFS ON NON-VENDOR/NON-SODP KERNELS! IT WILL ERASE THE CHIP CLEAN (INCLUDING THE BOOTLOADER!) CONSIDER YOURSELF WARNED}}
{{warning|IF YOUR DEVICE IS A SONY XPERIA DO NOT NEVER EVER EVER TRY TO ENABLE UFS ON NON-VENDOR/NON-SODP KERNELS! IT WILL ERASE THE CHIP CLEAN (INCLUDING THE BOOTLOADER!) CONSIDER YOURSELF WARNED}}


Line 47: Line 152:


You can optionally set <code>CONFIG_SCSI_SCAN_ASYNC=y</code> for some additional speedup while booting. Consider also enabling <code>CONFIG_QFMT_V2</code> if you intend on writing data to a <code>userdata</code> partition formatted by Android where disk quotas are normally enabled by default for <code>ext4</code> volumes.
You can optionally set <code>CONFIG_SCSI_SCAN_ASYNC=y</code> for some additional speedup while booting. Consider also enabling <code>CONFIG_QFMT_V2</code> if you intend on writing data to a <code>userdata</code> partition formatted by Android where disk quotas are normally enabled by default for <code>ext4</code> volumes.
== WLAN ==
For WLAN to work you need:
1. On the kernel side:
* The MSS (modem) remoteproc needs to be running with firmware extracted from the device partitions
* DTS needs to point to the firmware filenames under <code>/lib/firmware/</code>
* Currently if you get FW details printed in dmesg from ath10k with nothing else seemingly happening, you'll most likely have to [https://github.com/JamiKettunen/linux-mainline-oneplus5/commit/088eaa9153803e2b028e092f88539036442da4a3 fake an MSA ready indication] (Not needed since Linux 6.11, see [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=737abcabe97bb37e38be2504acd28ad779dbaf3d 737abcabe97bb37e38be2504acd28ad779dbaf3d arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi] )
2. On the userspace side:
* Follow steps from [https://github.com/jhugo/linux/blob/5.5rc2_wifi/README jhugo's 5.5 MSM8998 Wi-Fi README] (it's not perfect but should work)
* Place all needed device firmware files to <code>/lib/firmware/</code>
* Make sure your OEM <code>wlanmdsp.mbn</code> is in the same directory with <code>modem.mdt</code> (or <code>modem.mbn</code>)!
* Install the following pmOS packages: <code>pd-mapper</code>, <code>tqftpserv</code>, <code>qrtr</code> & <code>rmtfs</code>
* Enable the services (<code>rc-update add SERVICE_NAME boot</code>) for all of the above except <code>qrtr</code> (it's started automatically if needed)
* Run <code>diag-router</code> from https://github.com/andersson/diag in case MSS remoteproc keeps crashing and networks can be seen in e.g. <code>nmtui</code> soon after booting (Please note that if you want the WiFi to function properly, be sure to start diag-router before the aforementioned services.)
{{Stub|note=The WLAN notes are just a rough sketch}}
=== iwd ===
By default iwd (on the OnePlus 5 at least) has an issue where it will refuse to connect, apparently related to <code>EAPoL</code>.
This can be worked around by adding the following to <code>/etc/iwd/main.conf</code> (create the file if it doesn't exist).
<syntaxhighlight lang="ini">
[General]
ControlPortOverNL80211=false
</syntaxhighlight>
"<i>the EAPoL handshake is performed but we keep receiving packet 3/4 again and again on a 1 second interval. The replay key counter is never being increased so iwd just droped the packet and after a while the AP gives up</i>"
The suggestion is either a wifi firmware bug, the driver not supporting nl80211 properly or an issue with the access point.


== Bluetooth ==
== Bluetooth ==
Line 62: Line 198:


Those can be supplied directly from <code>[https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca linux-firmware]</code> and they should work fine, but if not you'll need to grab the files from your device's firmware partitions.
Those can be supplied directly from <code>[https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca linux-firmware]</code> and they should work fine, but if not you'll need to grab the files from your device's firmware partitions.
==Audio==
OnePlus 5&5T has tfa9894 codec, so additional modules are needed.
Add tfa98xx source code
(Modyfied from https://github.com/J0SH1X/tfa98xx) 11
Download:
https://stor.classfun.cn:4443/s/xPCE 5
Extract it and then copy the inc and src folder to linux/sound/soc/codecs
Modify Makefile and Kconfig:
<code>cd ~/workspace/linux/sound/soc/codecs</code>
Modify Makefile:<code>nano Makefile</code>:
snd-soc-tfa989x-objs := tfa989x.o
+snd-soc-tfa98xx-objs += src/tfa98xx.o
+snd-soc-tfa98xx-objs += src/tfa_container.o
+snd-soc-tfa98xx-objs += src/tfa_dsp.o
+snd-soc-tfa98xx-objs += src/tfa_init.o
snd-soc-tlv320adc3xxx-objs := tlv320adc3xxx.o
obj-$(CONFIG_SND_SOC_TFA9879)  += snd-soc-tfa9879.o
+obj-$(CONFIG_SND_SOC_TFA98XX) += snd-soc-tfa98xx.o
obj-$(CONFIG_SND_SOC_TFA989X)  += snd-soc-tfa989x.o
Modify Kconfig:<code>nano Kconfig</code>
imply SND_SOC_TFA989X
+imply SND_SOC_TFA98xx
imply SND_SOC_TLV320ADC3XXX
add it in Kconfig:
+config SND_SOC_TFA98XX
+        tristate "NXP/Goodix TFA98XX (TFA1) amplifiers"
+        depends on I2C
+        select REGMAP_I2C
+        help
+          Enable support for NXP (now Goodix) TFA98XX (TFA1 family) speaker
+          amplifiers, e.g. TFA98XX.
+          Note that the driver currently bypasses the built-in "CoolFlux DSP"
+          and does not support (hardware) volume control.
+
== GPS ==
GPS should "just work" when the modem is up. You should check whether the Position Determination Service (PDS) is running using <code>qrtr-lookup</code>:
  $ qrtr-lookup | grep PDS
        16      2        0    0    83 Location service (~ PDS v2)
After this you can essentially install [https://gitlab.com/gpsd/gpsd/-/merge_requests/139 GPSD with the Qualcomm PDS patch], configure it to use <code>pds://any</code> as the device during runtime and you should be good to go.


== Real-time clock (RTC) ==
== Real-time clock (RTC) ==
Line 69: Line 251:


After running that and fully powering down the device it should power on by itself soon afterwards (2 minutes later to be exact).
After running that and fully powering down the device it should power on by itself soon afterwards (2 minutes later to be exact).
== Haptics ==
Haptics are supported, see [[Haptics]] for more details.


== See also ==
== See also ==
Line 78: Line 264:
* [[User:Deathmist]] (@deathmist on Matrix)
* [[User:Deathmist]] (@deathmist on Matrix)
* [[User:R0551]] (@r0551 on Matrix)
* [[User:R0551]] (@r0551 on Matrix)
* [[User:Degdag]] (@degdag on Matrix)
* [[User:Degdag]] (@degdag on Matrix) [working on Xiaomi Mi 6]
* [[User:kcxt|Casey]] (@caleb on Matrix) [working on Pixel 2 XL]
* [[User:learnchungchen]]
* [https://github.com/SoMainline/ SoMainline] [working on F(x)tec Pro1 & SoMC Yoshino]
* [[User:MasterPlexus]] (@masterplexus on Matrix)
(feel free to add yourself here if you're working on MSM8998 mainlining!)
(feel free to add yourself here if you're working on MSM8998 mainlining!)

Latest revision as of 16:20, 15 June 2025

Qualcomm MSM8998
MSM8998 in ceramic package
MSM8998 in ceramic package
Manufacturer Qualcomm
Name MSM8998
Codenames msmcobalt/apqcobalt
Architecture aarch64
CPU 4x 2.45 GHz Kryo 280 Gold
4x 1.9 GHz Kryo 280 Silver
GPU Adreno 540
Year 2017
Process 10nm
Mainline yes
https://gitlab.com/msm8998-mainline
Components
Partial
UART
Works
Works
USB
Broken
Display
Partial
GPU
Broken
Pinctrl
Works
I²C
Works
Audio
Works
Untested
Thermal
Works
WiFi
Works
Bluetooth
Works
Partial
GPS
Works
Camera
Untested
Suspend
Untested

MSM8998 (or Snapdragon 835) is a high-end Qualcomm SoC released in 2017 with mainline support originally added for the MTP (proven reference design) board towards the end of 2018.

Devices

Device Codename Category
Essential Phone (PH1) essential-mata downstream
F(x)tec Pro1(X) fxtec-qx1000
Google Pixel 2 / XL google-taimen
HTC U11 htc-ocn
Motorola Moto Z2 Force motorola-nash downstream
Nubia Z17 nx563j
OnePlus 5 oneplus-cheeseburger testing
OnePlus 5T oneplus-dumpling testing
Samsung Galaxy Note 8 (Qualcomm) samsung-greatqlte
Samsung Galaxy Tab S4 (Wi-Fi) samsung-gts4lwifi
Sony Xperia XZ Premium sony-maple
Sony Xperia XZ1 sony-poplar
Sony Xperia XZ1 Compact sony-lilac
Xiaomi Mi 6 xiaomi-sagit testing

Booting

Assuming you derived your board DTS from the MSM8998 MTP ones, you'll likely notice a built kernel doesn't actually boot without any changes. This has been tracked down to CoreSight tracing activating, which seems to cause kernel panics on retail hardware. As per the linked patch, simply delete the added etf, etm*, etr, funnel*, replicator1 & stm nodes from your DTS.

Additionally enabling some options such as CONFIG_MSM_GPUCC_8998 may still cause the kernel to panic anyway. To avoid disabling "unused clocks" during late_initcall(), append clk_ignore_unused to your cmdline which can be done via modifying the bootimg, bootargs on DTS or setting CONFIG_CMDLINE in defconfig.

Display

Support for displays is currently marked as partial since mainline MSM8998 is completely missing device tree bindings for the MMCC, MDSS, MDP5 & DSI (as of 2020-11-16). However, unofficial patches for these are floating around and they seem to be fully working (as tested on the OnePlus 5 with a Samsung S6E3FA5 DSI cmd mode panel on Linux 5.10)!

For starters your best bet would be to setup simplefb though which utilizes the device framebuffer left active by the UEFI bootloader (Qualcomm XBL).

Note NOTE: Devices using DSC (Display Stream Compression) like the Pixel 2 XL will mostly likely not support simplefb!

1. Enable CONFIG_FB_SIMPLE in your defconfig

2. Apply a patch like this one to your board DTS while (as needed) replacing 1080 with the screen width and 1920 with the screen height (in pixels):

$ cat msm8998-simplefb.patch

USB

Attention, currently USB is not working with actual Mainline Kernel. it under investigation (Masterplexus, any help welcome).

Enabling USB on MSM8998 boards will differ between devices which use a USB 3.0 and USB 2.0 port.

Needed modules on defconfig side should include the following (and even QUSB2 can be dropped later if it turns out your device doesn't use this):

CONFIG_USB_CONFIGFS=y
CONFIG_PHY_QCOM_QMP=y
CONFIG_PHY_QCOM_QUSB2=y

In general (and for USB 3.0 devices) the following in your DTS should be enough and you'll hopefully see the device detected on your host (assuming the kernel is configured with the needed modules):

&usb3_dwc3 {
	dr_mode = "peripheral"; /* Force to peripheral until we have Type-C hooked up */
};

For USB 2.0 devices utilizing the QUSB PHY however that alone isn't enough and you should remove the usb3phy node entirely from your DTS & add the following configuration:

MSM8998 USB 2.0 configuration (DTS)

In case you've adjusted the l24 regulator minimum value below 3088000 μV to match downstream and USB doesn't work with no (obvious) issues on device dmesg, try setting it back to to this higher 3.08V value to see if it helps; this was the case on the OnePlus 5 for example.

UFS internal storage

Warning WARNING: IF YOUR DEVICE IS A SONY XPERIA DO NOT NEVER EVER EVER TRY TO ENABLE UFS ON NON-VENDOR/NON-SODP KERNELS! IT WILL ERASE THE CHIP CLEAN (INCLUDING THE BOOTLOADER!) CONSIDER YOURSELF WARNED

To enable the device's internal UFS 2.1 host controller (and 14nm UFS QMP PHY), compile the kernel with the following modules enabled:

CONFIG_SCSI_UFS_QCOM=y
CONFIG_PHY_QCOM_QMP=y

You can optionally set CONFIG_SCSI_SCAN_ASYNC=y for some additional speedup while booting. Consider also enabling CONFIG_QFMT_V2 if you intend on writing data to a userdata partition formatted by Android where disk quotas are normally enabled by default for ext4 volumes.

WLAN

For WLAN to work you need:

1. On the kernel side:

2. On the userspace side:

  • Follow steps from jhugo's 5.5 MSM8998 Wi-Fi README (it's not perfect but should work)
  • Place all needed device firmware files to /lib/firmware/
  • Make sure your OEM wlanmdsp.mbn is in the same directory with modem.mdt (or modem.mbn)!
  • Install the following pmOS packages: pd-mapper, tqftpserv, qrtr & rmtfs
  • Enable the services (rc-update add SERVICE_NAME boot) for all of the above except qrtr (it's started automatically if needed)
  • Run diag-router from https://github.com/andersson/diag in case MSS remoteproc keeps crashing and networks can be seen in e.g. nmtui soon after booting (Please note that if you want the WiFi to function properly, be sure to start diag-router before the aforementioned services.)
Icon This page could use some expansion. If you'd like to help out, feel free to edit this article!
In particular: The WLAN notes are just a rough sketch

iwd

By default iwd (on the OnePlus 5 at least) has an issue where it will refuse to connect, apparently related to EAPoL. This can be worked around by adding the following to /etc/iwd/main.conf (create the file if it doesn't exist).

[General]
ControlPortOverNL80211=false

"the EAPoL handshake is performed but we keep receiving packet 3/4 again and again on a 1 second interval. The replay key counter is never being increased so iwd just droped the packet and after a while the AP gives up"

The suggestion is either a wifi firmware bug, the driver not supporting nl80211 properly or an issue with the access point.

Bluetooth

Getting Bluetooth to work should be trivial assuming you compile the kernel with the following modules enabled:

CONFIG_RFKILL=m
CONFIG_BT_RFCOMM=y
CONFIG_BT_BNEP=y
CONFIG_BT_HIDP=y
CONFIG_BT_HS=y
CONFIG_BT_LE=y

After those are set and you've copied the needed kernel modules over to the rootfs in /lib/modules/ you just need the following firmware files in /lib/firmware/qca/:

crbtfw21.tlv
crnv21.bin

Those can be supplied directly from linux-firmware and they should work fine, but if not you'll need to grab the files from your device's firmware partitions.

Audio

OnePlus 5&5T has tfa9894 codec, so additional modules are needed. Add tfa98xx source code (Modyfied from https://github.com/J0SH1X/tfa98xx) 11 Download: https://stor.classfun.cn:4443/s/xPCE 5 Extract it and then copy the inc and src folder to linux/sound/soc/codecs


Modify Makefile and Kconfig: cd ~/workspace/linux/sound/soc/codecs Modify Makefile:nano Makefile:

snd-soc-tfa989x-objs := tfa989x.o
+snd-soc-tfa98xx-objs += src/tfa98xx.o
+snd-soc-tfa98xx-objs += src/tfa_container.o
+snd-soc-tfa98xx-objs += src/tfa_dsp.o
+snd-soc-tfa98xx-objs += src/tfa_init.o
snd-soc-tlv320adc3xxx-objs := tlv320adc3xxx.o
obj-$(CONFIG_SND_SOC_TFA9879)  += snd-soc-tfa9879.o
+obj-$(CONFIG_SND_SOC_TFA98XX) += snd-soc-tfa98xx.o
obj-$(CONFIG_SND_SOC_TFA989X)  += snd-soc-tfa989x.o

Modify Kconfig:nano Kconfig

imply SND_SOC_TFA989X
+imply SND_SOC_TFA98xx
imply SND_SOC_TLV320ADC3XXX

add it in Kconfig:

+config SND_SOC_TFA98XX
+        tristate "NXP/Goodix TFA98XX (TFA1) amplifiers"
+        depends on I2C
+        select REGMAP_I2C
+        help
+          Enable support for NXP (now Goodix) TFA98XX (TFA1 family) speaker
+          amplifiers, e.g. TFA98XX.
+          Note that the driver currently bypasses the built-in "CoolFlux DSP"
+          and does not support (hardware) volume control.
+

GPS

GPS should "just work" when the modem is up. You should check whether the Position Determination Service (PDS) is running using qrtr-lookup:

 $ qrtr-lookup | grep PDS
        16       2        0    0    83 Location service (~ PDS v2)

After this you can essentially install GPSD with the Qualcomm PDS patch, configure it to use pds://any as the device during runtime and you should be good to go.

Real-time clock (RTC)

The RTC module found on the PM8998 PMIC block works with CONFIG_RTC_DRV_PM8XXX enabled. It can be easily tested from userspace like so:

# cd /sys/class/rtc/rtc0/
# echo $((`cat since_epoch`+120)) > wakealarm

After running that and fully powering down the device it should power on by itself soon afterwards (2 minutes later to be exact).

Haptics

Haptics are supported, see Haptics for more details.

See also

linux-mainline-oneplus5 A mainline kernel fork with some patches for MSM8998 and OnePlus 5/5T support (check the 5.7 branch commits for a "step-by-step guide")

OnePlus_5_(oneplus-cheeseburger)#Mainline_kernel

Who's working on it

(feel free to add yourself here if you're working on MSM8998 mainlining!)