From patchwork Mon Apr 11 04:34:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09AAEC433F5 for ; Mon, 11 Apr 2022 04:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tANFvBdh3SYvqbzVKmSPoaY2C6sbXQ50VkZfQrZ39XQ=; b=yk6SXw3BZJ3CK/ +JqhletRQqHGG65BpZwGyrWlKIYvmyHF7n3sDVpO3Xvjl/Ha860If596l85MHhpunRjD4M3fOaJ8J RBr1RVx0ZZOLAglgn26+vwu7iyNz7+oqWIth80HHWe8ytnvtb40hn2a7sX0rqvFEyX138fTQ8oZOS O/DuHzogShtMWT0LOX02vuYtpH7xbRis3R8pBSOojT0ROLA0QQUGjnLBAkS7wW4EKbcStXgRY1SbK zZG38lIsUuVfPSSFrEyh8CFHkmEoloBtMOMpX+3iJWKlgrc50qYm7bHuvf8cu/JfxMhQXlvZIFbkm Olc5++LvrgtYYjJY+N6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlnS-006ayb-5S; Mon, 11 Apr 2022 04:37:02 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndllQ-006Zvo-5u for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:34:57 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id DD8143201F56; Mon, 11 Apr 2022 00:34:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 11 Apr 2022 00:34:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1649651694; x=1649738094; bh=ep miizdCaqCMESyl/+mq43QINmA/tnOXxGAGpcNLC7w=; b=gmVspqBUmpz9x3W9kw +GEvMIn0ZLm3C7loA1PIwZBMSzuJz+VQuYbhknanV9Jp0yfSlcBfHOj3o9W5lTH4 6N3DNJBSlXXhj/Vhuv1PVrPK1c8MSbgRQXsuNSY+1/cUFhNrXERTP7niqOE6BujL /44nZTlZrHn116zoSM7jDRZ5HyjZvJPfDahpAHnT8Ur2k5c6IAarEUetY1fFJ5RK x2m25B1MrxO8nsjq3/3KuM6MlGK23MR5h68MKQHkK12uIRbHxM8FZStvxLj8JqVJ mMxSt9LI7NyCK5l5c5ZcoWkIZ+ItrrBN4cE+YsGFWmh5AjoRwlzfz1YEJsnv+nLA ulCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1649651694; x=1649738094; bh=epmiizdCaqCMESyl/+mq43QINmA/tnOXxGA GpcNLC7w=; b=TTrcHSoioTz58R97+S9XDVeaPOqpcyOrlE5BesHoYGiQKdYTbFy ad7rE/GRC/0Rd92M97eWTuuAocTOyH4/p6ZKXvs2PuPTp6UXNgS0yMGDTMy3+mZv yzfF/1irV8w1UFyExvB3jvMEJyTyVfan21eyhywlayHvjj7A4yOTf6xA5Ph+o/wv XbrTzVaUXEg1j2BNT5nJPYrI967Rjwu6xYpiN22Sz9cwpPo5dMK0ivJzZkbKMvYi K8fgXHhFif5lw2Eb2b4OgjirgcqMicd/GIiXXcjfCQTcDoG1HV5ytk4RdJfFBvz5 UD7f8yIhDWjSp1Yl+MWT1nkZZirD94oUXrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:34:53 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 09/10] drm/sun4i: Add support for D1 TCONs Date: Sun, 10 Apr 2022 23:34:21 -0500 Message-Id: <20220411043423.37333-10-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411043423.37333-1-samuel@sholland.org> References: <20220411043423.37333-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_213456_278747_178905A2 X-CRM114-Status: GOOD ( 14.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org D1 has a TCON TOP, so its quirks are similar to those for the R40 TCONs. While there are some register changes, the part of the TCON TV supported by the driver matches the R40 quirks, so that quirks structure can be reused. D1 has the first supported TCON LCD with a TCON TOP, so the TCON LCD needs a new quirks structure. D1's TCON LCD hardware supports LVDS; in fact it provides dual-link LVDS from a single TCON. However, it comes with a brand new LVDS PHY. Since this PHY has not been tested, leave out LVDS driver support for now. Signed-off-by: Samuel Holland --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 88db2d2a9336..2ee158aaeb9e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -1542,6 +1542,12 @@ static const struct sun4i_tcon_quirks sun9i_a80_tcon_tv_quirks = { .needs_edp_reset = true, }; +static const struct sun4i_tcon_quirks sun20i_d1_lcd_quirks = { + .has_channel_0 = true, + .dclk_min_div = 1, + .set_mux = sun8i_r40_tcon_tv_set_mux, +}; + /* sun4i_drv uses this list to check if a device node is a TCON */ const struct of_device_id sun4i_tcon_of_table[] = { { .compatible = "allwinner,sun4i-a10-tcon", .data = &sun4i_a10_quirks }, @@ -1559,6 +1565,8 @@ const struct of_device_id sun4i_tcon_of_table[] = { { .compatible = "allwinner,sun8i-v3s-tcon", .data = &sun8i_v3s_quirks }, { .compatible = "allwinner,sun9i-a80-tcon-lcd", .data = &sun9i_a80_tcon_lcd_quirks }, { .compatible = "allwinner,sun9i-a80-tcon-tv", .data = &sun9i_a80_tcon_tv_quirks }, + { .compatible = "allwinner,sun20i-d1-tcon-lcd", .data = &sun20i_d1_lcd_quirks }, + { .compatible = "allwinner,sun20i-d1-tcon-tv", .data = &sun8i_r40_tv_quirks }, { } }; MODULE_DEVICE_TABLE(of, sun4i_tcon_of_table);