Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2576620rwd; Fri, 19 May 2023 07:32:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6pHcky3hkHK6B1XnDTXcLq2RaDyv8TXq5ulDEAmygExFGh4Oex3K4hO1/AL5hfcqSqOaE/ X-Received: by 2002:a05:6a00:1505:b0:63b:4313:f8c4 with SMTP id q5-20020a056a00150500b0063b4313f8c4mr3898986pfu.9.1684506731549; Fri, 19 May 2023 07:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684506731; cv=none; d=google.com; s=arc-20160816; b=c7zTyp85BZAiyWf+yBBx5gtltUY2f8rWXtqcb92k/ipBAUUZ8PcyRlWyHTy2MqEKxt QqZ2NOWPgoFri5dqPHXt81JQVOFmbOzqJN3pv/YgI0GziSBPhc9GRupB2+dSb+xqtqu3 cnaGKc8CbZXefpYogyxT9XYo7GJXo1fHpzgbW2+moX7mrfxdapVa3ZGdbxq/itZNWBZV 7jT4BQ2pe2clotLqZEvmOr4YYO1BabX2dnd7Sqw6y0BcdjedIUOCJZgneHrFaHSaFYAx 0P3Jiz/w+x5S+pu93WUguzGU8ZM+ivt/uME0ZEdOOPwzb9p8/eo0VM27yPc8qwRfFZN+ Txiw== 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=HGSXtFQO6NZPOk9/bp/O9fgH0shFEyfhGNdkgmYVGuk=; b=IM5rToXoXQfvnNAhiR7oybg5yx//bX55ve2DjTuHZjV5qG9oT3oE30ryARn5ej4lX6 E/VwW9hVBKPustkbkIL7TMbD9Oh0HNixi+S+A1SGbVyKthGmxcMy5ZE8gjOLa6e0j2np Vxg5VrRAoqQsYzVJ3V7Mbrd/Q6HdG/8PloMvsmXxQXJJTcYYHi1kzrx3grBz7eDl7bPi 4Hke1IMQiBMXwVl7/HhNpnXC0IsanHyADBCOHfqtixsA8XlC8EwIuWCpo2KXleICd1ab AF8Dr0LE9AzNqwujIiO1Fk956jk5oJxamN5p/AR85VBJy865vAXd4ViKCXbC/0S8CX5T km6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="gP5cE1b/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b187-20020a621bc4000000b0064a15fc65d5si1511180pfb.83.2023.05.19.07.31.56; Fri, 19 May 2023 07:32:11 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b="gP5cE1b/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232020AbjESOZp (ORCPT + 99 others); Fri, 19 May 2023 10:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbjESOZl (ORCPT ); Fri, 19 May 2023 10:25:41 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C0291A7; Fri, 19 May 2023 07:25:38 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f475366514so22944985e9.2; Fri, 19 May 2023 07:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684506337; x=1687098337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HGSXtFQO6NZPOk9/bp/O9fgH0shFEyfhGNdkgmYVGuk=; b=gP5cE1b/0ZXeEFiOfsjll6LI92Gh55XL+puh5lPSfpz3Su+bnwT3deO34gYAhpmhep gAXMO/uYVE+b0SGBbkGePVDjPE4exPyTsvUJbPVVhAj+O1rTbzEge3HS+2aBCwE6/WnC UvTXFXS2N4Nc3uOapotB2ZI1WuoFlMBWCNwCBux7X3K90lEqlM5wkLzCv1rLiINHL5r/ zmxgu3SQ4O6MA0UVWHsol0kLNTkV0teGGj8hG2e0IhsJULEo9mNp0l430gPPugOdorrc QX0mBmZ70hCRxObi9HAzYys1pbLWEWEI80yvyzMshWHVvAS4DHTYUqXjNE6LeBUQ011D w/wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684506337; x=1687098337; 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=HGSXtFQO6NZPOk9/bp/O9fgH0shFEyfhGNdkgmYVGuk=; b=hMRLs4N3K2IUeX0rBqas1X6pDAu9RiKtFSZDJwkQKF72eu/GvEXHxs2iBHtw+TzTd4 WZvjYvaLql8MFxuwDuWUKveOdryh8IJJhgDHfzIzXOhbgbn+K0arrg2bpB/moB+Kz1z8 FAZmUG37sswM1F3C07iARpDbYmLDMB3gCxRAm7VoCBbvueAtI/vOikxF8JLTEVKz1mu+ Hs/Muzd3BS3hLknkxYIR4iNiMGhxr4XeDG9ui6Hrq6C4Z48Y0A3oyDdAlVDWvzroH4ax wS2zpTBG3HUZUJ61WiN6EAgTh5YVhayAhZWX4HchYHoBRbT7clRuCzdI14neZQ/zT9Jw ysng== X-Gm-Message-State: AC+VfDwxBZKjv8CN4+FgGMIIyKdFlTfV5/N6+NUnANc5kw8T2GTn5A6U wayZCOuAj9R9ocMcLZ97TmA= X-Received: by 2002:a1c:4c10:0:b0:3f4:5058:a033 with SMTP id z16-20020a1c4c10000000b003f45058a033mr1524806wmf.24.1684506336808; Fri, 19 May 2023 07:25:36 -0700 (PDT) Received: from fedora.. ([95.168.116.22]) by smtp.gmail.com with ESMTPSA id h12-20020a5d4fcc000000b003062b2c5255sm5451748wrw.40.2023.05.19.07.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 07:25:36 -0700 (PDT) From: Paulo Pavacic To: neil.armstrong@linaro.org, sam@ravnborg.org, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Paulo Pavacic Subject: [PATCH 2/2] drm/panel-fannal-c3004: Add fannal c3004 DSI panel Date: Fri, 19 May 2023 16:24:56 +0200 Message-Id: <20230519142456.2588145-3-pavacic.p@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230519142456.2588145-1-pavacic.p@gmail.com> References: <20230519142456.2588145-1-pavacic.p@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Fannal C3004 is a 480x800 display made by fannal that requires DCS initialization sequences. Signed-off-by: Paulo Pavacic --- v2 changelog: - renamed from panel-mipi-dsi-bringup - only one MAINTAINER e-mail --- MAINTAINERS | 1 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-fannal-c3004.c | 405 +++++++++++++++++++++ 4 files changed, 418 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-fannal-c3004.c diff --git a/MAINTAINERS b/MAINTAINERS index 62374c8424b9..93fc1ae6832f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6432,6 +6432,7 @@ M: Paulo Pavacic S: Maintained C: matrix:r/mipi-dsi-bringup:matrix.org F: Documentation/devicetree/bindings/display/panel/panel-fannal,c3004.yaml +F: drivers/gpu/drm/panel/panel-fannal-c3004.c DRM DRIVER FOR FARADAY TVE200 TV ENCODER M: Linus Walleij diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2b9d6db7860b..a1041c1e6bf6 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -144,6 +144,17 @@ config DRM_PANEL_ELIDA_KD35T133 KD35T133 controller for 320x480 LCD panels with MIPI-DSI system interfaces. +config DRM_PANEL_FANNAL_C3004 + tristate "Fannal C3004 panel" + depends on OF + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for the Fannal C3004 + 2-lane 480x800 MIPI DSI panel which requires initialization + sequence. + + If M is selected the module will be called panel-fannal-c3004. + config DRM_PANEL_FEIXIN_K101_IM2BA02 tristate "Feixin K101 IM2BA02 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index ff169781e82d..13c0f00038b5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_EDP) += panel-edp.o obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) += panel-ebbg-ft8719.o obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o +obj-$(CONFIG_DRM_PANEL_FANNAL_C3004) += panel-fannal-c3004.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 diff --git a/drivers/gpu/drm/panel/panel-fannal-c3004.c b/drivers/gpu/drm/panel/panel-fannal-c3004.c new file mode 100644 index 000000000000..decbd0c59093 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-fannal-c3004.c @@ -0,0 +1,405 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MIPI DSI driver for Fannal C3004. + * Copyright (C) 2023, Zenitel + * Author: Paulo Pavacic + */ + +// ↓ include headers, static values, static functions ↓ +#include +#include +#include +#include +#include + +#include