From patchwork Tue Jun 6 14:07:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Pavacic X-Patchwork-Id: 689907 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4FE1C7EE29 for ; Tue, 6 Jun 2023 14:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236607AbjFFOMP (ORCPT ); Tue, 6 Jun 2023 10:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjFFOMN (ORCPT ); Tue, 6 Jun 2023 10:12:13 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47219107; Tue, 6 Jun 2023 07:12:11 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f6042d610fso61426625e9.1; Tue, 06 Jun 2023 07:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686060730; x=1688652730; 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=d8VaZ858WGTztv9OyCXzp4p0rlgykAZTm6ZPkmQwQoQ=; b=PJrWvg+7yLEkuxQcPa7D4RMCK89IfL/gJOfMvRycs4Qgky0SQXPslBXwTvjsPBZjnZ OshfLDhQVzZAf0kKwXqlbn1pUminA8vv7Ih2l/0e8SLdlF7mOPfVbCc035BPY45V3MM2 oORGsM+1XSWgZL/amlp2huSS+tR052kG7gSXdqbxcbDrcejFdgtOMXlQECOH0B+0vumB Sg8wqsI13m9aP0GxzXgsszWGhlyTLMDepYduYIYL2P906pS1I0YYNh3ebzNJoi1H/RfI 5z1kCUc/VcapiVPMDMuJxpMJoOkK5duLjBEBM/Je7OBPAuf8SS4dDpJUobWTFcwRgXE+ OSbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686060730; x=1688652730; 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=d8VaZ858WGTztv9OyCXzp4p0rlgykAZTm6ZPkmQwQoQ=; b=NnP79b4tX3yTqT7NLBy3d9Q4Zr9kNAY4suQJkU+Fava3jnRDisO1XHKD/jEiIj1b4G qgYiCXwA06SgpBllpQ/fKt4l6v0HI2Jqb7phpTJTeGNo+OYBo3rDa41iBwbg71+HTN/w uDUFpXBuTK3VV2gFI0FH8I9xaclZ2s9BQ2L3Vgy2Tra55TgU2HNNtqwOEEL8YpdkozWk scD5Lsj8uWrZIbezL2idpYDU9UTg7XQQ6NimjgxHwn4yKEsrf0ca2WyyBCaWKbYVhPVF hf3uyiyrfxeaPNnNq1JOsCqhE640i/BbYeYP+Mz/ynBpx8WkgSmRAIw2j8wzJhZJf5Pa MjxQ== X-Gm-Message-State: AC+VfDxlHO9UuuyNber+5L+Q6rL5bHNs2h+nnUuZTjuD141qHA3SBHy8 2QY7I4m+2Dq7pdjXK6ww9Fo= X-Google-Smtp-Source: ACHHUZ7kXhUfSKsOLk232B5A4piHFS4OhzgcPjlrkjl50WY8ohBAQ+PjbqGx4YX4kqE22/mxxJVfGA== X-Received: by 2002:a5d:4d45:0:b0:30a:e5ba:170d with SMTP id a5-20020a5d4d45000000b0030ae5ba170dmr2082349wru.32.1686060729450; Tue, 06 Jun 2023 07:12:09 -0700 (PDT) Received: from fedora.. ([212.15.177.3]) by smtp.gmail.com with ESMTPSA id g7-20020a5d5407000000b0030903371ef9sm12694315wrv.22.2023.06.06.07.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:11:54 -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 v3 1/3] dt-bindings: add fannal vendor prefix Date: Tue, 6 Jun 2023 16:07:55 +0200 Message-Id: <20230606140757.818705-2-pavacic.p@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606140757.818705-1-pavacic.p@gmail.com> References: <20230606140757.818705-1-pavacic.p@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Fannal is a one-stop-solution provider for touch displays in industrial application, committed to delivering a variety of professional high-quality products and technical services globally. Website: www.fannal.com Signed-off-by: Paulo Pavacic --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 82d39ab0231b..f962750f630a 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -462,6 +462,8 @@ patternProperties: description: Facebook "^fairphone,.*": description: Fairphone B.V. + "^fannal,.*": + description: Fannal Electronics Co., Ltd "^faraday,.*": description: Faraday Technology Corporation "^fastrax,.*": From patchwork Tue Jun 6 14:07:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paulo Pavacic X-Patchwork-Id: 689906 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95189C77B73 for ; Tue, 6 Jun 2023 14:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237792AbjFFONH (ORCPT ); Tue, 6 Jun 2023 10:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237774AbjFFOMn (ORCPT ); Tue, 6 Jun 2023 10:12:43 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B71541980; Tue, 6 Jun 2023 07:12:33 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30af159b433so6151188f8f.3; Tue, 06 Jun 2023 07:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686060752; x=1688652752; 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=HUFBF4cl9Qgce06HOWXsDwoj8Xhtf6qZR5FO6QTeOMo=; b=k0cOnYR//zHtC74CKXJVM9kkWkZxmba40nsNq6hk/wA1jix0mXDZPTFz6g2mnOVsiF iJk3Q0DPLZnSjujL0JIo3/IGW3sFNWvlk3hNhEkSDn99VY2OnP/Tz0HnQVXpuyeIBIBE iALc2dOGDdTJqjNvc/jAqEdKE3bjCUTOMTTSSm+L96TfD/u8OmZc90SoY9FrH73VfoRz 38jyt0t4t/PYhi9G55cOJXvkZKWrpG7h1X8MikFn0oNkt8XT9P8GM7qxtvUYE1qkYyT1 cePTm7oV+1saabyXTYM5DLVE4e2t90d7cfr+n1YzdG5Bl2598GchZTd0i+fdnMq/m9zC IMqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686060752; x=1688652752; 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=HUFBF4cl9Qgce06HOWXsDwoj8Xhtf6qZR5FO6QTeOMo=; b=B4H1ZTaN1AqTSpNNu6z8oDOsho8uTWuMBKAI4ZAaquLUb1qu423c/nRdYRFD6MEj3k c2fWvebBj4Lu7a+eZeHmeYMQsl9o7RHxKePubWaijB77IiA4qEmYZWcQC4Bnp8AiH4E8 ji/IsVlt0okY8Rfi36+FvK0YNtsYGKlzbt2Mx4yowuXkKL21k9N92BywPPpcAIdm1Z40 X18S35k3ftpt9ez1+Ij754I1+oWomJq9MixyzsH6UXray32te8Uh1nqCsOGJsLB1pcsO qxzCm9whSxHNbwWCUVuBx4rvP8qveDYA+a7u6fV85HFpO8D2s5PGc/QkmhGTYzrWXqTW 3VXQ== X-Gm-Message-State: AC+VfDx/VBdTA9rVwpuuENTXgYqCBx5blrq2D8JJSJ6k9FLwR5gcCkeq fOQkxz+5dAFn0aWQ8+z7PRE= X-Google-Smtp-Source: ACHHUZ6bH+VsEGv+KXgwJTq0y5tyy1T9ujEczve/tbkY8v2QA4TuIZS8A+zL60AZvU7Yg6IAwduQIw== X-Received: by 2002:adf:f7c5:0:b0:30a:e9a9:a4f8 with SMTP id a5-20020adff7c5000000b0030ae9a9a4f8mr2157655wrq.38.1686060751630; Tue, 06 Jun 2023 07:12:31 -0700 (PDT) Received: from fedora.. ([212.15.177.3]) by smtp.gmail.com with ESMTPSA id g7-20020a5d5407000000b0030903371ef9sm12694315wrv.22.2023.06.06.07.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:12:19 -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 v3 3/3] drm/panel-fannal-c3004: Add fannal c3004 DSI panel Date: Tue, 6 Jun 2023 16:07:57 +0200 Message-Id: <20230606140757.818705-4-pavacic.p@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606140757.818705-1-pavacic.p@gmail.com> References: <20230606140757.818705-1-pavacic.p@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Fannal C3004 is a 480x800 display made by fannal that requires DCS initialization sequences. Signed-off-by: Paulo Pavacic --- v4 changelog: - formatting and style changes - change community room v3 changelog: - using generic mipi_dsi_dcs_write_seq - removed success prints - removed some comments - simplified code/removed support for different panels - changed namespace from fann to fannal 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 | 318 +++++++++++++++++++++ 4 files changed, 331 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-fannal-c3004.c diff --git a/MAINTAINERS b/MAINTAINERS index 4f4492d0f6c9..c3187927b763 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6432,6 +6432,7 @@ M: Paulo Pavacic S: Maintained C: matrix:r/linux-drm: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..c26b69315334 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-fannal-c3004.c @@ -0,0 +1,318 @@ +// 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