From patchwork Thu May 9 08:34:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13659535 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 F34CDC10F1A for ; Thu, 9 May 2024 08:35:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1101210E2FA; Thu, 9 May 2024 08:35:12 +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="T5EXe8FN"; dkim-atps=neutral Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1126810E281 for ; Thu, 9 May 2024 08:35:10 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id 46e09a7af769-6f09ed75e4cso308089a34.3 for ; Thu, 09 May 2024 01:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1715243710; x=1715848510; 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=oqO7pR16Targcl+ULRUcXbcABQhE9U7T7xWKnAilQyg=; b=T5EXe8FNL2ZJcA56qjcKMuZyhdhGacq9cuGGVhqWqmvvLqOHUyRtjuj5h9d3FqccG1 M/YlUaij3MwhKZn16i9aK8QrdsaaxEfEwy42hYc/sKGAfD35a8+RgMCeNDxXcxr2Uwvh Z6VlA6H3JgmR0I8ELWIeomEffKJNU62Gu+7M+5ZV35ko8jz6b65IKWvYk5bz3QcVlO86 7RLpc61Lo1O2CTj4lkNIigHVVefdeqzF/4TaAyIPFS722ylSBNIt+Bbp3wVNSmtZDRgB Fu++uoJZ2qkFKWevW7qz6E3/SQ6FXG70732zXvnudAR8MtUgw4k1Nzt3I6yUdCbN/mnk wWfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715243710; x=1715848510; 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=oqO7pR16Targcl+ULRUcXbcABQhE9U7T7xWKnAilQyg=; b=qZco7krqJBFXhxQ5Q7cM9BtmMd9lQo7yRK8/f7Kbat5xXd+joaHRZlzCCvdceXAHOH /zZRcMwfqBspDxRGnQzMMqe/RYRHgpZgA9uEoPDWfXs88u0h+ia/OlEofyIgBw6EC7z5 8UkJnIUX1dRjQ93i0XD8jilh1M7Je+SD2wHrPJapcs909bLGtgxYGJ7J0PfUvqDQaSem S8ctPCs1j+WPkvzb6Ofk1skBVdpXSWwlUdv8LNzsEfbwJjUiFskvetG2Dx6pXs276wWD RakGsN/elPszQjhiulNYnurXlGGYoHrhve/6Vp3f/Z0qQONqyOaAUs0WWtDRAfguHyq4 OveQ== X-Gm-Message-State: AOJu0YwRXTsT1PQj1zvTA3RRJP1I2MSf/+XLWLBLufXiMToVynK/DPlL IkHnq4u644p+NM4Vgz2GeXz/HjO1I/JfIhlK8cncKiJ1Ay1PLJDHFd6EggNMT7c= X-Google-Smtp-Source: AGHT+IGyfXvc57xRXt/nPbK8uIuvRWBNkaxTWjEfIN9Wd7JCyZ+Mecf4mBxMjFjONY6D2w6DXitOqQ== X-Received: by 2002:a9d:6f1a:0:b0:6ef:9506:ca2c with SMTP id 46e09a7af769-6f0b794614emr4614967a34.10.1715243709979; Thu, 09 May 2024 01:35:09 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340c8a6967sm792643a12.44.2024.05.09.01.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:35:09 -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 v2 1/2] dt-bindings: display: panel: Add Starry-er88577 support Date: Thu, 9 May 2024 16:34:52 +0800 Message-Id: <20240509083453.14073-2-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240509083453.14073-1-lvzhaoxiong@huaqin.corp-partner.google.com> References: <20240509083453.14073-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" Create a new dt-scheam for the Starry-er88577. Signed-off-by: Zhaoxiong Lv --- Chage since V2: - Unmodified V1: https://lore.kernel.org/all/20240509064959.23550-2-lvzhaoxiong@huaqin.corp-partner.google.com/ --- .../display/panel/starry,er88577.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/starry,er88577.yaml diff --git a/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml new file mode 100644 index 000000000000..6686beaf0f16 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/starry,er88577.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Starry Display ER88577 based MIPI-DSI panels + +description: | + -This binding is for display panels using an ER88577 controller + +maintainers: + - Zhaoxiong Lv + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: starry,er88577 + + pp3300-supply: true + reg: true + +required: + - compatible + - reg + - enable-gpios + - pp3300-supply + - backlight + - port + +unevaluatedProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + panel: panel@0 { + compatible = "starry,er88577"; + reg = <0>; + enable-gpios = <&pio 98 0>; + pinctrl-names = "default"; + pinctrl-0 = <&panel_pins_default>; + pp3300-supply = <&en_pp6000_mipi_disp>; + backlight = <&backlight_lcd0>; + rotation = <90>; + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + }; + +... From patchwork Thu May 9 08:39:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13659538 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 C969FC10F1A for ; Thu, 9 May 2024 08:39:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AB4A10E32C; Thu, 9 May 2024 08:39:57 +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="Mr5OdEST"; dkim-atps=neutral Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8FD7510E32C for ; Thu, 9 May 2024 08:39:55 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-1ec69e3dbcfso4689295ad.0 for ; Thu, 09 May 2024 01:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1715243995; x=1715848795; darn=lists.freedesktop.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eicOXUVKUuALX3t2CzAxwFu2Xx2MQS12PjiJqikcPq0=; b=Mr5OdESTz2fVwT18FGr4W9dVQ81Le+kjddiPNrK6iWygyUyoe/9LS9QnOlLgFCmFoN VjN7iLD9An4oXTo3lzYZ/cAoO1mMjrNNbfGOSDusIJ//KTfRsK/WSSubaHXCwUzIngyz EkdDqdE4E39lDCht3+dtxDPcz5KnFSxK+vnhlfLkFnMnhrP4WxDkiITIurscWL2z7KPS dFwVc1336iplg3dUTQpON3L2ub/z7vz/SJJ6v43CgNzaOrGPwExwhZygs4oG81iIWdHY wA7OnKXZab+psLq51N+tUm7L/MJQHI0lb+Djkh+tDsRukAaZ7NPIf6Wf5budkWAoydk2 1DyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715243995; x=1715848795; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eicOXUVKUuALX3t2CzAxwFu2Xx2MQS12PjiJqikcPq0=; b=sUsZ8lj8obidMGYy3HDSRupogahW0KISIHe/7vzme/aHoGcEjX5tIumfhX8NWdRVhk Ad2xjmE6OJ8XVXTJfZAN81WOJk7V6vjhCwyDa9NQwuDRXezENNj0OTA1HfIk/8tr06YA f1xD6pTeOf2DzNwN0m63QEdpK7Z/9vtLAs1/e65jWtEfmRisG+Gfmg00cfWFYQPowqL+ aA+SEV3xZBrEEx/cDkNmk6qVXKonTDWkrroNdV6lkO7jrAgEEAodGpqrFg2zzEf0uL7x 2bTqMV8Nl9QgmMzu2iTjHMjVNL+JHfSmTywMSPieMmqh69bG4Eqi+5VfPgDUOta5MV0a 2ptw== X-Gm-Message-State: AOJu0YyRmE5WlCEgh3vbqZ9yqFhGDfjAd6A1g8izv6dgQUAj4FxPoXEo fM3T8HBDLX1BbXzaI43BMfWHXBRanaCrvH9t4XnYsRe3tAHHQot41TPwuNNl0Y4= X-Google-Smtp-Source: AGHT+IH2prmbSCMPhIEw1kici/ZvHgMkEj1vjofLFnpAilK/22RDwfQ9zd/7IpAQNNYB1RaSa5R9cw== X-Received: by 2002:a17:902:704a:b0:1eb:1474:5ef5 with SMTP id d9443c01a7336-1eeb0696156mr45056265ad.33.1715243994899; Thu, 09 May 2024 01:39:54 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf30cbasm8768785ad.126.2024.05.09.01.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:39:54 -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 v2 2/2] drm/panel: starry: add new panel driver Date: Thu, 9 May 2024 16:39:45 +0800 Message-Id: <20240509083945.24513-1-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 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 starry panel is based on ER88577 controller. Add a driver for it. Signed-off-by: Zhaoxiong Lv --- Chage since V2: - add the Makefile and Kconfig files V1: https://lore.kernel.org/all/20240509064959.23550-3-lvzhaoxiong@huaqin.corp-partner.google.com/ --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-starry-er88577.c | 444 +++++++++++++++++++ 3 files changed, 454 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 2c73086cf102..c075b1875ca6 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -795,6 +795,15 @@ config DRM_PANEL_SONY_TULIP_TRULY_NT35521 NT35521 1280x720 video mode panel as found on Sony Xperia M4 Aqua phone. +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_STARTEK_KD070FHFID015 tristate "STARTEK KD070FHFID015 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index cbd414b98bb0..d18917e0e192 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -80,6 +80,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..dfeae549adc5 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-starry-er88577.c @@ -0,0 +1,444 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Panels based on the ER88577B display controller. + * Author: Zhaoxiong Lv + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include