From patchwork Sat Apr 9 11:21:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 559269 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 507E5C433F5 for ; Sat, 9 Apr 2022 11:22:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241472AbiDILYb (ORCPT ); Sat, 9 Apr 2022 07:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240568AbiDILYa (ORCPT ); Sat, 9 Apr 2022 07:24:30 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 591752A046D; Sat, 9 Apr 2022 04:22:23 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 7DBE84018C; Sat, 9 Apr 2022 11:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1649503341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zkq2bxwItwV7ZiHOcxMVzv2QIp4bSzwtr06iHqBY/+8=; b=OCbIGhjXabYctSBypkAOTJZpyaF+90eN2v56qcUDbfhzEY8KniJ5tZ1H0e7ArFlAROPfZY Qp7mnzSr+OpXmFm5HZBdnpCwnRn99+KoHroP0CI4rhY3Wjx5FpS860XavfJ4GZoRbAZBRC rqUs/AYoW9bTAyWjEQjVqEYXbBXJ3/Y= Received: from localhost.localdomain (fttx-pool-217.61.154.105.bambit.de [217.61.154.105]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id CAD2A36062E; Sat, 9 Apr 2022 11:22:20 +0000 (UTC) From: Frank Wunderlich To: linux-rockchip@lists.infradead.org Cc: Frank Wunderlich , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: rockchip: Add USB nodes for BPI-R2-Pro Date: Sat, 9 Apr 2022 13:21:35 +0200 Message-Id: <20220409112136.164481-2-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220409112136.164481-1-linux@fw-web.de> References: <20220409112136.164481-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: dcb0c52c-8a9b-4f7d-8fa3-639cbd8b5ded Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Frank Wunderlich Add usb2 nodes to Bananapi R2 Pro board Signed-off-by: Frank Wunderlich --- .../boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts index 067fe4a6b178..879557595a64 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts @@ -73,6 +73,50 @@ vcc5v0_sys: vcc5v0-sys { regulator-max-microvolt = <5000000>; vin-supply = <&dc_12v>; }; + + vcc5v0_usb: vcc5v0_usb { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usb"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_12v>; + }; + + vcc5v0_usb_host: vcc5v0-usb-host { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_host_en>; + regulator-name = "vcc5v0_usb_host"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_usb>; + }; + + vcc5v0_usb_otg: vcc5v0-usb-otg { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_otg_en>; + regulator-name = "vcc5v0_usb_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_usb>; + }; +}; + +&combphy0 { + /* used for USB3 */ + status = "okay"; +}; + +&combphy1 { + /* used for USB3 */ + status = "okay"; }; &gmac0 { @@ -368,6 +412,16 @@ pmic_int: pmic_int { <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + usb { + vcc5v0_usb_host_en: vcc5v0_usb_host_en { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc5v0_usb_otg_en: vcc5v0_usb_otg_en { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pmu_io_domains { @@ -485,3 +539,42 @@ &uart9 { pinctrl-0 = <&uart9m1_xfer>; status = "disabled"; }; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host0_xhci { + extcon = <&usb2phy0>; + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usb_host1_xhci { + status = "okay"; +}; + +&usb2phy0 { + status = "okay"; +}; + +&usb2phy0_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy0_otg { + phy-supply = <&vcc5v0_usb_otg>; + status = "okay"; +};