Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp315821rwd; Tue, 16 May 2023 01:11:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QpzeOwS7Z0gA1sCTyy+4beguh9S9VgCf7AHrQ4Xqt8O8JIZXoSx0b1hdUIQILiDya/5Nc X-Received: by 2002:a17:902:b195:b0:19f:a694:6d3c with SMTP id s21-20020a170902b19500b0019fa6946d3cmr34849302plr.55.1684224701828; Tue, 16 May 2023 01:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684224701; cv=none; d=google.com; s=arc-20160816; b=rh1DwButiMxn4uEvEOCuAtF6pGtGDDMz4aC//i7DCBYNgYJtO/JhStL+zfsjGlgZcw TL1a75s+Dw85+GTiCWJRKdtJzs0aQqeLWcqE2SeilGpipuNwUlkjsggnwpOf7QH+50P3 GbQuvXIyC41M6j7yzNIzCwARHjeYXiEO8EppKT9LMSTMo0Ebzw7DEIM5pH25z3wIyVkU +SycQrE0KF9R5Lj43YGxBuFYGK3cp+FHEqb0lZuBXuyCsWHuNZtW7zENDUQx/zUcUlyc Ah7HyKHiKqbfc1oXgm0Iwxhd/cOJhst6HzB9POriZzDEc3TdA8WF6JmxVflXlq/HZ7Br D8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:mime-version:dkim-signature; bh=DsbgPvP2eQIlq7kmg9LRSNNJDTLHGkJ+z06cRTvKmPo=; b=uN5RW5wzlVBZ46tA75s+NwBiddlhjaT7wV0U4pg22OxG211ww+v592/KtiWmt/SAZI FpcwescKayaQj35ZtnxcXLVGaJ8xphkV3rTg2AWUWD778q1yjVLBV2NU/siXUPdNZ93U 2XylCzNGydykP5JAUTsCzjHbVxr8TE4cF2A8bsUq2VS2PWY1znZjcmMzQ0iwkl0vZ/II ZBXVDUS+vXIqiJsWpqrf86ljpNVHbRzPGk3Uz3WlrbeKuzoyRHgW+lHJxGH0wrG8a1yT GgcnQFgmNPo1348Y1PpOfF6ltMjZ23HCbXURQdMFqGwY36qJC6gLM6PrzbPt+6onMj62 0c0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IH+OxDSC; 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 q11-20020a170902dacb00b001ac495a2f96si18894657plx.559.2023.05.16.01.11.27; Tue, 16 May 2023 01:11:41 -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=IH+OxDSC; 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 S231519AbjEPHwp (ORCPT + 99 others); Tue, 16 May 2023 03:52:45 -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-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 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 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