From patchwork Mon Mar 11 10:03:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerry Han X-Patchwork-Id: 10848911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 268721669 for ; Tue, 12 Mar 2019 09:34:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E5712935C for ; Tue, 12 Mar 2019 09:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00A9E2937A; Tue, 12 Mar 2019 09:34:16 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9B6A2935C for ; Tue, 12 Mar 2019 09:34:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A39E489F24; Tue, 12 Mar 2019 09:33:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8615B89944 for ; Mon, 11 Mar 2019 10:04:08 +0000 (UTC) Received: by mail-pf1-x441.google.com with SMTP id v21so3318281pfm.12 for ; Mon, 11 Mar 2019 03:04:08 -0700 (PDT) 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=fGuUvySDxAC0VwqrSZgO4/CshOLgHoQpmMcsx1OdQzE=; b=QMlx03HtkFXSqhHW+DkwbrWRf85ZxZ7j/aG6a5biNHrY/Ao0FohD5T4cyECNLMSUuP sZt6h4WHPZRVxtQuWhgBV3EFYLe16omFEPv6BFR2nAzBv8Fkcnidx+weWQoodsfmagwd qfsP+LNWrGrbXNsn2mXjMMtthEAZHPxqZ2kW5hHg7wbCWkGrbIDFlXUHbE4SGNmZ0+Si d04FQ9XvKUMyGJTkMD/URTl8rNkdnHGVtMiSOGzevr6FjaYAZMhx3ty6wFLbenNfTDOV LjnOqUoMbUt5TDKzQv1XS1MgO5xEtbRZW6XOhP54XCZk3Qm+CpvQgbcT61T+hmjmNumX f5KA== X-Gm-Message-State: APjAAAUKF8aGLIAytdZzTqbYOvqnaydlNWHLOCrQkuerVggU9eZP9dyw wTlYTD8Digon+Eyi9kQQRZvSfIj5 X-Google-Smtp-Source: APXvYqxkDTwNIJ8ze2cD1IGblR3bGQGvXbE3t0Dnxzs4xLA2iZEKUlkz8YXtD1DQUXcvugcBTMvBOw== X-Received: by 2002:a62:f51d:: with SMTP id n29mr32050496pfh.21.1552298647685; Mon, 11 Mar 2019 03:04:07 -0700 (PDT) Received: from sugar.huaqin.com ([220.232.156.66]) by smtp.gmail.com with ESMTPSA id f87sm8154325pff.38.2019.03.11.03.04.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Mar 2019 03:04:07 -0700 (PDT) From: Jerry Han X-Google-Original-From: Jerry Han To: dri-devel@lists.freedesktop.org Subject: [PATCH] [v6,2/2] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel Date: Mon, 11 Mar 2019 18:03:58 +0800 Message-Id: <1552298638-7305-1-git-send-email-hanxu5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Tue, 12 Mar 2019 09:33:23 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fGuUvySDxAC0VwqrSZgO4/CshOLgHoQpmMcsx1OdQzE=; b=PJ8u56AeCP2zSTWqsAh9p7QTbgOGiFt8Eym3R7Z4H+1gsiX/KLMLSgYSYCtJcy3Vkz sX/uJjnyBFcwjNt6CxD7lCseBhT6SxP5euIcMaBCxPLi32QSwiRzgATiVMJOlcDB//KL f6QhEHPqOdcmjr0Jiv7a+eL8G2S7GJg48Cm9cimHAIo9U8V/bDsug/66vSPtvhP0bai/ Adw2hH0tXmrSD1pWAi51MKYJhFZn8+k+YBVEEQeY9vmhQ+A9dAsI54vdZtXKHWfyd5bp WiEopA5iT+gSZzFq8xtN06KQVqS1ZSVsw6s7Xyqoahhk1m5tYnZKKp7RwG5lUE7UV7kV xUEA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Derek Basehore , Jerry Han , Jitao Shi , Rock wang MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI panel. V6: - 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) v5: - Added changelog 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) Signed-off-by: Jerry Han Reviewed-by: Sam Ravnborg Cc: Jitao Shi Cc: Derek Basehore 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 | 1069 ++++++++++++++++++++++++++ 4 files changed, 1087 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-boe-himax8279d.c diff --git a/MAINTAINERS b/MAINTAINERS index b2f710e..095fbbe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4624,6 +4624,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 6020c30..4aae4a7 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,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 5ccaaa9..7285539 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_ILITEK_IL9322) += panel-ilitek-ili9322.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 0000000..c050a48 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -0,0 +1,1069 @@ +// 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 + +#include