Qualcomm Snapdragon 670 (SDM670)

From postmarketOS
Qualcomm SDM670
Manufacturer Qualcomm
Name SDM670
Codenames sdmbat
Architecture aarch64
CPU 2x 2.0 GHz Kryo 360 Gold, 6x 1.7 GHz Kryo 360 Silver
GPU Adreno 615
Year 2018
Process 10nm
Mainline yes
Community Page https://gitlab.com/sdm670-mainline
Components
CPU
Partial
UART
Broken
Storage
Partial
USB
Partial
Display
Works
GPU
Works
Pinctrl
Partial
I²C
Works
SPI
Broken
Audio
Partial
Video
Partial
Thermal
WiFi
Works
Bluetooth
Works
Modem
Works
GPS
Camera
Broken
NPU
Suspend
Ethernet


The Snapdragon 670 is a mid-range SoC used in a few devices.

Devices

Device Codename Mainline
Google Pixel 3a google-sargo Y
Google Pixel 3a XL google-bonito P

Display

It is fairly easy to get a working display. See MSM8996_Mainlining#Simple_Framebuffer for details on how to do this. For full panel support (needed for backlight and 3D acceleration), there is a panel driver generator.

Regulators

The PM660 and PM660L power management ICs host most of the regulators. If you're copying regulators from other SoCs, keep in mind that SDM670 uses RPMh to communicate with the PMICs, while most other SoCs use the older RPM. The SDM670 regulators don't go in &rpm_requests, but &apps_rsc instead (and have qcom,pm660-rpmh-regulators and qcom,pm660l-rpmh-regulators compatible strings).

Disabling core components

Your device might not boot with the first dts you send it if you keep the core components enabled:

  • &tlmm - the pinctrl and gpio subsystems normally access all pins to read their state
  • &gcc - with clk_ignore_unused as a kernel command line option, this might turn on reserved clocks

Bluetooth

Bluetooth is available on uart6. Modem and WiFi are not required.

Feature table

Audio

The internal sound card and generic WCD codecs are supported. Some device-specific codecs may not be set up by the sound card driver.

ADSP crashes after suspended to RAM, maybe because there is no interaction with the sleepstate SMP2P node.

Call audio

The q6voice drivers and q6voiced daemon set up call audio to go directly from the modem to ADSP. The Snapdragon 670 uses CVD revision 2.3, which requires a different initialization sequence.

Call audio may be loud depending on how the UCM configuration is set up for your device. Volume cannot be controlled in software, so it must be controlled in hardware. The headphone jack has 2 hardware volume controls, one for each channel, and can be controlled like so:

$ amixer -c 0 cset name='Digital RX1 Digital Volume' 23%
$ amixer -c 0 cset name='Digital RX2 Digital Volume' 23%
# alsactl store # Make this configuration persist across reboots

Pinctrl

There is a pin control driver but it has no wakeirqs. There is also an LPI TLMM for audio with no mainline driver.

Storage

eMMC is added but not UFS.

Thermals

Thermal zones are partially provided by the PMIC device tree, but are not actively tested.

USB

There is currently only USB 2.0.

Video

Video decoding works, but not encoding. There is still bad userspace support for video (ffmpeg isn't even packaged in Alpine with v4l2 video acceleration).

The video decoder is underclocked at 1920x1080 30fps, but not 24fps.

Who's working on it