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: 35977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp24818wrn; Thu, 22 Dec 2022 14:44:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXvCq9IjhE/U8dNuvqtP3oSWVOFV+QfhTaxA7o49fi6BhyQErpYF3HrAUND3MHLtl9Y77VAu X-Received: by 2002:a17:907:8b98:b0:840:a6a3:41c7 with SMTP id tb24-20020a1709078b9800b00840a6a341c7mr5172475ejc.50.1671749064291; Thu, 22 Dec 2022 14:44:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671749064; cv=none; d=google.com; s=arc-20160816; b=YTNlTWFQKxCWNTxr/U5DsFoBb7JkiNY1JbmrBq0lWUs9oLJPhbe1zBDpd4cgko5Y2z /K8bAPTh/nvvlRtdW+465tQh+wZ/PM7FNVdjnu1TB0W1+ihi0XjiibExjuQVgiH/BGA/ mYCPW0FjYp6x0Hf6quumDoOrCKH1QE3bS6zZWlAqQ2QVnCzG++nUEfmL4Q55XagVq06Q eCrqu4Z4xWxykPtvvuf9wJ4hZaVYJShERnXQK7w+SI6E/z9Zt+WxYppuIAEuhLCGaCQV ved+/MR6tUdd6XLyMwTef+DGKz685yexJX5xoRMZy2/MzzhWl3BlUxw2wD+UFXsZmCXU IWTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ght9Cz12XBVdRGneYg26vNie4Bxq0erKME7Iy3zY0sk=; b=B57if3vdzQddTTkVCktzVW6n3fMfEZgSDcXHX8OpzYnrPpiavER3pOdShjlI46B7f+ BqAzIXvuWOY4c1PCG/SgNoxquyQczTVbm7pLsAbvZS7r+0EIN8PScGhCoin8s2v9w2zx eQvSN0m0K8EpJ3qf7f6xwabd2Lb/A8Zg7mpZVKzygJkaZ6pnG9WYfukTK7AINw5bhbCx bT1vmPiw7JJAsxLr1gMq8orMRy8nEVl5FIlQoHuVsFtW7ig6sCknW7cu3DETYcABzqCA NHkJX63xNf9A8tlaBC2o1x+boHJIcI3842miy4oeF3uLy+YWHQ9BXOQvTXvz/Zp6+R9a brYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JNTUXWCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz17-20020a1709077d9100b007d6648874aasi1400657ejc.552.2022.12.22.14.44.01; Thu, 22 Dec 2022 14:44:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JNTUXWCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbiLVWjk (ORCPT + 99 others); Thu, 22 Dec 2022 17:39:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235769AbiLVWje (ORCPT ); Thu, 22 Dec 2022 17:39:34 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E57122BD8 for ; Thu, 22 Dec 2022 14:38:46 -0800 (PST) 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-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-461-MUGHDH0zNoeItYMHMJO_2w-1; Thu, 22 Dec 2022 17:38:44 -0500 X-MC-Unique: MUGHDH0zNoeItYMHMJO_2w-1 Received: by mail-wm1-f70.google.com with SMTP id v188-20020a1cacc5000000b003cf76c4ae66so2890107wme.7 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=Qx/gIfdLDd32m6853BQwG3z2CKCXGdkV4zeopsugLdAkJnCjBV92bSOhcy2mvu7JEi T0vjr3UKZ5XuDatvsdM0IMmWZpaMxvcdKi/e6Egm+tce5spo6uzg0KRcFl7kJR5lPcb0 Is0DuCNfAGCVyjG/2HgQsmJ3eLBVxF7wHhLuaTBFgRapWt90j4B4uwBHyq9QZkx6K3Hr fGqc0gkyy6Pni6UnL2arvxpyv8XHTDKBPKTmeQDhYjJO5OVWq1jnKhwOZY+ol8tR2AXO q2a21qBT16ExtNVhUl9elSyvtywGD0M3Tv8S2qYCGlTn9KECmlTnh9SrqDL2CtUoDKRE PCNQ== X-Gm-Message-State: AFqh2kqmItIJ6MK4xFRWKHKkCal2Ii7uGXIcomwC+1Ewb+QBxmfUF0va 5bWUk8EraBDhpg7rLI95A1ibLBxRQ+wuB5EUl19CEw4QKc99K3qMahLRBQnIQROKw0Z2J8CZI5d oJDCwdFNtdmIREf1/y2TphpXrQEuFxbpqSgAWAFcvFkNZPsAQeYr9UuXA0iFN+H3cQrULPFVG5/ Y= X-Received: by 2002:a1c:19c4:0:b0:3d1:ebdf:d592 with SMTP id 187-20020a1c19c4000000b003d1ebdfd592mr5462953wmz.22.1671748722786; Thu, 22 Dec 2022 14:38:42 -0800 (PST) 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 Cc: Ondrej Jirman , Robert Mader , Peter Robinson , =?utf-8?q?Kamil_Trzci=C5=84ski?= , Martijn Braam , Javier Martinez Canillas , Daniel Vetter , David Airlie , Sam Ravnborg , Thierry Reding , dri-devel@lists.freedesktop.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752955947204851041?= X-GMAIL-MSGID: =?utf-8?q?1752955947204851041?= 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