From patchwork Thu Mar 28 19:58:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1068635 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=david-bauer.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jDdh+mVn"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44VbKT4gypz9sR7 for ; Fri, 29 Mar 2019 06:58:52 +1100 (AEDT) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ng/miWBog5NO2y/TVp0FiraDvJ0BTNtPPtx1HKKK9XE=; b=jDdh+mVntn9S5s OqtQ6cr0b5GTQKsyvoJOOi1jNU9QYqaYPmbQjFEK5/7BdS+6B9oe2uZYIZbwGiAFC6ixZSYWhV7TR TNLP/6dv2sTZSEYrlXy4euEfG4qyR3aHEX4zUeVWyKHu8uNPjcENh5h3s4/+qUSmAgAzgyt7Vx6hc 1BaSXD9X0RWOwdhJyYG12rxyXgJu+C9Js5PJex4G/8BoyRBqWNM2pTfKj3Pu0SqCwy9cLDqNQkkgK tovtEBbDTH+cTVaAYMQJfyfimnQPVsIRc4d1sctEpadUwMNmfH9cR6f/Hq59nFFB5E0MgHy3Aphih si2+7a1mWxrkb653HXCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9bAM-0001KW-5W; Thu, 28 Mar 2019 19:58:22 +0000 Received: from mars.blocktrron.ovh ([2001:41d0:401:3000::cbd] helo=mail.blocktrron.ovh) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9bAH-0001JF-Qn for openwrt-devel@lists.openwrt.org; Thu, 28 Mar 2019 19:58:20 +0000 Received: from localhost.localdomain (p200300E53F0902006E4557C59DC67D8E.dip0.t-ipconnect.de [IPv6:2003:e5:3f09:200:6e45:57c5:9dc6:7d8e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id 9291B1FE8F for ; Thu, 28 Mar 2019 20:58:10 +0100 (CET) From: David Bauer To: openwrt-devel@lists.openwrt.org Date: Thu, 28 Mar 2019 20:58:04 +0100 Message-Id: <20190328195804.12832-1-mail@david-bauer.net> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_125818_024833_5F57C17E X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH] ramips: enable R6120 USB power X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Enable the USB power for the Netgear R6120. Otherwise, no power is supplied to an attached USB device. Signed-off-by: David Bauer --- target/linux/ramips/dts/R6120.dts | 15 ++++++++++++++- target/linux/ramips/mt76x8/config-4.14 | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/R6120.dts b/target/linux/ramips/dts/R6120.dts index 07b1a165d3..d263c7824b 100644 --- a/target/linux/ramips/dts/R6120.dts +++ b/target/linux/ramips/dts/R6120.dts @@ -65,13 +65,26 @@ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; }; }; + + usb-regulator { + compatible = "regulator-fixed"; + + regulator-name = "USB-power"; + gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + + regulator-always-on; + }; }; &pinctrl { state_default: pinctrl0 { gpio { ralink,group = "p0led_an", "p1led_an", "p2led_an", - "p3led_an", "p4led_an", "wdt", "wled_an"; + "p3led_an", "p4led_an", "wdt", + "wled_an", "uart1"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 62e51cbe43..5bcb948585 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -192,6 +192,8 @@ CONFIG_RALINK=y # CONFIG_RCU_STALL_COMMON is not set CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_RESET_CONTROLLER=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set