From patchwork Wed Jun 7 06:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270050 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 BB3A6C77B7A for ; Wed, 7 Jun 2023 06:32:20 +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=qrps6RdM7N4o+f BVq50CjEoVdM67v43dwfxxPZ9PM0uTXcuz6s9AhFF9EJTAAlBSftuy/OXWqH7lf6CJBkxNJp98bnn T0I8hMdqMRlFBHVrAbi2MMreiKtKoN8rlYTZt8VVPVj5k49DxfyAeTy1VIONKuPSI1/cUlX+nyhDD IbiovM96zbnK6ODEjPyckujhvNCm8O8EogAaGLQx1zs7G2RddJJ5NJzhxQ/lN5NnVxLVR18m+35/f PVQ6ke5rHEwOBC52tdlbDwvDo+ezp/5HAMum0xAi4UpTq/uWWyUrwb5bgVubfp6+n8KQZoAzzF9sy bJCr7Otj6ubvq6xYlmJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi3-004Yz7-2u; Wed, 07 Jun 2023 06:31:55 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mhx-004Yur-04 for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:50 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f735259fa0so40599285e9.1 for ; Tue, 06 Jun 2023 23:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119505; x=1688711505; 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=g2j6/JCVxK3TnZWkCdaosIWVIMAC/i6nhFtyu+Re5bfo/RS+chFBZPxNyozCfc90my 23Oir7AD/urej/TP3IhFf5y8O5uP5ydLyWw1O9546HsHgPevZM/lEEMGM6pOckKnQ070 c9O9Krxv0kQzUEMbJow7q/8nGkkAEmplFUkco= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119505; x=1688711505; 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=G3pqG7MwKfUbxo+UIrhSEjDBkxWA+i7KC8inYQRNBQlVlxpbHEyl86itC9yz6Dk5sZ WaJpntCQ6eLbYBnmCLfUIjONBQfkN0UlDgpVUm8kICkjntBxWjerU5cSTuihkpmFZpGG eR81+wpGY1THIdpLdzMDzcYNXbhKM94NwrVTfRsDAxaj0vS59u54KBzwVXN1w87Y8OsY Tm+xcaOXp78lx7K5U8/CnWXdq3357DqNg8+SS4y3WjXhkUYRWbLSiStjsirjWmzO0Pk2 DjS8ZErq6WeSvMV2sroYKOs97aOa20LbmJYhzii8iZGedLEyc1SIP2PdZhObnYQZqzaM WtAQ== X-Gm-Message-State: AC+VfDzy/+SUuucmU1S1NFSgYHg7TZIUMvMm+JwnF3J+ZoWbS1R9MqM7 gJBVoEW489ZAmC6tlOte4+u28w== X-Google-Smtp-Source: ACHHUZ7swwk8nHZHRKO2QFZgoHwZJa+Z94Ki4ZMTiNvDjHj307W1KcYe3A0JolZaW1dRw+WElacJZQ== X-Received: by 2002:a05:600c:2158:b0:3f7:2e57:d3af with SMTP id v24-20020a05600c215800b003f72e57d3afmr5795147wml.11.1686119505366; Tue, 06 Jun 2023 23:31:45 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:44 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org Subject: [RESEND PATCH v2 1/6] ARM: dts: stm32: add ltdc support on stm32f746 MCU Date: Wed, 7 Jun 2023 08:31:34 +0200 Message-Id: <20230607063139.621351-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233149_057403_BA336B57 X-CRM114-Status: GOOD ( 10.09 ) 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 --- (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 Wed Jun 7 06:31:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270049 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 16C2BC77B7A for ; Wed, 7 Jun 2023 06:32:18 +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=bWeCMrbB8Z7SABgmKq/XJTpfUlyuW6/RD6BJGgZ6Nrg=; b=RLyvBkVe4CSKAG IsV7d0925gWk/SC2mEreqRNBoAFjbgTXHKl1rEPmLeTtEI2W4DqBuZ92Q9Hg8Ufyp26RNr1sU58zo cXIj3GUKKEA4IaJQ2AejVYjQZ8lahhkHEk9Yqo4KQN3lqu/O76bbToRp4fLlYIkynftcY+Da3EWyR Blv+ElOiFPRJlxbbrwcvs8ZZNfkE0wOsPMWcoHq+1MpnF0GiSGn5BpSnxSKzy/oQrZ/fVF4yxPdNY hU600CMtN+Po2qgI4YU8zgNVi7biG4SCc/CDp/IHLv47zNE6JvJCrI0+zDaVq9qpZ8hKI6//JFN9b kc/LZsogRmWOpttrsxcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi4-004Yzc-1V; Wed, 07 Jun 2023 06:31:56 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mhy-004Yv9-2O for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:51 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6ef9a928fso56633965e9.3 for ; Tue, 06 Jun 2023 23:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119507; x=1688711507; 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=3QAQ0RCZfE4mrNQglSUgy3WeBMWWHrgZHNbJHgr6400=; b=h2Pc0QIyc0c+Ese5gn0TQbG4jtXqWPFGxlfBBI4qujJ5j/PoVbvqSoaNEQ5xdAEJ8r wG5F7picdZbAFya6ifGi2vPrn206t16wb3TdMMWdCXBPR3DwE1124jwS8JPUaU59iIH2 YcvO5fxeJnu0eXHh6LljL7+ZFDLu59JPVXN6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119507; x=1688711507; 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=3QAQ0RCZfE4mrNQglSUgy3WeBMWWHrgZHNbJHgr6400=; b=aMTEPrtNTKQGCXdzapNKX+wDbZGJIFA3i21Prx6BUbFKS5U+qbjrnjcTHDCkpMYmDg v3wedkJ7nfDv8dLw2QUwxIE8rI8OaFvYqvVuH69UKhpeSNDgFvRtAcGffJBnXEwJKNnG IgKzS/9OsLE6WgT25nNxqyR35UhboGJYO9YyhDy3dZRt+8P+nzQeK6Ynf4xdqcQ9bUFH lureSe7KZPhbxoHli6dSwNv04Dw82IOLS7nTTfG75+y0X1g8AxnZrc6W5aWEtLuVuACg zJM9Ifl/96VgyWYCArCZeXzTPxWQ0jR5E7dJi7tljdW9QQgiy9617mI8bM2lwiO1MiN+ Eq1A== X-Gm-Message-State: AC+VfDyU8M8nqgohcAmZW1vRq+sZxpEDWbyWZsv4/S42pUXIrOb5xSil kNYTxUjPzLtv4HYa1S/TTW28Og== X-Google-Smtp-Source: ACHHUZ7YZTDYHHtSg4VapoT8aZYSlojLOeUjs9KetpEEeslYwDaHLlqO6B8dQBlh72zVsbfiDNKagw== X-Received: by 2002:a1c:4c11:0:b0:3f7:408e:b89a with SMTP id z17-20020a1c4c11000000b003f7408eb89amr3494250wmf.37.1686119507059; Tue, 06 Jun 2023 23:31:47 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:46 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org Subject: [RESEND PATCH v2 2/6] ARM: dts: stm32: add pin map for LTDC on stm32f7 Date: Wed, 7 Jun 2023 08:31:35 +0200 Message-Id: <20230607063139.621351-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233150_774564_0AA338B5 X-CRM114-Status: GOOD ( 10.44 ) 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 --- (no changes since v1) 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..f3f90b9bcd61 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-pins-a-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 Wed Jun 7 06:31:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270051 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 3F05AC7EE43 for ; Wed, 7 Jun 2023 06:32:22 +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=1y5ulZJiHr0Z+C YxMAVR/AjXBPeFP4lqi4dY3apUVMmmiRjGBoVBfW8SD74SzSNnJo3VRFmzUynGKy3LzUwLAv/qZv9 hnbchHVhWrFOHReHZvZNfAMB6Z2TZxhGWYItvX3nusY/qj2mGMvzRKoB89TBhzPZoOkLLGwF7PqzG eh22tKxj3/ZLIk3s9QdcurzKJU9FB5+NgoH3s/3/ch+xqmliiRMOmpQjaLANOHHanmMqEuSyFqfmb AYgRgjv8QHlW8l9nOmRJKnJ7SaBuOIs4wpe396gfmVlwUZPW3pD16zy4OBAP+D52eScFr39qV/Sye aIoDgg2k1VToOoxosSxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi5-004Z0Q-0U; Wed, 07 Jun 2023 06:31:57 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi0-004Yvt-00 for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:53 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-30ae95c4e75so7007874f8f.2 for ; Tue, 06 Jun 2023 23:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119509; x=1688711509; 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=bzMNTxZK/4hAhbCJfyfkajbjSZHcrJlJ/ANGEgI8Xc2LZi/1j3XIaARW8OaUk1oUNt xVXHCzLxMc+NJPP7tmKJXtlG0YFtoAOv6eKRl6cIeAXRzBEeZFxDxGMzfM6EQiFdDCoG UlbJzxvd+HoA7k7tgjRYe/4BsTTBBkPNUkICY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119509; x=1688711509; 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=b6tSdhDqVXKYD8mt1+aLdw4akeEnqFsz/75bXrzcnABKsT7Xh6HH24oqM1I4oNcYtv lyn5ok6lDrFHg381yc3gJ5DR2O1mQwEKQD4HXHOoymRqzE6VQnOfLaKxg1Z47b55qav9 quKJ6h1/8zTCcxd/Ck3Z7mUWrp/T/R+GmRVJ29cUvpV8HpPgZ0brMTRUz18g/xEh+sz8 D9GmFVheSOAweZx3c5br8s/l8tn4wZ84RW9pNAQoqm7O9gnxw10+BBSNsSzccZURuc3z xKbJYxtwGy1AegCdR6BnPj3sw/3UJ/+EnOf3TGkwSRCx0U1XWPvI46S/smaMbnZFAFsV Eu5A== X-Gm-Message-State: AC+VfDz2mJgKU8TZuq4PO04vy9+RU3oCSakE7aEJfc5+lNX8bdc5rBmv BXawkp0OsXj/rVzG8cA4MJYS8Q== X-Google-Smtp-Source: ACHHUZ6ixe3R4kTg2jdLqsiTsvsMwIkzn0sw/3lIsOWGtuw4V3ztP1iDpCLGs/weEh3bWDKm3W6iSg== X-Received: by 2002:adf:eac1:0:b0:30e:5729:b5a5 with SMTP id o1-20020adfeac1000000b0030e5729b5a5mr1086540wrn.38.1686119508799; Tue, 06 Jun 2023 23:31:48 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:48 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org Subject: [RESEND PATCH v2 3/6] ARM: dts: stm32: support display on stm32f746-disco board Date: Wed, 7 Jun 2023 08:31:36 +0200 Message-Id: <20230607063139.621351-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233152_059332_118F97BD X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. 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 --- (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 Wed Jun 7 06:31:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270055 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 D6664C77B7A for ; Wed, 7 Jun 2023 06:32:35 +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=Wy8kss8Blu9Ko0zDLetG4eOXjGcvZYI1Vs0oYraZ+qU=; b=j7Rj6vgOdNFVBH PWQT9Ek0xTzeBKyaldftbQoVgNsFjBHqbSVz2139k7ITkB3AxvnQUEbf7dXFKm3qBAYvmQMd3E5bJ Wnm/znBbflLuD/ca4Kfy6PkHrjdCgwzFcH8G1pgUp6crdyGOtTqJqUay9XP7bVhfrZStLIw//lE7B pk65kuAfFWZ8tx8w49ZkDcIo3p83aYthSN2lKDmFN2D2GU1lP/sJvt50NPi5kShnYy17aERlD50MZ Ta+Cm0ZpVND/wStoOloVmMGGkH21bE+c5GT/igjV8QYca3sll97K1ORqAHtpVKpc3qh7mVKpkLCSL wXMZ9ggeZ1cGFwJWh4Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6miC-004Z4Q-02; Wed, 07 Jun 2023 06:32:04 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi2-004Ywt-2X for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:56 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f6d7abe934so58418255e9.2 for ; Tue, 06 Jun 2023 23:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119511; x=1688711511; 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=+N6ncdPhuJx70XZ6yjaTOtXW/wJdhXZgpqu86CyLnmg=; b=iSFhC91P61leOakC3ZYDB1vfHeGButTdGDM1hW2MzuCfi7TC+dUY0TPp87E5Gwzxxo h1o6UEBegakpxBiWmhOhHQNcKItVaIWq4KsvQsneKZ0iK3g19qU++mCSiiVscT1xka+X S7IGHfHgN7WvF22pGm+WjoUgdt42UbaeJaUH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119511; x=1688711511; 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=+N6ncdPhuJx70XZ6yjaTOtXW/wJdhXZgpqu86CyLnmg=; b=VsoVeqFrQCFfR0Fl0Iob3J3uriAipYJ1JtSwyOaxkcsSzYYW2Ps6IcXdfPR+eESM1e nPWAUEe3yHLAlKCKyHZEW5TjqxeOSLzgjOzBe8T6HU5jmyLsln2vEbWWivxqG2EzONd9 uuU1QMlQ/kfCHYF109QcZnnPz7K69TCoWGEOQF+UiXeIXru/UHv99EWvebofJUgEYGrc JdVlQSxja4bm5kOdc2BeSjdTr3p/z3YC0gL/Hy7GhXSK5kM1/9edjLl46P62EJfGoYFd wQ9zfusff2uYRXwn/sChMxK9szV/C4QqMyaF2ss/dyd4mo/b2FYTJsbCKhfYRlGDMGuP meAw== X-Gm-Message-State: AC+VfDz9yO/tTdhwWTbX5ezBcY3cm2bY1YCBAvFE9tE5HgwmJtJx6FSl 70FMfm3IOmQ0iYheUjz4CkV7vA== X-Google-Smtp-Source: ACHHUZ5a8gfVu2axekyl+99oSLUzWfSPuWuaqcQZYuCkNPZ73b9TII++3uuK7xQc96qqlkKElumaFA== X-Received: by 2002:adf:e80f:0:b0:30e:59e9:5e1f with SMTP id o15-20020adfe80f000000b0030e59e95e1fmr732503wrm.65.1686119511073; Tue, 06 Jun 2023 23:31:51 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:50 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Conor Dooley , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Neil Armstrong , Rob Herring , Sam Ravnborg , Thierry Reding , devicetree@vger.kernel.org Subject: [RESEND PATCH v2 4/6] dt-bindings: display: simple: add Rocktech RK043FN48H Date: Wed, 7 Jun 2023 08:31:37 +0200 Message-Id: <20230607063139.621351-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233154_822150_AD869C30 X-CRM114-Status: GOOD ( 10.36 ) 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 compatible to panel-simple for Rocktech Displays Limited RK043FN48H 4.3" 480x272 LCD-TFT panel. Signed-off-by: Dario Binacchi Acked-by: Conor Dooley Reviewed-by: Jagan Teki Reviewed-by: Raphael Gallais-Pou --- Changes in v2: - Add 'Acked-by' tag of Conor Dooley. .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml index 01560fe226dd..bd6a92d2b41c 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml @@ -280,6 +280,8 @@ properties: - rocktech,rk101ii01d-ct # Rocktech Display Ltd. RK070ER9427 800(RGB)x480 TFT LCD panel - rocktech,rk070er9427 + # Rocktech Display Ltd. RK043FN48H 4.3" 480x272 LCD-TFT panel + - rocktech,rk043fn48h # Samsung 13.3" FHD (1920x1080 pixels) eDP AMOLED panel - samsung,atna33xc20 # Samsung 12.2" (2560x1600 pixels) TFT LCD panel From patchwork Wed Jun 7 06:31:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270053 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 074DAC7EE43 for ; Wed, 7 Jun 2023 06:32:27 +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=r1pV+0gbbYJ+YIpSQhkOvts17JZMVOjRfIAyUN/GG9M=; b=uYK0YJOFjU3Vvv bcPCbn+baBjQJpoMdV3HXbfn4kEkTIE5XHumfacaXov/NTtxEY4CaZGOTeazdzoncxYjIvYttMvZQ wgxIu1QNUlwoKEQNBoHgqQC67bI6JdIlZwHYBd3Trnje3vHruP1N8NqKaBQuOoT+XiNP68oagSyuA 5PJUb9oIBS4IatiTW2feTIc3r1/eJo6hZaUz3p9we9VcS/jilx+2IYNgKdSuFSl4MaGcNUuPv58Pj bQdp/LgSZMSogMFNn3Hj3zrRLmwRBm9WRaZ2w8A4K99ZIDGSElqP1KvTOyXW7cPZS7KQ1niRRBBv0 1pADTUzKpmnIhFOaxJZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6miC-004Z4y-1y; Wed, 07 Jun 2023 06:32:04 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi4-004Yxh-2A for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:58 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30adc51b65cso6279325f8f.0 for ; Tue, 06 Jun 2023 23:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119513; x=1688711513; 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=QVzHDRPJNZ9IK1tuBeqT97BbWRZLa0+X8FPJl3jJUF8=; b=UYvhY2b4HirdovbXfPtrGbUTJmn6mv0vjtYgUpqMd26yDC895U6FxmXqgAGGLQenPB FYBFTQymCHZR9yDzHZpZtmUct4e7yOQVQxu9U1J+GoTgNqgB2sTkk86EzY+LrPiny4+E xtH62ZWLxxlheBL841A43Q3wpYHfq0ZPA7qsY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119513; x=1688711513; 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=QVzHDRPJNZ9IK1tuBeqT97BbWRZLa0+X8FPJl3jJUF8=; b=bp0xISoKVwpRjYjbL+BnzCU8qr8QWp51pldWhoU/dgCf7u4eqFKjweqBx093/wHwuM tllZEpppo9WLQ4qgCvCqkaRJietSYK6zCVuyw90KGB12VENrg1mHb4w71CK3BbittlS2 PSKbXJeGihhkTbTlckDUyHof4rq350FUdljfP3HdXMJ/Lwa0vMMaBFgEbMb71kzzwcO1 QjxRNjblI1b3GqtVSYAy2CC5qphsmAVa1YDS1YAfmoCzAgv9IqULi+4aoLBXw/vnhLq8 oMjXthWtGkQF75rOJyvZvv+lGWALk5LjbsL2O46Ezb1Txxq2buBDuZpCLi7LEzCeZ9ny Cenw== X-Gm-Message-State: AC+VfDxp/gl3b2c6GmtDvjgNU2xq7Zboz5ElF7d3HHyJ+pp4RcVz2Nrx o6hEcfIwYtyopY6YoN6sYKqJXg== X-Google-Smtp-Source: ACHHUZ7femRg72fKhwkXtOViccaCRPhvLbf87oH15MUY/N6uqJKzd9GvRbot+SgLThtMLLZ1M23wWg== X-Received: by 2002:adf:eb88:0:b0:309:38f4:fb52 with SMTP id t8-20020adfeb88000000b0030938f4fb52mr5870830wrn.9.1686119512971; Tue, 06 Jun 2023 23:31:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:52 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , kernel test robot , Daniel Vetter , David Airlie , Neil Armstrong , Sam Ravnborg Subject: [RESEND PATCH v2 5/6] drm/panel: simple: add support for Rocktech RK043FN48H panel Date: Wed, 7 Jun 2023 08:31:38 +0200 Message-Id: <20230607063139.621351-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233156_718478_3BF68DCC X-CRM114-Status: GOOD ( 12.12 ) 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 for Rocktech RK043FN48H 4.3" (480x272) LCD-TFT panel. Signed-off-by: Dario Binacchi Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306020343.jNTWeM0P-lkp@intel.com/ Reviewed-by: Jagan Teki --- Changes in v2: - Fix build warning reported by kernel test robot. - Add 'Reported-by' tag of kernel test robot. drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 065f378bba9d..3b10e78d07d9 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -3188,6 +3188,32 @@ static const struct panel_desc qishenglong_gopher2b_lcd = { .connector_type = DRM_MODE_CONNECTOR_DPI, }; +static const struct display_timing rocktech_rk043fn48h_timing = { + .pixelclock = { 6000000, 9000000, 12000000 }, + .hactive = { 480, 480, 480 }, + .hback_porch = { 8, 43, 43 }, + .hfront_porch = { 2, 8, 8 }, + .hsync_len = { 1, 1, 1 }, + .vactive = { 272, 272, 272 }, + .vback_porch = { 2, 12, 12 }, + .vfront_porch = { 1, 4, 4 }, + .vsync_len = { 1, 10, 10 }, + .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW | + DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE, +}; + +static const struct panel_desc rocktech_rk043fn48h = { + .timings = &rocktech_rk043fn48h_timing, + .num_timings = 1, + .bpc = 8, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, + .connector_type = DRM_MODE_CONNECTOR_DPI, +}; + static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, @@ -4218,6 +4244,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "qishenglong,gopher2b-lcd", .data = &qishenglong_gopher2b_lcd, + }, { + .compatible = "rocktech,rk043fn48h", + .data = &rocktech_rk043fn48h, }, { .compatible = "rocktech,rk070er9427", .data = &rocktech_rk070er9427, From patchwork Wed Jun 7 06:31:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13270054 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 847ACC83003 for ; Wed, 7 Jun 2023 06:32:32 +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=AuG4djw7zDTmV810WTuxA2O7dTXWL54t4ZSNlb2gCmI=; b=B7x9PCRtMQn9IO C3I8ue3AUh5zE/51FQiDU31rywzqgygCbWxjkCWUyOT/BZ6ImVRSz8GOxGcHksE4uXTLaH5fQfnHs Nizil5yFA8l+eVXB3I0dxXS2uTW8ZXrekUI6TmMtXwcHDvSUfzS4NEAZB2N6ZVeKCr18gsVJgiakG bsIZESgxXthu5zexM5d4gzJa0mAbk+iDoSAQjLNmhopqBCjwKAcWw7nPk6xFOZzU6Y5hLiXYNSFRT 8qRT/47Q3rUBG0jtQuis5eU6Pgo7KL9wJjeEXML5HB8z+Qszrg1NE+yCxTs8q0kxqhSnFcAPiOPiq Nm1+aGmmjt58Bj+ULwlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6miD-004Z5T-0z; Wed, 07 Jun 2023 06:32:05 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mi6-004Yyf-0y for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:31:59 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30d181952a2so4886583f8f.0 for ; Tue, 06 Jun 2023 23:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686119514; x=1688711514; 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=yAW+zzizoPdH0S/aO5WCXuWp95MvJ4568t/x7rERkZ8=; b=oij5WgWkvYYOUtEp7mGMYwADDCD01LfrAmCNgml9W85dFDuFYvvNhkENHGeXh9Cq9u 3pK6gWcbQ7t2LYbZXgI0BCw/6fRRB5PeqRjLTlBbp+ET9axLadAiZztH4few/0KIz34X QJqbD/+9emeAKB44hrtPdlFjhs5oBzK5xrdwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119514; x=1688711514; 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=yAW+zzizoPdH0S/aO5WCXuWp95MvJ4568t/x7rERkZ8=; b=N4r9QvVHntC294xErDfN/+mcGjFTp+nFUCrPFvuRK+GzKY6M8Ve2GdcG/34VUyevn/ WXomDpThIMRWgaH4ks4NpkwUsiR1C3mBYoZx/c85BfXG1u0OADn82mSi9CMwfnEuH95n 9ks50yl+Kd/AolN2FcNkWeWBIDIkRSmhRJwkjyGoT/o1XgK71lmXLZslvaHg/XSJ8P/C vbdORzDjE2zYAJI6PsWSVX05lep2ZogWpjMLdeRjYIFnu+qAUT7QGFVItbXcL9233JUp PUpesTGTdh1eurveI+7GZSkdp6FjF2q8JNGdrV0ibYpo9/RLm4pO2bd3bXiE2l17MfQA R2iw== X-Gm-Message-State: AC+VfDwekWa7fzfLhrhnX0zEhSh0Q8w90I6E0AsIkRvYW5nTF06+TfuZ YfQR2MKkazsv2LmVgXzOP1uOvDdzCxUIDw/Ss3slFQ== X-Google-Smtp-Source: ACHHUZ43EByLSLWH1Hp4CJmVlLkzIZdJ1bFJA5cBLjDViBWwpcPQQjpHCIvTkQJTIAxM2+k+COUtcA== X-Received: by 2002:a5d:420e:0:b0:306:3b78:fe33 with SMTP id n14-20020a5d420e000000b003063b78fe33mr3151485wrq.32.1686119514598; Tue, 06 Jun 2023 23:31:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:54 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu , Amarula patchwork , Maxime Coquelin , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dario Binacchi , Daniel Vetter , David Airlie , Yannick Fertre Subject: [RESEND PATCH v2 6/6] drm/stm: add an option to change FB bpp Date: Wed, 7 Jun 2023 08:31:39 +0200 Message-Id: <20230607063139.621351-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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-20230606_233158_414382_E2E7C2DB X-CRM114-Status: GOOD ( 12.69 ) 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 --- (no changes since v1) 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;