From patchwork Thu Nov 5 23:45:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 7564721 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 195009F36A for ; Thu, 5 Nov 2015 23:46:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B7AC20390 for ; Thu, 5 Nov 2015 23:46:08 +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 2336A20270 for ; Thu, 5 Nov 2015 23:46:07 +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 1ZuUEE-0001uw-Ry; Thu, 05 Nov 2015 23:46:02 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZuUEC-0001t8-HW; Thu, 05 Nov 2015 23:46:01 +0000 Received: by padhx2 with SMTP id hx2so93613363pad.1; Thu, 05 Nov 2015 15:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/QAaI86HguDVlga1JhtILKHNeNiufbUu/h7mq8+WoMg=; b=Z6xpJkx5+7gcOMD7H/6+9/KtiSN7V8q46SalPfASJjs0h98THo4AZXTYrFXbTNLSCa TwDBGbNnA2EhCJVe0to5Bg45JRNUUTJORQHqYZX95V5r+KGFTwKxLY5SBO8n9f3L7lWe lFNRts9f4EqaLrFMHmd5w3tKzLZmH6hLCE6EJ/nsc7e7L8imDSwvi1SXMy5pkLTg1KL/ UgEJ0JRx32wJImXIc8VbZFM/pttsJTqukEXWMF18NkF6OEXtuZ7tFCkJwzupaoJv5UMQ PpdMvWGNaRBCYYpSM6bULp/eYnr2o9BYtlPwYFvSzu0rxUBDfzFG/OPcbjdRwnYrJN5k obBw== X-Received: by 10.68.87.4 with SMTP id t4mr13083388pbz.61.1446767137836; Thu, 05 Nov 2015 15:45:37 -0800 (PST) Received: from google.com ([2620:0:1000:1301:a852:f13:9791:df54]) by smtp.gmail.com with ESMTPSA id bz2sm9935999pad.32.2015.11.05.15.45.36 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 05 Nov 2015 15:45:37 -0800 (PST) Date: Thu, 5 Nov 2015 15:45:34 -0800 From: Brian Norris To: Yakir Yang Subject: Re: [PATCH v9 10/17] phy: Add driver for rockchip Display Port PHY Message-ID: <20151105234534.GA77825@google.com> References: <1446020143-32645-1-git-send-email-ykk@rock-chips.com> <1446083918-30809-1-git-send-email-ykk@rock-chips.com> <20151103043827.GA17261@localhost> <563955E6.7000905@rock-chips.com> <20151104011348.GL7274@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20151104011348.GL7274@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151105_154600_629321_10A43211 X-CRM114-Status: GOOD ( 23.84 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , Heiko Stuebner , emil.l.velikov@gmail.com, djkurtz@chromium.org, linux-kernel@vger.kernel.org, Andrzej Hajda , Gustavo Padovan , linux-samsung-soc@vger.kernel.org, Russell King , Joonyoung Shim , linux-rockchip@lists.infradead.org, Kishon Vijay Abraham I , javier@osg.samsung.com, Kukjin Kim , robherring2@gmail.com, Thierry Reding , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , Inki Dae , Rob Herring , Sean Paul , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Mark Yao , Jingoo Han , Seung-Woo Kim , dianders@chromium.org, Kyungmin Park , Kumar Gala , ajaynumb@gmail.com, Andy Yan Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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 Hi, A few updates: On Tue, Nov 03, 2015 at 05:13:48PM -0800, Brian Norris wrote: > On Wed, Nov 04, 2015 at 08:48:38AM +0800, Yakir Yang wrote: > > On 11/03/2015 12:38 PM, Brian Norris wrote: > > >On Thu, Oct 29, 2015 at 09:58:38AM +0800, Yakir Yang wrote: > > >(FYI, I came across this by inspection when comparing Heiko's > > >'somewhat-stable' branch [1] with this series. The former brings up eDP > > >fine on veyron-jaq, whereas this one doesn't yet, even with the above > > >change. Still debugging the issue.) Some time after the above comment, I managed to kill the panel on my Jaq :( I think the wiring around the hinge was a bit flaky, and it finally went out for good. > > Hmm... I'm not sure whether your eDP screen have the hotplug signal, so I > > I believe hotplug is hooked up but... > > > think you can try to add "analogix,force-hpd" flag into > > rk3288-veyron-jaq.dts > > > > &edp { > > analogix,need-force-hpd; > > } > > ...already tried, just in case. No luck. However, now when testing a different Jaq device, now this series + Heiko's DTS updates + the "analogix,force-hpd" (i.e., [1]) works fine, modulo a few log warnings, some of which are probably expected (for instance, I believe the EDID is known not-so-helpful). Snippets: [ 3.170176] rockchip-dp ff970000.dp: AUX CH command reply failed! [ 3.178058] rockchip-dp ff970000.dp: AUX CH command reply failed! [ 3.184166] rockchip-dp ff970000.dp: unable to handle edid and later: [ 3.953300] rockchip-dp ff970000.dp: EDID data does not include any extensions. [ 3.966731] rockchip-dp ff970000.dp: EDID data does not include any extensions. [ 3.979409] rockchip-dp ff970000.dp: EDID data does not include any extensions. [ 3.998730] rockchip-dp ff970000.dp: Link Training Clock Recovery success [ 4.007046] rockchip-dp ff970000.dp: Link Training success! [ 4.115040] rockchip-dp ff970000.dp: Timeout of video streamclk ok [ 4.121211] rockchip-dp ff970000.dp: unable to config video [ 4.127616] rockchip-dp ff970000.dp: EDID data does not include any extensions. So, I'll chalk that earlier failure up to a hardware failure (or possibly a still yet-undiagnosed hardware difference; my new Jaq has some small differences from the previous unit). Also, it's still not real clear why HPD isn't working upstream (and we have to use the "force-hpd" property), when it appears to work on our downstream Chrome OS tree. Finally, I'll leave you with some small bits I've noticed from exploring this issue on Jaq: * The Chrome OS driver for this IP has a much longer timeout in (the equivalent of) analogix_dp_detect_hpd; it polls in 10-20 ms intervals (rather than 10-11 us) and takes something around 60 to 120 ms to notice the panel. * AFAICT, the Chrome OS driver never actually used the HPD interrupt; it was only polling the HPD status bit. So I can't claim that the functionality that Yakir is supporting here has ever been tested on these platforms. (Now, I'm not sure this is extremely important, since we still can fall back to polled status checks; see drm_kms_helper_poll_init().) That's all I've got for now. Regards, Brian [1] https://github.com/mmind/linux-rockchip/commits/tmp/analogixdp-veyron plus this diff: diff --git a/arch/arm/boot/dts/rk3288-veyron-jaq.dts b/arch/arm/boot/dts/rk3288-veyron-jaq.dts index 5c97e3153526..e77ae4c5531e 100644 --- a/arch/arm/boot/dts/rk3288-veyron-jaq.dts +++ b/arch/arm/boot/dts/rk3288-veyron-jaq.dts @@ -88,6 +88,18 @@ }; }; +&backlight { + power-supply = <&backlight_regulator>; +}; + +&panel { + power-supply = <&panel_regulator>; +}; + +&edp { + analogix,need-force-hpd; +}; + &rk808 { pinctrl-names = "default"; pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>; diff --git a/drivers/phy/phy-rockchip-dp.c b/drivers/phy/phy-rockchip-dp.c index c82c22f3d0e1..994189f49db5 100644 --- a/drivers/phy/phy-rockchip-dp.c +++ b/drivers/phy/phy-rockchip-dp.c @@ -22,7 +22,7 @@ #define GRF_SOC_CON12 0x0274 -#define GRF_EDP_REF_CLK_SEL_INTER_HIWORD_MASK BIT(4) +#define GRF_EDP_REF_CLK_SEL_INTER_HIWORD_MASK BIT(20) #define GRF_EDP_REF_CLK_SEL_INTER BIT(4) #define GRF_EDP_PHY_SIDDQ_HIWORD_MASK BIT(21)