Skip to content
Permalink
wip/sc8280xp-v…
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Apr 24, 2023

  1. johan_defconfig: add custom config

    Add a custom trimmed configuration that can be used to test SC8280XP
    support (e.g. ADP, CRD and X13s).
    
    Note that the default CMA size is increased to 128 MB due to NVMe
    (see CONFIG_CMA_SIZE_MBYTES).
    
    Make sure the initramfs includes any modules required to boot, for
    example:
    
    	phy_qcom_qmp_ufs ufs_qcom
    
    for the CRD and
    
    	nvme phy_qcom_qmp_pcie pcie_qcom
    
    for the X13s.
    
    For keyboard input and (more than 30 seconds of) display in initramfs,
    make sure to also include:
    
    	i2c_hid_of i2c_qcom_geni
    
    for keyboard, and
    
    	leds_qcom_lpg pwm_bl
    	qrtr pmic_glink_altmode gpio_sbu_mux phy_qcom_qmp_combo
    	panel-edp msm phy_qcom_edp
    
    for the display (preferably in the above order to avoid an msm drm
    probe-deferral issue).
    
    Not-signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  2. Bluetooth: fix use-bdaddr-property quirk

    Devices that lack persistent storage for the device address can indicate
    this by setting the HCI_QUIRK_INVALID_BDADDR which causes the controller
    to be marked as unconfigured until user space has set a valid address.
    
    The related HCI_QUIRK_USE_BDADDR_PROPERTY was later added to similarly
    indicate that the device lacks a valid address but that one may be
    specified in the devicetree.
    
    As is clear from commit 7a0e5b1 ("Bluetooth: Add quirk for reading
    BD_ADDR from fwnode property") that added and documented this quirk and
    commits like de79a9d ("Bluetooth: btqcomsmd: use
    HCI_QUIRK_USE_BDADDR_PROPERTY"), the device address of controllers with
    this flag should be treated as invalid until user space has had a chance
    to configure the controller in case the devicetree property is missing.
    
    As it does not make sense to allow controllers with invalid addresses,
    restore the original semantics, which also makes sure that the
    implementation is consistent (e.g. get_missing_options() indicates that
    the address must be set) and matches the documentation (including
    comments in the code, such as, "In case any of them is set, the
    controller has to start up as unconfigured.").
    
    Fixes: e668eb1 ("Bluetooth: hci_core: Don't stop BT if the BD address missing in dts")
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  3. Bluetooth: fix invalid-bdaddr quirk for non-persistent setup

    Devices that lack persistent storage for the device address can indicate
    this by setting the HCI_QUIRK_INVALID_BDADDR which causes the controller
    to be marked as unconfigured until user space has set a valid address.
    
    Once configured, the device address must be set on every setup for
    controllers with HCI_QUIRK_NON_PERSISTENT_SETUP to avoid marking the
    controller as unconfigured and requiring the address to be set again.
    
    Fixes: 740011c ("Bluetooth: Add new quirk for non-persistent setup settings")
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  4. Bluetooth: hci_qca: fix debugfs registration

    Since commit 3e4be65 ("Bluetooth: hci_qca: Add poweroff support
    during hci down for wcn3990"), the setup callback which registers the
    debugfs interface can be called multiple times.
    
    This specifically leads to the following error when powering on the
    controller:
    
    	debugfs: Directory 'ibs' with parent 'hci0' already present!
    
    Add a driver flag to avoid trying to register the debugfs interface more
    than once.
    
    Fixes: 3e4be65 ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990")
    Cc: stable@vger.kernel.org	# 4.20
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  5. Bluetooth: fix debugfs registration

    Since commit ec6cef9 ("Bluetooth: Fix SMP channel registration for
    unconfigured controllers") the debugfs interface for unconfigured
    controllers will be created when the controller is configured.
    
    There is however currently nothing preventing a controller from being
    configured multiple time (e.g. setting the device address using btmgmt)
    which results in failed attempts to register the already registered
    debugfs entries:
    
    	debugfs: File 'features' in directory 'hci0' already present!
    	debugfs: File 'manufacturer' in directory 'hci0' already present!
    	debugfs: File 'hci_version' in directory 'hci0' already present!
    	...
    	debugfs: File 'quirk_simultaneous_discovery' in directory 'hci0' already present!
    
    Add a controller flag to avoid trying to register the debugfs interface
    more than once.
    
    Fixes: ec6cef9 ("Bluetooth: Fix SMP channel registration for unconfigured controllers")
    Cc: stable@vger.kernel.org      # 4.0
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  6. hack: arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

    Describe the bus topology for PCIe domain 6 and add the ath11k
    calibration variant so that the board file (calibration data) can be
    loaded.
    
    FIXME: Using the calibration data for the X13s while waiting for proper
    calibration data for the CRD.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=216036
    Not-signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  7. arm64: dts: qcom: sc8280xp-x13s: enable UEFI Secure Application

    Enable the Qualcomm Secure Execution Environment SCM interface needed to
    communicate with the UEFI Secure Application which provides access to
    UEFI variables on the Lenovo X13s.
    
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  8. arm64: dts: qcom: sc8280xp-crd: enable UEFI Secure Application

    Enable the Qualcomm Secure Execution Environment SCM interface needed to
    communicate with the UEFI Secure Application which provides access to
    UEFI variables on the SC8280XP CRD.
    
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  9. firmware: Add support for Qualcomm UEFI Secure Application

    On platforms using the Qualcomm UEFI Secure Application (uefisecapp),
    EFI variables cannot be accessed via the standard interface in EFI
    runtime mode. The respective functions return EFI_UNSUPPORTED. On these
    platforms, we instead need to talk to uefisecapp. This commit provides
    support for this and registers the respective efivars operations to
    access EFI variables from the kernel.
    
    Communication with uefisecapp follows the Qualcomm QSEECOM / Secure OS
    conventions via the respective SCM call interface. This is also the
    reason why variable access works normally while boot services are
    active. During this time, said SCM interface is managed by the boot
    services. When calling ExitBootServices(), the ownership is transferred
    to the kernel. Therefore, UEFI must not use that interface itself (as
    multiple parties accessing this interface at the same time may lead to
    complications) and cannot access variables for us.
    
    Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20230305022119.1331495-5-luzmaximilian@gmail.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    qzed authored and jhovold committed Apr 24, 2023
  10. dt-bindings: firmware: Add Qualcomm QSEECOM interface

    Add bindings for the Qualcomm Secure Execution Environment interface
    (QSEECOM).
    
    Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20230305022119.1331495-4-luzmaximilian@gmail.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    qzed authored and jhovold committed Apr 24, 2023
  11. firmware: Add support for Qualcomm Secure Execution Environment SCM i…

    …nterface
    
    Add support for SCM calls to Secure OS and the Secure Execution
    Environment (SEE) residing in the TrustZone (TZ) via the QSEECOM
    interface. This allows communication with Secure/TZ applications, for
    example 'uefisecapp' managing access to UEFI variables.
    
    The interface is managed by a platform device to ensure correct lifetime
    and establish a device link to the Qualcomm SCM device.
    
    While this patch introduces only a very basic interface without the more
    advanced features (such as re-entrant and blocking SCM calls and
    listeners/callbacks), this is enough to talk to the aforementioned
    'uefisecapp'.
    
    Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20230305022119.1331495-3-luzmaximilian@gmail.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    qzed authored and jhovold committed Apr 24, 2023
  12. firmware: qcom_scm: Export SCM call functions

    Make qcom_scm_call, qcom_scm_call_atomic and associated types accessible
    to other modules.
    
    Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20230305022119.1331495-2-luzmaximilian@gmail.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    qzed authored and jhovold committed Apr 24, 2023
  13. phy: qcom-edp: drop regulator loads

    Drivers should not be specifying active-mode regulator loads unless
    supporting an idle mode where the load is reduced during runtime.
    
    This effectively reverts commit a4888b2 ("phy: qcom-edp: add
    regulator_set_load to edp phy")
    
    Link: https://lore.kernel.org/r/YuPps+cvVAMugWmy@sirena.org.uk
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  14. phy: qcom-qmp-combo: drop regulator loads

    Drivers should not be specifying active-mode regulator loads unless
    supporting an idle mode where the load is reduced during runtime.
    
    This effectively reverts commit 85936d4 ("phy: qcom-qmp: add
    regulator_set_load to dp phy").
    
    Link: https://lore.kernel.org/r/YuPps+cvVAMugWmy@sirena.org.uk
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  15. arm64: dts: qcom: sc8280xp: Enable GPU related nodes

    Add memory reservation for the zap-shader and enable the Adreno SMMU,
    GPU clock controller, GMU and the GPU nodes for the SC8280XP CRD and the
    Lenovo ThinkPad X13s.
    
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
    Link: https://lore.kernel.org/r/20230208034052.2047681-4-quic_bjorande@quicinc.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    andersson authored and jhovold committed Apr 24, 2023
  16. arm64: dts: qcom: sc8280xp: Add GPU related nodes

    Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the
    SC8280XP.
    
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
    Link: https://lore.kernel.org/r/20230208034052.2047681-3-quic_bjorande@quicinc.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    andersson authored and jhovold committed Apr 24, 2023
  17. drm/msm/adreno: Add Adreno A690 support

    Introduce support for the Adreno A690, found in Qualcomm SC8280XP.
    
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
    Link: https://lore.kernel.org/r/20230208034052.2047681-2-quic_bjorande@quicinc.com
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    andersson authored and jhovold committed Apr 24, 2023
  18. panel: edp: Add LP133WU1-SPB2

    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    andersson authored and jhovold committed Apr 24, 2023
  19. ASoC: codecs: wsa881x: mute/unmute PA in correct sequence

    In the current setup the PA is left unmuted even when the
    Soundwire ports are not started streaming. This can lead to click
    and pop sounds during start.
    There is a same issue in the reverse order where in the PA is
    left unmute even after the data stream is stopped, the time
    between data stream stopping and port closing is long enough
    to accumulate DC on the line resulting in Click/Pop noise
    during end of stream.
    
    Moving the mute/unmute to trigger stop/start respectively seems to
    help a lot with this Click/Pop issues reported on this Codec.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230323164403.6654-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  20. ASoC: codecs: wsa883x: mute/unmute PA in correct sequence

    In the current setup the PA is left unmuted even when the
    Soundwire ports are not started streaming. This can lead to click
    and pop sounds during start.
    There is a same issue in the reverse order where in the PA is
    left unmute even after the data stream is stopped, the time
    between data stream stopping and port closing is long enough
    to accumulate DC on the line resulting in Click/Pop noise
    during end of stream.
    
    Moving the mute/unmute to trigger stop/start respectively seems to
    help a lot with this Click/Pop issues reported on this Codec.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230323164403.6654-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  21. ASoC: qcom: common: add default jack dapm pins

    If the soundcard does not specify the dapm pins, let the common
    code add these pins for jack.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230302120327.10823-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  22. arm64: dts: qcom: sc8280xp: add reset to soundwire controllers

    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  23. clk: qcom: sc8280xp: add lpass csr driver

    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  24. soundwire: qcom: set clk stop need reset flag at runtime

    WSA Soundwire controller needs an full reset if clock stop support
    is not available in slave devices. WSA881x does not support clock stop
    however WSA883x supports clock stop.
    
    Make setting this flag at runtime to address above issue.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230209131336.18252-6-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  25. soundwire: qcom: add software workaround for bus clash interrupt asse…

    …rtion
    
    Sometimes Hard reset does not clear some of the registers,
    this sometimes results in firing a bus clash interrupt.
    Add workaround for this during power up sequence, as
    suggested by hardware manual.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230209131336.18252-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  26. soundwire: qcom: wait for fifo to be empty before suspend

    Wait for Fifo to be empty before going to suspend or before bank
    switch happens. Just to make sure that all the reads/writes are done.
    
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230209131336.18252-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  27. soundwire: qcom: enable runtime pm before controller is registered

    Registering controller even before pm runtime is enabled will result
    in pm runtime underflow warnings. Fix this by properly moving
    the runtime pm enable before registering controller.
    
    Fixes: 74e79da ("soundwire: qcom: add runtime pm support")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230209131336.18252-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  28. soundwire: qcom: update status correctly with mask

    SoundWire device status can be incorrectly updated without
    proper mask, fix this by adding a mask before updating the status.
    
    Fixes: c7d49c7 ("soundwire: qcom: add support to new interrupts")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230209131336.18252-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Srinivas-Kandagatla authored and jhovold committed Apr 24, 2023
  29. arm64: defconfig: build Qualcomm PCIe driver as a module

    The Qualcomm PCIe controller driver can now be built as a module.
    
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  30. ARM: qcom_defconfig: build PCIe driver as a module

    The Qualcomm PCIe controller driver can now be built as a module.
    
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  31. PCI: qcom: Add support for modular builds

    Allow the Qualcomm PCIe controller driver to be built as a module, which
    is useful for multi-platform kernels as well as during development.
    
    Reviewed-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    ---
    
    Changes in v3
     - rebase on post_deinit() removal patch
     - rebase on host-init error-handling patch
    
    Changes in v2
     - rebase on next-20220720 (adjust context)
     - add Rob and Mani's reviewed-by tags
    jhovold committed Apr 24, 2023
  32. hack: efi: disable reset service

    The UEFI reset service hangs on reboot and power off on the CRD and
    X13s. Disable it so that we fall back to PSCI.
    
    This is needed until the boot firmware provides an RT_PROP table that
    describes the supported services. An alternative is to disable all
    runtime services by booting with 'efi=noruntime'.
    
    Not-signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
  33. hack: disable has_address_auth_metacap and has_generic_auth

    Keeping these enabled prevents the sc8280xp from booting.
    
    This is needed until the firmware has been fixed. An alternative is to
    boot with 'arm64.nopauth'.
    
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    [ johan: amend commit message with rationale and alternative ]
    Not-signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    andersson authored and jhovold committed Apr 24, 2023
  34. USB: dwc3: clean up probe declarations

    Clean up the probe variable declarations by removing the stray newlines.
    
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    jhovold committed Apr 24, 2023
Older