Skip to content

Add mainline device packages for A3/A5/crackling

Minecrell requested to merge Minecrell/pmaports:msm8916-mainline into master

This PR adds mainline device packages for:

A project I've been working on together with @Mis012 and @TravMurav for nearly an half year now.

MSM8916 is a great SoC for mainlining - it was added to the mainline kernel for Dragonboard 410c and is quite well supported overall.

Status Overview

  • Booting:
  • USB Gadget Mode:
  • Display:
    • Brightness: crackling: , A3/A5: (TBD)
  • GPU: (Freedreno)
  • Touchscreen:
  • WiFi:
  • Bluetooth:
  • NFC: with neard (A3/A5 only; crackling does not have NFC)
  • Audio: (Headphones, Earpiece, Microphones)
    • Speaker: crackling , A3/A5: (TBD) - they use an extra speaker amplifier that is not supported by mainline
      • We managed to get it working with an external kernel module (not included in this MR)
  • Sensors:
    • Accelerometer:
    • Magnetometer:
    • Gyroscope: (crackling only; A3/A5 do not have a gyroscope)
    • Proximity/Light Sensor: (TBD)
    • Hall Sensor: (A3/A5 only; crackling does not have a Hall Sensor)
  • Hardware-accelerated video codecs: (Venus)
  • Battery: A3/A5: , crackling: not very accurate, dumb driver that estimates remaining capacity
  • Charging: (TBD)
    • A3/A5: seem to charge without software interaction
    • crackling: does not charge, but can be charged from (downstream) recovery
  • Modem: (TBD)
    • GPS: (TBD)
  • Camera: (TBD)

Initial support for the 3 devices was applied upstream and will be in Linux 5.4.

Implementation

I'm submitting all 3 devices together because they all have, more or less, the same device/firmware APKBUILD. Except for minor differences like the screen size or the firmware binaries, they could theoretically use the same device package.

device/soc-qcom-msm8916 is a shared package that has common parts from the device packages. At the moment this is the list of required dependencies and audio configuration. (More may be needed in the future...)

main/linux-postmarketos-qcom-msm8916 is the close-to-mainline kernel fork maintained at https://github.com/msm8916-mainline/linux. It is separated from linux-postmarketos-qcom (MSM8974) because the patches needed for the two SoCs are very different. None of the patches in linux-postmarketos-qcom are needed for MSM8916, and the same applies the other way around.

Using the same kernel makes sense when the same patches are used, but otherwise it will just cause a lot of additional effort for coordination. Changes always need to be tested on devices from the other SoCs to make sure there are no regressions.

(linux-postmarketos-qcom is really more a linux-postmarketos-qcom-msm8974 at this point...)

Please do not squash the commits in this PR. It contains separated commits for each device to maintain the authorship for each device.

Edited by Minecrell

Merge request reports