From patchwork Wed Aug 4 08:13:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 491751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71547C4320E for ; Wed, 4 Aug 2021 08:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 596C560F02 for ; Wed, 4 Aug 2021 08:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236069AbhHDIOk (ORCPT ); Wed, 4 Aug 2021 04:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236236AbhHDIOk (ORCPT ); Wed, 4 Aug 2021 04:14:40 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29459C061798 for ; Wed, 4 Aug 2021 01:14:27 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id s22-20020a17090a1c16b0290177caeba067so7662592pjs.0 for ; Wed, 04 Aug 2021 01:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LXSdt5lb/U9IdaoMZbjWU5/UO1lqAEgjijgMwDxRemU=; b=QfIs1gXZfmAsYsHu+9jNvROPGUtMfJzh/Y6QzhY+cuJ8yJ0YuRwyzw6+Qc5y8oEaKg KR5sOGRUSJDy9+5pn0eR8a9DrVgvnAIIGUeUdJJDKqpFbWHpjwVGv2JIQteqs6YQHwOm dprd9acEfFZHCh2H20UTDdR1F+pylet4xY3sCNb3/I5Y1HLkN/KIjSNe91uPVzrE7Ywv NpvgomB/4e+HfIMvEbS4xyTIxLplHC/4NRtY87euO4xGp+n8p3c1Ser0SuWlI+ouXEvF NY19PHw2Z/rGJZ06rbpEYbA/jyHhd0tEwuwB7GT5HCmQyEq6tKEfOyPyZ9J/hxVCSGxR zMgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LXSdt5lb/U9IdaoMZbjWU5/UO1lqAEgjijgMwDxRemU=; b=kwsSZaAshC/BElQ0QQ2KoVt5kKC2vF6VFjIKA4wnB6HP6/7amjsuBlMncYR4GqwFCD X5RUGezcwDmfCQ+pdirgg+cf6B5TgTxKnYGrodvg7pVHcQv5lgwUIG/aTsLMenXGYPfh FzY3yneLU71hijyfq5iSjnxaZGHOjU+Hn73Opspcs8Rxh5IFTGGXZLc3RrgCasPgkF1W yvD+joFymwa8YDilCZHyQhNIumDjT6NtD5TMX9aiFg92ENiOVk77yZJXi8sN2ftnbPM3 FSDxbUvaNQ7+YXebME9yzvYEIlMJMij9ZLtBooweXqxIM+Tjhh5E3z+UTUqDE+tRZ1Pf N1YA== X-Gm-Message-State: AOAM532LOgdy51bEjvNTxtztcELeSRe7wwsesY3L7klpF6tI0i1xG08D My5LF5N2Dc1DCRDPSigVNsIs0l9s+0GwZcCs X-Google-Smtp-Source: ABdhPJyw8xc1791JqwoSzpOHAqJUXvIx55BRiETGKjcY3Lu5QMOkeagrMLdc0TJj5xP/zRPMcRAzEg== X-Received: by 2002:aa7:9ec3:0:b029:32b:4eb5:4bad with SMTP id r3-20020aa79ec30000b029032b4eb54badmr26158861pfq.6.1628064866615; Wed, 04 Aug 2021 01:14:26 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id g26sm2067445pgb.45.2021.08.04.01.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 01:14:26 -0700 (PDT) From: Shawn Guo To: Thierry Reding , Sam Ravnborg Cc: Daniel Vetter , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH 2/2] drm/panel: Add Truly NT35521 panel driver Date: Wed, 4 Aug 2021 16:13:52 +0800 Message-Id: <20210804081352.30595-3-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210804081352.30595-1-shawn.guo@linaro.org> References: <20210804081352.30595-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org It adds a drm driver for Truly NT35521 5.24" 1280x720 DSI panel, which can be found on Sony Xperia M4 Aqua phone. The panel backlight is managed through DSI link. Signed-off-by: Shawn Guo --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-truly-nt35521.c | 491 ++++++++++++++++++++ 3 files changed, 501 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-truly-nt35521.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index ef87d92cdf49..cdc4abd5c40c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -537,6 +537,15 @@ config DRM_PANEL_TPO_TPG110 400CH LTPS TFT LCD Single Chip Digital Driver for up to 800x400 LCD panels. +config DRM_PANEL_TRULY_NT35521 + tristate "Truly NT35521 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Truly NT35521 + 1280x720 DSI panel. + config DRM_PANEL_TRULY_NT35597_WQXGA tristate "Truly WQXGA" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index cae4d976c069..3d3c98cb7a7b 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -56,6 +56,7 @@ obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o +obj-$(CONFIG_DRM_PANEL_TRULY_NT35521) += panel-truly-nt35521.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o diff --git a/drivers/gpu/drm/panel/panel-truly-nt35521.c b/drivers/gpu/drm/panel/panel-truly-nt35521.c new file mode 100644 index 000000000000..ea3cfb46be7e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-truly-nt35521.c @@ -0,0 +1,491 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, Linaro Limited + */ + +#include +#include +#include +#include + +#include