From patchwork Thu Apr 18 08:15:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13634456 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 A7C08C4345F for ; Thu, 18 Apr 2024 10:09:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B75CF10FF8D; Thu, 18 Apr 2024 10:09:16 +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="dLo+nFKV"; dkim-atps=neutral Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87FEA10FB3E for ; Thu, 18 Apr 2024 08:16:12 +0000 (UTC) Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3c61486d3fcso391445b6e.2 for ; Thu, 18 Apr 2024 01:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1713428171; x=1714032971; 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=hGbb639QF70AM8GOOwhigEAHZ87qriZbyNLY03o71uo=; b=dLo+nFKVErljJEfGiRZqOLOBNBLbpF9al4pTFGxDeBK2ManmnmagZUuCaBjmAUArGh 6gXjNYgf1VyIrL48LQ078ZIeefUocoNP8Qhni/7bqg98CM9w/0tI1MAdYmnXHRbpZFU4 q/tLlSZ1+foH+01mV9BAK3INoqKt+oqXHFPnzm/Hmfdg74OeH0/e/9nXkOy8dx9Hqwwk I3+1yCvUdHXQ1OW97uQzazHbfXJIHgRBmbC8XcpwYLhOYeAfxit71DSVm+LS3NNSc9OC 6T2eR20pDPPSJsy0daXr47c5ARrGpPlVZtxNmB56sUlaJXB9OUs27Bbmgi2tuk22yVoU iM1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713428171; x=1714032971; 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=hGbb639QF70AM8GOOwhigEAHZ87qriZbyNLY03o71uo=; b=mv6qbo4jwbX6XluY6agqJbg6dG0CoCGmyxEjU/uQ2DPocco+cbxJZTGVVMm/PEeo/x jitxytA8sgbJSnSm9XIfWGZ7+AFuwD+FdKyv8ikb1MFQzRzWtZPS7j/ONo58yS+Km9xs 6gX2PM+YfcszLpp5tNHp2f9usY8iRlIgnIbVX7WCFb3prgbBbrACT+uC845Wuap5AJAF sTCEdOcdekK5UDQTK1YaxqkI8pu9WN9kyiRaV/A+Ggbctvkn4pur+bOD5XgoHoQKuysq 9+BjdWCl8NPm4MTB8uw+pFmiotrMBMHjtKpvgmREs3C5Ib1hUYsrUQIlsT66U2ECCrvJ eKvw== X-Gm-Message-State: AOJu0Yy9LKlrvISajyc8Bwl8UFAKwtp1pUSROxx4j2i+ii2zTgFZf1j5 RcMuK7Mwbvb2OfTo/xf2LIE7YvhXiWJXniAYv2FaD5VrHAeQVkgxCtRn+WQScMg= X-Google-Smtp-Source: AGHT+IEspyv9P8EY2/qDTHNT4YTY3kFSzuMcr1c0VmB+mBMOVEN4Z9B8GjikmMM/QmHPGVxM51js8g== X-Received: by 2002:aca:220e:0:b0:3c6:62f:4fd4 with SMTP id b14-20020aca220e000000b003c6062f4fd4mr2408154oic.4.1713428171706; Thu, 18 Apr 2024 01:16:11 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id o18-20020a634e52000000b005f3d54c0a57sm881394pgl.49.2024.04.18.01.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:16:11 -0700 (PDT) From: lvzhaoxiong To: mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, dianders@google.com, hsinyi@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lvzhaoxiong Subject: [PATCH v1 1/2] dt-bindings: display: panel: Add KD101NE3-40TI support Date: Thu, 18 Apr 2024 16:15:47 +0800 Message-Id: <20240418081548.12160-2-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> References: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailman-Approved-At: Thu, 18 Apr 2024 10:09:14 +0000 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 kd101ne3-40ti. Signed-off-by: lvzhaoxiong --- .../panel/kingdisplay,kd101ne3-40ti.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/kingdisplay,kd101ne3-40ti.yaml diff --git a/Documentation/devicetree/bindings/display/panel/kingdisplay,kd101ne3-40ti.yaml b/Documentation/devicetree/bindings/display/panel/kingdisplay,kd101ne3-40ti.yaml new file mode 100644 index 000000000000..dc79a49eea3b --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/kingdisplay,kd101ne3-40ti.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/kingdisplay,kd101ne3-40ti.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: King Display KD035G6-40TI based MIPI-DSI panels + +description: | + -This binding is for display panels using an JD9365DA controller + +maintainers: + - Zhaoxiong Lv + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: kingdisplay,kd101ne3-40ti + + backlight: true + port: true + pp3300-supply: true + reg: true + enable-gpios: true + rotation: 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 = "kingdisplay,kd101ne3-40ti"; + 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 Apr 18 08:15:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiong Lv X-Patchwork-Id: 13634454 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 F2193C4345F for ; Thu, 18 Apr 2024 10:09:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD5CB10EB6F; Thu, 18 Apr 2024 10:09:15 +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="ALC8WIWX"; dkim-atps=neutral Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C3D810FB3E for ; Thu, 18 Apr 2024 08:16:15 +0000 (UTC) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6e9e1a52b74so161501a34.0 for ; Thu, 18 Apr 2024 01:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1713428174; x=1714032974; 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=YI++royKKBEGzn4ZdNLD2YG0nCfqJuUcPsyVGC3PWBo=; b=ALC8WIWX5FwQWDG+L8ilnVIrbs0MvlV2dFa6U9EDXO1DBb2h5P0Bb9RmAYxiFsN6fR WW6S1yWCck3vGo/BTTBFo/pRPaa8nGq7XZkczIEhBM3uwlEDc/ESAjxTuu83PVxyIsGb 3RqDsJTasnDg/+SmbP2siVDOYyOsALzH/nmxgRGVl+Zt4W8oYtYaW1pujHX5/bmnnmoU y/kIw+H1MUxF/6iAUy2xCoysWqGcjProrvpzJesuq1yXONkE97vIhw7jXbVNDBsLT/RD DbNgegM7/tV+n+p5GS9qsIMbPVIj+AU4rGDdes9LTnYimB+alBC2hFdLYpQFQtjG/eZY UKhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713428174; x=1714032974; 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=YI++royKKBEGzn4ZdNLD2YG0nCfqJuUcPsyVGC3PWBo=; b=mmdlg9l0JtcyiMrTGJFjnbVOBAyQ4qCB0X1ogpX6Dh902g1ZVdjs3RWJ4FGs3f6lf5 WHSyEm3XJhCu8KujjbJueAE1adVlKaLU34SfmVaCEogJfg/CBQO6s1B5jYGZle7NTzTP VmNGEp+4iQ+h3sA9mwb64oeKzb1l99vjzgSIUupa3ubqZTaA5qiTngVPA+Oy3YyETdAK ZjtvD96MvtdjyIn6SyC8tDGFFR+86vahg5zuUzJlwRQUj6hhVonPksJSvHMeuRU+vSvd BEJPN48TegScB7JQ1dFHmkqp61cpI2glGSiCp6zppb6E6QisScg1J3Oqu6mV2KqeGMBw XjJg== X-Gm-Message-State: AOJu0Yyi69Ab1pAG/p2Iuu2CEFHzshlA6wNZtcxfZxprt5Tr4sajqt8a FOEKyxuzAinlpPF4DzDx7vnAhMOEGDUy0lCgDEmLSrlht6rG8KUAucnvK3Ayvqw= X-Google-Smtp-Source: AGHT+IFaS8d7xX8Vdhv+fWPlod2E0mr7Ym0OVZ1VbnMTF8PCPIzPTDD/RUOjOrZ+R80RweZ9Akv99w== X-Received: by 2002:a05:6870:e98d:b0:235:3d0:2bd4 with SMTP id r13-20020a056870e98d00b0023503d02bd4mr2393991oao.31.1713428174539; Thu, 18 Apr 2024 01:16:14 -0700 (PDT) Received: from lvzhaoxiong-KLVC-WXX9.huaqin.com ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id o18-20020a634e52000000b005f3d54c0a57sm881394pgl.49.2024.04.18.01.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:16:14 -0700 (PDT) From: lvzhaoxiong To: mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, dianders@google.com, hsinyi@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lvzhaoxiong Subject: [PATCH v1 2/2] drm/panel: kd101ne3: add new panel driver Date: Thu, 18 Apr 2024 16:15:48 +0800 Message-Id: <20240418081548.12160-3-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> References: <20240418081548.12160-1-lvzhaoxiong@huaqin.corp-partner.google.com> X-Mailman-Approved-At: Thu, 18 Apr 2024 10:09:14 +0000 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 kingdisplay panel is based on JD9365DA controller. Add a driver for it. Signed-off-by: lvzhaoxiong --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-kingdisplay-kd101ne3.c | 607 ++++++++++++++++++ 3 files changed, 617 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 154f5bf82980..2c73086cf102 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -297,6 +297,15 @@ config DRM_PANEL_KINGDISPLAY_KD097D04 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. +config DRM_PANEL_KINGDISPLAY_KD101NE3 + tristate "Kingdisplay kd101ne3 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 + Kingdisplay kd101ne3 controller. + config DRM_PANEL_LEADTEK_LTK050H3146W tristate "Leadtek LTK050H3146W panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 24a02655d726..cbd414b98bb0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_DRM_PANEL_JDI_LPM102A188A) += panel-jdi-lpm102a188a.o obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.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_KINGDISPLAY_KD101NE3) += panel-kingdisplay-kd101ne3.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c new file mode 100644 index 000000000000..dbf0992f8b81 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd101ne3.c @@ -0,0 +1,607 @@ +// 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 + +#include