Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1644959lqe; Mon, 8 Apr 2024 15:53:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDGk1HN52NBa7TuajQsE1BfpCAuXxjGkS2VoIqjsfzhDx6sxqMFLqpeNldTKJ57JNAlP391LTORWF5DbBEsuzCs7DsW3xI4ii5hVgxvQ== X-Google-Smtp-Source: AGHT+IHXg2xeH6mVjL2D70RiiIgQ+qW8G3hrvOlZamKPQqcegsm4tqxlOWKDeVCkswV3OlD+J1lG X-Received: by 2002:a17:90a:bd81:b0:2a2:f249:6180 with SMTP id z1-20020a17090abd8100b002a2f2496180mr1452145pjr.18.1712616790448; Mon, 08 Apr 2024 15:53:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712616790; cv=pass; d=google.com; s=arc-20160816; b=tby0IT/n/EKFs/ZGbwWbfNRZRKGUVuZe7CACF2XyhdLREDe3sXSbtUiUJGyi4jMIwW FoRa8yiUXv/hPOb8pbHq+bqlQryRkYn7r1YRJq7Kr2XMM4KJW73qTccZYwAkHv+rb+Dy obBZu3HLldrJkfDnrqtrss7f/bMDw4DeWl+aDfTSdrwCEsDaHRcNoLrG8TKy0AZEAqqd 0ThM421LLpWbacvff16k+ekpUyLL+oMCfZA77Tiu65JHEqiS/ruzbJ7HMhXYWo42FROd e25K5/GhGf+T4e4pXcnlyEVPnTuWQQHMwRdMG4UOPjA+bhzGsR/CjpIBg9jtjst2mLJr gjng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=otUWg72L8F5zS9POIJUH6R5zCFUJ1t1kxnft+tPoGWM=; fh=PR8oX9iAuEV9EE88DNlIUN0LZl0FYAIumwLgJAahQOY=; b=Uozg8CMZhoEs6m6BLbRUt0PhWj1bp0ao814RnvhehKH7OVxQL1xSlqb+WRX6pycVfR KIXLlsu4D5ras9fneFuyC98NoPkV1Xc+o3553z4/8MGQ6h7KHZQazaC2K3jTARoohslv ZMFb6sz+9fITb/NpBqjXZp3smnUZJLUjB1WSkPPoXs2753np9fHnNY+mWtkjJBfcCDT6 109dbnJxyfzZHuR3aQtw2vjZn8j8E6wzGrOjIz5Lug2Mj2JE84tteK7ml2VZ5QX7WjN9 /mjl3InE9eT1AABWtl85OIXEl8EOEFnOZ9hJ5gHC5McFpgM4Ur5yhtaYFEYAgV6uDdfA UwBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Obn+kmVk; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-135992-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135992-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q1-20020a17090a68c100b002a214986325si7390205pjj.12.2024.04.08.15.53.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 15:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135992-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Obn+kmVk; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-135992-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135992-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 21126284655 for ; Mon, 8 Apr 2024 22:53:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 906A214D45B; Mon, 8 Apr 2024 22:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Obn+kmVk" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 2C56D149E1F; Mon, 8 Apr 2024 22:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712616678; cv=none; b=MCwzjSR7srHTEZMW/SPS13b/p5aEIGWwskhWzY+z0pUPwAN5IcesgEM7+Cax40WdTswvGwmZRm36OqyhclgPFBTFMnVs2fWFAyPyRLQCdqIalsKTdNNMlkooOTzhz7u4fcf+gx5zEeOKdyntDZ68oTUPrv/Uwr6MsH//zRY3PYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712616678; c=relaxed/simple; bh=Fzy9OkX4/BvaUM8Su85wGM2exBXf+UKj/bJzca5C88w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y52kbievuUAgZVm5XdxYK/PIew1MOEyxxWVhsmkXIUwkmGV0UDhsYVRhv/jxfWT0N5e7gztPQzXpUUh5kmIR1IWo5aNuU84/HsHOyvV4g6XPtyaIYSf4hiPVZyL/3qXsSGXfZteXpjqrgb6y0jtFDx9dkz4faXqhN9Ba9tMUWxA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Obn+kmVk; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712616671; bh=Fzy9OkX4/BvaUM8Su85wGM2exBXf+UKj/bJzca5C88w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Obn+kmVk300KWeY7zfJhsFzII439WpOclJoRtcSkcBjqn7mgFzNTRiqRV4VpDP1Md hc9crca9MWMwRB0Gk87bJNsWFScbHzjlLoEKgupi9oFAmPNyWp9TLYDgGcRopcBXqs oUImzeMv4p4kdk+ecoVi1V6OO8tHF6PmZpOCfj3Sg+Y2JoK2E+0Gp4Y690+B6L9VtY AaouZkZDSKT+nhVb7jSwcclwtYZtFts5rD1c5rVVjZhVGMCnthYrjBqfzBVcky1Fhb qOsZAaHxdxUont0igOzovJb5dFxAsaz0NcI/tsEBY/9NNZUTxqvOpwCEcdK+7bN/Id zZ9kZTrQ4Cz7w== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 42B4937820F5; Mon, 8 Apr 2024 22:51:11 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 48B344800D6; Tue, 9 Apr 2024 00:51:10 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner , Vinod Koul , Kishon Vijay Abraham I , linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Frank Wang , Kever Yang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v5 08/10] arm64: dts: rockchip: add USB3 to rk3588-evb1 Date: Tue, 9 Apr 2024 00:50:35 +0200 Message-ID: <20240408225109.128953-9-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408225109.128953-1-sebastian.reichel@collabora.com> References: <20240408225109.128953-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for the board's USB3 connectors. It has 1x USB Type-A and 1x USB Type-C. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-evb1-v10.dts | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts index de30c2632b8e..c3746d3a9b1d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -9,6 +9,7 @@ #include #include #include +#include #include "rk3588.dtsi" / { @@ -224,6 +225,18 @@ vcc5v0_usb: vcc5v0-usb-regulator { regulator-max-microvolt = <5000000>; vin-supply = <&vcc5v0_usbdcin>; }; + + vbus5v0_typec: vbus5v0-typec { + compatible = "regulator-fixed"; + regulator-name = "vbus5v0_typec"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>; + vin-supply = <&vcc5v0_usb>; + pinctrl-names = "default"; + pinctrl-0 = <&typec5v_pwren>; + }; }; &combphy0_ps { @@ -284,6 +297,56 @@ &gmac0_rgmii_clk &i2c2 { status = "okay"; + usbc0: usb-typec@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio3>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&usbc0_int>; + vbus-supply = <&vbus5v0_typec>; + status = "okay"; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "source"; + op-sink-microwatt = <1000000>; + sink-pdos = + ; + source-pdos = + ; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usbc0_orien_sw: endpoint { + remote-endpoint = <&usbdp_phy0_orientation_switch>; + }; + }; + + port@1 { + reg = <1>; + usbc0_role_sw: endpoint { + remote-endpoint = <&dwc3_0_role_switch>; + }; + }; + + port@2 { + reg = <2>; + dp_altmode_mux: endpoint { + remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; + }; + }; + }; + }; + }; + hym8563: rtc@51 { compatible = "haoyu,hym8563"; reg = <0x51>; @@ -410,6 +473,16 @@ vcc5v0_host_en: vcc5v0-host-en { rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb-typec { + usbc0_int: usbc0-int { + rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + typec5v_pwren: typec5v-pwren { + rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm2 { @@ -1041,6 +1114,22 @@ &sata0 { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + +&u2phy1 { + status = "okay"; +}; + +&u2phy1_otg { + status = "okay"; +}; + &u2phy2 { status = "okay"; }; @@ -1079,3 +1168,57 @@ &usb_host1_ehci { &usb_host1_ohci { status = "okay"; }; + +&usbdp_phy0 { + orientation-switch; + mode-switch; + sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; + sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + usbdp_phy0_orientation_switch: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_orien_sw>; + }; + + usbdp_phy0_dp_altmode_mux: endpoint@1 { + reg = <1>; + remote-endpoint = <&dp_altmode_mux>; + }; + }; +}; + +&usbdp_phy1 { + /* + * USBDP PHY1 is wired to a female USB3 Type-A connector. Additionally + * the differential pairs 2+3 and the aux channel are wired to a RTD2166, + * which converts the DP signal into VGA. This is exposed on the + * board via a female VGA connector. + */ + rockchip,dp-lane-mux = <2 3>; + status = "okay"; +}; + +&usb_host0_xhci { + dr_mode = "otg"; + usb-role-switch; + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + dwc3_0_role_switch: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_role_sw>; + }; + }; +}; + +&usb_host1_xhci { + dr_mode = "host"; + status = "okay"; +}; -- 2.43.0