From patchwork Fri Jun 9 06:20:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13273273 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 C47B1C7EE2E for ; Fri, 9 Jun 2023 06:21:46 +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=ccyxSCvQhcYH0UIsTsNLTQaRFQ9e/KQctrZqXbipolQ=; b=YgPpT1YEHzeAyT F+wbz3BcBXsXmyszBpC9QCsh6v35Ejn8MRegydUyPRgN1TMySUFtfJrY7/kdG79zrPjs9jB7sCdaC uejkIuZSFtwNM2OysyABZCv2/mcgsiNPjjrTF+p+4oqhwAnk9CvHmGJO0frY3CMMwM4CbbQxewLd/ 23F39fnyXXzi5uWzYa5zrpYiYNz7hkf/ayQ8am9wiD73oaI+Z0dgcEklBFKEOCl7hhxiY2qeojZML DPVt+LXfz8iaJZlSRb/ZE+J4SCgpcsslUuqinO3OdEJqcYmYpminfUKYZiRNC0FxjnTnTnTjtrLe7 9AwmaWQ44wEmK3cz+pPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7VUw-00BqZU-2K; Fri, 09 Jun 2023 06:21:22 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7VUu-00BqTe-1G for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 06:21:21 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5169f920a9dso3113830a12.0 for ; Thu, 08 Jun 2023 23:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686291663; x=1688883663; 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=2jBqOeBntw2+ThpWf4KE8BMuMRq2HYj3RR0u0oHiddc=; b=ZhxX49H7jgfUHEsQNMUk4/a6UbIjuqRJAwYW/LT42aNhof0z6wH4OBGRGgBWA51aek ydi0MJqMstzS4h5jqV+tcI9Ok9QO0ULC9vwBrGAQ3/rrlcCa48S6zHTCXcXwo0mqWnAt 4sVa0oueq6eWCE+ifmpEydDQztHEZ8P9qYdG4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686291663; x=1688883663; 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=2jBqOeBntw2+ThpWf4KE8BMuMRq2HYj3RR0u0oHiddc=; b=jJt2iVumts/ErAWxpl1bkVAZBjo9LTQhi663wC7kHtpzQg1TauJpVBG4BcdGYOvHJU uhpjOlwTU7/Hi3g5lywaaVMbqal3E+Mc6bTfsFLcbkTZfWIFYS8jvxrkUPPYVqYiE23O JA8tu8Qx1I9lT8o/thqexTeP3q6ogkDG93FGLfHc4+A8UQ8A63DG9zOfzCeox9xfD9MM Jyzn2x5cCD73YsZV4uCPQR9KPt7Y4L0M0iWB5gscJBZX1FIamvAWlZGTNwN4BdFwV++K mrAbk02U5lyZZ5IjjQ6MW+ael+bx+L0bmGQwXykkEqlJTt+Mh4+IyNsQ5rBQ3G/shNNJ dE1w== X-Gm-Message-State: AC+VfDyjvxkRHxOc0W5kooXf0nIuz4r8Kdm4ilS+/owT1dxQepzJ16w9 qzHvq0heyaxCBQOKwrWH9/gQSQ== X-Google-Smtp-Source: ACHHUZ7g6j/eAGApo5rh4URafnlF1N8g8+7/FnNy4oGvFK8B9Rr2e2tuFQhL9N04HORhDFvBXMITLA== X-Received: by 2002:a50:fb8d:0:b0:514:a6a6:facb with SMTP id e13-20020a50fb8d000000b00514a6a6facbmr825875edq.13.1686291663395; Thu, 08 Jun 2023 23:21:03 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id m7-20020aa7d347000000b005149461b1e0sm1380058edr.25.2023.06.08.23.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 23:21:02 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 1/4] ARM: dts: stm32: add ltdc support on stm32f746 MCU Date: Fri, 9 Jun 2023 08:20:47 +0200 Message-Id: <20230609062050.2107143-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> References: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_232120_427572_C2DE6B89 X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add LTDC (Lcd-tft Display Controller) support. Signed-off-by: Dario Binacchi Reviewed-by: Raphaël Gallais-Pou --- (no changes since v1) arch/arm/boot/dts/stm32f746.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi index dc868e6da40e..9c4ba0b7f239 100644 --- a/arch/arm/boot/dts/stm32f746.dtsi +++ b/arch/arm/boot/dts/stm32f746.dtsi @@ -507,6 +507,16 @@ pwm { }; }; + ltdc: display-controller@40016800 { + compatible = "st,stm32-ltdc"; + reg = <0x40016800 0x200>; + interrupts = <88>, <89>; + resets = <&rcc STM32F7_APB2_RESET(LTDC)>; + clocks = <&rcc 1 CLK_LCD>; + clock-names = "lcd"; + status = "disabled"; + }; + pwrcfg: power-config@40007000 { compatible = "st,stm32-power-config", "syscon"; reg = <0x40007000 0x400>; From patchwork Fri Jun 9 06:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13273276 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 C00CAC7EE25 for ; Fri, 9 Jun 2023 06:21:51 +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=jaXrecO99/FC3pfy/74uCStslk2r3HAMzFqtcjvixmQ=; b=wjbEbjSMNfV6O8 PvmTl6GRuHbfBLmhs/TlNZw9gQEX06+IyO8zPKzgIWFw0IHRRLBmJ6q/Q9w1jwXrTDHVXnk7LP54N AHIc7NIq4IHX9aAp6G4PIAGBCQ/XSFGgw0JiNN6qN2KtRaPXUW11GOQVoQ8lRZGvNzG89RmQLLh54 xYJ5Xdc2F16Nl+1ALYwEUht6JXVEt6WoKQ6U7aEzynMLi9TgshpiVZoLOuC8aAe2upA8nhJbkreEJ 87GmpNUo24wrPbAuttcb4DaWrhvdHlCPmzsVhpQzbECRJ+0TRzqS6a4NubNU1431M32A47LVNtJ6e 89CPkdtzdqfuUg0sQsJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7VV1-00Bqaj-0D; Fri, 09 Jun 2023 06:21:27 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7VUu-00BqTo-1O for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 06:21:22 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b1afe57bdfso15062961fa.0 for ; Thu, 08 Jun 2023 23:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686291665; x=1688883665; 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=8+cZsaL4nqe4EkBv4C/rg83ziLwGA0zL1CPKVC/ZIpY=; b=Xh2ITA299ks+uNMVxghk9PCc8hpBoastqUA/GfrKAuG+XVfjPF986qVhj790OK7lBh tl5ddsLugXEw7re+iPYjfrm/tJchi43Fhm9ynnp726s9iKkhYz/FN6zt30vZGgn/gG3X LLSvsr/iSXp/NR0xGCf4l+QJJJ2WaZDEGTpBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686291665; x=1688883665; 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=8+cZsaL4nqe4EkBv4C/rg83ziLwGA0zL1CPKVC/ZIpY=; b=U3UP0wk1/68nwvBenBbthTHjy0zLQv4Nhdmz+TP7OxC+pSrKHnCIhBJ3U/z8eWvZ3M lRETfKUTRUfcQSA9qL9emuEAOg1jXNxc+3lbaTHx/JxQBs0Lh9pqOWUV/xhDtEKo7TMV HYy6dFs3KWT1eT028I1ZPGvYNYobGMPWkpprWU/M1cHxJy8z/cmGXstfZFUbPqKaeT5i WEtrHdDAnfuIFWVjLRWQt6eBRqLsg3y5Perno9+GCObtDsrcZlJM1y210zqLuJlj4xcm 7gemAtCHpfHnzEWpQGwQAyG+K5E6wyDUKS2imqO51PQvjAhPrd7seXWKxukknXT+lmgu EPrQ== X-Gm-Message-State: AC+VfDxyAWw3zu2MsGOiGuGH7wIvXwR9QHzE3Y4mGeahCF4ExKu6NAt7 Tn3y/VKtwfb0MAOSZpKIHgn/OQ== X-Google-Smtp-Source: ACHHUZ5iaHPCBFL/CFyznNK8XH0UrXLqvcS9ooJKxpt4ywmkPY9MoIJv5N/4NU1OXT725VMpCpBLPA== X-Received: by 2002:a2e:990c:0:b0:2b1:b9b9:20d4 with SMTP id v12-20020a2e990c000000b002b1b9b920d4mr362059lji.5.1686291664880; Thu, 08 Jun 2023 23:21:04 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id m7-20020aa7d347000000b005149461b1e0sm1380058edr.25.2023.06.08.23.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 23:21:04 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 2/4] ARM: dts: stm32: add pin map for LTDC on stm32f7 Date: Fri, 9 Jun 2023 08:20:48 +0200 Message-Id: <20230609062050.2107143-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> References: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_232120_476722_C4807EE7 X-CRM114-Status: GOOD ( 10.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pin configurations for using LTDC (LCD-tft Display Controller) on stm32f746-disco board. Signed-off-by: Dario Binacchi Reviewed-by: Raphaël Gallais-Pou --- Changes in v3: - rename ltdc-pins-a-0 to ltdc-0. arch/arm/boot/dts/stm32f7-pinctrl.dtsi | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/stm32f7-pinctrl.dtsi b/arch/arm/boot/dts/stm32f7-pinctrl.dtsi index 9f65403295ca..36dad40dd0c7 100644 --- a/arch/arm/boot/dts/stm32f7-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f7-pinctrl.dtsi @@ -365,6 +365,41 @@ pins2 { bias-pull-up; }; }; + + + ltdc_pins_a: ltdc-0 { + pins { + pinmux = , /* LCD_B0 */ + , /* LCD_B4 */ + , /* LCD_VSYNC */ + , /* LCD_HSYNC */ + , /* LCD_CLK */ + , /* LCD_R0 */ + , /* LCD_R1 */ + , /* LCD_R2 */ + , /* LCD_R3 */ + , /* LCD_R4 */ + , /* LCD_R5 */ + , /* LCD_R6 */ + , /* LCD_R7 */ + , /* LCD_G0 */ + , /* LCD_G1 */ + , /* LCD_G2 */ + , /* LCD_G3 */ + , /* LCD_G4 */ + , /* LCD_B1 */ + , /* LCD_B2 */ + , /* LCD_B3 */ + , /* LCD_G5 */ + , /* LCD_G6 */ + , /* LCD_G7 */ + , /* LCD_B5 */ + , /* LCD_B6 */ + , /* LCD_B7 */ + ; /* LCD_DE */ + slew-rate = <2>; + }; + }; }; }; }; From patchwork Fri Jun 9 06:20:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13273274 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 31B57C7EE25 for ; Fri, 9 Jun 2023 06:21:48 +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=Fy3IfJaXMQCLrL/taAbsFfFer0zIvyUFBmWBmg9yZjo=; b=DCD5tWH4ise3y5 2GGsjQTWeHIQYOg3ZktzXT4SB2BeWkuFBr+TnzYpsGlDq6mM1Bx0b5kYL2tlEBcyt+lUJwiRSmbhC Myr+YslbfcuoLpfldt9SxPWcnFPfBOYnHlF/7dWLxYZxa7y6LB4OU79LQ/kBIYS4kddJP5/E7J/kf eIApobKJdOPLasKXGnrI9bH82WjYXqH083RhA3ICRAbWsQUhmzPX1Aw+tP2Ax4UXFlbo+v8W70oN7 qCbLB9OAy0n4saD6i9xXTv0J4HfSBCXU/XHC55ZIBsOst5CMavMyipV4wMJ0FvLNQBAulflrVSp8B jG/6jQiKUKAp29od91ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7VV1-00Bqb3-28; Fri, 09 Jun 2023 06:21:27 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7VUu-00BqTu-2s for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 06:21:22 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5169f920a9dso3113908a12.0 for ; Thu, 08 Jun 2023 23:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686291666; x=1688883666; 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=tlm5X0f1SJIUHEa+Ch7CRBAmlhS5LXsyaOP8GZ1/KKI=; b=Zn2wbcwo21fhOpg5eFi3fFexbvEY7Ul6UQIoI1MeNQzf5cOD48Pb9CySIeYGY3/Jju r7AdVz3fWHqUZfj/p0Ek4p2HnCOJ+jHcldG9ZArs4G454NpdYB8sl6yLnYyTTWgzM56J YRveOMviMIp2hQ/ahVfiS2GmRK+Xlv1GoA9b8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686291666; x=1688883666; 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=tlm5X0f1SJIUHEa+Ch7CRBAmlhS5LXsyaOP8GZ1/KKI=; b=CRol57ql+iH9MoqFX3uvQWhyPb6UktlPZGiFncPKIrB+mQKd1IQL6/ZW5GL1rgzDhT N6BqlcCi8EYwFwROFGe/WxJ+tJefnIzRBhBVRaoMjQCGSN7/H/BqMTjoMSDjQQO8pe+f u2ZOrqKuDaday9/y/q57z9oFZq7ia8kEBErq6EqC7gto6nATgrgsmxt2jCHQhVfGU0cI BCupM8HOrwqRfateSxgpk1wMUyUH/7egkqzgtziVB+7Gw4H0stauzmCo7W9nzdxP92NU Lpsbp0iQG7sum8CEiphTuIQhZJaidjePhPTwVh7SfS6HpzIz8aelKPmS6O9l/CTKJZJq YvTQ== X-Gm-Message-State: AC+VfDwN7hQd+82WfhPYBTscbvc/KCBq5ZcuqPk9ZWmLJJ5KXK1mDh+7 TEnaC5YEC+cRW61xFTSSkf5KhQ== X-Google-Smtp-Source: ACHHUZ4xW5JNQUR9WpWc3Icd9H1a0H3sV6NT4RZVtX5z+P6Z7QibdOPH+DuK978r1/65E63K0G3P3g== X-Received: by 2002:a05:6402:270e:b0:514:9e81:6185 with SMTP id y14-20020a056402270e00b005149e816185mr4277430edd.16.1686291666238; Thu, 08 Jun 2023 23:21:06 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id m7-20020aa7d347000000b005149461b1e0sm1380058edr.25.2023.06.08.23.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 23:21:05 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 3/4] ARM: dts: stm32: support display on stm32f746-disco board Date: Fri, 9 Jun 2023 08:20:49 +0200 Message-Id: <20230609062050.2107143-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> References: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_232120_927962_35578618 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support to Rocktech RK043FN48H display on stm32f746-disco board. Signed-off-by: Dario Binacchi Reviewed-by: Raphaël Gallais-Pou --- (no changes since v1) arch/arm/boot/dts/stm32f746-disco.dts | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm/boot/dts/stm32f746-disco.dts b/arch/arm/boot/dts/stm32f746-disco.dts index c11616ed5fc6..cda423b6a874 100644 --- a/arch/arm/boot/dts/stm32f746-disco.dts +++ b/arch/arm/boot/dts/stm32f746-disco.dts @@ -60,10 +60,41 @@ memory@c0000000 { reg = <0xC0000000 0x800000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + linux,cma { + compatible = "shared-dma-pool"; + no-map; + size = <0x80000>; + linux,dma-default; + }; + }; + aliases { serial0 = &usart1; }; + backlight: backlight { + compatible = "gpio-backlight"; + gpios = <&gpiok 3 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + panel_rgb: panel-rgb { + compatible = "rocktech,rk043fn48h"; + backlight = <&backlight>; + enable-gpios = <&gpioi 12 GPIO_ACTIVE_HIGH>; + status = "okay"; + port { + panel_in_rgb: endpoint { + remote-endpoint = <<dc_out_rgb>; + }; + }; + }; + usbotg_hs_phy: usb-phy { #phy-cells = <0>; compatible = "usb-nop-xceiv"; @@ -99,6 +130,26 @@ &i2c1 { status = "okay"; }; +&dma1 { + status = "okay"; +}; + +&dma2 { + status = "okay"; +}; + +<dc { + pinctrl-0 = <<dc_pins_a>; + pinctrl-names = "default"; + status = "okay"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; +}; + &sdio1 { status = "okay"; vmmc-supply = <&mmc_vcard>; From patchwork Fri Jun 9 06:20:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13273277 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 A580EC7EE2E for ; Fri, 9 Jun 2023 06:21:52 +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=056cT3HkJMBQuHI0m13EBHl9b54+iFgw6ev/SUUnkcY=; b=1hD4av/KKc6Tyb qzfhUWCeTpJ3MXshcquEgTiG6fgTlmOZTQs3P6d/qyhF7aYVVrF9+qhzlSbvt4HNDOUiH9YHutJyG JX6lyzilY+F9/kTFtSwsKwwbTxhbUb/B6SVmY4KmI9DscipWXdW+P+BDOsdwMpBnuLSbIUkMKGoVX Um5H2Zksl4TSblQe8zzDSJ4Po5Kd7B4bx3tGP0H9tISAKPh0m881p/3w0rEjhOY3KnsA6E/8aXyws /U5B8NGalj07fve+a3wj7pe4TNa7ur5/5TTMVEMQh2zb5jIyCc2bY1rP4w+0RNsn1DmBgqC7y2FmR JJ8ue4FwpDWGUTryTwtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7VV2-00BqbL-0k; Fri, 09 Jun 2023 06:21:28 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7VUu-00BqU5-2s for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 06:21:22 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-516a0546230so2125649a12.3 for ; Thu, 08 Jun 2023 23:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686291667; x=1688883667; 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=iGNFX6HEdIKRiw8NKvPwhXc8R+GQd9GHBG/7VCCQih4=; b=M/5/NpTFFGCRpQ6Zin9qb9E+Y65G+15U8vBcdXBhKs2ziuqY9ne2OMuK1rKdp1YynY oa6vtGFNCboTCqlpxK6MP3hC0Z8+ZlqlWgCvLTrWhND0vLpGIyWQJmPWuF6cogAOP2js EClF5qAkMaZyWVM7yJWgvLRRy9WQ+t2GO8J3c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686291667; x=1688883667; 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=iGNFX6HEdIKRiw8NKvPwhXc8R+GQd9GHBG/7VCCQih4=; b=dzbY2U2OQwgzknJ+UYzgCDtbpwnfcSwMoXU9u1sACK7uvPvTyuAgsPEpg1fkq6i5EL fS7AbJuRnhx9YSakVtqiDeYTPEBfVNxqE8arvU+FrFvThq1LvTM3RWlS+4qg67l8E8NB RUGONUKK1Ypa5l1qPF5kOaP8oPTu9xyuS6nWutCtcy6uax09SZLKZzF349vNJ5V2lWoG VA3C4qfWjHahK540BECHvnq1FOdCKtO1c1s5e4hS+5HaPEAE0cJoEvtxr5/cF9fI5z/M 0oaNSNRmkZV88I/6MCPggEGgJd1Y1DaaRBuzSp9S0z9y+saRoqYqlPw6uQ+gFYtPvtRa MuaA== X-Gm-Message-State: AC+VfDzmthQk5FbJtmtKa/Z3Rw7PSOrWE8EnkELJE1YqBCusi6TxGJu9 uA9Nb2VjPtbRbh0chRccODe6zA== X-Google-Smtp-Source: ACHHUZ6XFmSe2W3rNoo+VrpWUwTaMcErolR4cjDWNXAD6nl5w7ToPb4VYcUVV/18CrO8h0BLGMsYWg== X-Received: by 2002:aa7:c40b:0:b0:517:6ed9:6629 with SMTP id j11-20020aa7c40b000000b005176ed96629mr416496edq.21.1686291667668; Thu, 08 Jun 2023 23:21:07 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id m7-20020aa7d347000000b005149461b1e0sm1380058edr.25.2023.06.08.23.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 23:21:07 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Alexandre Torgue , Daniel Vetter , David Airlie , Maxime Coquelin , Philippe Cornu , Raphael Gallais-Pou , Yannick Fertre , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 4/4] drm/stm: add an option to change FB bpp Date: Fri, 9 Jun 2023 08:20:50 +0200 Message-Id: <20230609062050.2107143-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> References: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_232120_931669_A77F87E9 X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Boards that use the STM32F{4,7} series have limited amounts of RAM. The added parameter allows users to size, within certain limits, the memory footprint required by the framebuffer. Signed-off-by: Dario Binacchi Acked-by: Philippe Cornu --- Changes in v3: - drop [4/6] dt-bindings: display: simple: add Rocktech RK043FN48H Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next): https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c42a37a27c777d63961dd634a30f7c887949491a - drop [5/6] drm/panel: simple: add support for Rocktech RK043FN48H panel Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next) https://cgit.freedesktop.org/drm/drm-misc/commit/?id=13cdd12a9f934158f4ec817cf048fcb4384aa9dc drivers/gpu/drm/stm/drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 422220df7d8c..65be2b442a6a 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -30,6 +30,11 @@ #define STM_MAX_FB_WIDTH 2048 #define STM_MAX_FB_HEIGHT 2048 /* same as width to handle orientation */ +static uint stm_bpp = 16; + +MODULE_PARM_DESC(bpp, "bits-per-pixel (default: 16)"); +module_param_named(bpp, stm_bpp, uint, 0644); + static const struct drm_mode_config_funcs drv_mode_config_funcs = { .fb_create = drm_gem_fb_create, .atomic_check = drm_atomic_helper_check, @@ -93,6 +98,7 @@ static int drv_load(struct drm_device *ddev) ddev->mode_config.min_height = 0; ddev->mode_config.max_width = STM_MAX_FB_WIDTH; ddev->mode_config.max_height = STM_MAX_FB_HEIGHT; + ddev->mode_config.preferred_depth = stm_bpp; ddev->mode_config.funcs = &drv_mode_config_funcs; ddev->mode_config.normalize_zpos = true; @@ -203,7 +209,7 @@ static int stm_drm_platform_probe(struct platform_device *pdev) if (ret) goto err_put; - drm_fbdev_dma_setup(ddev, 16); + drm_fbdev_dma_setup(ddev, stm_bpp); return 0;