Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4434191imw; Thu, 7 Jul 2022 19:33:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u2a39QVinT+sHfrWJbwJ2aZ/X16dr9OkHdcAbSC37JMpEJN2AJCjhwUymVjMm1we+FNiXi X-Received: by 2002:a17:907:2c4b:b0:72a:f83b:35e7 with SMTP id hf11-20020a1709072c4b00b0072af83b35e7mr1249147ejc.636.1657247630179; Thu, 07 Jul 2022 19:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657247630; cv=none; d=google.com; s=arc-20160816; b=ylSpT66xNy8CeLPvuvmdcgT1yT7RbbYHYuzTsaKTJZ6NFkM2eb2mbkq5OKi0xzutAv rz3X+qBhgSxU5nJ39Y3Q0H5NWEgTqS6WdduhhbdaCyS79nZaRwuBoz8rk5MR4dcxXgy4 gURmt1H+YehPXh03WXOybigQ2ZvuFcPQ0ThLfH0/PbdRlOTvCqVIsrbSDRC6T9oi/CVd oG0Pm+QD/n4DpPCKlMV8J8moVUvKw9yclwVQuF1mJKaNMzY9k+g/nXZsyjk0G+xFaMh3 VXF5i3CLk/EV+8tnzI+3Xd61JJyMWnOvMg0j9LwkUmxDeryn24vPf2XecUalvwf9JLu+ 0Hwg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=iz8bT7YPyUHTObGNpxtkrlymFcuBRN0N5+wdic9C3L4=; b=GR6v6Yi/jvqeoXmkqqK5jDVL7B7PqWdAoHK70oIKVcBuL1Y8rQk+r8LCy3pZsKDcT+ /4WUJdX36/qGXmBzeZhyz3pDTi2aj7KDFJL2S+q3OR5gCpFAry8kOrbWSUVUigcCAyyP AtIgF4dSYinJRbr2L6QyLvlGjsb3icrkl/aMgk8kMoHqOUXFDGUdYSlc5IgqKZnHmxCF ZYbntyuPayxCcpciIXbJuOTOkba3OC50NkW2KE8l8qgdnk6Vm/Q/oTQQIREKlyCVh4X+ vt4ETzCKsFatzB2xLQhS1u+ZpeG8JaAi9hHVtsEKJvqjQlMe0jN3+EwLaAa5ssLHXJp7 5mgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ErDmXgWe; 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 ay19-20020a056402203300b0043a57b8b5d0si3431379edb.148.2022.07.07.19.32.57; Thu, 07 Jul 2022 19:33:50 -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=20210112 header.b=ErDmXgWe; 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 S237034AbiGHCTW (ORCPT + 99 others); Thu, 7 Jul 2022 22:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236929AbiGHCTN (ORCPT ); Thu, 7 Jul 2022 22:19:13 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B91B374359; Thu, 7 Jul 2022 19:19:10 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id r22so14295244pgr.2; Thu, 07 Jul 2022 19:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iz8bT7YPyUHTObGNpxtkrlymFcuBRN0N5+wdic9C3L4=; b=ErDmXgWeDdEjMB2VNmjqOaa4/jUh3dGZ5HXosNEIxuhRK0oU1H3Ro90xbw7VtmUNyo Bw3qJ3WIWKDz4yET0Pt3QA9OqDhEFixUwvEALg/zYwrifGUxclXQm6xPqoyRlF8dWbpV JwvC78kTkatErLKsBb4tcCA8ncEpZNKuduZ8nVlA5au7tDOOSXFmtRMpqnnZ78jf0vJ4 2drLOy5lguEP3FshINoAxYIW/QcKoxIgHwe2Z+XxyjYYtchdtcDZT+bgNJZJ5hkTpdD4 1mHFHvuWU6akdPTt6fhFZsX+hrcTSWRURkB1wVKa3BBv0TIwBqHYIiyzCdngTSsCB7bB vQiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iz8bT7YPyUHTObGNpxtkrlymFcuBRN0N5+wdic9C3L4=; b=RCkw2YM5OZDg4xhRai0h+jeBWwjoIM7boBDvHXle5KD2X6d1AswKNlhJ42wEUAJTU6 m9TSKCNQwOtkjt6STeMtCpOYydwYP6w/B50yJwW4KRlYkrm5PIshXBwACJUQGTUK2uGc xvKImxPsSmANcDmZxsemCmL7FWwkxKRsz4jmSwvPv96ZAu35WAwdIspKd39OxOAJv0sd 3BVN0ihxSphhuzjz+7jYwz3w0ghqooEG5qfdbZQmJVzjSTNDoefzxFQ6122ZKbiEfPY/ 5Jyvipz8pVuAFBdWJme2E3T/n3L3kSXwGfnDfz3VeBVoV9V7Ivy7oqMWcd/gPHKzitc2 JW/A== X-Gm-Message-State: AJIora9I/b+U4N6YxC80EptuDWY6RHxabJg6YS1/bVJ5i6E3jxTaZJNn ov2l/srTSjOZP4ihYn71YJc= X-Received: by 2002:a63:69c3:0:b0:411:9d19:ff13 with SMTP id e186-20020a6369c3000000b004119d19ff13mr1137416pgc.34.1657246750285; Thu, 07 Jul 2022 19:19:10 -0700 (PDT) Received: from localhost.localdomain ([112.0.189.16]) by smtp.gmail.com with ESMTPSA id c17-20020a170902d49100b0015e8d4eb1dbsm12678820plg.37.2022.07.07.19.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 19:19:09 -0700 (PDT) From: MollySophia To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Molly Sophia , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] drm: panel: Add novatek nt35596s panel driver Date: Fri, 8 Jul 2022 10:18:23 +0800 Message-Id: <20220708021824.9167-1-mollysophia379@gmail.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Novatek NT35596s is a generic DSI IC that drives command and video mode panels. Add the driver for it. Currently add support for the LCD panel from JDI connected with this IC, as found on Xiaomi Mi Mix2s phones. Signed-off-by: MollySophia --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-jdi-fhd-nt35596s.c | 464 ++++++++++++++++++ 3 files changed, 474 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d5176f75248f..a54389c107bc 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -231,6 +231,15 @@ config DRM_PANEL_JDI_R63452 Say Y here if you want to enable support for the JDI R63452 DSI command mode panel as found in Xiaomi Mi 5 Devices. +config DRM_PANEL_JDI_NT35596S + tristate "JDI NT35596S Full HD DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the JDI NT35596S + DSI video mode panel as found in Xiaomi Mi Mix2s Devices. + config DRM_PANEL_KHADAS_TS050 tristate "Khadas TS050 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index ef89dada021d..40db5e6dcbf5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_INNOLUX_TD4328) += panel-innolux-td4328.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.o +obj-$(CONFIG_DRM_PANEL_JDI_NT35596S) += panel-jdi-fhd-nt35596s.o obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c b/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c new file mode 100644 index 000000000000..0793bcd872e2 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c @@ -0,0 +1,464 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022 Molly Sophia + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include