From mboxrd@z Thu Jan 1 00:00:00 1970 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 42107C77B7A for ; Tue, 16 May 2023 07:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231521AbjEPHwr (ORCPT ); Tue, 16 May 2023 03:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbjEPHwf (ORCPT ); Tue, 16 May 2023 03:52:35 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C36946AF for ; Tue, 16 May 2023 00:52:33 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5341737d7aeso2143630a12.2 for ; Tue, 16 May 2023 00:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684223553; x=1686815553; h=content-transfer-encoding:cc:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DsbgPvP2eQIlq7kmg9LRSNNJDTLHGkJ+z06cRTvKmPo=; b=IH+OxDSCnRj0n1+jRXRta3jGInukoO1b64cA9Ks3MpgqXpCEwOnM302HL6p8kvhp/e aPMX07wda3y0nd5ZSLerXfaIGKieDc8n8lZx60O7D8jSajKtwimD5dCqv6lhBlGlImbZ jHr//F3JhpGK2c7Vf7rN3vxbl1LlgT1P22lKQsUj4vhIXfsPjUK+FeAQC6Hjq/omI4Bm 7s4ACIpULaePWNWnMZ41UP/l4A/F4KgFtM4SvMJJIqvJjq5xJI++SOCvgJu/pJHrSq2u QiN78KmcMJWKubO3i1xueBFg50LiOQORNyq6G5lpCdGlcRjvqi6C54cfoYhsdTqm6QQ1 yzhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684223553; x=1686815553; h=content-transfer-encoding:cc:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DsbgPvP2eQIlq7kmg9LRSNNJDTLHGkJ+z06cRTvKmPo=; b=cylS9+Xb+nSpAvvyzt5ueNJZX8MpLKwrBObr57LBQn3Na4cBftTcxnwwxzNtcXFq41 s7HCslAU8LvwHM5SYz/W5uBHRL7gypECk7irmhRUQINGDFlkvnKyggIYbx1R5gmIcdQ6 2Z7kg7c1zAHZMN63vMpBVypmAN6n2X25iDzFEaHmiURz9x3WwE9ISgCE/xPNG1sf6ajW ORK4ME9XDpdNDViiUkdD559guxvqzLPfKwXQDZazHSwRYZLkcsZLoAoa+kYHHk/TW9WR CamInJnFP7+DUqVwBYIoxamw6y9InEamF/TAk1iclnfUD/jcMIN3zBHHLYtXjIV2yZj8 E+vg== X-Gm-Message-State: AC+VfDxHtkjVTLtE1+ZwML9GQJz9rqTu/jrtO6M+Ya7rJTf2UYpY20wX mKt2nUIxbrx2tWMCz9RUwgybj73owBS3v/UHkfTCtWHAai9NrSrT X-Google-Smtp-Source: ACHHUZ5Ar5+E5Aib3r0ioU3vwbYtx1KUxFjcdflrsZ0se9OUf9+0vHEriXuUqUch7mtfTXZaPsN+X/ZxbkDBNUefhK4= X-Received: by 2002:a17:90b:3909:b0:24e:1144:ef52 with SMTP id ob9-20020a17090b390900b0024e1144ef52mr35607506pjb.11.1684223552706; Tue, 16 May 2023 00:52:32 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?UGF1bG8gUGF2YcSNacSH?= Date: Tue, 16 May 2023 09:52:21 +0200 Message-ID: Subject: drm/panel: Add panel-mipi-dsi-bringup To: "daniel@ffwll.ch" , "airlied@gmail.com" , sam@ravnborg.org, "neil.armstrong@linaro.org" Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >From 118419935002e076b44292c832e9b26106f93c89 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Paulo=3D20Pava=3DC4=3D8Di=3DC4=3D87?=3D Date: Fri, 12 May 2023 17:38:29 +0200 Subject: [PATCH] drm/panel: add panel-mipi-dsi-bringup driver MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This driver makes it easy to add new MIPI DSI panel drivers if one already has panel enabled on the embedded system without Linux kernel. I have developed it out of the need because no other driver worked for me without big amount of changes. Currently it supports fannal C3004. Documentation/* files will be added in second patch since checkpatch.pl was complaining. Signed-off-by: Paulo Pava=C4=8Di=C4=87 --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-mipi-dsi-bringup.c | 418 ++++++++++++++++++ 4 files changed, 437 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-mipi-dsi-bringup.c diff --git a/MAINTAINERS b/MAINTAINERS index e0ad886d3163..8eff1e6f884c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6566,6 +6566,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.y= aml F: drivers/gpu/drm/tiny/panel-mipi-dbi.c +DRM DRIVER FOR MIPI DSI BRINGUP +M: Paulo Pava=C4=8Di=C4=87 , +S: Maintained +C: mipi-dsi-bringup:matrix.org +F: Documentation/devicetree/bindings/display/panel/panel-mipi-dsi-bring= up.yaml +F: drivers/gpu/drm/panel/panel-mipi-dsi-bringup.c + DRM DRIVER FOR MSM ADRENO GPU M: Rob Clark M: Abhinav Kumar diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2b9d6db7860b..b2ccb3a376a3 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -805,4 +805,15 @@ config DRM_PANEL_XINPENG_XPP055C272 Say Y here if you want to enable support for the Xinpeng XPP055C272 controller for 720x1280 LCD panels with MIPI/RGB/SPI system interfaces. + +config DRM_PANEL_MIPI_DSI_BRINGUP + tristate "Bringup driver for MIPI DSI panels" + depends on OF + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for MIPI DSI bringup panel + driver. This driver helps with initial porting of panels to the Linu= x + kernel but can also be used as a daily driver. This driver by defaul= t + supports Fannal's C3004 480x800 panel. + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefil= e index ff169781e82d..c00fb78e6fc4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -82,3 +82,4 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) +=3D panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) +=3D panel-visionox-vtdr6130.o obj-$(CONFIG_DRM_PANEL_WIDECHIPS_WS2401) +=3D panel-widechips-ws2401.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) +=3D panel-xinpeng-xpp055c272.o +obj-$(CONFIG_DRM_PANEL_MIPI_DSI_BRINGUP) +=3D panel-mipi-dsi-bringup.o diff --git a/drivers/gpu/drm/panel/panel-mipi-dsi-bringup.c b/drivers/gpu/drm/panel/panel-mipi-dsi-bringup.c new file mode 100644 index 000000000000..0a37d0ea2a79 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-mipi-dsi-bringup.c @@ -0,0 +1,418 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MIPI DSI Panel bringup driver. Purpose of this driver is to provide eas= y way + * for panel manufacturers to enable their panels which were previously on= ly + * available on the kernel-less systems. This driver is made to be very si= mple + * so that you may add new panels easily. All the values are set directly = in + * this file so that only device tree node has to be added with gpio reset= pin. + * Parts that you usually have to change are market with "INTERACTION" wor= d. + * Search for word "INTERACTION" in this file if you are trying to + * enable new panel. Namsepace is brup as in brungup, + * so prepend all your functions with "brup_" prefix. + * + * Copyright 2023 Zenitel + */ + +// =E2=86=93 include headers, static values, static functions =E2=86=93 +#include +#include +#include +#include +#include + +#include