[RFC 0/3] Enable firmware-managed USB resources on Qcom targets

From: Sriram Dash
Date: Tue Mar 05 2024 - 11:58:38 EST


Some target systems allow multiple resources to be managed by firmware.
On these targets, tasks related to clocks, regulators, resets, and
interconnects can be delegated to the firmware, while the remaining
responsibilities are handled by Linux.

To support the management of partial resources in Linux and leave the rest
to firmware, multiple power domains are introduced. Each power domain can
manage one or more resources, depending on the specific use case.

These power domains handle SCMI calls to the firmware, enabling the
activation and deactivation of firmware-managed resources.

The driver is responsible for managing multiple power domains and
linking them to consumers as needed. Incase there is only single
power domain, it is considered to be a standard GDSC hooked on to
the qcom dt node which is read and assigned to device structure
(by genpd framework) before the driver probe even begins.

fw-managed dt property allows the driver to determine whether
device resources are managed by Linux or firmware, ensuring
backward compatibility.

Establish the channel and domain mapping for the power domains to connect
with firmware, enabling the firmware to handle the assigned resources.
Since these delegated resources will remain invisible to the operating
system, ensure that any references to them are removed.

Sriram Dash (3):
dt-bindings: usb: qcom,dwc3: Add support for multiple power-domains
USB: dwc3: qcom: Add support for firmware managed resources
arm64: dts: qcom: sa8775p-ride: Enable support for firmware managed
resources

.../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 74 ++++--
.../bindings/phy/qcom,usb-snps-femto-v2.yaml | 49 +++-
.../devicetree/bindings/usb/qcom,dwc3.yaml | 37 ++-
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++--
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 290 ++++++++++++++++-----
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 213 ++++++++++++---
drivers/usb/dwc3/dwc3-qcom.c | 259 +++++++++++++-----
7 files changed, 801 insertions(+), 217 deletions(-)

--
2.7.4