Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp520700rdb; Thu, 2 Nov 2023 10:03:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEe/bh0USyTFfYrhUY4vVDDquPZH22geFOse6o7pqodKo7ax/VQ5tlHScbLJi0cRliyqa1l X-Received: by 2002:a17:902:d4d1:b0:1bc:1e17:6d70 with SMTP id o17-20020a170902d4d100b001bc1e176d70mr466108plg.24.1698944609084; Thu, 02 Nov 2023 10:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698944609; cv=none; d=google.com; s=arc-20160816; b=h1I33YQIHBS0wjo3EIedlWTjzjjHlpTSszzPTTCt8YXcL6lolsKTd9UnUTA1QaId6S BIIksLN85huXKxqEHGBbKE36YroqGGQ2gEPZw+ttQjsWp8WJrjit+q0iuk72dgLMI5VB +Lzt44l1nZuCO6tKpwdqplOvK7Rms0U8A3iQ2ii/PHDrpmjfHMVIORJQPwA/Tloqqa/4 SWJBEyfLRvrAAGVLzO+pLi7njv03E1i4IV+XJQPonjakIuFrGdO0+5vp9zeu1+0Kq8j7 G3ksUcc+1nQuQEpjFlj8CmEwZ8YjEqm9AQ92JRACsiwU/iuDqqQgK9bdsTop0nZ+WoQ5 oLWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gsBsQo9gDD9IOvVzS0FvwfEweq3C/58AnmRRuIg7BgA=; fh=gV8wHdNE4LBNvPJRiOGyzQacX+c2iSf1WwEP3THgZM0=; b=QN7ulsQmt8OgT+Asj9wD5FgXmpogEbrOZSpJH6BMaTSoBmtSGci8X+26gP88xLRydM Tbtv9ooats6Jp66Y8k6CMBztdw53Gz47kiTniZuRKkwDy+Yo7gog+cJu1GDSc76GHKwc Nt6YZy15gz4VQkzcp9IzbYDKYb/1Qo5H14k1euNJjHycu0GfckcSUAuJ3MPq4wx9SH3a DN3gLKzBRGO0EK7dHC+T4wNAhFGIp6LQCMo5iKTvAMDk80zOT2irZe2e17Zbt2xB4zIl dNiBNt7L7pisU1Qp1ybqhBbPs5ONSwVqsb4CRN8aGtCW9gmnFKKlfklnZ+AvdhEVksY0 sy0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=N7AWHaRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id jx6-20020a170903138600b001cbd8dd09e8si131154plb.537.2023.11.02.10.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 10:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=N7AWHaRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E42A281C9A55; Thu, 2 Nov 2023 10:03:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377111AbjKBRCv (ORCPT + 99 others); Thu, 2 Nov 2023 13:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjKBRCt (ORCPT ); Thu, 2 Nov 2023 13:02:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2112813A; Thu, 2 Nov 2023 10:02:42 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A2FeGWX010878; Thu, 2 Nov 2023 17:02:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=gsBsQo9gDD9IOvVzS0FvwfEweq3C/58AnmRRuIg7BgA=; b=N7AWHaRg++8Gvzgi9jihUmtiBNZG16Ot0L4GM0xJPkEW63H7jAqRBy+vExWW0ylh5cMu ysUrwnLxltIK/4hEfsAI0hFKseKlu1B0xiv3VEy5mEw80X+HLJOOGglpsu5swXV4cEdb MfI32w+nWFmcwggwk27Kws0WSVI7KVjX3Hcf1g6YojeAe2QVafb/lyCsoZuwV4HQOpXN XQeECkZZz7v/hpeDENL5A14ipxvp8H5A5GQj53R4SH2H5MboQ63W+KcZJOvLcSmK8wxT pwYioUakoVqO+zov13Rvd6T+gS9+F941TOrmnHwLhIdD2jeFdFCyixYp3UeXSrYkVOwu RA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u3s6pat68-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Nov 2023 17:02:27 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A2H2PYT031717 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 2 Nov 2023 17:02:25 GMT Received: from [10.249.8.135] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Thu, 2 Nov 2023 10:02:19 -0700 Message-ID: <960101cc-78c0-49cf-ab62-90614eeb9ee2@quicinc.com> Date: Thu, 2 Nov 2023 22:32:14 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 1/8] dt-bindings: usb: qcom,dwc3: Add bindings to enable runtime To: Caleb Connolly , Thinh Nguyen , Bjorn Andersson , "Konrad Dybcio" , Krzysztof Kozlowski CC: , , Conor Dooley , , , Andy Gross , "Philipp Zabel" , Rob Herring , "Greg Kroah-Hartman" , , , References: <20231017131851.8299-1-quic_kriskura@quicinc.com> <20231017131851.8299-2-quic_kriskura@quicinc.com> <272a9764-1cae-4d86-88b1-00175de83333@linaro.org> Content-Language: en-US From: Krishna Kurapati PSSNV In-Reply-To: <272a9764-1cae-4d86-88b1-00175de83333@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: f2rf_tH3m84_VVWOfJQ8fUhn7B2RrSGj X-Proofpoint-ORIG-GUID: f2rf_tH3m84_VVWOfJQ8fUhn7B2RrSGj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-02_07,2023-11-02_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 mlxscore=0 spamscore=0 suspectscore=0 clxscore=1011 bulkscore=0 mlxlogscore=818 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311020139 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 10:03:01 -0700 (PDT) On 11/2/2023 10:03 PM, Caleb Connolly wrote: > > > On 17/10/2023 14:18, Krishna Kurapati wrote: >> Add enable-rt binding to let the device register vendor hooks to >> core and facilitate runtime suspend and resume. > > Hi Krishna, > > From reading through these patches, it's not clear to me why this > behaviour should be conditional on a new devicetree property. Are there > some platforms where this behaviour would be undesirable? And if so then > would it be possible to determine this based on the QSCRATCH registers? >> Hi Caleb, There are two types of platforms, some use extcon and some use role-switch to deliver vbus/id notifications. Extcon targets already have this qscratch modifications present today in vbus and id handlers. But for role-switch based targets we don't have any way to get this notification to dwc3-qcom. In this implementation, I wanted to get those notications from core to glue and for this we implenented vendor hooks. The property added has been used to do two things: 1. Register glue's vendor hooks to core driver 2. Do runtime_allow for glue (and by default for core as the dt is not flattened) In case of extcon, we don't want to register vendor hooks as notifications are not necessary. For xhci, we opted to enable runtime from userspace. >> Signed-off-by: Krishna Kurapati >> --- >>   Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 5 +++++ >>   1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml >> b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml >> index cb50261c6a36..788d9c510abc 100644 >> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml >> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml >> @@ -151,6 +151,11 @@ properties: >>         HS/FS/LS modes are supported. >>       type: boolean >> +  qcom,enable-rt: >> +    description: >> +      If present, register vendor hooks to facilitate runtime >> suspend/resume >> +    type: boolean > > A Krzysztof pointed out, properties should define the hardware > behaviour, not tot the implementation details. For this case the > hardware isn't wired up to vbus, so maybe something like "qcom,no-vbus"? >> + On all targets, vbus is not routed to hardware. This vbus toggle indication is given to controller via qscratch only. Regards, Krishna,