From patchwork Tue Nov 29 17:29:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13058893 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0114DC433FE for ; Tue, 29 Nov 2022 17:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hIV7JOyRCtJeWSFBTfT64zvci08E9s9/ViYMf8U8KXM=; b=kzZr5GlOSLmWEH vmZKND6BsYCre9pevAA0rvjao2I9vhDmK/ayk4vG1rgHnQW8QaKkVsprGIVDyFsP8iINKsMLZw+ZS edX/GqTT3sedtjgKGVzdg38GLxnX4aftfRdUpkswixOmTAITRVzlCVhn2HY5mbRwnmv/WCkakL/bs 6T8iEjNXodPC8OKITBUrzf6F9vHKeZMo9bhbG4pGotf2wEs77Qx6IyPJfU8duaHDUGghRU6WEFSJK TIuG6mdBaefEnyQ/YYTDMbRDCZbRPJ9OWY5Mmy8Bl0xdYmaSyQ5X37ekk36vLIbOM+RVZTZjY94Ht DAU3RVk9EGn55ha7tLgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p04Q9-00AWNZ-Jn; Tue, 29 Nov 2022 17:29:25 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p04Q6-00AWLk-7f for linux-rockchip@lists.infradead.org; Tue, 29 Nov 2022 17:29:23 +0000 Received: by mail-ot1-x32e.google.com with SMTP id t19-20020a9d7753000000b0066d77a3d474so9549926otl.10 for ; Tue, 29 Nov 2022 09:29:20 -0800 (PST) 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 :message-id:reply-to; bh=udm6nw1ZDjvFU6fzxBUSlncrdZ0RFybOK/j61va2T24=; b=nvWL9pwomvK8xrnPXbJX8fRHcQXgI9500QQwdFVUnOfMvcRx9M6mqyJQkZIQNnvJrg j8dJx3g13FyIv/eUlzX9YSc7qOhQMGM9e4rGDBMjDrX6TeN6FXU+PeGjPZUfuSf/VEq7 qF0JT95CMpYdbCw2+yH/WH6ijy7F7mLjzh6RPYmex3TKLGHs5iSjbOkORdelyoxO0ID/ jYH0VwKk7XsrNkKqs9g36GHWn5syqepcEMHTJcccJskguR59A/GV9hyGjU+3eayiSg0r DyR1Ph/9cU6d1O32U4Khpgt9SHF4Y9qggvFEqzvheYxI1anrF6MCcZv270rkb6wyLr8P 6e8A== 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:message-id:reply-to; bh=udm6nw1ZDjvFU6fzxBUSlncrdZ0RFybOK/j61va2T24=; b=xjt9F8utPLes2F8IrqhWrBdCLWyA4yX+n/zv250BlbPseyH2mhSTWvGwHbXC+MNHPU x3ouxU/pKloigM9EcKSJReUylKfGs4QSdenEKvdsrggOAgm9wNymjgXd/Oi0S1ANr098 nLpdBcKUQTe7LHwUUvdSBPf9WB7/ihQSue4KlgtlYv56tVET0rrm/K4UK4eqqu/YYgor 54j4nciOcc2Jbzm9ppTSx0UvUXsi/dIcXSojRBFH7pqcIiizeeZJCY1QHwH28sjgajR9 E+kaD6WtHRzu3JopEE945xRK6oGctJcDbLUpof8JZwsgf5HVPmkFNWQJpREjHhKlPkdR x1SA== X-Gm-Message-State: ANoB5pkxRwSs7ppoLhY2OJzeq87Rh+qFLj1CJzdJShA4fp5mVQ55PDmy ZYhMN82bFczy0wK5bu5nGgwkOYHfZNs= X-Google-Smtp-Source: AA0mqf7f5CKAnvu+qFZ6za7Y3ODRll+oNHf2qMqp45z8JYf7KKFwqWCfhpvN8iCCVN1l0vyyYi0+3w== X-Received: by 2002:a9d:2961:0:b0:66c:4e7a:a316 with SMTP id d88-20020a9d2961000000b0066c4e7aa316mr29565998otb.329.1669742959943; Tue, 29 Nov 2022 09:29:19 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id l26-20020a9d709a000000b00661b46cc26bsm6224546otj.9.2022.11.29.09.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 09:29:19 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, maccraft123mc@gmail.com, heiko@sntech.de, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, thierry.reding@gmail.com, linus.walleij@linaro.org, Chris Morgan Subject: [PATCH V4 1/3] dt-bindings: display: panel: Add Samsung AMS495QA01 Date: Tue, 29 Nov 2022 11:29:10 -0600 Message-Id: <20221129172912.9576-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221129172912.9576-1-macroalpha82@gmail.com> References: <20221129172912.9576-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221129_092922_294051_D0F994E0 X-CRM114-Status: GOOD ( 12.57 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add documentation for the Samsung AMS495QA01 panel. Signed-off-by: Chris Morgan Signed-off-by: Maya Matuszczyk Reviewed-by: Rob Herring Reviewed-by: Linus Walleij --- .../display/panel/samsung,ams495qa01.yaml | 57 +++++++++++++++++++ 1 file changed, 57 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..dd4b9b626fb2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,ams495qa01.yaml @@ -0,0 +1,57 @@ +# 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# + - $ref: /schemas/spi/spi-peripheral-props.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 + +unevaluatedProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "samsung,ams495qa01"; + reg = <0>; + enable-gpios = <&gpio4 15 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc3v3_lcd0_n>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; + }; + +... From patchwork Tue Nov 29 17:29:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13058894 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 084EFC4332F for ; Tue, 29 Nov 2022 17:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6Tn2aWTY8hpFCvBGM1G9SKp78laM9qPPt6wJW5XLZTY=; b=k4b7RRI10Cf4+g XcoubeJsKUGzMW1gW9G9Zi7oqKj9rzQLkmKseRm45121cxyoMCxBRFp9KJopQg+Pf2kG1KEjiJp8O hJmwZ7MRzJ47jMIQR/c5ri+StVbvYXRO/1qVoh9HdmKWULi2H1T5YQ4SRxTPic0/wFw6OvuDRv2/T vqrPhqT/is3OxBxp4QDSAmuVWiaLOofQCkgstG4ntNtuqeABlOoNUROldxrD8dfyNkfd1mESu8Xe7 PbW+KzDpsmye6C3PZI0sJyH77WHipOSI3+h3PCfi3tCkH2/pn5UQUvE+enmoESjUWQfDdYJ69rJtx VwtM6UU4VDcZC+4r76tQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p04QD-00AWPt-1F; Tue, 29 Nov 2022 17:29:29 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p04Q6-00AWLo-8v for linux-rockchip@lists.infradead.org; Tue, 29 Nov 2022 17:29:26 +0000 Received: by mail-ot1-x32e.google.com with SMTP id cn2-20020a056830658200b0066c74617e3dso9572478otb.2 for ; Tue, 29 Nov 2022 09:29:22 -0800 (PST) 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 :message-id:reply-to; bh=H8O3B2jRpLsNjyS/gdTHulg2SlWMZk/+Q/QopsevFIs=; b=OyKavHZpNOMhff+UTQ+i5YMh9R8Um+bGQq9DjsoM2akmv8c5JBrWjgt9cs8qxXp83z 76Fz+ZaKR3YNHjta9kk16QTqIy/ve7pX4GdZAXcGvczmeseOhZ3NLOsl/HEFSp+YfO9R iPegTpjYNS5+D6CCo5kUEwxFwnIfWc7ZH1AglexhkDudzrXHLdUtVb/jihOAZrxwRsxS NTqO20+huBTGOlFEAEiLHPFxN5pjHWz3WeZMniUBgy/6GG8fHNuQxKS0QdQEWbNmYaw3 Tt/gia9BV+aGcpnRluG54PZG2fZ6Z2IjHTzytom+ZdoLrkUh5VI1y6/hpr3dLaZBXxXE EdQA== 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:message-id:reply-to; bh=H8O3B2jRpLsNjyS/gdTHulg2SlWMZk/+Q/QopsevFIs=; b=lmoWynsCofDONT2zFg0Py04Di7rP3+P/P9Zgkk8pzoxrQ9BQ7oTzGbx90KlII15KBd wlEpf7jTzUA32aR1YCPIdKqsm9hhqy82E34SHC/JV4TunHQa26BavDzcME11gs2XhUoB V90ywV3a1jZ96NeK+qJSAumifKdc8LF8gj3ifALnMV4dxwe87/HbKnFDsC9h0FkibNkT xQgsybpT119C/VfV10iFMgncelE7MbiUJ4mgOO/wWamUd1cjOKGIo7xC09J9Sz3L6ybm JG0XmjeI4AHLFohayx8fcKRq3j9AYnqmIduDD/6/q0eIqpwaagpU0nJ9VjRd3y/UbZ7T Qzbg== X-Gm-Message-State: ANoB5pmV3RFsb86hE1ql8jlJonc6CO7rLvEu9UtzA+IIGWE+flQxNLzz lilA7PTDuWcGeZwjvUIoUyvKmXS+0II= X-Google-Smtp-Source: AA0mqf5EYQqt9YXgVeATAod1I6L6HLXwThHLfNk9AkO4Kasn8xp5CHwILcWkrGyUnLrLfPlWCglt2A== X-Received: by 2002:a9d:7515:0:b0:66c:5407:98f7 with SMTP id r21-20020a9d7515000000b0066c540798f7mr29142223otk.85.1669742961082; Tue, 29 Nov 2022 09:29:21 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id l26-20020a9d709a000000b00661b46cc26bsm6224546otj.9.2022.11.29.09.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 09:29:20 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, maccraft123mc@gmail.com, heiko@sntech.de, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, thierry.reding@gmail.com, linus.walleij@linaro.org, Chris Morgan Subject: [PATCH V4 2/3] drm/panel: Add Samsung AMS495QA01 MIPI-DSI LCD panel Date: Tue, 29 Nov 2022 11:29:11 -0600 Message-Id: <20221129172912.9576-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221129172912.9576-1-macroalpha82@gmail.com> References: <20221129172912.9576-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221129_092922_426630_7D91B51B X-CRM114-Status: GOOD ( 22.75 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.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 Signed-off-by: Maya Matuszczyk --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-samsung-ams495qa01.c | 547 ++++++++++++++++++ 3 files changed, 558 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 a582ddd583c2..0d9a9e9fd866 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..b59839d026da --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams495qa01.c @@ -0,0 +1,547 @@ +// 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 + +#include