Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp538204lqs; Tue, 5 Mar 2024 08:58:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVJ9uWr1ILL51NiatllUt559eTgzp9D+B3jEEgEIivDqK5U1UilwBj+Mq7xjK4IYCMCJM6uJZB2QsgsEuIM8grZGEz9PjQjkGwINOHs3Q== X-Google-Smtp-Source: AGHT+IHLlzcwhhCOLRHFlmK4zVcLQe0x+FYnO/eVgQ7iBX9E6R2ErG6W7qwEcPpVfmbjxGXqVWS0 X-Received: by 2002:a0c:8f01:0:b0:690:299:1909 with SMTP id z1-20020a0c8f01000000b0069002991909mr2932058qvd.50.1709657917194; Tue, 05 Mar 2024 08:58:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709657917; cv=pass; d=google.com; s=arc-20160816; b=fWY9WHp/A3W+eL4cN55j1xq4iFM7K3OUwWK7lPNZu7iLnHMbIUFhwuA9ZHdH6po7zu BUtrngwVNOIKnzRF6T9WKb4+vBv/s7p39b6IFA+MiIXElzN1meHoJ3t2b/q1p/CG7aVL uboG6Qc5x+GdHTTY09pWLs56x2ZWNe8rGLPCyOQJcmrrYlg8ektih4gzACug8uovE14P SHE2AEALaTuam6s829COcwed5BSF5OoORqlZykBLXMIwMOgBCU3WcNN2XtvGS4a0l8iI vXBqkrKsGYJKiqda/kEkTa0MEy8IY/mwFR8y7hjoieOoHwz8Jd+jt4zgt0/CKm4dV2Co hdmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:to:from:dkim-signature; bh=kOc4mqW7YqT2IuvMfdIuROMR2Y3JLVuf7pv+QEnyKJA=; fh=Y7vNOB7g+tLdnT/0w1CbUvhidE8cG6PuGcWmbWZrJJE=; b=ccoRDgTs3J4KEbQoex4QCrIEAl2oxKGW/mirM57O2F/dgzH4ODZ+m2vbcbpoPQjqtU aH0raoQi6qQR7Op7JLaWg8ULyodLN/guiEtKOqxf7X6nV/vqpIK3enO2CwAjy47oJttd mqBUwN2CYI1/7vQyFiUkSzhBsPtxXODbfsOSZz3pLvt3A/4n7Kr2PSjvk8oVhv43/4wz 6oof5noFt+0X95HOZPUhqr9/mWLaJpc7Dxwuwh2dmX++Z5IOlHIsv0TquxivBuYfa28r KthDo8A8u84P5DZIlDO/rEfb8M50IY1nwfK6WbRTMFF/YvqrcL8apkkUyTmuwOxA9UM6 S9TA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ldwkflPv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-92727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k4-20020ad45be4000000b00690197c48f0si13021036qvc.28.2024.03.05.08.58.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 08:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ldwkflPv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-92727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E3FCA1C21984 for ; Tue, 5 Mar 2024 16:58:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D67512E6D; Tue, 5 Mar 2024 16:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ldwkflPv" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBCC6D268; Tue, 5 Mar 2024 16:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709657906; cv=none; b=eaJ6qn3fo8cUSTX6BbaOHsiVeLMgOeozdzp9YrZ3Xh0/DMxGKhsY/qgilgNGhN/0E3j5oPkhjYQAOfWDi6FKeN3FzK6IB8J4VQmJoyHAyTonB3p6JHWa18Hdii3uoCw2YtiD8cVjSCt3r6p59KQxqX3DVtm48ZnWFP2pj9vg2A8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709657906; c=relaxed/simple; bh=Dbene+JorLqbq3nZB9Olrm3SKJvTPOQ5KM0W99aqTcw=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=cCmw5uC8+H8nODDVncRvdEgXprce3we1ah9/QfEVST3FhlgNCjI0WGJzw9/ZRWQUtUFklpa/VwyAB+SUWeJnB+3dxmvvXs05BqJkc7w5mUVsdrgR98idmYYls6mee8EHSdnZaeMu4Hx8B3BW0C/oFCXj6pBabV20gfHA5hLYJ6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ldwkflPv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 425DlDGp015519; Tue, 5 Mar 2024 16:58:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=kOc4mqW7YqT2IuvMfdIuROMR2Y3JLVuf7pv+QEnyKJA=; b=ld wkflPvMNeMySBy4sXWklzfreoNf63GQosctJsOYWtu6qa1UBB+ylYHjhCGKjuduD FnxymjUfg5Vkn241FPhki3CeVhxA2zuVRsdFCE2xceI9F7RuSN2HBhCgrdkcHMUd w8Ksm5muoeD1UlX9WxlCcXesYU2UsHqvkrGBcGKgwOBDoZPPb2cTT5FnB8DrWhku K2Wuh80OVzliDvzGo8PuMDi/RWz+TyBKxUlmCvN2Ud7i4FA9Z/1VTu/l9U5eLGdz AIxuY6riTmoGVwSUEdwzHG89uDsvGNwkIkhcmEJJZ+WYdQQkLdfPEoJrTrav3klM 9v3cull930UUqhl26Dew== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wp04612rf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Mar 2024 16:58:06 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 425Gw4hl022108 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 5 Mar 2024 16:58:04 GMT Received: from sriramd-linux.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 5 Mar 2024 08:57:57 -0800 From: Sriram Dash To: , , , , , , , , , , , , , , , , , , , , , Subject: [RFC 0/3] Enable firmware-managed USB resources on Qcom targets Date: Tue, 5 Mar 2024 22:27:35 +0530 Message-ID: <1709657858-8563-1-git-send-email-quic_sriramd@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: f2fMK1kDVeAoNQXzg53S1juzVV-xWszD X-Proofpoint-GUID: f2fMK1kDVeAoNQXzg53S1juzVV-xWszD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-05_14,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 adultscore=0 mlxlogscore=934 bulkscore=0 suspectscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403050136 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