From patchwork Tue Aug 22 10:22:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9914791 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 CE598603F9 for ; Tue, 22 Aug 2017 10:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC0EE2885E for ; Tue, 22 Aug 2017 10:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0E2F28860; Tue, 22 Aug 2017 10:23:05 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY 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 5F4E72885E for ; Tue, 22 Aug 2017 10:23:05 +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-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NypyZ3UEp7/BOl+uUlUZgiCvs069vHTy6WwonpstYn0=; b=Ei/hTrEZ0CMJlPMG4fnWejJlE sXIaDRmnNB/7Vi7gijmaS/xrbwbzvisJgF34xZRsWPSJHNo6SE/hQvqTas8eDH9YA6Fkj40Ee50Iy 1Ecloj183wWXF8cwXT+iS/6oIQPY1ek7C/di8jDq3XhV4QLkYhHE9uU2i9IFRq6luX8X+aXTN8k/6 sN4NlL8gxLU53nx9FR7tz60vS+y3+Q0vU41eQGjuof5uTFy+WkIBhWqusiyoWboIJ2Q0fWAepcbSp /7dB/wHyYqAED/Lg+tdXETj8F9Kr6uDLcJ0akg+GHVq9jltmfBL4xD8Zgbh7hGtOxQ2t+h8GyHQLV u8L0BjEnw==; 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 1dk6Ke-0001A4-6w; Tue, 22 Aug 2017 10:22:48 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk6KY-0000Jz-VT for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2017 10:22:45 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id AA07A26C91B Date: Tue, 22 Aug 2017 12:22:14 +0200 From: Sebastian Reichel To: Pavel Machek Subject: Re: device tree bindings for lp5523 leds on N950? Message-ID: <20170822102214.pmag4k2dxz4fdvq5@earth> References: <20170814133816.GA24493@amd> <20170815131518.jt4xff6qv4whebul@earth> MIME-Version: 1.0 In-Reply-To: <20170815131518.jt4xff6qv4whebul@earth> User-Agent: NeoMutt/20170609 (1.8.3) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_032243_308335_89DC15C5 X-CRM114-Status: GOOD ( 15.47 ) 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: ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, aaro.koskinen@iki.fi, kernel list , abcloriens@gmail.com, pali.rohar@gmail.com, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , serge@hallyn.com 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 Hi, On Tue, Aug 15, 2017 at 09:15:28AM -0400, Sebastian Reichel wrote: > Hi Pavel, > > On Mon, Aug 14, 2017 at 03:38:16PM +0200, Pavel Machek wrote: > > I'm (still) trying to debug "N950 not booting" situation. I'm stuck > > with black screen, so I thought it would be cool to use RGB led for > > debugging... > > > > Unfortunately, I don't see required dts bindings in the mainline. > > > > Does anyone have that working? > > I have some N950 DTS patches lying around, I think RGB led was one > of them. I'm currently in Canda for a company event without my N950, > but I should be able to send something tested before the weekend. Below is a DTS snippet for N950, that has been tested by me on top of 4.13-rc6. The left and right keyboard LEDs are also debug LEDs for cpu idle modes, so they will be lit without being enabled in lp5523. The status LED of N950 is not RGB, but just white. Also you need this to get the driver loading. Otherwise detection after reset fails even after quite increases waiting times. Looks like the lp5523 reset (which is not properly Ack'd by the device) breaks the omap-i2c state horribly. -- Sebastian ---------- &i2c2 { rgb-led@32 { compatible = "national,lp5523"; reg = <0x32>; enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */ clock-mode = /bits/ 8 <2>; /* external */ chan0 { chan-name = "lp5523:kb5"; /* Keyboard ooooox */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan1 { chan-name = "lp5523:kb4"; /* Keyboard ooooxo */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan2 { chan-name = "lp5523:kb3"; /* Keyboard oooxoo */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan3 { chan-name = "lp5523:kb2"; /* Keyboard ooxooo */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan4 { chan-name = "lp5523:kb1"; /* Keyboard oxoooo */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan5 { chan-name = "lp5523:kb0"; /* Keyboard xooooo */ led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; chan6 { led-cur = /bits/ 8 <0>; max-cur = /bits/ 8 <0>; }; chan7 { led-cur = /bits/ 8 <0>; max-cur = /bits/ 8 <0>; }; chan8 { chan-name = "lp5523:status-led"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <130>; }; }; }; --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -413,7 +413,7 @@ int lp55xx_init_device(struct lp55xx_chip *chip) usleep_range(1000, 2000); /* 500us abs min. */ } - lp55xx_reset_device(chip); + //lp55xx_reset_device(chip); // FIXME: breaks omap-i2c /* * Exact value is not available. 10 - 20ms