From patchwork Tue Jul 21 15:24:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11675895 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 564EB159A for ; Tue, 21 Jul 2020 15:25:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F7F8206E3 for ; Tue, 21 Jul 2020 15:25:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Od2FlLZk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vqQf8Bm4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="i2CmEJaf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F7F8206E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y93Xfh4a0h2o3Ug96TMYq6CQbcf7aAFLa/wCq2zIOkk=; b=Od2FlLZkt+FdSOwcnLx7DKRg9 pxR/J6rekqy5QTShUCvXkTX2PofqZRJBKJ9hUpjlJ9e23vrywwFYbj99eh6G0/XnOTJvCF0Ehk8Z8 6M+Uf8kUKEHz73A/D6r4mQQxgeqAst0NKTcNjauttykZWhcuOkqE+5m5bjgVXUyUdr/Hgmx3cwJRK PIPkU2oLIRdyvsMXlp+++yxgQectQqCwh9ef6lIm8L5OuGiTMsgmmhQzEdK8clTS0bke8T5rY+FwC w9HAXE+wLtdzOKVb8FYsVfsObniTUxma1t4NdystuYIZkWYOUYWkK/YI6Sn7vwebn9ZM/6YfVreI/ ntQMoksxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxu96-0003zj-Sf; Tue, 21 Jul 2020 15:25:32 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxu93-0003x2-5M for linux-rockchip@merlin.infradead.org; Tue, 21 Jul 2020 15:25:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=WUEZCvXM6b4XdeRuAzykStbjmf+stosFsibv2H/fuuY=; b=vqQf8Bm4alVLcPCRJZ72DmHid2 SovFGHrdLcn2mTJsC6mo7pKTT9BVDDK4/aACTNo0lpm9C1P3EHgaZucQLpaHVMF9HaZ+7x8kkRi7S fS7IcJ+GcUxR1S7zoeLWeQlevNchbkdHLri6wuh43YXS7C1lM+cw7j86VDh2NBO71or3PS9sEBraE XZLVM7hLdiv9uoo8tOMmSCQfnu2Cc+kvO9vJrTADUYtFOG8A2QRY7NwvNNAX6rvC/yzx36nl0PcAV HwF7wFHGZTcc6H2i6pXI+0GcR2Jr5D/6OhD0im5N/p6xnHyigt/amjfwmjoeHTbhrh7VhpQ7ygGot 4wXi0PxQ==; Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxu8q-0003Xf-Mo for linux-rockchip@lists.infradead.org; Tue, 21 Jul 2020 15:25:27 +0000 Received: by mail-pj1-x1043.google.com with SMTP id b92so1834552pjc.4 for ; Tue, 21 Jul 2020 08:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WUEZCvXM6b4XdeRuAzykStbjmf+stosFsibv2H/fuuY=; b=i2CmEJafkjo7J6e543mtWxuQ7BV8qptSKRdAPSOhWwC9o8oK3znpAsfeLTfqE1yeeX 38sqTWa9U7LBwYeK3UyV8aCLOb6dKfJ7bUHWIzEZ0y4nxSCOo09HqVKnooasHXXKJZjo biqmc7zlm2ttxUXez7ZOa2DkvmOCBwPdq+Yc8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WUEZCvXM6b4XdeRuAzykStbjmf+stosFsibv2H/fuuY=; b=Xbgf5lyOOcztDDGP03REvsxsmHjP36+IPcgBe5bnyOMC8N1sI8g+TJ4jAzjHIs1Gms CG4sNWnKT7Ys3ahPAzQzfudWO27ZFl0FlKpt91BpbhfBzmL1qA4JCSMUENINkbmfj6A9 YdZSRIMNSFFo7UAuaCG9RedsosFH2EUYXzqWWHKyUmcbElX/SxW4L8yHnp/jLfkO75bi YQbOwBwGRznzHcH/Hpoa3/oqZdSJskfPcTYCmM2stvRHoFSBC0pGYy+8/PIppXKVL90g XN31or1zRbOJNCKmJvX3iO53xQa2KysAtk0uO7vMzy3Pldd35zdnP+jcm7D8LmgaChgi BNYQ== X-Gm-Message-State: AOAM5327hQTeIPlTPIgF+2iVspJE2hZS8Rm3mXNeP0jqDos44sX/EIXE XrxMbhvzPg67RnVgOYWn7+/KnA== X-Google-Smtp-Source: ABdhPJx4Bg3JtxNouo1x47vGUJNyouFyGpDCtfHILG0yrhT5dnCdzjLHMioRxasG1w5ykL6SUdP0tw== X-Received: by 2002:a17:90a:ee95:: with SMTP id i21mr5543937pjz.77.1595345112809; Tue, 21 Jul 2020 08:25:12 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:3df7:ef76:b2b5:fa14]) by smtp.gmail.com with ESMTPSA id h131sm2876838pfe.138.2020.07.21.08.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 08:25:12 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH v2 04/12] ARM: dts: rockchip: Add USB for RockPI N8/N10 Date: Tue, 21 Jul 2020 20:54:38 +0530 Message-Id: <20200721152443.37602-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721152443.37602-1-jagan@amarulasolutions.com> References: <20200721152443.37602-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_162518_501297_20079EA8 X-CRM114-Status: GOOD ( 13.83 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Radxa dalang carrier board has 2x USB 2.0 and 1x USB 3.0 ports. This patch adds support to enable all these USB ports for N10 and N8 combinations SBCs. Note that the USB 3.0 port on RockPI N8 combination works as USB 2.0 OTG since it is driven from RK3288. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v2: - none arch/arm/dts/rk3288-vmarc-som.dtsi | 42 ++++++++++ arch/arm/dts/rk3399pro-vmarc-som.dtsi | 78 +++++++++++++++++++ .../dts/rockchip-radxa-dalang-carrier.dtsi | 18 +++++ 3 files changed, 138 insertions(+) diff --git a/arch/arm/dts/rk3288-vmarc-som.dtsi b/arch/arm/dts/rk3288-vmarc-som.dtsi index 7a9fd40e5b..72a503e50d 100644 --- a/arch/arm/dts/rk3288-vmarc-som.dtsi +++ b/arch/arm/dts/rk3288-vmarc-som.dtsi @@ -258,4 +258,46 @@ rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; }; }; + + vbus_host { + usb1_en_oc: usb1-en-oc { + rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + vbus_typec { + usb0_en_oc: usb0-en-oc { + rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&usbphy { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1 { + status = "okay"; +}; + +&usb_otg { + status = "okay"; +}; + +&vbus_host { + enable-active-high; + gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ +}; + +&vbus_typec { + enable-active-high; + gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ }; diff --git a/arch/arm/dts/rk3399pro-vmarc-som.dtsi b/arch/arm/dts/rk3399pro-vmarc-som.dtsi index 37ed95d5f7..111d6cf9a4 100644 --- a/arch/arm/dts/rk3399pro-vmarc-som.dtsi +++ b/arch/arm/dts/rk3399pro-vmarc-som.dtsi @@ -304,6 +304,18 @@ rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>; }; }; + + vbus_host { + usb1_en_oc: usb1-en-oc { + rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + vbus_typec { + usb0_en_oc: usb0-en-oc { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &pmu_io_domains { @@ -324,8 +336,74 @@ max-frequency = <150000000>; }; +&tcphy0 { + status = "okay"; +}; + &tsadc { rockchip,hw-tshut-mode = <1>; rockchip,hw-tshut-polarity = <1>; status = "okay"; }; + +&u2phy0 { + status = "okay"; + + u2phy0_otg: otg-port { + phy-supply = <&vbus_typec>; + status = "okay"; + }; + + u2phy0_host: host-port { + phy-supply = <&vbus_host>; + status = "okay"; + }; +}; + + +&u2phy1 { + status = "okay"; + + u2phy1_host: host-port { + phy-supply = <&vbus_host>; + status = "okay"; + }; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usbdrd3_0 { + status = "okay"; +}; + +&usbdrd_dwc3_0 { + status = "okay"; +}; + +&vbus_host { + enable-active-high; + gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ + pinctrl-names = "default"; + pinctrl-0 = <&usb1_en_oc>; +}; + +&vbus_typec { + enable-active-high; + gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ + pinctrl-names = "default"; + pinctrl-0 = <&usb0_en_oc>; +}; diff --git a/arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi b/arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi index 450e5bb5af..d2b6ead148 100644 --- a/arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +++ b/arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi @@ -33,6 +33,24 @@ regulator-max-microvolt = <5000000>; vin-supply = <&vcc12v_dcin>; }; + + vbus_host: vbus-host { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&usb1_en_oc>; + regulator-name = "vbus_host"; /* HOST-5V */ + regulator-always-on; + vin-supply = <&vcc5v0_sys>; + }; + + vbus_typec: vbus-typec { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&usb0_en_oc>; + regulator-name = "vbus_typec"; + regulator-always-on; + vin-supply = <&vcc5v0_sys>; + }; }; &gmac {