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,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 3B3DAC00454 for ; Sat, 14 Dec 2019 14:43:56 +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 1288C214AF for ; Sat, 14 Dec 2019 14:43:56 +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="oid6ylK/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1288C214AF 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 EE02F6E3B8; Sat, 14 Dec 2019 14:43:32 +0000 (UTC) Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 058486E32C for ; Sat, 14 Dec 2019 09:11:41 +0000 (UTC) Received: by mail-pf1-x443.google.com with SMTP id x184so2801070pfb.3 for ; Sat, 14 Dec 2019 01:11:41 -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=7skkPmKE3m2mYd6xI56Sq+iez/YNbDE+Cf7QZl+t5VI=; b=oid6ylK/pqjL7JWLBPtOm5aJRuA6JXvyboZRI2/lAB0Clba8dqsZuQxsw9HwGq84GK 2tfgcZmAe/ebWMhmA6FJRWAPfU5sBH7mC5a5xRr+WGmyzl6C1BGk2PV9FU0+4FkHPiBU 3S5rAeFKj90NQ3syd0O+nlb3ZO+4k4cRDwVVmfaxIbpKzPt/Qh0+bJMGnvgJoG7vQpB1 Wvent78k0l+461nzxHLcWSviPy68Hp8RpmLyybKSIRSocA36XTZYiY1pOkO0bsL904qz 4Cu84UE1cpMY0s7lvtIjhH8cPyoaa/uU+8966uf4eprgcUO6/DV97zILrVFhD3ihrC99 POWw== 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=7skkPmKE3m2mYd6xI56Sq+iez/YNbDE+Cf7QZl+t5VI=; b=V+KHDsuz6JCKM0PnXZPxl0ZEOWTEuYzuu2IRaxr/0qFvEHybU31O9lLrT0KpfWtW2Y G28swZ4KgZsX94DXHVEESaNl7jWMZhHdtSsJVmpuYH2xA8wcfjwuZCkPg2ncm/E1/8fm F4x1QjSi7IiYmSTg+vU2rRa4R8F04BXQHrt5N9FfiIXdfdVAlOD0aoOBKD7975tzt1no mOylGZf5/p5npsDlaLVoI+/FOCkrgnL0XGa+bibM6DRqpogRpGkjHkhYyR7u6F+iQ6N3 SlWr9sDj4ULjOXwLnbeL383S2i0s3sji0dUnlVQYxPqdYEzJ31TccQIb6Ogx9SC+n3DK uS3g== X-Gm-Message-State: APjAAAXcgF4/UsZrrOk5Ar9b2Sw+jqFWd0hKw/EgeceNF/Uw/sDS4T2b WtTMfMTPRD7YLR/9KmDqcppV+jtq X-Google-Smtp-Source: APXvYqy+8N5dRBnLPogWfqmoetyt7FScvUbSudVAZmo/afS6SHQmiMiztVhXxM9EjhIHgF43xiXEkQ== X-Received: by 2002:a65:490e:: with SMTP id p14mr4531082pgs.4.1576314699863; Sat, 14 Dec 2019 01:11:39 -0800 (PST) Received: from super-sugar.huaqin.com ([101.78.151.194]) by smtp.gmail.com with ESMTPSA id u11sm12205844pjr.9.2019.12.14.01.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2019 01:11:39 -0800 (PST) From: Jerry Han To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel Date: Sat, 14 Dec 2019 17:11:34 +0800 Message-Id: <20191214091134.1014-1-jerry.han.hq@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Sat, 14 Dec 2019 14:42:54 +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. V12: - fix build in boe_panel_modes() (sam) - fix backlight - drm_panel_of_backlight() must be called after drm_panel_init() (sam) 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 | 978 +++++++++++++++++++ 4 files changed, 996 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..74d58ee7d04c --- /dev/null +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -0,0 +1,978 @@ +// 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