From patchwork Fri Jun 14 14:56:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13698802 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55D06C41513 for ; Fri, 14 Jun 2024 14:56:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B62DA10ED83; Fri, 14 Jun 2024 14:56:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b="Ctam3Mft"; dkim-atps=neutral Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE8E410ED8A for ; Fri, 14 Jun 2024 14:56:31 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-6e4dbca52f0so1686198a12.0 for ; Fri, 14 Jun 2024 07:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1718376991; x=1718981791; darn=lists.freedesktop.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=ezAR0bXKlSsLgN6d+IzrNljlQ+VyGp7/9wkgyFYogRY=; b=Ctam3MftooPwQQmKFQ3TZJ/wdPRQUXSH7hx24UOvLqxIo5nyM49qikWHq15Iz9tKxn Glp5byseLpKsbpvZtbj3xEhWJHDYWtWx9y8HPDlcKRChM0od3GYMHiyLZuN72KLAYjjE 2Zg8LBMBifVn4ZgTMr0uDJVovx2mRL6w5T53jZWmjckEkl5/VsrBYIshkDicc4e1yjZ8 TIBBeoLv99toAj9xj9JFlYVYa8YKVso1JHrahiNUzxy/MvqKU60qI3DSASXp67OoWX0L S5CuhaEFRZm6fxapQA1CGVtdo3sIPToTZyDl4nIx05VedRg1huuVUu0IZoG/loYWIGPo 5J7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718376991; x=1718981791; h=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=ezAR0bXKlSsLgN6d+IzrNljlQ+VyGp7/9wkgyFYogRY=; b=iaiSUFkoVZ4BGZ8z2XCXcWlB8DZOCzgrFGJZ2L/f19riz4Z97Dpz+YOrUwzwWbdZR2 kH/XQGEcolrCe3nzorPTlif27jwVErNEg6BHKD2k7qhhO8E7NUO83tTtT0UXLNGMWcgS xYFZhr+hoaBJrcaUo249Xv3mQU8DE8fMBTDf+Z/qvtJG54fX92dwgw2qiHqI0Kw9hZaa RK4koKn/7zr65Imh+JJKWZa/5KcQZ6WB2C9HXlvh689F/5pIE6GD3aNGtmhxLpyaakT3 +34ZPXEivummYqGWXtp7ZTybSjL028JQr9PZul6Gmxu5PqIwkWO6/5oWbVaW44tYRMQc tUOQ== X-Gm-Message-State: AOJu0Yx461/t4mE8V35jJC8tfjSr8evfPPSMyQEFLbFvwyeH/07oHp6S xY+vDko69tvRxur0MkCWsHwR9qIBx9nLmQebadG3ua8ia21l3EC+x4fzbLM+WRM= X-Google-Smtp-Source: AGHT+IH+AeWYB3n5lUtDRmfv30Qlv/jrfM6142JCb+EKQcpFQU4PoeioTtzZ27oADvwMofPE4rBFDA== X-Received: by 2002:a17:90a:4491:b0:2c4:c2d3:c061 with SMTP id 98e67ed59e1d1-2c4db24d283mr3223301a91.18.1718376991028; Fri, 14 Jun 2024 07:56:31 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c4c467c60fsm3985913a91.53.2024.06.14.07.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 07:56:30 -0700 (PDT) From: Zhaoxiong Lv To: dmitry.torokhov@gmail.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jikos@kernel.org, benjamin.tissoires@redhat.co, dianders@google.com, hsinyi@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Zhaoxiong Lv Subject: [PATCH v3 2/2] drm/panel: starry-er88577: add new panel driver Date: Fri, 14 Jun 2024 22:56:09 +0800 Message-Id: <20240614145609.25432-3-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240614145609.25432-1-lvzhaoxiong@huaqin.corp-partner.google.com> References: <20240614145609.25432-1-lvzhaoxiong@huaqin.corp-partner.google.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The bias IC of this starry-er88577 panel is placed on the panel side, so when the panel is powered on, there is no need to control AVDD and AVEE in the driver, only 3.3v and reset are needed. Signed-off-by: Zhaoxiong Lv --- Chage since V3: - Separate Starry-er88577 from the panel-kingdisplay-kd101ne3 driver. - Use mipi_dsi_dcs_set_display_on_multi(). - Use mipi_dsi_dcs_exit_sleep_mode_multi() and mipi_dsi_msleep(). v2: https://lore.kernel.org/all/20240601084528.22502-5-lvzhaoxiong@huaqin.corp-partner.google.com/ Chage since V2: - Add compatible for Starry er88577 in panel-kingdisplay-kd101ne3 drivers. --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-starry-er88577.c | 343 +++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-starry-er88577.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index e54f6f5604ed..a52aa2552ab8 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -781,6 +781,15 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_STARRY_ER88577 + tristate "Starry er88577 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Starry er88577 controller. + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f0203f6e02f4..ecd843a6dc6e 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -81,6 +81,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_STARRY_ER88577) += panel-starry-er88577.o obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o diff --git a/drivers/gpu/drm/panel/panel-starry-er88577.c b/drivers/gpu/drm/panel/panel-starry-er88577.c new file mode 100644 index 000000000000..a8250a464883 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-starry-er88577.c @@ -0,0 +1,343 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Panels based on the JD9365DA display controller. + * Author: Zhaoxiong Lv + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include