From patchwork Wed Jul 12 16:51:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 702431 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E79C7EB64DA for ; Wed, 12 Jul 2023 16:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233372AbjGLQwt (ORCPT ); Wed, 12 Jul 2023 12:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjGLQwr (ORCPT ); Wed, 12 Jul 2023 12:52:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 949C810CB; Wed, 12 Jul 2023 09:52:46 -0700 (PDT) Received: from jupiter.universe (dyndsl-091-248-191-111.ewe-ip-backbone.de [91.248.191.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id ED6476607027; Wed, 12 Jul 2023 17:52:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689180765; bh=88rywqObFwpBKAI+SECDCZP0Ch3+dLlV5WnpkFjXbX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UxsdaLgLBD2WNL/TdPuXumYNKwmN0BE4DkRYGXXhVh9ptRrCb7NtmbcGszmOX3Qoy lIEa7N18QaVlPKAUTCaELHG7aFrzzLE+4aLjUQbk+5V2e+TEYEVGRTFyBYRw1Kswcu FxL6SAS8YmhSsAMXc+ZOjQwd98Ps8v8WdDCOXduJUHPK5dwyboXywtWXbj2CGvc5yq Pz7ndHHYABvD4IRlNDqVi7FlfX1SvbG9XM/wHJ+RRRCvHz5kKMSGn88dO5eWERJbjv 49S46oXM5xv34hetuqhS/kapqmYossQ0SE1WCSlxT9T8yNFInsGPtuUINEDPTTY4JA UGnnqUCFVR3nw== Received: by jupiter.universe (Postfix, from userid 1000) id 1B7C248059A; Wed, 12 Jul 2023 18:52:43 +0200 (CEST) From: Sebastian Reichel To: linux-rockchip@lists.infradead.org, Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: add USB2 Date: Wed, 12 Jul 2023 18:51:05 +0200 Message-Id: <20230712165106.65603-4-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230712165106.65603-1-sebastian.reichel@collabora.com> References: <20230712165106.65603-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable USB2 (EHCI and OCHI mode) support for the Radxa ROCK 5 Model B. This adds USB support on the M.2 Key E, both USB2 ports and USB2 mode for the upper USB3 port (the one further away from the PCB). The lower USB3 (closer to the PCB) and the USB-C ports use the RK3588 USB TypeC host controller, which is not yet supported upstream. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-rock-5b.dts | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index 9cea262998b4..6be759903411 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -43,6 +43,20 @@ fan: pwm-fan { #cooling-cells = <2>; }; + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_host"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_host_en>; + vin-supply = <&vcc5v0_sys>; + }; + vcc5v0_sys: vcc5v0-sys-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_sys"; @@ -201,6 +215,12 @@ hp_detect: hp-detect { rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + usb { + vcc5v0_host_en: vcc5v0-host-en { + rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm1 { @@ -564,3 +584,38 @@ &uart2 { pinctrl-0 = <&uart2m0_xfer>; status = "okay"; }; + +&u2phy2 { + status = "okay"; +}; + +&u2phy2_host { + /* connected to USB hub, which is powered by vcc5v0_sys */ + phy-supply = <&vcc5v0_sys>; + status = "okay"; +}; + +&u2phy3 { + status = "okay"; +}; + +&u2phy3_host { + phy-supply = <&vcc5v0_host>; + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +};