From patchwork Thu May 28 20:47:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Rondini X-Patchwork-Id: 11576891 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 31BA1739 for ; Thu, 28 May 2020 20:49:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0968A2074B for ; Thu, 28 May 2020 20:49:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QxWC+YtR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kynetics-com.20150623.gappssmtp.com header.i=@kynetics-com.20150623.gappssmtp.com header.b="NqgdwDyl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0968A2074B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kynetics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=rZNt2TdQWYzcUl60IRJ9P5k8dh9iVBwHHzCU9tQLlGc=; b=QxWC+YtRnCSi3K SVL+tOQXenb/YZ1GuX1gCj1/LiuH07ronGv8Hn4TmPRWqEzzBivEpd1yzbFuPhAmqn4qqZOFfRjId w3XxxDbxRH/+EZ16svbh38l6j9kl7YtMl/urF/6Q7EOLigzU5ReKit/MkrK3nS81HgJx3kj24BONH 2SfHIR+Us3HdMDXesBzWT9ITEfXIwENAMhJbQBpAwCRjgD1CbHKt9D5CJoFJgbrr+GocaZjCXOssu UXVtro8b/spTfD759E9nKdzy1pNkZagwM7RdkdJSGm9ammacHL/HjHyQvjIrOGUrYYWcYKR1qQ42e 83rOfQ3/UyAAlK03OoUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jePSZ-0006l2-PN; Thu, 28 May 2020 20:49:03 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jePSX-0006jk-3G for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2020 20:49:02 +0000 Received: by mail-wr1-x441.google.com with SMTP id r7so814366wro.1 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=eePIsyeEe0Ev6S2uxi5lhMr6kRHT0hq9bdEwWm7zmAIyM1VbR4b8LkIcOdHqe1pSUv CdvZz49OkRB8RFbpbNrd70ARvv5fMXLaHg6AC1piMjTLYNFF+bEIA1gbNy0td/Qitksy I7jeRs6Wbb7T/WxR/3FPcUcKu5vpQIWygkwudRtWD7RXWTdTse8iiGjmhapdP884aPqK KKBRUHENkGQfXPrq4IzYMJ3RYnMZ+cpZd4/bpORQJ9BfCc2aW9dlSfx077tmlhk738Xz I2jpISFBSf8PdnaKY4MjK4HQaNvdN+rZRYqnASbu+rsFQmFifw/mxtvVoCDLTn6qvttT iBjw== X-Gm-Message-State: AOAM531ZOx86ZW36T+1mXu4vSfjmVjXzcWKP1PIwX46xjt3vw/LL6Duv Ss2VTtWqfHa5w6L0eSSsV+S/QA== X-Google-Smtp-Source: ABdhPJzwOzuB9A1HKWNt34Uu6DxWwtaF4OkTIOet4cseL0Mea2TRDauwS/pcfa5XsGFhl7VbI8VA1w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200528_134901_205248_6A242A34 X-CRM114-Status: GOOD ( 11.79 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, Diego Rondini , linux-sunxi@googlegroups.com, Rob Herring , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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"; +}; From patchwork Thu May 28 20:47:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Rondini X-Patchwork-Id: 11576893 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 635C0913 for ; Thu, 28 May 2020 20:49:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 414F42074B for ; Thu, 28 May 2020 20:49:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rPFWWW6q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kynetics-com.20150623.gappssmtp.com header.i=@kynetics-com.20150623.gappssmtp.com header.b="YIYCtIqH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 414F42074B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kynetics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=dL862Jw5kh/8ww/r7eCMXm+zNew2HyLK7UqdbowwaGg=; b=rPFWWW6qEoirMz LnTOXXlRDbcLA2R13AP738paaUeaQVLilPUQUWftiME30WaI/d6rEiP/Vynpnh3d2BSNfLwA8NmBw wC3vJ0/Vs0oDOXQygCbnBfsIP1U9ZG4HHeuzkk/7ZQy1NcWbmJwW0BmTFBhZWHyMvjA7GJEZ4ElAx i7619rdtVgBjAIAFxHADR/YGcOHZEJyUF30vEwWcOys3blCjk2aw3UNNtsRaHjbQ/vGxze1leq8Zv PEpNEAYIPoT8ysBpOrmBsae0iLhQVDHVbMHnWZamqS1lqLgSUeCdtmo8gy37DdGPYrx7VAu7mNi2D RaRajMki2TeED9ZXEZqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jePSo-0006vt-5u; Thu, 28 May 2020 20:49:19 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jePSY-0006jq-04 for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2020 20:49:03 +0000 Received: by mail-wr1-x42d.google.com with SMTP id y17so701950wrn.11 for ; Thu, 28 May 2020 13:49:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=9NI5oITF3sur5up7exzC9ZwtSgcG5SfGWcxVBeWbrEk=; b=YIYCtIqHdfGvz+bp/GYBuOno2ziXPiDMbn/A2C6efWe0GlUnF3/yB6gC75n4H+TEJH axNE8iiu3suwzy791TcLkaM4wUDEz1LOGM7dmc+v/zsdWR4YPaRQdPYdidQ14Q0cdOxP fXRBtTCDtBGuK4Hz7vv1O2xtn3SbCUSZfJcLtNobdcb5vlK8fsK582Glx9sw1PjrSXTR YDYGjlBK0VSYqTIIsOM3qTh0NIJloBX0drnL2sMfJiDfa5HaxmaZk099HsR5ykIuDl3t 3r/xBUa6SkAi9773WuXIXGpr3oja8O5oAoZrkzgZ5PLRP563+zeipN3A+Dzb4T3LCOPO V3gA== 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=9NI5oITF3sur5up7exzC9ZwtSgcG5SfGWcxVBeWbrEk=; b=ENav1Z3I9OKckJkW9LaodpT4GmEO3/RyyaS5YsnMPqYQKAk3YpBXJu4nQ49ibiTFg1 rq0viyQtapbSCdzQ8YDWahckjGxMe0DlCNJ2Ef0C8+FB6skjphfxFRMS/yzUfK/GKoZr Cp1qV64Ebv6H7ch0mXBimWt+9XjArgnQzXfgCb6EZo3K445R5u1alWkPCZ+s7ixeSHIz ZnNN0BmpUCm3GntDTs6kJIUw1G8M1FZp//1kUmxecSO2QRdGOMvF+Io3fSvOIVjQ1rZn ibsbQZtQCzrdKjSEvP0/AVOYveJJWt9PX30bsCPy7axxQd8Vi8AK3ObQuzfil/fC1Dg/ y2jg== X-Gm-Message-State: AOAM533ACSooDEn3mmB9SXW8wf3mbK0/L1naMeMyVW5gCYY6RRPhXe5r za1qNCjf0WfYpv8ih2D5nt1L1w== X-Google-Smtp-Source: ABdhPJz/iGMq6FoO6oFdT/+8B+caaHgzgf4nNbD2c5b9TxzV8Ex09SkSVsjO3fDnHZCj/9mURqHdFA== X-Received: by 2002:adf:f790:: with SMTP id q16mr5260464wrp.399.1590698939287; Thu, 28 May 2020 13:48:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 13:48:58 -0700 (PDT) From: Diego Rondini To: Maxime Ripard Subject: [PATCH 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration Date: Thu, 28 May 2020 22:47:12 +0200 Message-Id: <20200528204712.552964-2-diego.rondini@kynetics.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200528204712.552964-1-diego.rondini@kynetics.com> References: <20200528204712.552964-1-diego.rondini@kynetics.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200528_134902_035053_D06FC764 X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42d listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, Diego Rondini , linux-sunxi@googlegroups.com, Rob Herring , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add pwr and status leds configuration and turn on pwr led by default for Orange Pi Zero Plus 2 (both H3 and H5 variants). Signed-off-by: Diego Rondini --- .../boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 16 ++++++++++++++++ .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 16 ++++++++++++++++ 2 files changed, 32 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 4376767699a47..4cd0ac706bd2c 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -82,6 +82,22 @@ wifi_pwrseq: wifi_pwrseq { reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ post-power-on-delay-ms = <200>; }; + + leds { + compatible = "gpio-leds"; + + pwr_led { + label = "orangepi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status_led { + label = "orangepi:red:status"; + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; + }; + + }; }; &de { 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 d8192a7483e9e..517d53e1b0ff1 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 @@ -42,6 +42,22 @@ wifi_pwrseq: wifi_pwrseq { reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ post-power-on-delay-ms = <200>; }; + + leds { + compatible = "gpio-leds"; + + pwr_led { + label = "orangepi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status_led { + label = "orangepi:red:status"; + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; + }; + + }; }; &de {