Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2403305lqt; Mon, 22 Apr 2024 09:42:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKav2/4Byxl6Pkso6WX1f9YO5wny8UJzFfMnh64PRxvrlx1bb9KHUbgtTclUY8iTGB72Og4U+IiEnBkUP4bnYAjy0bbXG2iFms4cPR/Q== X-Google-Smtp-Source: AGHT+IEW5QE39vunt0nA+/z3aWtyRodyEnyFpk2ir1f/zUyhZN8Fei6Gb8pIlEw2vPnO9e7do2X2 X-Received: by 2002:a05:6a00:2e10:b0:6ea:17ff:4dc0 with SMTP id fc16-20020a056a002e1000b006ea17ff4dc0mr262640pfb.4.1713804119711; Mon, 22 Apr 2024 09:41:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713804119; cv=pass; d=google.com; s=arc-20160816; b=wt1lLckomVW5se5PE1LWffUK0srLI+3yXrhty7LzdCiDYeWZsgSh8l7BZS+HNn0I08 IJ+GFi1x0HaIglViSZWZfEmht4TCY5RUX+kg4v8AM1veDCIk0Q40D7J9W+DpfiQR23oV TSD6xc7smgmMMNa942e/V/SYwRfxoz9AEuJSoLTjkqt5eCIr+HsTZitklCwupwxNNnua RBiIGZBvZaPyH0TNh4WSpJv7O2jWoZlJlPpj57QkNUyLweZQhxILJR4y0bgtBi35nBqJ Pu92K5bELYo6nqcHqgAZlOdC8PiwddfNnSEw1DZZJHRdUoRq29vdg06mjIQ9HxujZ1BA 7gbQ== 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; bh=JhAzD7O9dgLnM5biQwPsBuHDsBVHcegFGELUCbkTwYY=; fh=5sGA35n7zigtFlmq1mADrfJQ3jGu/uSz/HAiY46yR+s=; b=Nr5VQHtxxfUF5lQKufhNfm6gsO/KLDcnK5eoJqzwbi/buSwYw4o9Xj83UoLzL1shG6 GnNMxWs+1K0dPtyStToZBYzoCj5ZG9WRmVZuB34iHWIqRZB+VBAUkotZgQHLd0AaOQXy Qd30E+QoX2cp+l9iL5xPab0ssT820WKjO4trzwAIfmckkqD/ny6SoqSNUZh6kZlaeQcb r5bnKXNLdgD734uXcc7rQGMeZLA0PpNX1CKoaCu3vDOUvlXKoox1AAV7dx3OGOKlsZiR G3vdreajkNpspdQK3gYH9gePdAMKpazZ9nJeAXFu0YHoowkWtDWSqsZchSzkA21HKZGu Rh7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-153724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bd18-20020a056a00279200b006ed2168d42bsi8077182pfb.87.2024.04.22.09.41.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:41:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153724-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; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-153724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de 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 546AD287097 for ; Mon, 22 Apr 2024 16:40:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80D21154C10; Mon, 22 Apr 2024 16:40:00 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 5913D15382E for ; Mon, 22 Apr 2024 16:39:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804000; cv=none; b=ZbBLclkjomCQhni9NjjFpaQ3N4iRZ4Mwh5frSo71ym9cGen+L9vYQmsEQe10b+xNrfi9n2XfBXabpSIECxedJKCc26tq0WqNTjbelnWgzRkrPAC4w3NNsjbLrFc2W5/u8L9ilnGu50s5Y/yAR0lYwoJj4PDd4o29spi7npekhY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804000; c=relaxed/simple; bh=eTJzE4ddILeETJjvUuFFbdH2Scx/iVqDMflf2dR101M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cC8lCXL9CInc4YNSMmAm+2QaxJplv1BOj8UoWm52UNIIgv8jNenmeoLzHHkEuyNTnT/6zMqI38zAZXMg9YxFwSr6d3BDIQFwKVEN29QYCYm7IdonUfI5/a8Sn74vddCThR/ooYDimzFTM70yfagHEM8OkQqcrbB2qgAc1qGyIbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e861d85.versanet.de ([94.134.29.133] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rywhu-0004gq-MA; Mon, 22 Apr 2024 18:39:54 +0200 From: Heiko Stuebner To: heiko@sntech.de Cc: quentin.schulz@theobroma-systems.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH v2 3/3] arm64: dts: rockchip: add dual-role usb3 hosts to rk3588 Tiger-Haikou Date: Mon, 22 Apr 2024 18:39:51 +0200 Message-Id: <20240422163951.2604273-4-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422163951.2604273-1-heiko@sntech.de> References: <20240422163951.2604273-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Heiko Stuebner Apart from the host-only usb3 controller (host2) the rk3588 also provides two dual-role controllers. On the Tiger-Haikou combination these are connected to the lower usb3-host port in host-only mode and the micro-usb3 port for dual-role operation. Add the necessary controllers, phys to the Tiger-Haikou board and enable the usb-id extcon. Signed-off-by: Heiko Stuebner --- .../boot/dts/rockchip/rk3588-tiger-haikou.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts index 2aa43e7430e5..52695b6c113a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts @@ -113,6 +113,16 @@ vcc5v0_baseboard: vcc5v0-baseboard-regulator { vin-supply = <&dc_12v>; }; + vcc5v0_otg: vcc5v0-otg-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&otg_vbus_drv>; + regulator-name = "vcc5v0_otg"; + regulator-always-on; + }; + vcc5v0_usb: vcc5v0-usb-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_usb"; @@ -137,6 +147,10 @@ &combphy2_psu { status = "okay"; }; +&extcon_usb3 { + status = "okay"; +}; + &gmac0 { status = "okay"; }; @@ -199,6 +213,13 @@ haikou_keys_pin: haikou-keys-pin { <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + usb2 { + otg_vbus_drv: otg-vbus-drv { + rockchip,pins = + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &sdmmc { @@ -214,6 +235,23 @@ &sdmmc { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + phy-supply = <&vcc5v0_otg>; + status = "okay"; +}; + +&u2phy1 { + status = "okay"; +}; + +&u2phy1_otg { + status = "okay"; +}; + &u2phy2 { status = "okay"; }; @@ -236,6 +274,13 @@ &uart2 { &uart5 { rts-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; +}; + +&usbdp_phy0 { + status = "okay"; +}; + +&usbdp_phy1 { status = "okay"; }; @@ -249,6 +294,19 @@ &usb_host0_ohci { status = "okay"; }; +/* host0_xhci on Q7_USB_P1, usb3-otg port */ +&usb_host0_xhci { + dr_mode = "otg"; + extcon = <&extcon_usb3>; + status = "okay"; +}; + +/* host1_xhci on Q7_USB_P0, lower usb3 port */ +&usb_host1_xhci { + dr_mode = "host"; + status = "okay"; +}; + /* host1 on Q7_USB_P3, usb2 port */ &usb_host1_ehci { status = "okay"; -- 2.39.2