From patchwork Fri Oct 9 11:09:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siarhei Siamashka X-Patchwork-Id: 7360791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D30CCBEEA4 for ; Fri, 9 Oct 2015 11:12:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D63FA2089A for ; Fri, 9 Oct 2015 11:12:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08B9420896 for ; Fri, 9 Oct 2015 11:12:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZkVZ4-0005S2-Mn; Fri, 09 Oct 2015 11:10:18 +0000 Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZkVYu-00042R-3b for linux-arm-kernel@lists.infradead.org; Fri, 09 Oct 2015 11:10:09 +0000 Received: by lbos8 with SMTP id s8so76195776lbo.0 for ; Fri, 09 Oct 2015 04:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/FZ6y/7XD5csa5bF2vRXtQsDr1hdm4EPVQ2brGpbhEU=; b=AG96ixp44Vqo4twNO1bmEMy1N2gYHKejMKNY5kVqI4cSm8y36G1YEOQozZWEmUMzoa ZPQFCK17elJpXL9Y1HTbvsHtPTd8IdqXQS6B48N2Tr9vW2eScomylGGL/i6lVpdWyaSg sEUxLIzq68ZnQwCQA2SzhL8BaDDZ9X/CfCscU7V8VSpzZOHil4hd3tmlCE82JxU74XvB xjbFk4UHKo8O2QyC12yt2otN8fvtm+ohcJ6HxlnI+BqKM7ldl8v3WwcH9NYcUAIE7xmI x7cARv4MXL6o+Tskxu3BnGtweK9qY1y5PjE6MtY9Nv1Qr3+UbpuBYh4Rk5xXvG1otKju hleA== X-Received: by 10.112.137.169 with SMTP id qj9mr6333507lbb.34.1444388985800; Fri, 09 Oct 2015 04:09:45 -0700 (PDT) Received: from localhost.localdomain (85-76-179-242-nat.elisa-mobile.fi. [85.76.179.242]) by smtp.gmail.com with ESMTPSA id v19sm202299lfd.7.2015.10.09.04.09.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Oct 2015 04:09:44 -0700 (PDT) From: Siarhei Siamashka To: Maxime Ripard Subject: [PATCH v2 1/3] ARM: dts: sun4i: Allow to use the PH6 pin for GPIO on pcDuino1/2 Date: Fri, 9 Oct 2015 14:09:37 +0300 Message-Id: <1444388979-12072-2-git-send-email-siarhei.siamashka@gmail.com> X-Mailer: git-send-email 2.4.9 In-Reply-To: <1444388979-12072-1-git-send-email-siarhei.siamashka@gmail.com> References: <1444388979-12072-1-git-send-email-siarhei.siamashka@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151009_041008_366252_308534C4 X-CRM114-Status: GOOD ( 16.69 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree , linux-sunxi@googlegroups.com, Zoltan HERPAI , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The pcDuino1 board does not use any power switches at all for its two USB host ports and the VBUS pins are always connected to 5V. The pcDuino2 board uses the RT9701GB power switch for its single USB host port, but the USB_EN pin (PD2) is pulled up with a 10K resistor. So that the USB power is still enabled by default, resulting in the same behaviour as pcDuino1 if nobody touches the PD2 pin. This minor difference is going to be handled in a follow-up patch, introducing a separate dts file for pcDuino2. The primary reason for this fix is that the current dts file unnecessarily meddles with the PH3 and PH6 pins. But the PH6 pin is available on the Arduino-compatible expansion header and may have a better use for other purposes. This patch fixes the problem and now the PH6 pin can be used with the GPIO sysfs interface. Tested on a pcDuino2 board with a multimeter: echo 230 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio230/direction echo 0 > /sys/class/gpio/gpio230/value echo 1 > /sys/class/gpio/gpio230/value USB still works as expected too. Signed-off-by: Siarhei Siamashka --- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts index c882421..0b45d27 100644 --- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts +++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts @@ -180,14 +180,6 @@ }; }; -®_usb1_vbus { - status = "okay"; -}; - -®_usb2_vbus { - status = "okay"; -}; - #include "axp209.dtsi" ®_dcdc2 { @@ -222,7 +214,7 @@ }; &usbphy { - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; + usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */ + usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */ status = "okay"; };