From patchwork Thu Dec 22 22:38:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 13080414 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 872C7C4332F for ; Thu, 22 Dec 2022 22:38:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0457A10E599; Thu, 22 Dec 2022 22:38:51 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 539C810E599 for ; Thu, 22 Dec 2022 22:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671748725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ght9Cz12XBVdRGneYg26vNie4Bxq0erKME7Iy3zY0sk=; b=JNTUXWCn1VxTO7lId0eUP+eELmw7yGjGWz4Yyf5mUs4ow1jbzWQWbf0Z2fTMkPggrL0VAB ooY5WoU/M8xM6qBBugePDfQwebCfWz2C+wC4obXmPhlf31NzUg1VFxGnxrvovRu4eh6swr 3+uvByt5/GTSNc6696hT9CtL370qOVY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-427-v-20NfRvP8KwW47Iywmb8g-1; Thu, 22 Dec 2022 17:38:44 -0500 X-MC-Unique: v-20NfRvP8KwW47Iywmb8g-1 Received: by mail-wm1-f69.google.com with SMTP id t24-20020a1c7718000000b003d1fd0b866fso685075wmi.3 for ; Thu, 22 Dec 2022 14:38:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ght9Cz12XBVdRGneYg26vNie4Bxq0erKME7Iy3zY0sk=; b=EOX/ECg2iXQigrrmnq+MqKofOv3ztD/gfUN/GEJRH7dfVW+j8TCalGgh3nWOLHpcd+ cgAQsEmooPMB5Bpa4x0o58fDCTQF2FyQhp0KfdvGx955Vi8HcW4E9u8bonuLo3WHBmgJ HqxuWkndYj5povAo7Goe+RCpMnYbjFhHZyopQn/JMChrlupzG2Q8azYi38OlQ89FpJDR xB9E/np6q4xY+mPI+0C/Rg5m66i1C7jgCbQQXx+S5l0dA9ATQuEEaQlta3kIo8HjAfLE xV0W1IekCCNxAMi9abXgAuEHgrd+ecp6i2l2u9NUgxHfy6CHbadVdR3gUEl3H1WSFM4c u7sQ== X-Gm-Message-State: AFqh2krGKx9LkgF1sNulSNfhK5vszQHW/dFYNjW2m1gXK/Hkp0vfqagl baukc7I67PdqeDcjx55lrCfQiG3/dyVFFH+q6xNaAm4TQoql+xKWkGnCzaINX9Vjn99oQcGmZnO L7y7fn+kFQAQ9UB/Jmu/RKdEE9nne X-Received: by 2002:a1c:19c4:0:b0:3d1:ebdf:d592 with SMTP id 187-20020a1c19c4000000b003d1ebdfd592mr5462946wmz.22.1671748722669; Thu, 22 Dec 2022 14:38:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXuP0u7dskGkzNbFK3ZW8MZVZqH4CqyAnp12i/3HFUwZu5I/n43YZMwG5g5RPJKp6qEDcJuEyw== X-Received: by 2002:a1c:19c4:0:b0:3d1:ebdf:d592 with SMTP id 187-20020a1c19c4000000b003d1ebdfd592mr5462933wmz.22.1671748722393; Thu, 22 Dec 2022 14:38:42 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id n25-20020a7bc5d9000000b003d969a595fbsm2386239wmk.10.2022.12.22.14.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 14:38:42 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH 1/4] drm: panel: Add Himax HX8394 panel controller driver Date: Thu, 22 Dec 2022 23:38:27 +0100 Message-Id: <20221222223830.2494900-2-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221222223830.2494900-1-javierm@redhat.com> References: <20221222223830.2494900-1-javierm@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Robert Mader , Sam Ravnborg , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Martijn Braam , Thierry Reding , Ondrej Jirman , Peter Robinson , =?utf-8?q?Kamil_Trzci=C5=84ski?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Kamil Trzciński The driver is for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface. Signed-off-by: Kamil Trzciński Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-himax-hx8394.c | 460 +++++++++++++++++++++ 3 files changed, 473 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-himax-hx8394.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 737edcdf9eef..7ee9c83f09a7 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -154,6 +154,18 @@ config DRM_PANEL_FEIYANG_FY07024DI26A30D Say Y if you want to enable support for panels based on the Feiyang FY07024DI26A30-D MIPI-DSI interface. +config DRM_PANEL_HIMAX_HX8394 + tristate "HIMAX HX8394 MIPI-DSI LCD panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Himax HX8394 controller, such as the HannStar HSD060BHW4 + 720x1440 TFT LCD panel that uses a MIPI-DSI interface. + + If M is selected the module will be called panel-himax-hx8394. + config DRM_PANEL_ILITEK_IL9322 tristate "Ilitek ILI9322 320x240 QVGA panels" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f8f9d9f6a307..84c01adafd4c 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) += panel-ebbg-ft8719.o obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o +obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c new file mode 100644 index 000000000000..b22eec0674b5 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -0,0 +1,460 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for panels based on Himax HX8394 controller, such as: + * + * - HannStar HSD060BHW4 5.99" MIPI-DSI panel + * + * Copyright (C) Kamil Trzciński + */ + +#include +#include +#include +#include +#include +#include +#include + +#include