From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m49233.qiye.163.com (mail-m49233.qiye.163.com [45.254.49.233]) (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 9BBB832D0E2; Thu, 30 Oct 2025 08:56:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761814615; cv=none; b=VYAN7HAGJGDwc5h9MPh6PW2hxm7EJ8XYLsJIQqk3z1ADPPyFmvt5d/ohNz7JvDhOneknSeRnUN/Sht2JHP+yPsLA+Oqzo/4lxalXdL8vwzcWpGIMCsZqUsG7krfqHtQWO2ODf6OT7PpXXDuUOMZbAPt1J3fqcSX0prqIJ7yDSbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761814615; c=relaxed/simple; bh=5iOLt0K6++NJo2jrrcX9XRb8mk8Pt+TIBChlFsuvqBY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GOPXOx/PQNpCx4asHjS+YzIz+H1vxdom38DYjN2NH0BRCY/boRETHvhJ/OiDqMxctF3Vg1lcruFK/CFrYk0XmUjY17is25KPAVpNg9kLxDzLRDBcmVHEY5clXS+3PUypiXxGVr/idUkr2YLRk/XZQ3zPHFfHCndTAJn3BIXQT7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=SQVUwkwv; arc=none smtp.client-ip=45.254.49.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="SQVUwkwv" Received: from [172.16.12.149] (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTP id 27b7b5d56; Thu, 30 Oct 2025 11:13:53 +0800 (GMT+08:00) Message-ID: <7853bbf0-34e5-4880-a2f4-2d73f25cd5e6@rock-chips.com> Date: Thu, 30 Oct 2025 11:13:51 +0800 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 10/10] arm64: dts: rockchip: rk3399-evb-ind: Add support for DisplayPort To: Peter Chen , Chaoyi Chen Cc: Heikki Krogerus , Greg Kroah-Hartman , Dmitry Baryshkov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Dragan Simic , Johan Jonker , Diederik de Haas , Peter Robinson , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org References: <20251029071435.88-1-kernel@airkyi.com> <20251029071435.88-11-kernel@airkyi.com> Content-Language: en-US From: Chaoyi Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9a331b863b03abkunmb7090e2043262e X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGUJNGFZNQ0tDGU9DGh9MSU1WFRQJFh oXVRMBExYaEhckFA4PWVdZGBILWUFZTkNVSUlVTFVKSk9ZV1kWGg8SFR0UWUFZT0tIVUpLSEpPSE xVSktLVUpCS0tZBg++ DKIM-Signature: a=rsa-sha256; b=SQVUwkwvxyCWtCdSzsP/tXB93YNtCupIhIhQ00CSdl54mjwHsgiZuOkw9accZWeqDE2m3y5GmX8bLQn1Dz42qXdQqPuIMzqAFw7dir7OI14TX7BSiWvgzFwiCL2OALE2z+GHw55hkOovciBLGJ5HKDcID5cMmDcTqARlrl/WMlY=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=u9ztqH78wDt1szeKu+Mrw37tmnOhAVykkfsydy8rr6U=; h=date:mime-version:subject:message-id:from; On 10/30/2025 10:50 AM, Peter Chen wrote: >>> Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is >>> short for Type-C connector, >>> and no control is needed for Type-C application. >>> Why is there a remote-endpoint connection between USB2 PHY and Type-C connector? >> From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ? >> > Have you tried debugging based on upstream code? Yes, I have tried both the v2 and v8 approaches, and both can work. > v2 is correct, but the dts needs to improve. > - There is a remote-endpoint connection for USB role switch between > Type-C connector > device and USB controller device > - There is a remote-endpoint connection for orientation and lane configuration > between Type-C connector device and USB/DP PHY device. In v8 patch5, we implemented typec_mux and typec_switch in the USB/DP PHY. I think the current remote-endpoint connections are all child node of the USB/DP PHY. That is: &tcphy0_dp {     mode-switch;     ... }; &tcphy0_usb3 {     orientation-switch;     ... }; Does this still need to be improved? Thank you. > > Peter > >> [0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/ >> >> Or is the following approach correct? >> >> >> port@0 { >> reg = <0>; >> >> usbc_hs: endpoint { >> remote-endpoint = <&tcphy0>; >> }; >> }; >> >> port@1 { >> reg = <1>; >> >> usbc_ss: endpoint { >> remote-endpoint = <&tcphy0>; >> }; >> }; >> >> port@2 { >> reg = <2>; >> >> usbc_dp: endpoint { >> remote-endpoint = <&tcphy0_typec_dp>; >> }; >> }; >> >> >>>>>>> + port@1 { >>>>>>> + reg = <1>; >>>>>>> + >>>>>>> + usbc_ss: endpoint { >>>>>>> + remote-endpoint = <&tcphy0_typec_ss>; >>>>>>> + }; >>>>>>> + }; >>>>>>> + >>>>>>> + port@2 { >>>>>>> + reg = <2>; >>>>>>> + >>>>>>> + usbc_dp: endpoint { >>>>>>> + remote-endpoint = <&tcphy0_typec_dp>; >>>>>>> + }; >>>>>>> + }; >>>>>>> + }; >>>>>>> + }; >>>>>>> + }; >>>>>>> +}; >>>>>>> + >>>>>> ..... >>>>>>> &u2phy0 { >>>>>>> status = "okay"; >>>>>>> + >>>>>>> + port { >>>>>>> + u2phy0_typec_hs: endpoint { >>>>>>> + remote-endpoint = <&usbc_hs>; >>>>>>> + }; >>>>>>> + }; >>>>>>> }; >>>>>>> >>>>>> There is no switch and mux, how to co-work with Type-C? >>>>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you. >>>> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY. >>> I assume the Micro-USB connector does not use Type-C/PD IC, is it >>> right? Does it relate to this patch? >>> >>> Best regards, >>> Peter >>> > -- Best, Chaoyi