From 61374468cdd00d98a415ec427fb2026e56ebdc11 Mon Sep 17 00:00:00 2001 From: Jasper Korten Date: Wed, 9 Aug 2023 11:41:48 +0300 Subject: [PATCH] linux-google-smaug: new aport (MR 4007) --- ...DI-LPM102A188A-display-panel-support.patch | 1147 +++ ...-dts-nvidia-tegra210-smaug-Add-touch.patch | 36 + device/testing/linux-google-smaug/APKBUILD | 72 + .../config-google-smaug.aarch64 | 6788 +++++++++++++++++ 4 files changed, 8043 insertions(+) create mode 100644 device/testing/linux-google-smaug/0001-Add-JDI-LPM102A188A-display-panel-support.patch create mode 100644 device/testing/linux-google-smaug/0002-arm64-dts-nvidia-tegra210-smaug-Add-touch.patch create mode 100644 device/testing/linux-google-smaug/APKBUILD create mode 100644 device/testing/linux-google-smaug/config-google-smaug.aarch64 diff --git a/device/testing/linux-google-smaug/0001-Add-JDI-LPM102A188A-display-panel-support.patch b/device/testing/linux-google-smaug/0001-Add-JDI-LPM102A188A-display-panel-support.patch new file mode 100644 index 000000000..2491cf1ef --- /dev/null +++ b/device/testing/linux-google-smaug/0001-Add-JDI-LPM102A188A-display-panel-support.patch @@ -0,0 +1,1147 @@ +From patchwork Tue Oct 25 15:37:45 2022 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Diogo Ivo +X-Patchwork-Id: 1694475 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org + (client-ip=2620:137:e000::1:20; helo=out1.vger.email; + envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) +Authentication-Results: legolas.ozlabs.org; + dkim=fail reason="signature verification failed" (1024-bit key; + secure) header.d=tecnico.ulisboa.pt header.i=@tecnico.ulisboa.pt + header.a=rsa-sha256 header.s=mail header.b=GViLoP3X; + dkim-atps=neutral +Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) + by legolas.ozlabs.org (Postfix) with ESMTP id 4Mxbh11CxVz23kR + for ; Wed, 26 Oct 2022 02:38:41 +1100 (AEDT) +Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S232319AbiJYPij (ORCPT ); + Tue, 25 Oct 2022 11:38:39 -0400 +Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57098 "EHLO + lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S232152AbiJYPii (ORCPT + ); + Tue, 25 Oct 2022 11:38:38 -0400 +Received: from smtp1.tecnico.ulisboa.pt (smtp1.tecnico.ulisboa.pt + [193.136.128.21]) + by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E280185410; + Tue, 25 Oct 2022 08:38:37 -0700 (PDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTP id 45FBA6008777; + Tue, 25 Oct 2022 16:38:36 +0100 (WEST) +X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at + tecnico.ulisboa.pt +Received: from smtp1.tecnico.ulisboa.pt ([127.0.0.1]) + by localhost (smtp1.tecnico.ulisboa.pt [127.0.0.1]) (amavisd-new, + port 10025) + with LMTP id E-UtSeaQ8SqG; Tue, 25 Oct 2022 16:38:31 +0100 (WEST) +Received: from mail1.tecnico.ulisboa.pt (mail1.ist.utl.pt + [IPv6:2001:690:2100:1::b3dd:b9ac]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTPS id BCFB36008763; + Tue, 25 Oct 2022 16:38:31 +0100 (WEST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tecnico.ulisboa.pt; + s=mail; t=1666712311; + bh=mOfuX1v6w2LK1O2hWFLzbZ86Qnb8CAZ7MrjT98fuOTU=; + h=From:To:Cc:Subject:Date:In-Reply-To:References; + b=GViLoP3XavVcSCe4Bh5eRxFAdoK/oT8OkGKG1ahNLuL7Ixis1CS0QhtmriO2eJUHH + U7dzow6t8JYKGvAweJz5Pv8xUCP7u47dkVCTFjmB+o7W5SsA0YdVQ7ibw2SP2s3SLu + UOys7kLQwyWBxui/2qoFOiHxPvkELwcsB7v6hx4k= +Received: from localhost.localdomain (unknown [89.207.171.77]) + (Authenticated sender: ist187313) + by mail1.tecnico.ulisboa.pt (Postfix) with ESMTPSA id 249A636007E; + Tue, 25 Oct 2022 16:38:17 +0100 (WEST) +From: Diogo Ivo +Cc: Diogo Ivo , thierry.reding@gmail.com, + sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, + robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, + jonathanh@nvidia.com, arnd@arndb.de, + dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, + linux-tegra@vger.kernel.org +Subject: [PATCH v2 1/4] dt-bindings: display: Add bindings for JDI LPM102A188A +Date: Tue, 25 Oct 2022 16:37:45 +0100 +Message-Id: <20221025153746.101278-2-diogo.ivo@tecnico.ulisboa.pt> +X-Mailer: git-send-email 2.38.1 +In-Reply-To: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +References: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +MIME-Version: 1.0 +X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, + RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,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 +To: unlisted-recipients:; (no To-header on input) +Precedence: bulk +List-ID: +X-Mailing-List: linux-tegra@vger.kernel.org + +The LPM102A188A is a 10.2" 2560x1800 IPS panel found in +the Google Pixel C. + +Signed-off-by: Diogo Ivo +Reviewed-by: Krzysztof Kozlowski +--- +Changes in v2: + - removed the touch screen property + + .../display/panel/jdi,lpm102a188a.yaml | 94 +++++++++++++++++++ + 1 file changed, 94 insertions(+) + create mode 100644 Documentation/devicetree/bindings/display/panel/jdi,lpm102a188a.yaml + +diff --git a/Documentation/devicetree/bindings/display/panel/jdi,lpm102a188a.yaml b/Documentation/devicetree/bindings/display/panel/jdi,lpm102a188a.yaml +new file mode 100644 +index 000000000000..2f4d27a309a7 +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/jdi,lpm102a188a.yaml +@@ -0,0 +1,94 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/display/panel/jdi,lpm102a188a.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: JDI LPM102A188A 2560x1800 10.2" DSI Panel ++ ++maintainers: ++ - Diogo Ivo ++ ++description: | ++ This panel requires a dual-channel DSI host to operate. It supports two modes: ++ - left-right: each channel drives the left or right half of the screen ++ - even-odd: each channel drives the even or odd lines of the screen ++ ++ Each of the DSI channels controls a separate DSI peripheral. The peripheral ++ driven by the first link (DSI-LINK1) is considered the primary peripheral ++ and controls the device. The 'link2' property contains a phandle to the ++ peripheral driven by the second link (DSI-LINK2). ++ ++allOf: ++ - $ref: panel-common.yaml# ++ ++properties: ++ compatible: ++ const: jdi,lpm102a188a ++ ++ reg: true ++ enable-gpios: true ++ reset-gpios: true ++ power-supply: true ++ backlight: true ++ ++ ddi-supply: ++ description: The regulator that provides IOVCC (1.8V). ++ ++ link2: ++ $ref: /schemas/types.yaml#/definitions/phandle ++ description: | ++ phandle to the DSI peripheral on the secondary link. Note that the ++ presence of this property marks the containing node as DSI-LINK1. ++ ++required: ++ - compatible ++ - reg ++ ++if: ++ required: ++ - link2 ++then: ++ required: ++ - power-supply ++ - ddi-supply ++ - enable-gpios ++ - reset-gpios ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include ++ #include ++ ++ dsia: dsi@54300000 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x0 0x54300000 0x0 0x00040000>; ++ ++ link2: panel@0 { ++ compatible = "jdi,lpm102a188a"; ++ reg = <0>; ++ }; ++ }; ++ ++ dsib: dsi@54400000{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x0 0x54400000 0x0 0x00040000>; ++ nvidia,ganged-mode = <&dsia>; ++ ++ link1: panel@0 { ++ compatible = "jdi,lpm102a188a"; ++ reg = <0>; ++ power-supply = <&pplcd_vdd>; ++ ddi-supply = <&pp1800_lcdio>; ++ enable-gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>; ++ reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>; ++ link2 = <&link2>; ++ backlight = <&backlight>; ++ }; ++ }; ++ ++... + +From patchwork Tue Oct 25 15:37:47 2022 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Diogo Ivo +X-Patchwork-Id: 1694477 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org + (client-ip=2620:137:e000::1:20; helo=out1.vger.email; + envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) +Authentication-Results: legolas.ozlabs.org; + dkim=fail reason="signature verification failed" (1024-bit key; + secure) header.d=tecnico.ulisboa.pt header.i=@tecnico.ulisboa.pt + header.a=rsa-sha256 header.s=mail header.b=WzZtI1ai; + dkim-atps=neutral +Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) + by legolas.ozlabs.org (Postfix) with ESMTP id 4MxbhD6RBTz23js + for ; Wed, 26 Oct 2022 02:38:52 +1100 (AEDT) +Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S232284AbiJYPiw (ORCPT ); + Tue, 25 Oct 2022 11:38:52 -0400 +Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57226 "EHLO + lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S232152AbiJYPiv (ORCPT + ); + Tue, 25 Oct 2022 11:38:51 -0400 +Received: from smtp1.tecnico.ulisboa.pt (smtp1.tecnico.ulisboa.pt + [IPv6:2001:690:2100:1::15]) + by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08FA8189538; + Tue, 25 Oct 2022 08:38:48 -0700 (PDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTP id 434016008764; + Tue, 25 Oct 2022 16:38:47 +0100 (WEST) +X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at + tecnico.ulisboa.pt +Received: from smtp1.tecnico.ulisboa.pt ([127.0.0.1]) + by localhost (smtp1.tecnico.ulisboa.pt [127.0.0.1]) (amavisd-new, + port 10025) + with LMTP id h9NZeVGhtjag; Tue, 25 Oct 2022 16:38:43 +0100 (WEST) +Received: from mail1.tecnico.ulisboa.pt (mail1.ist.utl.pt [193.136.128.10]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTPS id 9CA006008790; + Tue, 25 Oct 2022 16:38:43 +0100 (WEST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tecnico.ulisboa.pt; + s=mail; t=1666712323; + bh=rLPSMEa5QR4W2bAIa2PZGeA+BLLtvrDQHBpWE5Lx8n4=; + h=From:To:Cc:Subject:Date:In-Reply-To:References; + b=WzZtI1aiSjFPDTDQA3ObLNWAX5xJb0l8isR7FxOHTPVgWRbn6rIHszEwQeCyJ358G + DQny2Tk84sfFHUQIMmHo2l7vVAeOo18kd9pEHsKovoqBOYAgcZ9193tEwf5Vz7n25U + u9ukXcUHKLVfQ1dvH1MHOC5IquZ0kqyfhpn5bjhI= +Received: from localhost.localdomain (unknown [89.207.171.77]) + (Authenticated sender: ist187313) + by mail1.tecnico.ulisboa.pt (Postfix) with ESMTPSA id A8454360085; + Tue, 25 Oct 2022 16:38:40 +0100 (WEST) +From: Diogo Ivo +Cc: Diogo Ivo , thierry.reding@gmail.com, + sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, + robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, + jonathanh@nvidia.com, arnd@arndb.de, + dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, + linux-tegra@vger.kernel.org +Subject: [PATCH v2 2/4] drm/tegra: dsi: Clear enable register if powered by + bootloader +Date: Tue, 25 Oct 2022 16:37:47 +0100 +Message-Id: <20221025153746.101278-3-diogo.ivo@tecnico.ulisboa.pt> +X-Mailer: git-send-email 2.38.1 +In-Reply-To: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +References: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +MIME-Version: 1.0 +X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS, + 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 +To: unlisted-recipients:; (no To-header on input) +Precedence: bulk +List-ID: +X-Mailing-List: linux-tegra@vger.kernel.org + +In cases where the DSI module is left on by the bootloader +some panels may fail to initialize if the enable register is not cleared +before the panel's initialization sequence is sent, so clear it if that +is the case. + +Signed-off-by: Diogo Ivo +--- +Changes in v2: + - detect if the DSI module is on based on the register value, + instead of a DT property. + - remove Display Controller clear, since it is redundant. + + drivers/gpu/drm/tegra/dsi.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c +index de1333dc0d86..5954676a7ab1 100644 +--- a/drivers/gpu/drm/tegra/dsi.c ++++ b/drivers/gpu/drm/tegra/dsi.c +@@ -912,6 +912,15 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder) + u32 value; + int err; + ++ /* If the bootloader enabled DSI it needs to be disabled ++ * in order for the panel initialization commands to be ++ * properly sent. ++ */ ++ value = tegra_dsi_readl(dsi, DSI_POWER_CONTROL); ++ ++ if (value & DSI_POWER_CONTROL_ENABLE) ++ tegra_dsi_disable(dsi); ++ + err = tegra_dsi_prepare(dsi); + if (err < 0) { + dev_err(dsi->dev, "failed to prepare: %d\n", err); + +From patchwork Tue Oct 25 15:37:48 2022 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +X-Patchwork-Submitter: Diogo Ivo +X-Patchwork-Id: 1694478 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org + (client-ip=2620:137:e000::1:20; helo=out1.vger.email; + envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) +Authentication-Results: legolas.ozlabs.org; + dkim=fail reason="signature verification failed" (1024-bit key; + secure) header.d=tecnico.ulisboa.pt header.i=@tecnico.ulisboa.pt + header.a=rsa-sha256 header.s=mail header.b=G9jW0AyR; + dkim-atps=neutral +Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) + by legolas.ozlabs.org (Postfix) with ESMTP id 4MxbhZ4dzxz23js + for ; Wed, 26 Oct 2022 02:39:10 +1100 (AEDT) +Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S232152AbiJYPjJ (ORCPT ); + Tue, 25 Oct 2022 11:39:09 -0400 +Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57350 "EHLO + lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S233335AbiJYPjH (ORCPT + ); + Tue, 25 Oct 2022 11:39:07 -0400 +Received: from smtp1.tecnico.ulisboa.pt (smtp1.tecnico.ulisboa.pt + [193.136.128.21]) + by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56176156272; + Tue, 25 Oct 2022 08:39:06 -0700 (PDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTP id 171D46000423; + Tue, 25 Oct 2022 16:39:05 +0100 (WEST) +X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at + tecnico.ulisboa.pt +Received: from smtp1.tecnico.ulisboa.pt ([127.0.0.1]) + by localhost (smtp1.tecnico.ulisboa.pt [127.0.0.1]) (amavisd-new, + port 10025) + with LMTP id mKq8NXh8mVvI; Tue, 25 Oct 2022 16:38:59 +0100 (WEST) +Received: from mail1.tecnico.ulisboa.pt (mail1.ist.utl.pt [193.136.128.10]) + by smtp1.tecnico.ulisboa.pt (Postfix) with ESMTPS id 15FE86008808; + Tue, 25 Oct 2022 16:38:59 +0100 (WEST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tecnico.ulisboa.pt; + s=mail; t=1666712339; + bh=8+N1CCqStgkdwlH3d9b5Pgu3DCSMvsKXHOuMYZzP5bU=; + h=From:To:Cc:Subject:Date:In-Reply-To:References; + b=G9jW0AyRVTRJT8gkR/V4vCNBLRHqxWQs2lYGsh9Ebnk5u2B/y36+lamBL0/PWrvFD + 7lCcQyQ5AmHAyvPxc7dHlBOMLU87sZAmvMe0h+sjixW0ZdBP22VIQAHsefE6OrJdRP + HIfoRi2hz+a5+euPW5JY1UD//9LAnCpDi/h80cAk= +Received: from localhost.localdomain (unknown [89.207.171.77]) + (Authenticated sender: ist187313) + by mail1.tecnico.ulisboa.pt (Postfix) with ESMTPSA id 696DC360085; + Tue, 25 Oct 2022 16:38:50 +0100 (WEST) +From: Diogo Ivo +Cc: Diogo Ivo , thierry.reding@gmail.com, + sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, + robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, + jonathanh@nvidia.com, arnd@arndb.de, + dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, + linux-tegra@vger.kernel.org +Subject: [PATCH v2 3/4] drm/panel: Add driver for JDI LPM102A188A +Date: Tue, 25 Oct 2022 16:37:48 +0100 +Message-Id: <20221025153746.101278-4-diogo.ivo@tecnico.ulisboa.pt> +X-Mailer: git-send-email 2.38.1 +In-Reply-To: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +References: <20221025153746.101278-1-diogo.ivo@tecnico.ulisboa.pt> +MIME-Version: 1.0 +X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, + RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,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 +To: unlisted-recipients:; (no To-header on input) +Precedence: bulk +List-ID: +X-Mailing-List: linux-tegra@vger.kernel.org + +The JDI LPM102A188A is a 2560x1800 IPS panel found in the Google Pixel C. +This driver is based on the downstream GPLv2 driver released by Google +written by Sean Paul [1], which was then adapted to the newer kernel APIs. + +[1]: https://android.googlesource.com/kernel/tegra/+/refs/heads/android-tegra-dragon-3.18-oreo/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c + +Signed-off-by: Diogo Ivo +--- +Changes in v2: + - tuned backlight delays + + drivers/gpu/drm/panel/Kconfig | 11 + + drivers/gpu/drm/panel/Makefile | 1 + + drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 509 ++++++++++++++++++ + 3 files changed, 521 insertions(+) + create mode 100644 drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c + +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index a582ddd583c2..80eda8f6bee0 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -214,6 +214,17 @@ config DRM_PANEL_JDI_LT070ME05000 + The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses + 24 bit per pixel. + ++config DRM_PANEL_JDI_LPM102A188A ++ tristate "JDI LPM102A188A DSI panel" ++ depends on OF && GPIOLIB ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ help ++ Say Y here if you want to enable support for JDI LPM102A188A DSI ++ control mode panel as found in Google Pixel C devices. ++ The panel has a 2560×1800 resolution. It provides a MIPI DSI interface ++ to the host. ++ + config DRM_PANEL_JDI_R63452 + tristate "JDI R63452 Full HD DSI panel" + depends on OF +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index 34e717382dbb..2870cba96d14 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -19,6 +19,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o + obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o + obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o + obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o ++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 +diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c +new file mode 100644 +index 000000000000..980af82ad6d6 +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c +@@ -0,0 +1,509 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2014 Google, Inc. ++ * ++ * Copyright (C) 2022 Diogo Ivo ++ * ++ * Adapted from the downstream Pixel C driver written by Sean Paul ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include