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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 185CACCD1AB for ; Thu, 23 Oct 2025 03:34:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 80EED10E2AA; Thu, 23 Oct 2025 03:34:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=airkyi.com header.i=@airkyi.com header.b="lLXekl7B"; dkim-atps=neutral Received: from smtpbg154.qq.com (smtpbg154.qq.com [15.184.224.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 572B210E2AA for ; Thu, 23 Oct 2025 03:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=airkyi.com; s=altu2504; t=1761190431; bh=1RfAR5qe3fDpGYWfe4IMPee9wlWopj1wjBrVtJQSHJQ=; h=From:To:Subject:Date:Message-Id; b=lLXekl7BrZcmWcRE9uY8XNOroervE6SJueaOo0qf7YTU9kCjMdcXEqomppvfQJbpM 61pysI63OASjZBXZHZ60V0xwdeg+pihsNr7GFZlD9h2sw6fCsxhCbrY9Igvx3a82jy 48BBaYG98BGGWi98PH8TkZc4syIJFQnscySFRqTM= X-QQ-mid: esmtpsz16t1761190266t43abe1df X-QQ-Originating-IP: 0d5iSVWuoMY/pzXTcvdmH8vOvSaqskohuXcY4gRyoIQ= Received: from DESKTOP-8BT1A2O.localdomain ( [58.22.7.114]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 23 Oct 2025 11:31:03 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 14524474531760413252 From: Chaoyi Chen To: 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 , Chaoyi Chen , Dragan Simic , Johan Jonker , Diederik de Haas , 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 v7 9/9] arm64: dts: rockchip: rk3399-evb-ind: Add support for DisplayPort Date: Thu, 23 Oct 2025 11:30:09 +0800 Message-Id: <20251023033009.90-10-kernel@airkyi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20251023033009.90-1-kernel@airkyi.com> References: <20251023033009.90-1-kernel@airkyi.com> X-QQ-SENDSIZE: 520 Feedback-ID: esmtpsz:airkyi.com:qybglogicsvrsz:qybglogicsvrsz4a-0 X-QQ-XMAILINFO: NRN3UPsLzYKVTjlmPYbyiNXjz22MvBdoGKMUaNflCEKaCWWZ5sKYe90Y Tn1gYr/RvEiNOqWUpqBLyVxFJYTdWyrTucTUwlCrbiOJsALVswYeLOy/TvnddW4Mg9Hun5/ QxxU1AvkgM4uoNS5eiwgIvjYlYO1pJcaB27bXFlEL0/XSBEuptuvA0eSNXcomZqPTb7cmn6 Aq0sUtKt49h1nENG4hVTWQpKuH9Vkq/502+w1+R12g+wMO4cJnEjAEct4TO/Dze3luxlHhi UaxkGVMn7EWGX+4/ZmGyYXxSNK0GB4zJ/p5RNlAZW3wEtq8i6iWsYQkkF5sqUdEnvrEMP4g /jX1NozxcGz9LdFMTaKqQn1N737eXDLFf0ALtTSTjI7MJVmjvL5bDfyyF1Hp1jShv3pVjFh zKY6Oee9o1kWB6TDYG749MlFFBdKWDrMHf+a1BVoNSHxxAZp6hlrfpRb325imj2M7gPMKA3 xPhd856fgyLpUCDW+uPUCa3LzE3PdqvAZBISknqNUdzbfRTIxxOExRt5K+opiy+qgNpLGrC 0LlWloYGueEDpdZw1Bdw/ENoASHQoQPAz0/Tgq0AV5+L6mayUTD+wKKFXeXYJRFBupHyf3L cwOGdtc18W46XZTEdW45pGAyzhavDUDfMGxmVxsEuajTwsu/wQ0thun7EL/GINzUkuVeyWE Tfm4+pfzuDUDGlIccE6mSxREHb8dWI8sQAZ5+OVrLYBbQGqazinft8qwBntv+2gBe/IE1zF 9242tFDNWHvTlXIsyluiQyTaDkX5RzwXsYJ2XqMvMIU92SynJ7H3MIaqhD9JnQFUDrIhI2E ntoWt6TQa6Qf1onjuoOZXa6aGb1bRHL44QOMnzz6ww/It58tAjz+B0ChOF9+QlyovuPZeqY m2MX3b+2JlhOfTVhSxEDF4cI2TFQWQB1fdHs9Sx03N5prE0CiFj+RS40XD9KGeAp8h1lis6 4AltKdYObTnl10NXCKaj9pizWqOOAuew2vYDlfu9iC3jhm3Y8j9SsOtQWcijHagBAUirgRD pRYak0uQ== X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk= X-QQ-RECHKSPAM: 0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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