From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 549B82AF14 for ; Mon, 27 Jan 2025 14:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737989143; cv=none; b=LmU0JRqZcnGLUBwXNcWU8H4St21DhAbgrmrAF8pf2oLKw5OHskle0uWhztRGsSyCXHhP3kCDcsF6IP5Vzc+w0DW2AP/XUn2riBeXPWOhOBzBNpUJrh8GKr2Qb7AdIqcB00DMccfzgenyXAHXhieaqfU7hqMM3zTA6FqLz3ntNno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737989143; c=relaxed/simple; bh=wqen5QqvQcEQxpPvtTgSOB9IxhjeeWYi88Zb9RiNpNU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tuKF0L1+Ola3Q1CtIozPgsFjlqnHRmWtRoJxyEdXwcSm80F8CG4h+rLjqViP9pMUKocladOilJ6HXq+OP/h7dUsFe1uyuvvWugHtdPBSFE4pdVGhgSRf7/OBWTaxCPRfqyyMLDGFuBJ05wynu84XloFUkpIM0SPrWbFWYJfNhSI= 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=bCd0tyBe; arc=none smtp.client-ip=205.220.180.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="bCd0tyBe" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50RCibeC009066 for ; Mon, 27 Jan 2025 14:45:40 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= FrRoBeelfFXbKKIfECxmv8hw8TWenwlLx1vwSbq5ykQ=; b=bCd0tyBe9aNzXwp1 A6dMeByFDDop4sP69OV4YrToP6Xz83AGtjTU1LpxswNgzC95xywSXSAGqiYDTDmh Zm6sLaUNz94rvxAmpQ7+pvBvVToOKyxhxndE41xEf5LdpzIEI2wphbUcqUckxxt1 0eiwJoeeNV5n+z/xetYLazC3jAno4fFoY+/by0pLXN/q80yZfyBzs/zn/NeGlLYM nJZ6mIDeLELk34+mH3KN400vB6K+HzDZZW18FTY++lESqUtyJiYFNNFZHfAelKTI tA8/AxDAApT0JsklOYqqB1i5NbR4Bw0J4PVGQ9RLHGCBdNPI0ODuuQKREv3MXzB+ 1zSeCQ== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44eadvr7hc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 27 Jan 2025 14:45:40 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-46e78a271d3so2911161cf.3 for ; Mon, 27 Jan 2025 06:45:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737989139; x=1738593939; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FrRoBeelfFXbKKIfECxmv8hw8TWenwlLx1vwSbq5ykQ=; b=snrZL1KWIn4C+19EEC9Jb4648UtYVbHE4QUhxWnnLACAhlTAz4jVEbkeSkNgAb++Vm X/+6cL+hu3xkxCatqw7gUrzsrxqi5Mhq/3wF+d4+y4N8DpOQ1Fvhd2iXske6tZPVYmwX AT/Yy25ZaeK8ruyB5M+EgRi/IkhoX4zayvgjppEXIntyiq+p+v3Zn8o2ZctD3yEc0WAs 66d3ZTD1gsaZQ9IdF/H+4TUxsEFj5ynaBW5L69JXt2TrycKTC4xV3Z+OJ7f9/Jd4NQfN WPi+SWP6rzMD5/HAzCG9K2L60k+2k4z6CLEkphU6p51riecCj1tW/otMLufGSnfwjGMZ kAWA== X-Forwarded-Encrypted: i=1; AJvYcCV2BqaKwmIIn5eItta7f1Zwt1nnzvOR9uSvWPVYvUiJBeC1TKUOwMtdkOJ2KBTWKNXaQq08devLFBrnHQM=@vger.kernel.org X-Gm-Message-State: AOJu0YwohZFhFEkJbOmoG3E3XurdhhglChYh6lvO14jQFIqZiayiepMC OlBIyxWwNiZc1hm7g+EO/n6lE5T06b1GZZCJ8KM0emSq/ouwCqalhK21Rlp1yWQyPYTQQ1BsLN6 uDOgOravxKs59ISMRj+5aCCnP7chwX950gfjPzvjAkH3u4UECqLSLhYb6BJn16ByDDqhvYPg= X-Gm-Gg: ASbGnctw9UlZyt0ewO4OKnUYLXslwvcTI5X8ErXVVLJJSo4Ws72skfDuRUW74y/zDsX 7MUk14HASQAJMc/rQ9N1ELq+NbODpEBJqzOJmBOcWIUrHWgECY/8qvHEJazVf05c7LROr8+CVDv 3YUWa9Jp/eqa74DpLekcVc8nIC+zgkt12qLsrmDwzpS5oJXywGbWfr8uWLmT/PPbaeBncqa4Iga gCCCuj5Vg5B2NL2FmZVldXX9A6hOHKPcP0AUK6B+fKkajHUq7aMKpztCRFS7DpTZ7MtWfnZtlkV 1/rrD1mPHefdSRUyZRSSJsFshnN/Bq8LGnfTBYgLEiwcIhiXasFIWyPtezM= X-Received: by 2002:a05:622a:1210:b0:467:5d34:aa84 with SMTP id d75a77b69052e-46e12a9a0c3mr242352711cf.9.1737989139101; Mon, 27 Jan 2025 06:45:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeFGQxsM9cQx8f5654W5vrsEmUeyQuSaOOkZRea+KKqOquJIhIZAHz5V/T+4Tymt7e2W94tA== X-Received: by 2002:a05:622a:1210:b0:467:5d34:aa84 with SMTP id d75a77b69052e-46e12a9a0c3mr242352481cf.9.1737989138633; Mon, 27 Jan 2025 06:45:38 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab675e5ca68sm598066766b.38.2025.01.27.06.45.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jan 2025 06:45:38 -0800 (PST) Message-ID: Date: Mon, 27 Jan 2025 15:45:36 +0100 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: Re: [PATCH 2/8] dt-bindings: soc: qcom: eud: Add usb role switch property To: Krzysztof Kozlowski , Elson Serrao , andersson@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, gregkh@linuxfoundation.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <20240730222439.3469-1-quic_eserrao@quicinc.com> <20240730222439.3469-3-quic_eserrao@quicinc.com> <7aec2a72-3276-4837-87fb-ac974588fd53@kernel.org> <41a8e42b-69d7-49ef-97bf-84f260e2e709@kernel.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <41a8e42b-69d7-49ef-97bf-84f260e2e709@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: LR-nj27CqBeRlxvELM5kYup1dsY37dC9 X-Proofpoint-GUID: LR-nj27CqBeRlxvELM5kYup1dsY37dC9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-27_07,2025-01-27_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501270118 On 1.08.2024 9:46 AM, Krzysztof Kozlowski wrote: > On 01/08/2024 02:16, Elson Serrao wrote: >> >> >> On 7/30/2024 10:36 PM, Krzysztof Kozlowski wrote: >>> On 31/07/2024 00:24, Elson Roy Serrao wrote: >>>> EUD hub is physically present in between the USB connector and the >>>> USB controller. So the role switch notifications originating from >>>> the connector should route through EUD. Hence to interpret the usb >>>> role assigned by the connector, role switch property is needed. >>>> >>>> Signed-off-by: Elson Roy Serrao >>>> --- >>>> Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> index fca5b608ec63..0fa4608568d0 100644 >>>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> @@ -37,6 +37,10 @@ properties: >>>> items: >>>> - const: usb2-phy >>>> >>>> + usb-role-switch: >>>> + $ref: /schemas/types.yaml#/definitions/flag >>>> + description: Support role switch. >>> >>> So both EUD and DWC3 controller (as this binding states) are role switching? >>> >> >> Yes. EUD would receive roles from the connector and relay it to the DWC3 controller. In addition to these roles, the DWC3 controller >> would also receive roles from EUD itself (related to USB attach/detach events). > > Does not look right. Seems like you add something because it is easier > to code in drivers. Perhaps that's semantics.. EUD can be thought of as something approximating USB-C (very loosely). If you program it right, it exposes a USB hub full of """altmodes""" (debug components visible as separate USB peripherals, really) We need it to know when the device is connected in USB device mode (vs host), so that we don't accidentally undermine the rest of the USB hardware by de-muxing the usb controller from a direct connection to the PHY. Konrad