From patchwork Tue Sep 20 17:09:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 607790 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A052C6FA92 for ; Tue, 20 Sep 2022 17:09:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbiITRJu (ORCPT ); Tue, 20 Sep 2022 13:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbiITRJr (ORCPT ); Tue, 20 Sep 2022 13:09:47 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC7BDE88 for ; Tue, 20 Sep 2022 10:09:45 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id o64so4506879oib.12 for ; Tue, 20 Sep 2022 10:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=xLE/KMkN6oWOgP71Pba5WPZGD9ngcwIQDqZNkJgFhWY=; b=gUGVPWLKHVWqdBHBLmTHQzwRCfadaeEArwQWsGTjd50Iehet6tbWH17xZ2WlXB8Ao/ cwsRo5pwuptXH4v944Z0miy2vWura7Una2z6oH9WQ4PwW0ZvCZSE3HwEIQw3qYsZVfHY Vc+zECP+79n8lXNc/rIdddjkNEe8xpLkGKlbTpUihVvIKqew0RzZ5Xu6kxL+ApTt/ksI 5W+8/mZvCRCNcCBCpKspI9ehFiDHz1qgS+ASGE/A88pNy8Ubf41yffP9y5Fcyk6gxQ9M K8CX1YQLVyzFQe5FMX4PoLx+0UhwSkLnvhdBPhLswPSf9UOcZmkmdGNSlziVouM2/wKp zhQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=xLE/KMkN6oWOgP71Pba5WPZGD9ngcwIQDqZNkJgFhWY=; b=zUz7f+XCxtQZwev0jQUEwaTQTftwjGtWrs2p0XrvExtLFPNaIFV5ggaBNOB0rimnPS 0CzVnKWd4Nqlo1NZWTEf39WR0KbohaeFCgCEIA/TMMJpGvZhAadYHEWlAqqFZWyO5d/e GIsXxXqNr3TH6oOkpIc2Vkkz0dMqzeXh/4BcjtqZWP+5kZOIE97/ZmGdczdPSQWuEZkD mFI1XCJBOuYg+D5eRryRNbKdkXIn3w/r3nYW5pMoTt7iXaTGtgwJrXKKssbn/OwNysle qm8Wczi1UGcYzdIJDFi4CnFY7kFetNFma+6+rIP542cyGm75ho5DpvRsMZtaNYItBCXt 0bsQ== X-Gm-Message-State: ACrzQf1Vw9WvR/QkV6XHpJmrIj6g5z1XLb3b106Wsnq+2EiGFHTPlCqV SSCkDG8xn1lmT5MfKkCDKQU= X-Google-Smtp-Source: AMsMyM4Gb5RoR8uwoNErq5clxV2eINJIk9PZtaEqYIUzg3OBloriaHFSAUKyJ0CeH///dNewpwCbig== X-Received: by 2002:a05:6808:140a:b0:350:cf96:8294 with SMTP id w10-20020a056808140a00b00350cf968294mr1960948oiv.169.1663693785305; Tue, 20 Sep 2022 10:09:45 -0700 (PDT) Received: from wintermute.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id v13-20020a9d69cd000000b00636956b3080sm121468oto.43.2022.09.20.10.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 10:09:44 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie, sam@ravnborg.org, thierry.reding@gmail.com, Chris Morgan Subject: [PATCH V2 1/2] dt-bindings: display: panel: Add Samsung AMS495QA01 bindings Date: Tue, 20 Sep 2022 12:09:36 -0500 Message-Id: <20220920170937.14486-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920170937.14486-1-macroalpha82@gmail.com> References: <20220920170937.14486-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Chris Morgan Add documentation for the Samsung AMS495QA01 panel. Signed-off-by: Chris Morgan --- .../display/panel/samsung,ams495qa01.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,ams495qa01.yaml diff --git a/Documentation/devicetree/bindings/display/panel/samsung,ams495qa01.yaml b/Documentation/devicetree/bindings/display/panel/samsung,ams495qa01.yaml new file mode 100644 index 000000000000..08358cdad19c --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,ams495qa01.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/samsung,ams495qa01.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung AMS495QA01 4.95in 960x544 DSI/SPI panel + +maintainers: + - Chris Morgan + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: samsung,ams495qa01 + reg: true + reset-gpios: true + elvdd-supply: + description: regulator that supplies voltage to the panel display + enable-gpios: true + port: true + vdd-supply: + description: regulator that supplies voltage to panel logic + +required: + - compatible + - reg + - vdd-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "samsung,ams495qa01"; + reg = <0>; + vdd-supply = <&vcc3v3_lcd0_n>; + }; + }; + +... From patchwork Tue Sep 20 17:09:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 607789 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 126BCC6FA93 for ; Tue, 20 Sep 2022 17:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbiITRJv (ORCPT ); Tue, 20 Sep 2022 13:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbiITRJt (ORCPT ); Tue, 20 Sep 2022 13:09:49 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A11DFF3 for ; Tue, 20 Sep 2022 10:09:47 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-12c8312131fso5194128fac.4 for ; Tue, 20 Sep 2022 10:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=qkEkl1T24VS6THCkYE/ePve2BexAGuuTTaNBxBE7vME=; b=GdNwOw3jD/7pINx9z9fWkNhc8elh6hMz5MbddK2cvX4jaFWZjL4tfH596RxYnRKvKa zDgaT6hPaXFw1exakoYc6GW+3FT0rAXvnkBgtrUnLSb+KN4Lm3VxSGsljGtHaB1aieID B96jHMFE6c9kyShOxXkfm5wTZ0VY/rnJeVvKNKWdsz28OTSlnWJdv11+w7ulI366gec1 /z9uH2SGb7znFqZ73PTjq2tuBb24HkaaWt/1CH8RMaiWPbhCE7G0LvYxq2VRgmvtVLm8 3b1b4uPgLwNtVppKj7AfioGpWn/dtb2CgAzSJhP/Vv32/j0INV93x5e2uD/E8m/1tIhp 6X8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=qkEkl1T24VS6THCkYE/ePve2BexAGuuTTaNBxBE7vME=; b=x6cPU0gpa0i2NpK0T3DipAxzaDl9xBX3d3/BF+TguL29/u5ASFRkv67NER7x2FFpJ7 jlOamtQWCQ6g54B8xCSwO/GVWYEKkefVdkD5dOMRhG+m5c5dJV/LMyKkpqa40yaUGQ66 UBNRJ2kTYYsBsWORHxrtenVn2FEAnjV2MAA2EKBiGFk1oYZbnvcfdTtvcLw/uc37gOne omvpt2aH7GHZlnnxqRhmhq5NF0qHO1uvdq/0uAxsJ3fVdaNscQdxmtWwhnY0WYmiem9K aXPprj1UXCxzCh8qZ6i8Chu2owz4rNhkgoO6sPVw1N55bus6F1U61rXpks58m7pOCJQM uEhQ== X-Gm-Message-State: ACrzQf3Z2gMV5Qto0yd4VA9Ljt3v6XwgruZrzUJPdRMYxk+d3tgWH9O4 PMG/85HMqi1BzBQXvEPhUtQ= X-Google-Smtp-Source: AMsMyM6blCSAhNeOyz5NuIH6XGBmaYwelD4Q1GwgkFAdPygTXc/cOEUo4hbGpX8hR8/HEjVyxNmiPQ== X-Received: by 2002:a05:6870:f10a:b0:127:856b:828c with SMTP id k10-20020a056870f10a00b00127856b828cmr2560103oac.225.1663693786401; Tue, 20 Sep 2022 10:09:46 -0700 (PDT) Received: from wintermute.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id v13-20020a9d69cd000000b00636956b3080sm121468oto.43.2022.09.20.10.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 10:09:45 -0700 (PDT) From: Chris Morgan To: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie, sam@ravnborg.org, thierry.reding@gmail.com, Chris Morgan Subject: [PATCH V2 2/2] drm/panel: Add Samsung AMS495QA01 MIPI-DSI LCD panel Date: Tue, 20 Sep 2022 12:09:37 -0500 Message-Id: <20220920170937.14486-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920170937.14486-1-macroalpha82@gmail.com> References: <20220920170937.14486-1-macroalpha82@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Chris Morgan Support Samsung AMS495QA01 panel as found on the Anbernic RG503. Note This panel receives video signals via DSI, however it receives commands via 3-wire SPI. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-samsung-ams495qa01.c | 505 ++++++++++++++++++ 3 files changed, 516 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-ams495qa01.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index a9043eacce97..954b66a2adee 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -444,6 +444,16 @@ config DRM_PANEL_RONBO_RB070D30 Say Y here if you want to enable support for Ronbo Electronics RB070D30 1024x600 DSI panel. +config DRM_PANEL_SAMSUNG_AMS495QA01 + tristate "Samsung AMS495QA01 DSI panel" + depends on OF && SPI + depends on DRM_MIPI_DSI + select DRM_MIPI_DBI + help + DRM panel driver for the Samsung AMS495QA01 panel. This panel + receives video data via DSI but commands via 3-Wire 9-bit + SPI. + config DRM_PANEL_SAMSUNG_ATNA33XC20 tristate "Samsung ATNA33XC20 eDP panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 34e717382dbb..de0b57baf851 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -42,6 +42,7 @@ obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS495QA01) += panel-samsung-ams495qa01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o diff --git a/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c new file mode 100644 index 000000000000..d693ba5f20c9 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c @@ -0,0 +1,505 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Samsung ams495qa01 MIPI-DSI panel driver + * Copyright (C) 2022 Chris Morgan + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include