[SRU v2][B/snapdragon] Initial support for Qualcomm Snapdragon 820 chipset

Paolo Pisati paolo.pisati at canonical.com
Fri Jun 21 14:05:28 UTC 2019


BugLink: https://bugs.launchpad.net/bugs/1832012

Changes from V1:

-backported qcom-qmp and qcom-qusb2 phy drivers from 5.2
-msm regulator and pinctrl bugfixes from 5.2
-fixed a qcom pcie "unbalanced pm" warning

Impact:

Although the Bionic/snapdragon kernel contains the BSP from the Qualcomm landing
tree kernel[1], it didn't work on Snapdragon 820 based board (e.g.  Qualcomm
DB820C APQ8096).

Fix:

Import the necessary patches to make it boot on such a board (and clones), and
fix as many bugs as possible.

How to test:

1) put the board in fastboot mode[2]
2) generate a compatible boot.img:

$ cat linux/arch/arm64/boot/Image.gz linux/arch/arm64/boot/dts/qcom/apq8096-db820c.dtb > Image.gz+dtb
$ touch ramdisk
$ python android/system/core/mkbootimg/mkbootimg.py --kernel Image.gz+dtb
--ramdisk ramdisk --pagesize 4096 --base 0x80000000 --kernel_offset 0x8000
--ramdisk_offset 0x1000000 --tags_offset 0x100 --cmdline
'console=ttyMSM0,115200n8 root=/dev/sda1 net.ifnames=0 init=/lib/systemd/systemd
ro rootwait rng_core.default_quality=700 panic=-1 fixrtc earlyprintk
earlycon=msm_serial_dm,0x75b0000' --output bionic-snapdragon-db820c-boot.img

3) boot the board using the generated boot.img:

$ fastboot boot bionic-snapdragon-db820c-boot.img

Regression potential:

While i realize this pull request is pretty big (~90[3] patches), and with new
code there's always a degree of regression potential, all patches (but the first
one in the pull) came from Linus's upstream tree, and the only external one,
came direclty from the qcom-lt 4.14 tree.

Tested on db410c and db820c, proposing for Bionic/snapdragon.

1: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=release/qcomlt-4.14
2: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard820c/installation/board-recovery.md.html
3: while backporting fixes from 5.2 to Bionic, i decided to take a
"clean pick" approach, so if a commit was sitting on a top of other patches and
the backport wasn't trivial, i reversed all the local custom patches
that get in the way, and then applied the entire upstream stack

The following changes since commit ba256cf3be83139e52743efc717986daea388565:

  UBUNTU: Ubuntu-snapdragon-4.15.0-1056.60 (2019-06-14 19:09:39 +0200)

are available in the git repository at:

  git://git.launchpad.net/~p-pisati/ubuntu/+source/linux 19592fed849af258995e7d573c1bc0c1b26fe198

for you to fetch changes up to 19592fed849af258995e7d573c1bc0c1b26fe198:

  UBUNTU: fix missing modules (2019-06-20 12:12:23 +0000)

----------------------------------------------------------------
Axel Lin (1):
      regulator: qcom_spmi: Use regmap helpers for enable/disable/is_enabled callback

Bjorn Andersson (7):
      scsi: ufs: Extract devfreq registration
      scsi: ufs: Use freq table with devfreq
      PCI: qcom: Fix error handling in runtime PM support
      PCI: qcom: Don't deassert reset GPIO during probe
      phy: qcom-qmp: Correct READY_STATUS poll break condition
      regulator: qcom-smd: Batch up requests for disabled regulators
      pinctrl: msm: Use dynamic GPIO numbering

Can Guo (3):
      phy: Update PHY power control sequence
      phy: General struct and field cleanup
      phy: Add QMP phy based UFS phy support for sdm845

Christian Lamparter (1):
      pinctrl: msm: fix gpio-hog related boot issues

Douglas Anderson (3):
      phy: qcom-qmp: Quiet -EPROBE_DEFER from qcom_qmp_phy_probe()
      phy: qcom-qusb2: Quiet -EPROBE_DEFER from qusb2_phy_probe()
      pinctrl: msm: Fix msm_config_group_get() to be compliant

Evan Green (5):
      phy: qcom-qmp: Utilize fully-specified DT registers
      phy: qcom-qmp: Expose provided clocks to DT
      phy: qcom: Utilize UFS reset controller
      phy: ufs-qcom: Refactor all init steps into phy_poweron
      scsi: ufs: qcom: Expose the reset controller for PHY

Grygorii Strashko (1):
      phy: core: rework phy_set_mode to accept phy mode and submode

Gustavo A. R. Silva (1):
      phy: qcom-usb-hs: Mark expected switch fall-through

Jeffrey Hugo (2):
      phy: qcom-qmp: Add QMP V3 USB3 PHY support for msm8998
      phy: qcom-qusb2: Add QUSB2 PHY support for msm8998

Manu Gautam (21):
      phy: qcom-qmp: Power-on PHY before initialization
      phy: qcom-qusb2: Power-on PHY before initialization
      phy: qcom-qmp: Fix PHY block reset sequence
      phy: qcom-qmp: Move SERDES/PCS START after PHY reset
      phy: qcom-qusb2: Add support for different register layouts
      phy: qcom-qusb2: Add support for QUSB2 V2 version
      phy: qcom-qmp: Move register offsets to header file
      phy: qcom-qmp: Add register offsets for QMP V3 PHY
      phy: qcom-qmp: Add support for QMP V3 USB3 PHY
      phy: Add USB speed related PHY modes
      phy: qcom-qusb2: Add support for runtime PM
      phy: qcom-qmp: Add support for runtime PM
      phy: add SPDX identifier to QMP and QUSB2 PHY drivers
      phy: qcom-qmp: Enable pipe_clk before PHY initialization
      dt-bindings: phy-qcom-qusb2: Update binding for QUSB2 V2 version
      dt-bindings: phy-qcom-usb2: Add support to override tuning values
      phy: qcom-qmp: Add QMP V3 USB3 UNI PHY support for sdm845
      phy: qcom-qusb2: Add QUSB2 PHYs support for sdm845
      phy: qcom-qusb2: Use HSTX_TRIM fused value as is
      phy: qcom-qusb2: Fix HSTX_TRIM tuning with fused value for SDM845
      phy: core: Allow phy_pm_runtime_xxx API calls with NULL phy

Marc Gonzalez (3):
      phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro
      phy: qcom-qmp: Add QMP UFS PHY support for msm8998
      phy: qcom-qmp: Add msm8998 PCIe QMP PHY support

Markus Elfring (1):
      pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe()

Niklas Cassel (4):
      regulator: qcom_spmi: Fix warning Bad of_node_put()
      regulator: qcom_spmi: Use correct regmap when checking for error
      regulator: qcom_spmi: Do not initialise static to NULL
      regulator: qcom_spmi: Indent with tabs instead of spaces

Paolo Pisati (18):
      Revert "PCI: qcom: add runtime pm support to pcie_port"
      Revert "phy: qcom-qmp: Fix failure path in phy_init functions"
      Revert "phy: qcom-qmp: Fix phy pipe clock gating"
      Revert "phy: qcom-qmp: Fix failure path in phy_init functions"
      Revert "regulator: smd: Add floor and corner operations"
      Revert "pinctrl: msm: fix gpio-hog related boot issues"
      UBUNTU: [Config] disable QCOM_CPR
      UBUNTU: [Config] MSM_GCC_8996=y
      UBUNTU: [Config] MSM_MMCC_8996=y
      UBUNTU: [Config] PINCTRL_MSM8996=y
      UBUNTU: [Config] RPMSG_QCOM_GLINK_RPM=y
      UBUNTU: [Config] EXTCON_USB_GPIO=y
      UBUNTU: [Config] CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
      UBUNTU: [Config] ATL1C=y
      UBUNTU: [Config] disable SCSI_UFSHCD
      UBUNTU: [Config] PHY_QCOM_UFS_14NM=m
      UBUNTU: [Config] disable PHY_QCOM_UFS
      UBUNTU: fix missing modules

Rajendra Nayak (1):
      clk: qcom: Register the gdscs before the clocks

Rob Herring (1):
      phy: Convert to using %pOFn instead of device_node.name

Srinivas Kandagatla (1):
      PCI: qcom: add runtime pm support to pcie_port

Stephen Boyd (5):
      regulator: qcom_smd: Drop regulator/{machine,of_regulator} includes
      pinctrl: msm: Really mask level interrupts to prevent latching
      pinctrl: msm: Mux out gpio function with gpio_request()
      pinctrl: msm: Configure interrupts as input and gpio mode
      pinctrl: msm: Actually use function 0 for gpio selection

Subhash Jadavani (1):
      scsi: ufs: ufs-qcom: remove broken hci version quirk

Timur Tabi (1):
      pinctrl: qcom: remove static globals to allow multiple TLMMs

Tomas Winkler (1):
      scsi: ufs: ufshcd_dump_regs to use memcpy_fromio

Tony Lindgren (1):
      pinctrl: core: Return selector to the pinctrl driver

Venkat Gopalakrishnan (1):
      scsi: ufs: make UFS Tx lane1 clock optional for QCOM platforms

Vivek Gautam (7):
      scsi: ufshcd: Fix NULL pointer dereference for in ufshcd_init
      phy: qcom-qmp: Fix failure path in phy_init functions
      phy: qcom-qmp: Fix phy pipe clock gating
      phy: qcom-qmp: Adapt to clk_bulk_* APIs
      phy: qcom-ufs: Remove stale methods that handle ref clk
      scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host
      phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken

Yanjiang Jin (1):
      pinctrl: core: make sure strcmp() doesn't get a null parameter

YueHaibing (1):
      phy: qcom-ufs: Make ufs_qcom_phy_disable_iface_clk static

 .../devicetree/bindings/phy/qcom-qusb2-phy.txt     |   26 +-
 .../abi/4.15.0-1055.59/arm64/snapdragon.modules    |   18 -
 debian.snapdragon/config/config.common.ubuntu      |   29 +-
 drivers/clk/qcom/common.c                          |   32 +-
 drivers/pci/dwc/pcie-qcom.c                        |   68 +-
 drivers/phy/allwinner/phy-sun4i-usb.c              |    3 +-
 drivers/phy/amlogic/phy-meson-gxl-usb2.c           |    5 +-
 drivers/phy/broadcom/phy-bcm-cygnus-pcie.c         |    4 +-
 drivers/phy/broadcom/phy-brcm-sata.c               |    4 +-
 drivers/phy/marvell/phy-berlin-sata.c              |    6 +-
 drivers/phy/marvell/phy-mvebu-cp110-comphy.c       |    3 +-
 drivers/phy/mediatek/phy-mtk-tphy.c                |    2 +-
 drivers/phy/phy-core.c                             |   26 +-
 drivers/phy/qualcomm/Kconfig                       |   17 +
 drivers/phy/qualcomm/Makefile                      |    4 +-
 drivers/phy/qualcomm/phy-qcom-qmp.c                | 1318 ++++++++++++++++----
 drivers/phy/qualcomm/phy-qcom-qmp.h                |  316 +++++
 drivers/phy/qualcomm/phy-qcom-qusb2.c              |  583 +++++++--
 drivers/phy/qualcomm/phy-qcom-ufs-i.h              |   26 +-
 drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c       |   28 +-
 drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.c       |   28 +-
 drivers/phy/qualcomm/phy-qcom-ufs.c                |  109 +-
 drivers/phy/qualcomm/phy-qcom-usb-hs.c             |    4 +-
 drivers/phy/rockchip/phy-rockchip-emmc.c           |    4 +-
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c      |    8 +-
 drivers/phy/rockchip/phy-rockchip-typec.c          |    4 +-
 drivers/phy/rockchip/phy-rockchip-usb.c            |    4 +-
 drivers/phy/tegra/xusb.c                           |    4 +-
 drivers/phy/ti/phy-da8xx-usb.c                     |    3 +-
 drivers/phy/ti/phy-tusb1210.c                      |    2 +-
 drivers/pinctrl/core.c                             |   37 +-
 drivers/pinctrl/qcom/pinctrl-msm.c                 |  140 ++-
 drivers/regulator/qcom_smd-regulator.c             |  142 +--
 drivers/regulator/qcom_spmi-regulator.c            |  122 +-
 drivers/scsi/ufs/Kconfig                           |    1 +
 drivers/scsi/ufs/ufs-qcom.c                        |  213 ++--
 drivers/scsi/ufs/ufs-qcom.h                        |    9 +-
 drivers/scsi/ufs/ufshcd.c                          |  162 ++-
 drivers/scsi/ufs/ufshcd.h                          |    3 +
 include/dt-bindings/phy/phy-qcom-qusb2.h           |   37 +
 include/linux/phy/phy-qcom-ufs.h                   |   38 -
 include/linux/phy/phy.h                            |   31 +-
 include/linux/regulator/qcom_smd-regulator.h       |   30 -
 43 files changed, 2697 insertions(+), 956 deletions(-)
 create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp.h
 create mode 100644 include/dt-bindings/phy/phy-qcom-qusb2.h
 delete mode 100644 include/linux/phy/phy-qcom-ufs.h
 delete mode 100644 include/linux/regulator/qcom_smd-regulator.h
-- 
bye,
p.



More information about the kernel-team mailing list