From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 26674C43603 for ; Fri, 13 Dec 2019 08:22:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0EAB24658 for ; Fri, 13 Dec 2019 08:22:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fsTxF6jF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0EAB24658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03AC16E29D; Fri, 13 Dec 2019 08:22:26 +0000 (UTC) Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id E92056E065 for ; Thu, 12 Dec 2019 11:52:14 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id 6so1048770pgk.0 for ; Thu, 12 Dec 2019 03:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=8mF7OxWnmHyMVBa4AuLWYl4i7D14Gqs7HQtBBxcCOMk=; b=fsTxF6jFHRURT9/cnUETmc/AJZ9+L92Z0Oqh7Zn9BKROL5WsFcVwEQ1A8NrhJ0WqHc /a07fhR66viDkpwjFUlGkGtzIyTP7MO/uCYotm8GRbqtVl9OkMefvqmz54pfUNhb/9me A2pUVozQ4J2yOZHGzk6rJOsf9F9JO/yiaKWdxNY5dusUNxgASkB10cnSwKn9FozIzp0m Wke8BwYTDmXpzTIdKYVoaAlmXT6lLmsZM5AAjUTw1YppgQDjWV8TKuheCrgRcg4KzXhW VSP/rmzYYiCwNebz7XZSOumy90iw4ZLTsnAk1ScJcWS0owqm7NJJK1oDJzbAlimFpU2P x4xg== 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; bh=8mF7OxWnmHyMVBa4AuLWYl4i7D14Gqs7HQtBBxcCOMk=; b=iKn2+XrsD8g4ZJdRyFbNC+ba/fq8XmupYqJM6MalDsVbWte2oSqiKPTmfDslKn7D7A TAui/sJxUfNiapxGSaJwV2xJ5EFze8/Nafu/Uyx40RaA5bQFh2wAN1K+lkPRgMTSA+A/ r01hdvmqnPi/T5Tbr9LEmmfVa8CGkP6SQtFGLMflRNfOFQuMWokHqIoWl4Fr+N1vB0jt CKlFZxkTB5Fpewu9IIwwjlJ0/iPxhRwMxaJ7tMgPGz3YkUrw6NjTjq3LTmqSTDbK2MiZ o869+ganhq8S9Vy0Q+6zdQburGWmBAN0GAJLRLyeoQdhIHXcJgqA8OH1ii3HaDiBZCM4 LHtA== X-Gm-Message-State: APjAAAWcsDH/xuOhQ/BmBJbVaoT4+z+2JnvdnQwaU1uICtuu/GmeYvMQ 2Ft8LI0tPQDOQllWbDFCOFRgqohRAfI= X-Google-Smtp-Source: APXvYqysFAuFmHKx1GF3oYkmbQSkivFg6TUrPuS2WqY6ryUpjOUjg+/FImFQsNsp5mh0ZRMaLdnizw== X-Received: by 2002:a63:7045:: with SMTP id a5mr10193091pgn.49.1576151533825; Thu, 12 Dec 2019 03:52:13 -0800 (PST) Received: from super-sugar.huaqin.com ([101.78.151.194]) by smtp.gmail.com with ESMTPSA id t30sm6433797pgl.75.2019.12.12.03.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 03:52:13 -0800 (PST) From: Jerry Han To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel Date: Thu, 12 Dec 2019 19:52:08 +0800 Message-Id: <20191212115208.3878-1-jerry.han.hq@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Fri, 13 Dec 2019 08:22:24 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jerry Han , Jitao Shi , Rock wang MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI panel. V11: - Use the backlight support in drm_panel to simplify the driver (Sam) V10: - Adjust init code, make the format more concise (Emil) V9: - kill off default_off_cmds (Emil) - use mipi_dsi_dcs_set_display_{on,off} in their enable/disable callbacks. (Emil) - Adjusting the delay function (Emil) V8: - modify PARENTHESIS_ALIGNMENT format (Sam) - use gpios are required API replace optional gpio API (Emil) V7: - Modify communication address V6: - Add the information of the reviewer - Remove unnecessary delays, The udelay_range code gracefully returns without hitting the scheduler on a delay of 0. (Derek) - Merge the same data structures, like display_mode and off_cmds (Derek) - Optimize the processing of results returned by devm_gpiod_get_optional (Derek) V5: - Add the information of the reviewer (Sam) - Delete unnecessary header files #include (Sam) - The config DRM_PANEL_BOE_HIMAX8279D appears twice. Drop one of them (Sam) - ADD static, set_gpios function is not used outside this module (Sam) V4: - Frefix all function maes with boe_ (Sam) - Fsed "enable_gpio" replace "reset_gpio", Make it look clearer (Sam) - Sort include lines alphabetically (Sam) - Fixed entries in the makefile must be sorted alphabetically (Sam) - Add send_mipi_cmds function to avoid duplicating the code (Sam) - Add the necessary delay(reset_delay_t5) between reset and sending the initialization command (Rock wang) V3: - Remove unnecessary delays in sending initialization commands (Jitao Shi) V2: - Use SPDX identifier (Sam) - Use necessary header files replace drmP.h (Sam) - Delete unnecessary header files #include (Sam) - Specifies a GPIOs array to control the reset timing, instead of reading "dsi-reset-sequence" data from DTS (Sam) - Delete backlight_disable() function when already disabled (Sam) - Use devm_of_find_backlight() replace of_find_backlight_by_node() (Sam) - Move the necessary data in the DTS to the current file, like porch, display_mode and Init code etc. (Sam) - Add compatible device "boe,himax8279d10p" (Sam) V1: - Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI panel. Signed-off-by: Jerry Han Reviewed-by: Sam Ravnborg Reviewed-by: Derek Basehore Reviewed-by: Emil Velikov Reported-by: kbuild test robot Cc: Jitao Shi Cc: Rock wang --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-boe-himax8279d.c | 977 +++++++++++++++++++ 4 files changed, 995 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-boe-himax8279d.c diff --git a/MAINTAINERS b/MAINTAINERS index 248938405c01..8b2e6c68832d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5153,6 +5153,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc S: Maintained F: drivers/gpu/drm/bochs/ +DRM DRIVER FOR BOE HIMAX8279D PANELS +M: Jerry Han +S: Maintained +F: drivers/gpu/drm/panel/panel-boe-himax8279d.c +F: Documentation/devicetree/bindings/display/panel/boe,himax8279d.txt + DRM DRIVER FOR FARADAY TVE200 TV ENCODER M: Linus Walleij T: git git://anongit.freedesktop.org/drm/drm-misc diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index f152bc4eeb53..683ff77a3733 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -18,6 +18,17 @@ config DRM_PANEL_ARM_VERSATILE reference designs. The panel is detected using special registers in the Versatile family syscon registers. +config DRM_PANEL_BOE_HIMAX8279D + tristate "Boe Himax8279d 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 Boe Himax8279d + TFT-LCD modules. The panel has a 1200x1920 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host and has a built-in LED backlight. + config DRM_PANEL_LVDS tristate "Generic LVDS panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index b6cd39fe0f20..8783476110a3 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o +obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c new file mode 100644 index 000000000000..3a6ee2069158 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -0,0 +1,977 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019, Huaqin Telecom Technology Co., Ltd + * + * Author: Jerry Han + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include