From patchwork Thu Feb 22 16:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10235865 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 A253F602DC for ; Thu, 22 Feb 2018 16:12:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98B7E28E64 for ; Thu, 22 Feb 2018 16:12:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AA8228E6B; Thu, 22 Feb 2018 16:12:58 +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=-0.1 required=2.0 tests=BAYES_00, DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 C2F6D28E64 for ; Thu, 22 Feb 2018 16:12:57 +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=VZD3DjtFh5oU3hwO5UM/HZwcgjnqGYtQZPzQHohQb40=; b=YUs MaVk3nP4hd1O9o7Ijo6B5X+VAsEcZ8+ODs/EryQlQkv4aI7l8MZW1/WYkmXBNqA04EW2z3qPb+xbV fxEDpPkp1u3vTdsAcvNatPIzTzg0BoZrGjMFtl0dMpD1WyNnF3NS3FPwtpmesleiT3B/RIW2X7ZDX HAl310Ob3IBf8nQCndw/OruZS9/nV7V6aWeP/Qq69G3NGP57CLFRYkvc25fwJeASCYIB9TgyUQJkL A0Y/MMG/I9MoLo5q9HRGJ4goRZ1cYep3hiyM0An91mbJ8bOkVNOn/A7QYS/1LNp2EPCHwustQ78bH +WOG0gxtzuPFrcJEl2ZP8nQgyDTd43A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eotUG-00040a-9A; Thu, 22 Feb 2018 16:12:48 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eotUB-0003y9-Eu for linux-arm-kernel@lists.infradead.org; Thu, 22 Feb 2018 16:12:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1519315948; bh=uM7lxTJTEXmzkCrCBOYYEnUfRchykUTyo7FrkyqptXM=; h=From:To:Cc:Subject:Date:From; b=boD7dkl6YSneFSt1LvI0IYmgmRfvWs9L8YKzNDKugk1jhMc+tlh/Hd21OllMzTxhr dokHBiEBpsnLcWVuCO/dd2ZBZlUcCH4Sa7LX3O4vMxXKDn+qkU64SL/DZdVlz3eted /x5tbguIMzeWrk/zfHCcsTLfYsudTRUHseO9TNg8= From: megous@megous.com To: dev@linux-sunxi.org Subject: [PATCH RFC] drm/sun4i: Enable the output on the pins (tcon0) Date: Thu, 22 Feb 2018 17:12:17 +0100 Message-Id: <20180222161217.23904-1-megous@megous.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180222_081243_850416_E3C3C7F8 X-CRM114-Status: UNSURE ( 9.62 ) 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: Ondrej Jirman , David Airlie , open list , "open list:DRM DRIVERS FOR ALLWINNER A10" , Chen-Yu Tsai , Maxime Ripard , "moderated list:ARM/Allwinner sunXi SoC support" 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 From: Ondrej Jirman I noticed that with 4.16-rc1 LVDS output on A83T based TBS A711 tablet doesn't work (there's output but it's garbled). I compared some older patches for LVDS support with the mainlined ones and this change is missing from mainline Linux. I don't know what the register does exactly and the harcoded register value doesn't inspire much confidence that it will work in a general case, so I'm sending this RFC. This patch fixes the issue on A83T. Signed-off-by: Ondrej Jirman --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 3c15cf24b503..51740ddb4b32 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -335,6 +335,9 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon, regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, SUN4I_TCON_GCTL_IOMAP_MASK, SUN4I_TCON_GCTL_IOMAP_TCON0); + + /* Enable the output on the pins */ + regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, 0xe0000000); } static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,