2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-30 05:25:20 +08:00
Commit Graph

1267111 Commits

Author SHA1 Message Date
Dmitry Baryshkov
69565c73fa soc: qcom: pmic_glink: enable UCSI on sc8180x
Now as all UCSI issues have been fixed, enable UCSI subdevice on the
Qualcomm SC8180X platform.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:50 +08:00
Dmitry Baryshkov
f1bb9838e8 soc: qcom: pmic_glink: reenable UCSI on sc8280xp
Now as all UCSI issues have been fixed, reenable UCSI subdevice on the
Qualcomm SC8280XP platform.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:50 +08:00
Dmitry Baryshkov
efc8c00cf8 usb: typec: ucsi_glink: enable the UCSI_DELAY_DEVICE_PDOS quirk
Enable the UCSI_DELAY_DEVICE_PDOS quirk on anything past sc8180x /
sm8350.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:50 +08:00
Dmitry Baryshkov
453698c1c5 usb: typec: ucsi_glink: rework quirks implementation
In preparation to adding more quirks, extract quirks to the static
variables and reference them through match->data. Otherwise adding
more quirks will add the table really cumbersome.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
22af9199fc usb: typec: ucsi: support delaying GET_PDOS for device
Qualcomm firmware doesn't return sane information for device's PDOs
unless the partner is also using a PD mode. On SC8280XP this even
results in the Error bit being set in the UCSI response (with 0 error
status).

Add a quirk to delay reading USB PD capabilities for a device until we
detect a partner in PD mode.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
2d28bb0d92 usb: typec: ucsi: extract code to read PD caps
Extract function to read PDOs from the port and set PD capabilities
accordingly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
9cf42e952d usb: typec: ucsi: simplify partner's PD caps registration
In a way similar to the previous commit, move
typec_partner_set_usb_power_delivery() to be called after reading the PD
caps. This also removes calls to
usb_power_delivery_unregister_capabilities() from the error path. Keep
all capabilities registered until they are cleared by
ucsi_unregister_partner_pdos().

Fixes: b04e1747fb ("usb: typec: ucsi: Register USB Power Delivery Capabilities")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
b34e5112b1 usb: typec: ucsi: always register a link to USB PD device
UCSI driver will attempt to set a USB PD device only if it was able to
read PDOs from the firmware. This results in suboptimal behaviour, since
the PD device will be created anyway. Move calls to
typec_port_set_usb_power_delivery() out of conditional code and call it
after reading capabilities.

Fixes: b04e1747fb ("usb: typec: ucsi: Register USB Power Delivery Capabilities")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
403ed9ec19 usb: typec: ucsi: properly register partner's PD device
Use typec_partner_usb_power_delivery_register() to register PD device
for Type-C partner so that the PD device is nested under the partner's
device in sysfs.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
12c523247c usb: typec: ucsi: limit the UCSI_NO_PARTNER_PDOS even further
Reading Partner Source PDOs for the consumer Connectors appears to be
working. Permit getting PDOs in this case in order to populate
capabilities of the connected power supply in the sysfs.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Dmitry Baryshkov
c7d22f01f3 usb: typec: ucsi: allow non-partner GET_PDOS for Qualcomm devices
The name and description of the USB_NO_PARTNER_PDOS quirk specifies that
only retrieving PDOS of the attached device is crashing. Retrieving PDOS
of the UCSI device works. Fix the condition to limit the workaround only
to is_partner cases.

Fixes: 1d103d6af2 ("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 22:18:49 +08:00
Christian A. Ehrhardt
6eefab99c5 usb: typec: ucsi_acpi: Remove Dell quirk
The Dell quirk from ucsi_acpi.c. The quirk is no longer
necessary as we no longer send lone connector change acks.

Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
2024-03-30 22:18:49 +08:00
Christian A. Ehrhardt
796faa5003 usb: typec: ucsi: Never send a lone connector change ack
Some PPM implementation do not like UCSI_ACK_CONNECTOR_CHANGE
without UCSI_ACK_COMMAND_COMPLETE. Moreover, doing this is racy
as it requires sending two UCSI_ACK_CC_CI commands in a row and
the second one will be started with UCSI_CCI_ACK_COMPLETE already
set in CCI.

Bundle the UCSI_ACK_CONNECTOR_CHANGE with the UCSI_ACK_COMMAND_COMPLETE
for the UCSI_GET_CONNECTOR_STATUS command that is sent while
handling a connector change event.

Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
2024-03-30 22:18:49 +08:00
Christian A. Ehrhardt
9ed5e7c157 usb: typec: ucsi: Stop abuse of bit definitions from ucsi.h
In ucsi.h there are flag definitions for the ->flags field
in struct ucsi. Some implementations abuse these bits for
their private ->flags fields e.g. in struct ucsi_acpi.

Move the definitions into the backend implementations that
still need them. While there fix one instance where the flag
name was not converted in a previous change.

No semantic change intended.

Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
2024-03-30 22:18:49 +08:00
Neil Armstrong
b5b9f181ef arm64: dts: qcom-mode-switch: allow 4 lanes for DisplayPort and enable QMP PHY mode-switch
Allow up to 4 lanes for the DisplayPort link from the PHYs to the Controllers
and allow mode-switch events to the QMP Combo PHYs.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:04 +08:00
Neil Armstrong
a86646f5dd arm64: dts: qcom-sm8650: allow 4 lanes for DisplayPort and enable QMP PHY mode-switch
Allow up to 4 lanes for the DisplayPort link from the PHY to the Controller
and allow mode-switch events to the QMP Combo PHY.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:04 +08:00
Neil Armstrong
996e03c45a arm64: dts: qcom-sm8550: allow 4 lanes for DisplayPort and enable QMP PHY mode-switch
Allow up to 4 lanes for the DisplayPort link from the PHY to the Controller
and allow mode-switch events to the QMP Combo PHY.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:04 +08:00
Neil Armstrong
7c694baf8e phy: qcom: qmp-combo: register a typec mux to change the QPHY_MODE
Register a typec mux in order to change the PHY mode on the Type-C
mux events depending on the mode and the svid when in Altmode setup.

The DisplayPort phy should be left enabled if is still powered on
by the DRM DisplayPort controller, so bail out until the DisplayPort
PHY is not powered off.

The Type-C Mode/SVID only changes on plug/unplug, and USB SAFE states
will be set in between of USB-Only, Combo and DisplayPort Only so
this will leave enough time to the DRM DisplayPort controller to
turn of the DisplayPort PHY.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:04 +08:00
Neil Armstrong
56104a9d1e phy: qcom: qmp-combo: introduce QPHY_MODE
Introduce an enum for the QMP Combo PHY modes, use it in the
QMP commmon phy init function and default to COMBO mode.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:03 +08:00
Neil Armstrong
478473f55e phy: qcom: qmp-combo: store DP phy power state
Switching the PHY Mode requires the DisplayPort PHY to be powered off,
keep track of the DisplayPort phy power state.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:03 +08:00
Neil Armstrong
f3d4390ccd dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Add mode-switch
The QMP USB3/DP Combo PHY can work in 3 modes:
- DisplayPort Only
- USB3 Only
- USB3 + DisplayPort Combo mode

In order to switch between those modes, the PHY needs to receive
Type-C events, allow marking to the phy with the mode-switch
property in order to allow the PHY to Type-C events.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-30 22:18:03 +08:00
Xilin Wu
e44ee2e67a !fixup: dts: odin2 pwrseq wlan 2024-03-30 21:14:24 +08:00
Xilin Wu
d55547a571 arm64: dts: qcom: Add device tree for AYN Odin 2
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:14:14 +08:00
Xilin Wu
2ab8ef50ef arm64: dts: qcom: sm8550: Add UART15
Add uart15 node for UART bus present on sm8550 SoC.

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
2024-03-30 21:13:20 +08:00
Xilin Wu
5909c19210 arm64: dts: qcom: pmk8550: Add PWM controller
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:13:20 +08:00
Xilin Wu
1245e97589 arm64: dts: pmk8550: Add pmk8550_sdam_46
haptics requires it

Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:13:20 +08:00
Xilin Wu
a7af209a31 arm64: dts: pm8550b: Add HV haptics node
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:13:20 +08:00
dd66e0579c drm/panel: odin2: add panel physical size for desktop auto scale
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-03-30 21:12:45 +08:00
37b0daf2da drm/panel: odin2: add support for panel orientation rotation
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-03-30 21:12:45 +08:00
Xilin Wu
6eb704f2ab drm/panel: Add WIP panel driver for AYN Odin 2
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:12:45 +08:00
Manivannan Sadhasivam
2a5554902e arm64: dts: qcom: sm8550: Fix the msi-map entries
While adding the GIC ITS MSI support, it was found that the msi-map entries
needed to be swapped to receive MSIs from the endpoint.

But later it was identified that the swapping was needed due to a bug in
the Qualcomm PCIe controller driver. And since the bug is now fixed with
commit bf79e33cdd ("PCI: qcom: Enable BDF to SID translation properly"),
let's fix the msi-map entries also to reflect the actual mapping in the
hardware.

Fixes: 114990ce3e ("arm64: dts: qcom: sm8550: Use GIC-ITS for PCIe0 and PCIe1")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
2024-03-30 21:11:45 +08:00
Xilin Wu
57d05f8c79 HACK: wifi: ath12k: Always try to suspend when requested
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:11:34 +08:00
Xilin Wu
0d814f5313 Revert "drm/msm/a6xx: Poll for GBIF unhalt status in hw_init"
This intruduces latency on AYN Odin 2 and doesn't seem to be required.

This reverts commit b77532803d.

Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-30 21:11:18 +08:00
Bartosz Golaszewski
8aa254e599 PCI/pwrctl: add a PCI power control driver for power sequenced devices
Add a PCI power control driver that's capable of correctly powering up
devices using the power sequencing subsystem. The first user of this
driver is the ath11k module on QCA6390.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:23 +08:00
Bartosz Golaszewski
ba18280d04 Bluetooth: qca: use the power sequencer for QCA6390
Use the pwrseq subsystem's consumer API to run the power-up sequence for
the Bluetooth module of the QCA6390 package.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:23 +08:00
Bartosz Golaszewski
fb5363ec9c power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets
This adds the power sequencing driver for the PMU modules present on the
Qualcomm WCN Bluetooth and Wifi chipsets. It uses the pwrseq subsystem
and knows how to match the sequencer to the consumer device by verifying
the relevant properties and DT layout.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:23 +08:00
Bartosz Golaszewski
a64cadb0ae power: sequencing: implement the pwrseq core
Implement the power sequencing subsystem allowing devices to share
complex powering-up and down procedures. It's split into the consumer
and provider parts but does not implement any new DT bindings so that
the actual power sequencing is never revealed in the DT representation.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:23 +08:00
Bartosz Golaszewski
8071fe2baf PCI/pwrctl: add PCI power control core code
Some PCI devices must be powered-on before they can be detected on the
bus. Introduce a simple framework reusing the existing PCI OF
infrastructure.

The way this works is: a DT node representing a PCI device connected to
the port can be matched against its power control platform driver. If
the match succeeds, the driver is responsible for powering-up the device
and calling pcie_pwrctl_device_set_ready() which will trigger a PCI bus
rescan as well as subscribe to PCI bus notifications.

When the device is detected and created, we'll make it consume the same
DT node that the platform device did. When the device is bound, we'll
create a device link between it and the parent power control device.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
7eb9a05fec PCI/pwrctl: create platform devices for child OF nodes of the port node
In preparation for introducing PCI device power control - a set of
library functions that will allow powering-up of PCI devices before
they're detected on the PCI bus - we need to populate the devices
defined on the device-tree.

We are reusing the platform bus as it provides us with all the
infrastructure we need to match the pwrctl drivers against the
compatibles from OF nodes.

These platform devices will be probed by the driver core and bound to
the PCI pwrctl drivers we'll introduce later.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
b99b169a92 PCI/pwrctl: reuse the OF node for power controlled devices
With PCI power control we deal with two struct device objects bound to
two different drivers but consuming the same OF node. We must not bind
the pinctrl twice. To that end: before setting the OF node of the newly
instantiated PCI device, check if a platform device consuming the same
OF node doesn't already exist on the platform bus and - if so - mark the
PCI device as reusing the OF node.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
8d0155a807 PCI: hold the rescan mutex when scanning for the first time
With the introduction of PCI device power control drivers that will be
able to trigger the port rescan when probing, we need to hold the rescan
mutex during the initial pci_host_probe() too or the two could get in
each other's way.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
1c1511eddd arm64: dts: qcom: qrb5165-rb5: add the Wifi node
Add a node for the PMU module of the QCA6391 present on the RB5 board.
Assign its LDO power outputs to the existing Bluetooth module. Add a
node for the PCIe port to sm8250.dtsi and define the WLAN node on it in
the board's .dts and also make it consume the power outputs of the PMU.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
1e74783510 arm64: dts: qcom: sm8650-qrd: add the Wifi node
Describe the ath12k WLAN on-board the WCN7850 module present on the
board.

[Neil: authored the initial version of the change]
Co-developed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
f82041efa9 arm64: dts: qcom: sm8550-qrd: add the Wifi node
Describe the ath12k WLAN on-board the WCN7850 module present on the
board.

[Neil: authored the initial version of the change]
Co-developed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
d67cbb89c0 dt-bindings: net: wireless: describe the ath12k PCI module
Add device-tree bindings for the ATH12K module found in the WCN7850
package.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
1912b8e81e dt-bindings: net: wireless: qcom,ath11k: describe the ath11k on QCA6390
Add a PCI compatible for the ATH11K module on QCA6390 and describe the
power inputs from the PMU that it consumes.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
e8f3f40c4d dt-bindings: net: bluetooth: qualcomm: describe regulators for QCA6390
QCA6390 has a compatible listed in the bindings but is missing the
regulators description. Add the missing supply property and list the
required ones in the allOf section.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
7dcee48321 regulator: dt-bindings: describe the PMU module of the WCN7850 package
The WCN7850 package contains discreet modules for WLAN and Bluetooth. They
are powered by the Power Management Unit (PMU) that takes inputs from the
host and provides LDO outputs. Extend the bindings for QCA6390 to also
document this model.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-30 21:09:22 +08:00
Bartosz Golaszewski
ab1c3737d1 regulator: dt-bindings: describe the PMU module of the QCA6390 package
The QCA6390 package contains discreet modules for WLAN and Bluetooth. They
are powered by the Power Management Unit (PMU) that takes inputs from the
host and provides LDO outputs. This document describes this module.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-30 21:09:22 +08:00
Stephen Rothwell
a6bd6c9333 Add linux-next specific files for 20240328
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2024-03-28 15:50:35 +11:00