From patchwork Sat Feb 11 08:56:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willy Tarreau X-Patchwork-Id: 9567881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FA6F6043D for ; Sat, 11 Feb 2017 08:57:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D76525D99 for ; Sat, 11 Feb 2017 08:57:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FDFD285F4; Sat, 11 Feb 2017 08:57:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EF60425D99 for ; Sat, 11 Feb 2017 08:57:35 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=zxM9VtOc1Ikkgv3RCbodX6E7Vxddt3cpHKtHBiQugDY=; b=D3U oAZbl+gp1mQz4be0GbI1yPIcVOoB5inBmvzdqJLeVuJZ+iJWccR1hRtAnIRrLn6JmoWT23qsREBLp /I6vScZCPJ9vJ8RH1MalHpieHT72lG4QnB9ras3adF9xiPHYPmzI/FXR4Rl6VDSyL2xeZ3IXhZllt dQMI9hFhpfhxut8m3EmG4uDWcyf0pVRKz9olObWOv+svj7znw2V1pkgJGK3ShJZRasGwte2mRJWv+ bgTMvDEnFh6oAa30e5ygAjnpa9+sDex+7A3S3kpJ0CvKBq0WDjUsuYuPjX+edZZhAGh/xkE//BcSX yCOFkQXGgxySHYLWwAqFZNf6vLRipQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ccTUq-00050i-Ge; Sat, 11 Feb 2017 08:57:32 +0000 Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ccTUa-0004pP-Vg; Sat, 11 Feb 2017 08:57:20 +0000 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id v1B8uldi014666; Sat, 11 Feb 2017 09:56:47 +0100 From: Willy Tarreau To: linux-rockchip@lists.infradead.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Rob Herring Subject: ARM: dts: rockchip: fix the MiQi board's LED definition Date: Sat, 11 Feb 2017 09:56:45 +0100 Message-Id: <1486803405-14625-1-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170211_005717_447630_D984088F X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willy Tarreau MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The MiQi board's green LED doesn't work at all with the mainline kernel. There are multiple reasons to this. First, the gpio number is wrong, it is declared on gpio220 (chip 7 pin 4) instead of gpio218 (chip 7 pin 2). Second, a pinctrl is referenced, also declared with the same wrong value while it is not unused. Third, the GPIO polarity was wrong (active low instead of active high) with the default value set to "default-on", resulting in the LED being turned off even when the GPIO is correct. This patch fixes all these inconsistencies at once since these they are related to each other, and also restores the "timer" trigger which is the same as the one used by the kernels shipped with the board. It's important to note that during the port to mainline, the led's label was changed from "System" to "miqi:green:user", so scripts making use of the name will still not work until they're fixed. Fixes: 162718c (v4.7) Cc: Heiko Stuebner Signed-off-by: Willy Tarreau --- arch/arm/boot/dts/rk3288-miqi.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts index f751372..2f4c635 100644 --- a/arch/arm/boot/dts/rk3288-miqi.dts +++ b/arch/arm/boot/dts/rk3288-miqi.dts @@ -68,11 +68,9 @@ compatible = "gpio-leds"; work { - gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; + gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; label = "miqi:green:user"; - linux,default-trigger = "default-on"; - pinctrl-names = "default"; - pinctrl-0 = <&led_ctl>; + linux,default-trigger = "timer"; }; }; @@ -363,12 +361,6 @@ }; }; - leds { - led_ctl: led-ctl { - rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - sdmmc { /* * Default drive strength isn't enough to achieve even