Qualcomm Snapdragon 660 (SDM660)

From postmarketOS
Jump to navigation Jump to search
Qualcomm SDM630
Manufacturer Qualcomm
Name SDM630
Architecture aarch64
CPU 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster
GPU Adreno 508
Year 2017
Process 14nm
Mainline yes
Components
CPU
Partial
UART
Works
Storage
Works
USB
Partial
Display
Partial
GPU
Pinctrl
Works
I²C
Works
Audio
Video
Thermal
Partial
WiFi
Bluetooth
Modem
Partial
GPS
Camera
Suspend


Qualcomm SDM636
Manufacturer Qualcomm
Name SDM636
Architecture aarch64
CPU 4x Kryo 260 Gold PERF cluster + 4x Kryo 260 Silver PWR cluster
GPU Adreno 509
Year 2017
Process 14nm
Mainline yes
Components
CPU
Partial
UART
Works
Storage
Works
USB
Partial
Display
GPU
Pinctrl
Works
I²C
Works
Audio
Video
Thermal
WiFi
Bluetooth
Modem
GPS
Camera
Suspend


Qualcomm SDM660
Manufacturer Qualcomm
Name SDM660
Architecture aarch64
CPU 4x 2.2 GHz Kryo 260 Gold, 4x 1.84 GHz Kryo 260 Silver
GPU Adreno 512
Year 2017
Process 14nm
Mainline yes
Components
CPU
Partial
UART
Works
Storage
Partial
USB
Partial
Display
GPU
Pinctrl
Works
I²C
Audio
Video
Thermal
WiFi
Bluetooth
Modem
GPS
Camera
Suspend


General description

SDM660/636/630 are Qualcomm SoCs released in 2017, with mostly out-of-tree mainline support.

According to Wikipedia, they all are pretty similar. Their advantage is price; these SoCs are usually used in middle-range devices.

Closest similar SoC is MSM8998 Snapdragon 835 (which has decent mainline support), and it seems that several drivers from MSM8998 can be reused for SDM660.

Devices

SDM660 (Snapdragon 660)

Device Codename Mainline
Asus Zenfone 4 asus-z01k
Xiaomi Mi A2 xiaomi-jasmine_sprout N
Xiaomi Mi Note 3 xiaomi-jason
Xiaomi Redmi Note 7 xiaomi-lavender P

SDM636 (Snapdragon 636)

Device Codename Mainline
Asus Zenfone Max Pro M1 asus-x00td N
Sony Xperia 10 Plus sony-mermaid Y
Xiaomi Redmi Note 5 Pro xiaomi-whyred

SDM630 (Snapdragon 630)

Device Codename Mainline
Motorola Moto X4 motorola-payton
Sony Xperia 10 sony-kirin Y
Sony Xperia XA2 sony-pioneer Y
Sony Xperia XA2 Plus sony-voyager Y
Sony Xperia XA2 Ultra sony-discovery Y

Battery/Charging

Most devices seem to use the PMIC-provided QPNP-charger which currently does not have a mainline driver.

CPU

All cores are up, PSCI is working. Marked as partial because there is no support for CPU frequency scaling. It is advised to use only 4 CPUs for now due to the lack of cluster interconnect scaling, which results in 8 cores being slower than 4.

Display

At least four 630 boards can successfully use display (both command- and video-mode) via DRM/MSM (and of course CPU rendering) with some (for now) out-of-tree patches. Most devices make use of PMIC-provided WLED backlight, which does have a mainline driver, but there happens to be an issue with it not working.

GPU

Adreno 508/509/512 are not supported in the mainline kernel yet.

There are patches sent to upstream for enabling support for those GPUs. See kholk commits to upstream for more info

Modem Subsystem

The remote processor responsible for modem subsystem shows up and shows *some* signs of life, but neither the modem itself, nor the Wi-Fi chip currently work. The phone also gets very hot with it enabled, which might suggest it's not really fine right now. Of course it needs firmware.

Pinctrl

Was ported from downstream kernel to mainline by opendata in 2018.

SMMUs / IOMMUs

This platform is very picky about its SMMUs and therefore requires many downstream workarounds to be implemented. Upstream maintainers aren't exactly happy with that.

https://patchwork.kernel.org/project/linux-arm-msm/list/?series=355881

Storage

At least SDHCI (eMMC) was tested to work. UFS is untested (if anybody knows about a sdm630/36/60-based device using UFS, leave a note here!).

USB

There is WIP support for USB 2.0 only (no USB 3) by Konrad Dybcio in https://github.com/konradybcio/linux/commits/ninges_labs

Do note that most devices only have USB 2.0 wired up in hardware.

WiFi

Wireless network should be available via the ath10k_snoc driver, provided the modem subsystem is alive. It also needs firmware (which is possibly signed per-device or per-vendor - though it's unconfirmed!).

Work done so far

Who is working on it

Upstream commits related to sdm630/636/660

Hopefully this can serve as history log, a step-by-step example of what needs to be done to bring new SoC support to mainline kernel from zero.

commits merged in 4.20:

commits merged in 5.1:

commits merged in 5.6:

commits merged in 5.8:

commits merged in 5.9:

To be merged in linux-5.10 (currently in linux-next/master):


see also: