From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C69EDCCD199 for ; Thu, 16 Oct 2025 02:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YKR7WH7HVRM7I4QNrGpBZ8XBUJTtZLq0dSb5PE11q48=; b=kV6U1pgLVGQzXl y8A5PDPtLGOeN6G+2cpcaIXVtuIN3bzXCqZPxa8nc6OTwhphtmre7AcpX9Owt9nZ+HmNeXTe6qqwJ DV01sBvkyJoqmuIhgJXVReaKsdFjYUSDoNQFFJmOgmMy4Rwp3BUYJd7VZXoZLcy0qAL+vTey+AqiO DP7WUt7q5O3LtrjeZtZbN7k8dmR3wv5Oq7hEcX4+P7tUjMGqdRIB65RnXste6rteI38swAT4nrSUF yR75WzSis8ywdZPpWfbxZBRFynB/grKmEaQ0gAYfP6yUyTNCNNvplniX+8zGKxv+E9CVL9K/Yl+dU tyUo+5a197HwbnnO1ceQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9Djz-00000003HKQ-1Lw9; Thu, 16 Oct 2025 02:29:19 +0000 Received: from smtpbgeu1.qq.com ([52.59.177.22]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9Djq-00000003GsW-3Ucz; Thu, 16 Oct 2025 02:29:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=airkyi.com; s=altu2504; t=1760581709; bh=1RfAR5qe3fDpGYWfe4IMPee9wlWopj1wjBrVtJQSHJQ=; h=From:To:Subject:Date:Message-Id; b=TTm1HCrbqeXq7P1kxCRfSNMPgBplWP2oFJ6+09c/9zfpJsqmf2HLs5191+C++wwJj 4H2Qh48kGKQUoM+GIm/S7UFRMbktUu37uDg0Ubii2SFZHAy7u/MoHESWDjNGa87/iV X78FLc7P6o9kVyrHWrvCZTT1sT6pr+Vc/+vV6Vzc= X-QQ-mid: zesmtpgz1t1760581707te7834fa0 X-QQ-Originating-IP: fu4+9mqDE3XZAMSCh/z+SENLWrlcpaz7T3n6vsQJy5o= Received: from DESKTOP-8BT1A2O.localdomain ( [58.22.7.114]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 16 Oct 2025 10:28:25 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 18195829153663395563 From: Chaoyi Chen To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Heikki Krogerus , Greg Kroah-Hartman , Chaoyi Chen , Dragan Simic , Johan Jonker , Diederik de Haas , Dmitry Baryshkov , Peter Robinson Cc: 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 Subject: [PATCH v6 8/8] arm64: dts: rockchip: rk3399-evb-ind: Add support for DisplayPort Date: Thu, 16 Oct 2025 10:27:41 +0800 Message-Id: <20251016022741.91-9-kernel@airkyi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20251016022741.91-1-kernel@airkyi.com> References: <20251016022741.91-1-kernel@airkyi.com> X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpgz:airkyi.com:qybglogicsvrsz:qybglogicsvrsz4a-0 X-QQ-XMAILINFO: Mdc3TkmnJyI/g46mb2NUghtoATatWDvJeUu+ylsQ8Azc35inUhrIlLpG /b5dzCzBD2otk3ob9sEd9GTgeXbplYioANOCDD8r+wp3P5LAye9/OM5awVe8CGJxR/oqnKm O6+L32+NKMxzUzIduSURMh0vmVPoGVsybycLh40fVl8QArgSLumoP/NQdAGuztGyVUYeiy/ lkfiWDi8/xWHgAEysDPoxs/OnkyrIsNUOX7DMzygIIa/omYumH3UTkAc3SHZrUnkn+naH9C lsiaH5Ce1uQKniNQjqqdaEIzRkkvRhiQ41sAmL1OIiWgmQpXu9dfWicppjaIqq2bsDA4Sq0 EWELGlFq+xrf2d4i4uvhMUko3CDH9OiX8IrBjZzeziv9XkBrLagl4SjeCqegV5V2nv4vWU8 gdOVxfx/Hf9HMiEpoP3CKyEOHBH1C9wD3vANHIQnOdBhaIeGInVyPdBPL1AUQC9zVddojI6 14pISv2VwCfpmXYvaSi2EdV05h8Pl/IgfHCtS8Dfpyoyak/br5WHSP2mr4vK1hJh6pKzxhd Y2fk46iBkidEB3P7i70TOKarBGWsxesRHhMU3oaVhYJg6IwQ1q67/CVNHg+QXRr8DuJpSzU WumDQG1NFva4XQ1daiV197a+zxEQzEwReqQxkzi0QYo9ocgG1OQ3c3NqihtXUlWtEoUjrFj P2i8U/5HMSQ+ZKheexjW+YXyRARTl3oMC4xvI29RpGWqU9Gd+x86A3FbR/ZPrBeaNQdGRLQ Mk/FM65T7EOyWJrK6kR9/l1PyDOgH4fu9foxKkiVFaOuhMIKJx+01F/ovgmG8CONFctQk3T 1qvUMf7U8uLqeirS3k052r60A7+tilWFa7y5R1qYebaZlXwP/4E6rGLx1baNtYkKYcBz2kl ByXINEbh8/HNnGFcp2ylOCIljE9yYIbGp5HCx5ctP+ysAOFuYKufmWgF/YDzNs9TVZzSh0j PNVjcmN4fDc7D32OuGLlhUmf97ysuZ0digBWqD195g2U9s+/WgWx4amYUIv0SkS6y0FvME6 oO+MMmjcoC5GqprmgqsXsIgecnI4RaW4caczAceG30vaUIW7r0 X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= X-QQ-RECHKSPAM: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251015_192911_510643_089E1C7E X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Chaoyi Chen The RK3399 EVB IND board has a Type-C interface DisplayPort. It use fusb302 chip as Type-C controller. fusb302 chip ---> USB/DP PHY0 <----> CDN-DP controller Signed-off-by: Chaoyi Chen --- (no changes since v4) Changes in v3: - Fix wrong vdo value. - Fix port node in usb-c-connector. Changes in v2: - Add endpoint to link DP PHY and DP controller. - Fix devicetree coding style. .../boot/dts/rockchip/rk3399-evb-ind.dts | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts index 70aee1ab904c..aeeee6bd2973 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts @@ -4,6 +4,7 @@ */ /dts-v1/; +#include #include "rk3399.dtsi" / { @@ -19,6 +20,21 @@ chosen { stdout-path = "serial2:1500000n8"; }; + sound: sound { + compatible = "rockchip,rk3399-gru-sound"; + rockchip,cpu = <&i2s0 &spdif>; + }; + + vbus_typec: regulator-vbus-typec { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_typec0_en>; + regulator-name = "vbus_typec"; + vin-supply = <&vcc5v0_sys>; + }; + vcc5v0_sys: regulator-vcc5v0-sys { compatible = "regulator-fixed"; enable-active-high; @@ -31,6 +47,11 @@ vcc5v0_sys: regulator-vcc5v0-sys { }; }; +&cdn_dp { + phys = <&tcphy0_dp>; + status = "okay"; +}; + &cpu_b0 { cpu-supply = <&vdd_cpu_b>; }; @@ -55,6 +76,12 @@ &cpu_l3 { cpu-supply = <&vdd_cpu_l>; }; +&dp_out { + dp_controller_output: endpoint { + remote-endpoint = <&dp_phy_in>; + }; +}; + &emmc_phy { status = "okay"; }; @@ -341,6 +368,71 @@ regulator-state-mem { }; }; +&i2c4 { + i2c-scl-rising-time-ns = <475>; + i2c-scl-falling-time-ns = <26>; + status = "okay"; + + usbc0: typec-portc@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio1>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&usbc0_int>; + vbus-supply = <&vbus_typec>; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + op-sink-microwatt = <1000000>; + sink-pdos = + ; + source-pdos = + ; + + altmodes { + displayport { + svid = /bits/ 16 <0xff01>; + vdo = <0x00001c46>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usbc_hs: endpoint { + remote-endpoint = <&u2phy0_typec_hs>; + }; + }; + + port@1 { + reg = <1>; + + usbc_ss: endpoint { + remote-endpoint = <&tcphy0_typec_ss>; + }; + }; + + port@2 { + reg = <2>; + + usbc_dp: endpoint { + remote-endpoint = <&tcphy0_typec_dp>; + }; + }; + }; + }; + }; +}; + &i2s2 { status = "okay"; }; @@ -354,6 +446,16 @@ &io_domains { }; &pinctrl { + usb-typec { + usbc0_int: usbc0-int { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + vcc5v0_typec0_en: vcc5v0-typec0-en { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; @@ -400,10 +502,48 @@ &sdmmc { status = "okay"; }; +&sound { + rockchip,codec = <&cdn_dp>; + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + &tcphy0 { status = "okay"; }; +&tcphy0_dp { + mode-switch; + + port { + #address-cells = <1>; + #size-cells = <0>; + + tcphy0_typec_dp: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc_dp>; + }; + + dp_phy_in: endpoint@1 { + reg = <1>; + remote-endpoint = <&dp_controller_output>; + }; + }; +}; + +&tcphy0_usb3 { + orientation-switch; + + port { + tcphy0_typec_ss: endpoint { + remote-endpoint = <&usbc_ss>; + }; + }; +}; + &tcphy1 { status = "okay"; }; @@ -418,6 +558,12 @@ &tsadc { &u2phy0 { status = "okay"; + + port { + u2phy0_typec_hs: endpoint { + remote-endpoint = <&usbc_hs>; + }; + }; }; &u2phy0_host { -- 2.49.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy