Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1649340ybt; Mon, 15 Jun 2020 06:06:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxissBkbxkQOOI1HVVNgDtBUZi9NrJIVhghmWKcRsUE4dmXej2EQ7jt29fu16rHJFdpIdWb X-Received: by 2002:a05:6402:17e6:: with SMTP id t6mr22691628edy.243.1592226384600; Mon, 15 Jun 2020 06:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592226384; cv=none; d=google.com; s=arc-20160816; b=oXD/GRog4jLHBJMc4jRxDszBDDMTBxtIFjd17rP7+Hz/x9Y2QrBZ7P896E3E94CsnR 4VBHavpFiGYcVwhi35rEpF5oNc34P1kVTUQmxTO3CkCQ4w1tfbmX3J5G7Xz0w1BZV79T e1hF9M+ZOVe/kIXQ3KkiW0dDoddlj62rYXySj3CRGYs/bY9tNz9r721eNnFENxX4D+jp MldGFl5KpHMDhnNSUX0SJEEgWHQXJdDTi8ZWvqA4+4sdRYFUDRhprVGAuzGUb4Hj93FI /X9uts/8Iy7QUlvk70sLv3IPDSl8EJBJdyTA3A70rooQSKGGTMHWH4NRZmyVBO+Aip18 2+sg== 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=yG4TX0q4STnfakhZj1Jy6LqPd0TuAXoc/J2tzd+XYRw=; b=vccRlLyeMRyEp1xSqE5cn2cUukYmsOwWxIFKnK0GRYWJxF06JZgQLdZU1QLVqQF5Fu A4UKxnoVDGKqFnP/CYxobl2e4CQbB8C0jceuM9e1znJdxp4gNwucobKbfMcdsJrAb+4V LWYOm4VfTwR6CdAH8tJdUA+Us0hIsTla7SM5vAcLCMM6/mAzpUT1EQ3l1G2JOkI70EwM EjT26NzNYvXUzR6cz4jotYA5T3GbrL1pU2FcLEAQ7p2NypMtK3Z3h2XVIiKk95sTC4ec RTpP/2za0TLKhy/4KKrjwr0+VSQD3Vo+N8xBqHGX3tloTMGwvaoqj1vKL3Nbpsn9WC+/ j9DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kynetics-com.20150623.gappssmtp.com header.s=20150623 header.b=vOlT6DrX; 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 ay4si9311740ejb.439.2020.06.15.06.06.01; Mon, 15 Jun 2020 06:06:24 -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=vOlT6DrX; 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 S1730459AbgFONC4 (ORCPT + 99 others); Mon, 15 Jun 2020 09:02:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730455AbgFONCz (ORCPT ); Mon, 15 Jun 2020 09:02:55 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D02BBC061A0E for ; Mon, 15 Jun 2020 06:02:54 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id l17so14573250wmj.0 for ; Mon, 15 Jun 2020 06:02:54 -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=yG4TX0q4STnfakhZj1Jy6LqPd0TuAXoc/J2tzd+XYRw=; b=vOlT6DrX6rx075X32KGHYvlAhGW2prqOHQiHu160Jm1Sx7TPbdK5EgFzjZY5ZDNTcz nL3jeWVLcxZ33If0/DklPgn7giQIo7U+JsYbTWa7upUdP1mCURZ6tDHN1xXutpLEXZAz gyaANYRm+OMChPplA5Q04hueaT4rUERoCh8lL/8e62inXpt8LZBzK4g9E3OgelBx35el DOQ8fWw5gtMRlpzAnk8lELnN5+aD+xe3695jvPVuVUpjPJExJi7j+GIVVHdsNOpshKjb Yo13cozv2dkpvDc7hvUiXdSwoOkSPOPNgGAcwJQgPe2s7YQTynkpqEt1C+eFEUQpSYEz kL0A== 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=yG4TX0q4STnfakhZj1Jy6LqPd0TuAXoc/J2tzd+XYRw=; b=Dg2QTL7l3i36i1P6hveLMnZmPvBtKNti54goD1xxCvzdPl5/cdysrjZi1KdeskbpcR zCPMN1nWexT1MXEOSPjeXtND640L+5kCZ0p+PovdmFIurvSHro1CgiC9ZrqUgyWx4ITf nAUKvXRpMT91Jfk9naHfJvTw95JzmdfplTV51/n2vn3OzWw4lGqZRfWLwcMHERP1ySvK MSy1g0NEQLeWYw/gfeNy6wIA52BLo3GJ4pxgeEnQlTRMPlgX4gKInLqHMb1NFfKE17Ej qnY9cj/y2k/sk+bxTeCf2VfE6aZwIMx4E49EXZr+X+NPPqA3wHPVuxng+fInDFbCznpl AZTA== X-Gm-Message-State: AOAM530MuKkVIo5VbRpuv+6u0bF4WJ1pq6AsnoMU5qpZDeaXd9hbHqq+ mphHWWuqAFHSpbks1mhlnTGp7Q== X-Received: by 2002:a1c:e057:: with SMTP id x84mr13695935wmg.160.1592226173500; Mon, 15 Jun 2020 06:02:53 -0700 (PDT) Received: from localhost.lan (mob-37-176-61-186.net.vodafone.it. [37.176.61.186]) by smtp.gmail.com with ESMTPSA id s132sm23900345wmf.12.2020.06.15.06.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 06:02:53 -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 v2 1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port Date: Mon, 15 Jun 2020 15:02:23 +0200 Message-Id: <20200615130223.34464-1-diego.rondini@kynetics.com> X-Mailer: git-send-email 2.26.2 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 --- v2: - reordered nodes alphabetically --- .../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..cbe32b975c5fe 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -88,6 +88,10 @@ &de { status = "okay"; }; +&ehci0 { + status = "okay"; +}; + &hdmi { status = "okay"; }; @@ -132,8 +136,27 @@ &mmc2 { status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pa_pins>; 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"; +}; + +&usbphy { + 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..e67733d133bb4 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 @@ -48,6 +48,10 @@ &de { status = "okay"; }; +&ehci0 { + status = "okay"; +}; + &hdmi { status = "okay"; }; @@ -92,6 +96,10 @@ &mmc2 { status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pa_pins>; @@ -103,3 +111,18 @@ &uart1 { pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 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"; +}; + +&usbphy { + status = "okay"; +}; -- 2.26.2