From patchwork Fri Jul 23 04:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 12395265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3618C4320A for ; Fri, 23 Jul 2021 04:06:56 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 76A6860E0C for ; Fri, 23 Jul 2021 04:06:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 76A6860E0C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 061EE6FA36; Fri, 23 Jul 2021 04:06:56 +0000 (UTC) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by gabe.freedesktop.org (Postfix) with ESMTPS id E72486FA35 for ; Fri, 23 Jul 2021 04:06:53 +0000 (UTC) Received: by mail-pj1-x102f.google.com with SMTP id e2-20020a17090a4a02b029016f3020d867so2096674pjh.3 for ; Thu, 22 Jul 2021 21:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B7rhomLLzwRgFfNNTM797mpLG3BiqS6x3e33hEPmJTQ=; b=SGgCTbvwYG1v+5tp6r3T4PLgjP/4PBx3FlYRSZedUbj8Q7Kly0YN2p2Q9sGasqkcP9 zniQ+1QPUF/TaPtGoLFABC3ATUvZgbHOnbpFMc8DQQA6mijc9N8YXLNOo3bShwinLK2L mRCXD+rwSUYOescplYpusojv62U32AmIZNUWpSVEjoJxxKbIRdDCmyOLco577IjYeAeR HzseF5PMoRs2RJS33HBAft8nYJrTMnN6lUZ8YgkzvjOqwhaEgt4YUdtFroZ71fy/GQ2p Z71CdFvti5fjEzCU/KSQ9iT7fMlXcXipr4BQxQ5MY+0r4Gp06cZard3Ft6MBSKGvllsX mj0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B7rhomLLzwRgFfNNTM797mpLG3BiqS6x3e33hEPmJTQ=; b=P8LxSyvU0qCmoPuJDjbbhxEvpyPM29Mhy1pZjaks0BsanLD5JOMmKnHU7DB/utw3ut RPde4f4v9kfLz7d+VLXzk4cJkrysjLJLI9Mj2YKFAjbIlO2zJ0xwDVLiALjxLiTDniTH niL3Oi/k0I/4uPI2/udwBjB//F4UYLnnyLnDOfsOAAQikhAyqpsBi1E0QdOb9IYKLk8D 3sIa1qc084U3bTJyY6hK5VIT+Ks5RYlK589KA/Gq9u/9cGSVegPh/0CNJ7gUYiqSmJ1r kju7iAU9VH7NKZpDOVSAfrQaDxmE8+QLl95d4Mneyq+jfQq+uWDSSCZ7sRAXRe6aix7m waJw== X-Gm-Message-State: AOAM532nY6rIvemceNdzSSMmTk3ngW9qolwNAblhX2YXEdnAkkcFWCxf h1gOlitpwjcSh4uKc5xxjvY= X-Google-Smtp-Source: ABdhPJykvEEecxAO8ZNgVcwsI6ew9t6mtT9/SC/ITDuPpUox4KucwUVfybx2mBKvkZiM9vXgiLdpFw== X-Received: by 2002:a62:3344:0:b029:28c:6f0f:cb90 with SMTP id z65-20020a6233440000b029028c6f0fcb90mr2633175pfz.58.1627013213589; Thu, 22 Jul 2021 21:06:53 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id p3sm35474910pgi.20.2021.07.22.21.06.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jul 2021 21:06:53 -0700 (PDT) From: dillon.minfei@gmail.com To: laurent.pinchart@ideasonboard.com, thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, linus.walleij@linaro.org, alexandre.torgue@foss.st.com, mcoquelin.stm32@gmail.com Subject: [PATCH v3 1/3] dt-bindings: display: panel: Add ilitek ili9341 panel bindings Date: Fri, 23 Jul 2021 12:06:41 +0800 Message-Id: <1627013203-23099-2-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.com> References: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.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: , Cc: devicetree@vger.kernel.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, noralf@tronnes.org, Dillon Min , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dillon Min Add documentation for "ilitek,ili9341" panel. Signed-off-by: Dillon Min Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/lkml/1626853288-31223-2-git-send-email-dillon.minfei@gmail.com/ --- v3: - collect reviewed-by tags from linus. - add link address. .../bindings/display/panel/ilitek,ili9341.yaml | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml new file mode 100644 index 000000000000..2ed010f91e2d --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9341.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek-9341 Display Panel + +maintainers: + - Dillon Min + +description: | + Ilitek ILI9341 TFT panel driver with SPI control bus + This is a driver for 320x240 TFT panels, accepting a rgb input + streams with 16 bits or 18 bits. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - enum: + # ili9341 240*320 Color on stm32f429-disco board + - st,sf-tc240t-9370-t + - const: ilitek,ili9341 + + reg: true + + dc-gpios: + maxItems: 1 + description: Display data/command selection (D/CX) of this DBI panel + + spi-3wire: true + + spi-max-frequency: + const: 10000000 + + port: true + + vci-supply: + description: Analog voltage supply (2.5 .. 3.3V) + + vddi-supply: + description: Voltage supply for interface logic (1.65 .. 3.3 V) + + vddi-led-supply: + description: Voltage supply for the LED driver (1.65 .. 3.3 V) + +additionalProperties: false + +required: + - compatible + - reg + - dc-gpios + - port + +examples: + - |+ + spi { + #address-cells = <1>; + #size-cells = <0>; + panel: display@0 { + compatible = "st,sf-tc240t-9370-t", + "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; +... + From patchwork Fri Jul 23 04:06:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 12395267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35543C4338F for ; Fri, 23 Jul 2021 04:07:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D6D16600D3 for ; Fri, 23 Jul 2021 04:06:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D6D16600D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C5746FA37; Fri, 23 Jul 2021 04:06:59 +0000 (UTC) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by gabe.freedesktop.org (Postfix) with ESMTPS id B48E86FA38 for ; Fri, 23 Jul 2021 04:06:57 +0000 (UTC) Received: by mail-pj1-x102d.google.com with SMTP id e2-20020a17090a4a02b029016f3020d867so2096803pjh.3 for ; Thu, 22 Jul 2021 21:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IILYi2BBED19uarLK77YF9MGNtXI5Hu+8bpBHATAL0I=; b=kXr7wvE1n7/TKCY9W0ROVKU8LnS+Q14q61PeYSiAkwkZvmRJeFrRuyI2AkNv+A9Nqy 8xm5Eo/qWe1mk49oAvJk8NggYhPEfliRN4N65Bnt2b+ZV8Lqdq7cpXk5i9XQpZ0blmQ7 9V/UJ7vBzQLiubZ17ZPkF4g7JiEpx02olOoW0uXusgWr0r6Otguvq+f8gTh4QafrBabD r2TnHHeQBg9ztK6H5LRCUiOTUg8vvFCVpViM68F1o2S6PkfaUov/DMAVNKAaSwocFksU Uhp4MfE+Kf9OE3GAzr5+vfDSLuoi5aCG4iq2sdQpXg8Y0Tu1MHvLPIWBg3HFTOYdRvs3 DEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IILYi2BBED19uarLK77YF9MGNtXI5Hu+8bpBHATAL0I=; b=NX5RKZ14qyKjZ4K0VgK6aIK/GHnGp5ClCZujSG1ExVDGDpiAjO/J2gDTE2W3JDUH+j mo2Q2QoNonC0TDCkqyoqcNhItDzoyWhz/Z300uV91s2VE/C9K8f1CdgUetVAHyt+c84A Rhc19AAruvHWaeeCTPKFot1b9Z2yoqZ0IkwTdpB6+kfSmxvbpXXes8TqH8gxW48OnMor btQzcmDVjVZ1AoIuXOPbZ2Q1aJiMKn5C79a3nqnE0IAzz5/lhKlK4EjkUTYkvbouxMPg YSVYvK52hUyZ0xdG/+ToPV5KFH+HrgbmEVJoRiVhnMVymeMYh98+L+IcdAm8rSYVolsD Zt7A== X-Gm-Message-State: AOAM533QFRfVMILnzzOQf7AyIl9i/JMDagg1Rc5IVm8GmCGJ9nGU0GdD viu+QU5f4y67NGaMwJpA5yI= X-Google-Smtp-Source: ABdhPJzfAN4Dm2094Oc4AXpBDrI+S93x0ZGuxtrf0rg65AiTzxOdCaPAA6zHF0nhMV4hySjMhRpNjQ== X-Received: by 2002:aa7:9115:0:b029:359:69db:bc89 with SMTP id 21-20020aa791150000b029035969dbbc89mr2809512pfh.32.1627013217619; Thu, 22 Jul 2021 21:06:57 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id p3sm35474910pgi.20.2021.07.22.21.06.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jul 2021 21:06:57 -0700 (PDT) From: dillon.minfei@gmail.com To: laurent.pinchart@ideasonboard.com, thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, linus.walleij@linaro.org, alexandre.torgue@foss.st.com, mcoquelin.stm32@gmail.com Subject: [PATCH v3 2/3] ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding Date: Fri, 23 Jul 2021 12:06:42 +0800 Message-Id: <1627013203-23099-3-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.com> References: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.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: , Cc: devicetree@vger.kernel.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, noralf@tronnes.org, Dillon Min , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dillon Min Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341" so, append "ilitek,ili9341" to avoid the below dtbs_check warning. arch/arm/boot/dts/stm32f429-disco.dt.yaml: display@1: compatible: ['st,sf-tc240t-9370-t'] is too short Fixes: a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board") Signed-off-by: Dillon Min Reported-by: kernel test robot --- v3: - add Fixes tags. arch/arm/boot/dts/stm32f429-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts index 075ac57d0bf4..6435e099c632 100644 --- a/arch/arm/boot/dts/stm32f429-disco.dts +++ b/arch/arm/boot/dts/stm32f429-disco.dts @@ -192,7 +192,7 @@ display: display@1{ /* Connect panel-ilitek-9341 to ltdc */ - compatible = "st,sf-tc240t-9370-t"; + compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341"; reg = <1>; spi-3wire; spi-max-frequency = <10000000>; From patchwork Fri Jul 23 04:06:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 12395269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6385BC4338F for ; Fri, 23 Jul 2021 04:07:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 360D9600D3 for ; Fri, 23 Jul 2021 04:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 360D9600D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C43DE6FA38; Fri, 23 Jul 2021 04:07:03 +0000 (UTC) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D1106FA38 for ; Fri, 23 Jul 2021 04:07:02 +0000 (UTC) Received: by mail-pl1-x630.google.com with SMTP id u8so1869780plr.1 for ; Thu, 22 Jul 2021 21:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IQRKRQq+ppZZQjhzVhSUB/UHn9VMaT6QTfTpkIDhRQI=; b=H3lo744reWojIp1GyZdVK46sIiZYEgZmDLiO3ezCXeRfWjbB1x3fwuFCCCxuD/gNmA vjvBPnSj0sKiRnBCm+IWP2HMaOsAby6blAGtXjUbxaiheLl87r4Ya1EJYeQRKLZZmQXJ a2IShTcRzDdT7cD1+YE/Yaa5n4WF06jmtnn3RoXUqNBvpqD4jG1gGpFvbkuZLGJy9ggb eOLN0pV150Ty/F8EoLUXzbKQ0N+ZTTAbiqw1RALixwXWkUTp2MzBU0r2d0ss5YghBshq erodpU73DmGmYqEQX9s5yOqu2Dr0EkEKOFx5AlnHbJXXh0NNCG9O1ZIfutNB4ofyMBXW OouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IQRKRQq+ppZZQjhzVhSUB/UHn9VMaT6QTfTpkIDhRQI=; b=D97tByfrhGPD6n+XjpGOYJf80UfsYRPDR7mgJsLyUmw2DvYLF2TFISbBwkJeTPNnXu pqBRdyzDmyAPcgSQjtJK/xKrV1vUufSPoKk7y/ZWJd/1HL4NjiwbzoM752TSstVH6Sfg t7BzsSzEj7Wnhib3CCro6M90dsq/R+1zlcw+VWRfl8/9AmasZKqA4A64mkYLl1CQQd72 xaXzoAtHvWGk1VqSxrTvIPFCWcpgfYI+ZWF+lpznTQdJaJWy83OlBYNnT8Hq5LsZ2BoZ NlicGPNUmEN9hMwQ4LAD/4wnvxR0mxKhDnHamRTT9eeeBoHEd/Jmizics6J6+hNzEx6+ /6Xw== X-Gm-Message-State: AOAM533Vw/sMgcf1Vr4/8N0GB/uhdVfpzMJJ0aNtxcs0VIe86c7ciSkw kUe4+XFt6o95hw7aIGvFiqc= X-Google-Smtp-Source: ABdhPJxFM/fWD2b9j1qBQ4Ym72CYy11R5S3mpGG3J3quDTLTGgaP9q3pqclAaA/ykXpOnbBuPRLkDg== X-Received: by 2002:a63:fd07:: with SMTP id d7mr3116268pgh.288.1627013221679; Thu, 22 Jul 2021 21:07:01 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id p3sm35474910pgi.20.2021.07.22.21.06.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jul 2021 21:07:01 -0700 (PDT) From: dillon.minfei@gmail.com To: laurent.pinchart@ideasonboard.com, thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, linus.walleij@linaro.org, alexandre.torgue@foss.st.com, mcoquelin.stm32@gmail.com Subject: [PATCH v3 3/3] drm/panel: Add ilitek ili9341 panel driver Date: Fri, 23 Jul 2021 12:06:43 +0800 Message-Id: <1627013203-23099-4-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.com> References: <1627013203-23099-1-git-send-email-dillon.minfei@gmail.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: , Cc: devicetree@vger.kernel.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, noralf@tronnes.org, Dillon Min , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dillon Min This driver combines tiny/ili9341.c mipi_dbi_interface driver with mipi_dpi_interface driver, and can support ili9341 with serial mode or parallel rgb interface mode by register configuration. Signed-off-by: Dillon Min Reviewed-by: Linus Walleij Reviewed-by: Jagan Teki --- v3: all the v3 updates are based on Sam and Jagan's review. - collect reviewed-by tags from linus and jagan. - replace DRM_ERROR() with dev_err() or drm_err(). - remove kernel-doc markers from struct ili9341_config{}. - reorder include headers. - remove the struct device *dev from struct ili9341{}. - restructure the ili9341_probe() function, add two ili9341_{dbi,dpi)_probe() to make it more readable according to jagan's suggestion, thanks. For "So this is a full display driver. The more relevant home for this driver is inside drm/tiny/." I'm not sure if this is to ask me move the dpi code to drm/tiny/ili9341.c, and remove this driver. or just remove the dbi code from this driver, but this will result in two drivers to support the same panel (as Noralf does not agree with it). so, waiting for the decision from Sam, Laurent, then will update in v4, thanks. drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 786 +++++++++++++++++++++++++++ 3 files changed, 799 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index ef87d92cdf49..eb34b8d1b19a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -124,6 +124,18 @@ config DRM_PANEL_ILITEK_IL9322 Say Y here if you want to enable support for Ilitek IL9322 QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. +config DRM_PANEL_ILITEK_ILI9341 + tristate "Ilitek ILI9341 240x320 QVGA panels" + depends on OF && SPI + depends on DRM_KMS_HELPER + depends on DRM_KMS_CMA_HELPER + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DBI + help + Say Y here if you want to enable support for Ilitek IL9341 + QVGA (240x320) RGB panels. support serial & parallel rgb + interface. + config DRM_PANEL_ILITEK_ILI9881C tristate "Ilitek ILI9881C-based panels" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index cae4d976c069..0ecde184665d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c new file mode 100644 index 000000000000..5ab6f18c3ce1 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,786 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Ilitek ILI9341 TFT LCD drm_panel driver. + * + * This panel can be configured to support: + * - 16-bit parallel RGB interface + * - 18-bit parallel RGB interface + * - 4-line serial spi interface + * + * Copyright (C) 2021 Dillon Min + * Derived from drivers/drm/gpu/panel/panel-ilitek-ili9322.c + * the reuse of DBI abstraction part referred from Linus's patch + * "drm/panel: s6e63m0: Switch to DBI abstraction for SPI" + */ + +#include +#include +#include +#include +#include +#include +#include + +#include