Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp735543ybm; Thu, 28 May 2020 13:51:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymwikb2uzgKveT/c65uc4JY7YBlL063C/wOTRswffxsKRGgx8Tf97crAcj+F8kS1JrOgwi X-Received: by 2002:aa7:dad0:: with SMTP id x16mr5233915eds.354.1590699106235; Thu, 28 May 2020 13:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590699106; cv=none; d=google.com; s=arc-20160816; b=k8nZqt1qKsexoFAMgy/PRoa8Xl4fYrgfuDiJoPU4gkq0JieC7lT6rp1r6fa9SEd6k7 4VEpPq4v7cDGjmAaglbcMJ+Oy45qRelLyrlz+YSR3VhYXgZRyCRGrBr4u+MkU2wmOETV M2RfpmSZYPeuuSmmpfvVV1lRtFe7K7ZaZX5y6sP8UrLbrdCaBekUPCms/rvz6ioGfGQs kz5ZSosjK9A5xHtHxPD4xnNfutgesTvwoLn3vC7C6l13v3mtOojDul8YjmRhK56+3YXL HBaA1rnojUSqfo/kfO67r9jMYjP7kFBg4gCQ0xSgGpFPPCxUultJS5uDp3B6ss2JVCVu 5Tfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HUiYoi4oRp58+q5ZwZM3ckxVs2ohb6Fr3EU5Rh4Dl0I=; b=yBLS0kN0kCf8aM6ApTqP7ApLnoVAfbcysW7WkGZg5/3mNElHkdRd72M3dp8lAPjI34 nx8SOH7NLx+P1LJKEwZrOKJvbAzhe8hyMoGnCLoj00kfTmZLgL3mHVQ9XqudwRs5rT8C 1mNFINmpnArAVsES3JHkPiVUjY2ElVpe72/Bo9ViICpaZA/DeHkCHgwso6YGbyhVoaYz Qbpq+oGXkfv65ZUiul60zDN62y0/Le/Fg8yrfOBYHtmoK6aFDYEaZ8LuZGcWGT/6Xz7H BRD0McUYXi/Q202loLGD4JiKtky5g56KHwaD521JgTkn4doLowj5B1t8AwjhizL5O61N lpbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kynetics-com.20150623.gappssmtp.com header.s=20150623 header.b=NqgdwDyl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si4633555ejx.675.2020.05.28.13.51.23; Thu, 28 May 2020 13:51:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kynetics-com.20150623.gappssmtp.com header.s=20150623 header.b=NqgdwDyl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407396AbgE1UtF (ORCPT + 99 others); Thu, 28 May 2020 16:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407390AbgE1Us7 (ORCPT ); Thu, 28 May 2020 16:48:59 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4618BC08C5C8 for ; Thu, 28 May 2020 13:48:59 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id y17so701830wrn.11 for ; Thu, 28 May 2020 13:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynetics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HUiYoi4oRp58+q5ZwZM3ckxVs2ohb6Fr3EU5Rh4Dl0I=; b=NqgdwDyljpdh0ZqDu6YHewXyVjxlQvyaoDcVNEhKu3GQyB7A9uq+7b/W1cFKNj6Auo mhKwV7wV1isHYxuYqarBvpiX91pHT3Vpg06C2EFiQrntIJzEQyvT2nxTAkGiivbl8QSi bZxMZ2vKBo3uptBm8vIzCGaUTT9IxYkHdAfQW1O58OJaSH7wmU5nxeBdmFcpQjfbRq5U zovuTjw8NTa9epKpX7BNnRmILXOudZyRWmSiDA3suI/YDdXWZN/ZMA8WnelIjLiUQkBK OzJGs/OR7cjo2MG36l32/kvopZ6nlWzQcfHIKXjfOzSmRK590aqWPoi6x17vOUbtFpeH sSBQ== 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:mime-version :content-transfer-encoding; bh=HUiYoi4oRp58+q5ZwZM3ckxVs2ohb6Fr3EU5Rh4Dl0I=; b=meCSCjS6flFh8/4LkJ1LhxsUygdUnF3wuuWdTfS5sZ9tx+Vw6iTFLXqJPGINQxqVaM F8XD/R/rrguBq3/RcTHJoSiWDCTq/+nv1Z7soELbLRBc/tjaahrtczHcjvFPeTWyp6rX DOFog9j/lCO/RwI6mg0dFDZvbAUB6hpnRHVdcE4KOdSo6Vk2Q7MzsIHBVKXPXq/gR0/S aFW6bOmkbtajlU4U14KrHuwhsdACf1J4XL8NP/w1n9EZxheHL0RaInWJYsTLZcQ6hDa3 HyHFiB6zgmKO7Rsmity42NuBkw5KihuNB0wNX/b9ZkLlXd2olDJdiUykXQfD0lGSZEdj /sCQ== X-Gm-Message-State: AOAM530R/T40yDLsGW7OBa+YZ1sMS0v0QFPO+aatMcNBGoKWnh4QbzGo EzgALhhqYY4dUriqVTWPo5Ipf2bqcFo= X-Received: by 2002:a5d:4cc4:: with SMTP id c4mr5108720wrt.159.1590698937914; Thu, 28 May 2020 13:48:57 -0700 (PDT) Received: from localhost.lan (mob-2-41-210-190.net.vodafone.it. [2.41.210.190]) by smtp.gmail.com with ESMTPSA id a15sm7632782wra.86.2020.05.28.13.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 13:48:57 -0700 (PDT) From: Diego Rondini To: Maxime Ripard Cc: Rob Herring , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Diego Rondini Subject: [PATCH 1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port Date: Thu, 28 May 2020 22:47:11 +0200 Message-Id: <20200528204712.552964-1-diego.rondini@kynetics.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable support for USB OTG port on Orange Pi Zero Plus 2 (both H3 and H5 variants). As, according to the board schematics, the USB OTG port cannot provide power to external devices, we set dr_mode to peripheral. Signed-off-by: Diego Rondini --- .../boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ .../sun50i-h5-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts index b8f46e2802fd3..4376767699a47 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -137,3 +137,26 @@ &uart0 { pinctrl-0 = <&uart0_pa_pins>; status = "okay"; }; + +&usbphy { + status = "okay"; +}; + +&usb_otg { + /* + * According to schematics CN1 MicroUSB port can be used to take + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB + * port cannot provide power externally even if the board is powered + * via GPIO pins. It thus makes sense to force peripheral mode. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index c95a68541309c..d8192a7483e9e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -103,3 +103,26 @@ &uart1 { pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; }; + +&usbphy { + status = "okay"; +}; + +&usb_otg { + /* + * According to schematics CN1 MicroUSB port can be used to take + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB + * port cannot provide power externally even if the board is powered + * via GPIO pins. It thus makes sense to force peripheral mode. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; -- 2.25.4