From patchwork Sat Nov 16 17:28:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 3193001 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9A4D9C045B for ; Sat, 16 Nov 2013 17:29:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0C502084A for ; Sat, 16 Nov 2013 17:29:44 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D107920846 for ; Sat, 16 Nov 2013 17:29:43 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhjgW-00084D-KU; Sat, 16 Nov 2013 17:29:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhjgU-0006Wa-6W; Sat, 16 Nov 2013 17:29:26 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhjgQ-0006Vw-W3 for linux-arm-kernel@lists.infradead.org; Sat, 16 Nov 2013 17:29:23 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id F1D4E16A85A3 Message-ID: <5287AB20.9070407@collabora.co.uk> Date: Sat, 16 Nov 2013 18:28:00 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: Tony Lindgren , Enric Balletbo i Serra , bcousson@baylibre.com, tomi.valkeinen@ti.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 11/11] OMAPDSS: DPI: use VPLL2 regulator if VDDS_DSI is not found References: <1384608224-9452-1-git-send-email-javier.martinez@collabora.co.uk> <1384608224-9452-12-git-send-email-javier.martinez@collabora.co.uk> <20131116141853.GF10317@atomide.com> <5287908C.3040602@collabora.co.uk> <20131116154507.GL10317@atomide.com> <20131116160234.GB5104@earth.universe> In-Reply-To: <20131116160234.GB5104@earth.universe> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131116_122923_135070_BCE27B64 X-CRM114-Status: GOOD ( 26.54 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Hi Sebastian, On 11/16/2013 05:02 PM, Sebastian Reichel wrote: > On Sat, Nov 16, 2013 at 07:45:07AM -0800, Tony Lindgren wrote: >> Well let's see what Tomi prefers. >> >> > > &vaux1 { >> > > /* Needed for ads7846 */ >> > > regulator-name = "vcc"; >> > > }; >> > > >> > > &vpll2 { >> > > /* Needed for DSS */ >> > > regulator-name = "vdds_dsi"; >> > > }; >> >> In the long we'll use regulator phandles anyways in the DSS related >> nodes, so from that point of view fixing dpi.c makes sense. > > The hack, as being sent by Javier, will result in the wrong > regulator being used on the Nokia N900, which is using vaux1. > It must depend on the machine. > I see, so this hack is not generic enough to be usable for all OMAP3 boards so I think is better to just add the hack on the DTS. I was more found about adding a hack on dpi.c since the DTB is an stable ABI while the dpi.c implementation is not. But I guess is not that bad to change the DTS later once DSS DT bindings are added to mainline. > At the same time the N900 device tree file uses V28 as > regulator-name for vaux1 (which is the same one as legacy boot > used). Nothing depends on this, but I don't think it's a > good idea to use this property. Apparently it does not work > if multiple drivers need the same regulator under different > names. > > -- Sebastian > So, what do you think about the following patch instead? From 99f1c60f6db6cac07ea2c0398a9cbb3525dfdd72 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sat, 16 Nov 2013 17:59:08 +0100 Subject: [PATCH 1/1] ARM: dts: omap3-igep0020: name twl4030 VPLL2 regulator as vdds_dsi On Device Tree boot the VDDS_DSI regulator is not linked to the DPI device so omapfb driver probing fails with: [ 3.186035] OMAPFB: omapfb_probe [ 3.190704] omapdss DPI error: can't get VDDS_DSI regulator [ 3.196594] omapfb omapfb: failed to connect default display [ 3.202667] omapfb omapfb: failed to init overlay connections [ 3.208892] OMAPFB: free_resources [ 3.212493] OMAPFB: free all fbmem [ 3.216735] omapfb omapfb: failed to setup omapfb As a workaround name the VPLL2 regulator from twl4030 as "vdds_dsi" so getting the VDDS_DSI regulator will succeed on dpi_init_regulator(). Signed-off-by: Javier Martinez Canillas --- arch/arm/boot/dts/omap3-igep0020.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index b9a9e17..1c7e74d 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -215,3 +215,8 @@ &usbhsehci { phys = <&hsusb1_phy>; }; + +&vpll2 { + /* Needed for DSS */ + regulator-name = "vdds_dsi"; +};