From mboxrd@z Thu Jan 1 00:00:00 1970 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 6217737B033 for ; Thu, 26 Mar 2026 01:49:54 +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=1774489795; cv=none; b=opOJKX3ST6q42ZgpJp3CmCldthtSFOG65IXPYhlKl5YUQFEGisxNxaH4VpG0JFDkzWzMI2jaEKbasja3yQB5sCVEIRxhQcy8+ZzD786yurNko+GBi+SbaByo/GJOPMorruQ/+RSduTwtNN31dDkmDpzjcO8zxcnvq6fl0x6GpRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774489795; c=relaxed/simple; bh=EeivOs92UFYicj7rost+GLPobGxernwG7JpYzbsimdQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OIVYbQ5Gjk6B06eJP/VojzDBgX4O374z85SRL3cD3ppfyLk1hY5CKNMXkpFJkAQCN904EpHESVC9fv+k+rJGoKPerwC7hQlwbdYSJiVLdummtAIpgz7vsEGmnoXUdkO+5uu1bhdYE8yc+XWO509U1LF5N8ovVkzWdJcIJf9zhu4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=E5U7tclx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=OwllT0gi; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="E5U7tclx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OwllT0gi" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62Q0nnHm1811861 for ; Thu, 26 Mar 2026 01:49:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 0PUiEEnMAQ36ATGbtMZUbQwtivifyozOfZDa46WQkm0=; b=E5U7tclx2hDr+YDC gjqMEM9ME2gRZWrvHnbZOEkX/j61DDbv1gRCYG+IgEh2gcB1Ch3FkNh6uw1x4Egl 2aLp2Ho8LUCrnvmLN4/OxPggkEoAzqUYW9kSd+cWGMbvDJv2pZS1e2hH1EkjJT9b 2YXgSW6XPcTT3V8MCtWlj7N+h2f99zunWcMqaDKxzPZeraZelH9QWjgkn+UFJMn3 peTGcHfLwrWzOt8hNpgGra77VhEBKJM41HRtTp3QUTF89nE6iu4e2cf3t1zAHMe3 8hJOcGjfi5svJsRpkt9JcmiPJcGtDKKv/K67/nxW6zuKcg1+sq/p4nFeDZs3bGCs 2Qxy8A== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d4tkn04xv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 26 Mar 2026 01:49:53 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2bda35eab74so305030eec.0 for ; Wed, 25 Mar 2026 18:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1774489793; x=1775094593; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0PUiEEnMAQ36ATGbtMZUbQwtivifyozOfZDa46WQkm0=; b=OwllT0giEugpOUTRS55VBUrV/9DQ3cP+7TvLu4AOUP/P/aLBwzsYaH5Y3Qnbz/2QAS cTzT5TvFAI2IBLcoL9uEhl61eq0erfaXHxOJYPDCl8jUDcJsGiSHQM0Veq2SDhGskvZT aZEu/HoT51kZ8AbOebadP0pzEDeAmZdMxmeD/ghnX2XFMsht+9FzPvANMeIeoPHd5eF4 jHd8M5d+1vVbWaf8O3vibqkcioQgdlx21RV3UBgEDT7DRy3QsOfnbVwpJFP2ERy1GurH xi6y6nceH/RailBEVaegZcFCOIBUMw8RXpNoE1L8CALlKDzUl7gmQcksWoryiHAeSDcf lt2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774489793; x=1775094593; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0PUiEEnMAQ36ATGbtMZUbQwtivifyozOfZDa46WQkm0=; b=iNf/Ixh32Fp2+5yl9+MdH9S9u/0pE+jqmiZlNCMhekYwH17Wn8aooU85PzXOpz4VBZ hIdY8gvF6IM+60BkJ5O66AAK3J5Hk95wAvXGWnUj+39kEYxZFlHvmuPmO7cqo2MVu4Ru EpOCldK7dV5GI0FECQjJNfCols3+Lai9ReN+zSlR6VD1Gn1gb99ZlQ593mx1iVPIogYa N6up6Cw4B8zLSnHSYtU9j38Fi5CnifiMR1GcARYucZ+B+rBorQ9hTT4AxPJcReR+9BwJ +hHoRLkug5jC+SLrcQKVka0QK+dkQQteuwy/7Ehe6n36jkJoDSooe3QDZRzEGCvIYwHH MDQw== X-Forwarded-Encrypted: i=1; AJvYcCWn2AqyqByK8Rk6ReDVuGuUCeKmu/6Oh/3+j/zOynoaGK+J2ms8Wqludqd4K+Rx9nupDIgd/BkID+MkR/0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3fRXK2VOCoNFqsObq7QN+JEkuMYDT/fC5TZZksFG+783hxZWn 3ZssMfJWkmQyulheo2DCLg4wglenWMDM4E+Z9vIwQPFsvV0oyZWg4BWSAhDbS4XxMbMrbJgP5AO 7T8HkGEA81tJO5kBH2fLWBAmro6l81B0CJ4vny7acj7z2pzcrK5anQbdqb3DRbsHzSlWZ12hi3l g= X-Gm-Gg: ATEYQzwJ07gefvfN3DPV9JHX4fnba9na6I0+1Z2Mj0on/7L3aFj9WIXdBwj/m9HIdKA rayTD5oFrLi1h3Idj8Jebxb3NH0RZtkt2A7d2jobcObGIEPqQGMg93+orUUn2wMzkumZJ+7aqHH gdXGfigpFeOinCggUH335zesCrwVJ2RvReptp9+8aTJU2bqpcbZy84TulfpyP3P0nq3DDln+08Q wUALJpJ7b2Xo68xxtl6MtH4wBZLK+dP4Lny1EGQP8QOGXO0isAxfM4elGmyQopJO/xdgODEsfgH oRKG0jbXcuQGa8rVav1ge/T7yg30o3ShrWSfN3ibEv5O4eu1YLE4vWg9SdG91Jzb0sDF8SrPAN0 WyM/gksdj4lhmGol8MXGJIeAi1i5GvEeT5GHQsAo1k1prU+0Ll+s= X-Received: by 2002:a05:7300:5721:b0:2be:cc8:820c with SMTP id 5a478bee46e88-2c14b63d560mr3982986eec.17.1774489792767; Wed, 25 Mar 2026 18:49:52 -0700 (PDT) X-Received: by 2002:a05:7300:5721:b0:2be:cc8:820c with SMTP id 5a478bee46e88-2c14b63d560mr3982974eec.17.1774489792110; Wed, 25 Mar 2026 18:49:52 -0700 (PDT) Received: from [192.168.1.132] ([70.95.199.79]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2c16ee2a41fsm1250065eec.28.2026.03.25.18.49.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Mar 2026 18:49:51 -0700 (PDT) Message-ID: Date: Wed, 25 Mar 2026 18:49:50 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?Re=3A_=5BPATCH_v2_1/1=5D_dt-bindings=3A_connector=3A_Add_?= =?UTF-8?Q?role=E2=80=91switch_provider_phandle?= To: Dmitry Baryshkov Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Bjorn Andersson , Konrad Dybcio , Wesley Cheng , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20260324172916.804229-1-elson.serrao@oss.qualcomm.com> <20260324172916.804229-2-elson.serrao@oss.qualcomm.com> Content-Language: en-US From: Elson Serrao In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDAxMSBTYWx0ZWRfX+t/BSh8Fivt6 mSEYdohEGAz4KX7RipvrnyBTT0tX7GtZ9p0vkA4eiSkjnClMz8G3hGZ9txQhsT7DCGxtFKd9gCb yaF8qzMD6Fte5Tmj73m7v+9iU726ifzeKtM8YNdx4TJsAozIAGN3ckswsNWB3ftctXT8exK8ZyH w8d3ukf/Zyx+VIimIGjw+qAEYZsVP/Q8HK4V7zPoRlBbv+iSEA0W8IF1+beDPzBAsxtGD9Qvlq5 +6XbO8KTN54od6oe/v8isNeyl+ZMz9v+Lp+LcT4boSFzpmDR1BzwdaSNBlO01sb8a858rbZYuAG ARJ8jeAYqO7foYKNw/MVAzEwnAoGq8YrQIatuLNvgOfMVaTvqe1pkxb9WL4aKCOpg77irOvhIis BHXb5fTql0Wqw37Ld+SPsV3AWmdrYvIj85ISbiUnb3fcjejxXtghZUbMwzwPeuJYtuF9BV5pZ89 oTI8PVuJ1SRls0Dpb8A== X-Authority-Analysis: v=2.4 cv=It8Tsb/g c=1 sm=1 tr=0 ts=69c490c1 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=uHxescsG3rBdxcXwcPaeSg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=5KLPUuaC_9wA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=vfXj0wn94qoC9zwMpVkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: lL3wlC_IkdCo-uManssN3BO09DZdk4mS X-Proofpoint-ORIG-GUID: lL3wlC_IkdCo-uManssN3BO09DZdk4mS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_01,2026-03-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603260011 On 3/24/2026 10:57 AM, Dmitry Baryshkov wrote: > On Tue, 24 Mar 2026 at 19:29, Elson Serrao > wrote: >> >> Add an optional consumer→provider phandle on USB connectors to reference >> the USB role-switch provider when no direct graph link exists. The DRD >> controller remains the provider via its 'usb-role-switch' property. >> >> Signed-off-by: Elson Serrao >> --- >> .../devicetree/bindings/connector/usb-connector.yaml | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml >> index 11e40d225b9f..ef8d3d26461b 100644 >> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml >> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml >> @@ -95,6 +95,14 @@ properties: >> - device >> - dual >> >> + usb-role-switch: >> + $ref: /schemas/types.yaml#/definitions/phandle >> + description: >> + A phandle to the USB role-switch provider. The provider is typically >> + a dual-role (DRD) USB controller node that declares the boolean >> + 'usb-role-switch' property. Use this when the connector is not >> + directly linked to the provider in the OF graph. > > This kind of properties has already been discussed at least twice: > - First for referencing the DisplayPort controller from the AltMode > node (USB-C connector) > - Then for referencing the USB-C muxes / orientation switches when > there is an intermediate chip > > In both cases the agreement was to not add such out of band handle > references. The solution was on the software side, letting drivers for > the intermediate devices in the OF graph translate and resend > necessary events. > > Previously we didn't have such an issue for the usb-role-switch, > because there always have been a direct link between the USB connector > (be it gpio-usb-b-connector or usb-c-connector) and the USB controller > (implementing usb-role-switch). As with the EUD this is no longer a > case, my suggestion would be to follow prior art and let EUD receive, > interpret and resend usb-role-switch events. > In this topology, the EUD hardware spans more than one independent role-switch relationship, as a single EUD node is the direct neighbor of multiple connectors. This introduces additional considerations around role-switch discovery. One practical consideration if the EUD registers multiple role-switch instances is that fwnode_usb_role_switch_get() ( which relies on class_find_device_by_fwnode API), assumes a unique firmware node per role-switch instance. If multiple role-switch instances are registered against the same firmware node (the EUD fwnode), the lookup will return only the first registered instance, making it difficult for a connector to reliably bind to its intended role-switch provider. Supporting multiple role-switch instances in this model would therefore require extending the lookup mechanism to allow additional disambiguation (for example, associating role-switch instances with connector context). I want to make sure I clearly understand the intended modeling and whether these USB role-switch framework implications are considered acceptable. Thanks, Elson