From patchwork Mon Mar 24 18:00:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3877 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D4DAF3F0D8 for ; Mon, 24 Mar 2025 19:00:55 +0100 (CET) Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3978ef9a284sf1719077f8f.3 for ; Mon, 24 Mar 2025 11:00:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839255; cv=pass; d=google.com; s=arc-20240605; b=IwC8LDRYyqIC8KxiUv3Ahq3EmpMizq87O1Uxic2tLEjwoddqAlIcDe6coAuIo7Q6ks drrNkQCEng3ayKGN5QgAYQSgBD/nhZ5Ccs/JE7z2IjATaWXbRjmLnlnBwoCBf5yv7CVB w5HCpubiSlNnJ7j8POaGpketO0dk0JAjwj8sL/oIIm6vmD3T3dN6V5i/fh2jdH9B5XGK lJJmYoyWyNBfGup/2Y+q2Y1TIDIXC6YOBgzN2zZBG+SVLqEMEOlv39dEqcpIFP/0B/Jt h8ToFceD7RqKFeHON459nylnxARFT8vQLP91BuVwZ1/KstCX5dsPgSvwTt6pf0c+r7a0 NQbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oTThaM0ByQfQUmGhHXozKL5cspWTSJlFQK7MLgzq+Z8=; fh=7Jt+XOJr8zJjey9qJpTx38P40cy9NXyc28LqVoeFUpg=; b=jcaAYPOKOLSBMmLjuEAdGEQyH3MNrbbUvLvmwiNk9+iS2cmt/daN63OqPK0er0LETp r/FAMlyUBazs9kTu+F5XRwXC141RE8IkEXlIcPpSwt02NwZxJbZRjPOA68Y1o1y9eHxK NAll+PhXl5yW2L2sGj+l6XQYQH5tSu+KO3s5kT8aLOSZLkGk0rCh/brsY+HIOWZQ8vqV Vg+RWRt9UR7MEJV/z0VHfwGjIdrj+8Xpoc4Y6xAVORTm2FPCeP3DtqWQlRLSAinR5ArN /x5W9wCgYlEXUYhGyZbDxSN85jHJRbZGwr85B8tRkl4V4PC3+AokVrY1QPIYnUWs5QtT QL1g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WFARQNZE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839255; x=1743444055; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=oTThaM0ByQfQUmGhHXozKL5cspWTSJlFQK7MLgzq+Z8=; b=MYmHd9xHyNVPnT3x1iR+RNuVd5ncYAajkK3UlxmFlgNgKSSNsavhK+peLAyTIjZK0+ 77mCBy3zwOjzfeRz4WvxFDUnY9zc1KOQLxoF7ug2ndwXggR4LDyW79BGoUtgP7KK6x3z RXItvB8HB2Umk3H+zNXGecbYu9g3Ey+Go8owc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839255; x=1743444055; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oTThaM0ByQfQUmGhHXozKL5cspWTSJlFQK7MLgzq+Z8=; b=nA6hiIUFWYNun3ghrTta0vpx/tcaY1dzDuFYP6EVyg7P7zfKILT//q4YkBMNT7VNHC 5FugIo5uKPKUtHwKGLDPN+2GSzacDY+3J3AwWMhFh+sYmVTsDy+OAXGfQJN0dIRLyxAd JdpsAKiS40IihQCzsLLmYWtoE+E2uL/P3t5zSkYrNNVO7RdiN7mFipnwtrwtcSf687Jw 4vZMNYJ/QCY68ZiD0RKDmo73GcZpll1OjbVOKMbziVou7f3osMedcLpInH+DquYTVVR6 qr4J16hZKNGhVH4MgCnCFVXK6+Wt6LvvjPxQBjMmC3R/6Duc7zRk6R1S47XDkjiclgwe w8rw== X-Forwarded-Encrypted: i=2; AJvYcCWibEhG1INiyX/+2zp9tTuma3p41lPg9w41UKwOvWgLo0lgYuP4WTvpeVCG50ATgLeSjx0FdCc1U9colfGY@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxxM5BnrTYJ9ylnlw5VTASt9m17P3JJCH2Y8YX+HduuSeQ26BJU B4/UBv5j/O2rW8zgHEdZHtOQm8C3eE8H29m2xtpY8Wu9OZZSegmF1FIiEzq1bs+Q+g== X-Google-Smtp-Source: AGHT+IH6UcttlEwHu9nNpLy6M8KO6jZwG+flVZfsZhzzYHKXPfwcM+q+n5FBkSOFP0Uobq/0xAB3nw== X-Received: by 2002:a5d:6c67:0:b0:391:253b:4046 with SMTP id ffacd0b85a97d-3997f8fa4aemr15116045f8f.16.1742839254836; Mon, 24 Mar 2025 11:00:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPAL6b/ZQcxyY8Gz3p4jJo+8qVhCHt8nmzSxQGXoQbCwVqA== Received: by 2002:adf:ed10:0:b0:38f:21ce:c3c8 with SMTP id ffacd0b85a97d-3997970b1f1ls2388715f8f.2.-pod-prod-06-eu; Mon, 24 Mar 2025 11:00:53 -0700 (PDT) X-Received: by 2002:a05:6000:2d84:b0:391:40bd:6222 with SMTP id ffacd0b85a97d-3997f8fd7camr7177599f8f.22.1742839252743; Mon, 24 Mar 2025 11:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839252; cv=none; d=google.com; s=arc-20240605; b=BSi+uYri8arW4B0LE+IOvg+R9SztyaamiOhg2l4QaXPeBn3hqXrZNLw4rtDzPgF0Jy 04jdhoSc+Ri7NZlWY6fnRHYdHkg4ngUtiOYZjrUdnkpHo9OVVlDaO1s4GvF+GrA8xTXW XfYyQxvIa19f1j8O4RV5OkCZNuCCO9r4jvI2GpOoz457pbcTufdLKvBIiKbw9YxrGqFf ScZ1D0ErXnKY6tW6TzFEmduK89wfqefQ6DybcITNAPie8yIGolG1VKmhW3V3h/0dlJK1 TTBpY9oCKAaIq1JH8D3OxC76NRLZV7BHb+pSg+YHdpAadM3kx7r0baHd34+hM2MahgKR HN0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Rk2FYKP+658TBtLU/m3Z1R7K/iJrSTDoXsuAJF08vcQ=; fh=oIe0PiPZCvrcmt6IQjgU+Fb1OoVcS0Yo3ov7NWbceYk=; b=Y0amV5xDGbZ0f5KtvgNx/Yco+W9X1vJnAUAnXQB1ExdRNCrab/JMc/ewyq3R4n8koJ r0jMtKcPbmJATlmQcVOoTfbbb74GGvKdfy9b5XTiyFrvSvoP58uyhZcAJXjMQD8XYD4a IwPN3d59+bO4/cpEK1eBafbHpQVceWEpICZ2z9RgcEcF0Rbz+4iDNQXpmqh0mjpydiTQ oWYxfZZ8UZnLNIxJ8YabA9t9M25dVB5NyBvSW4xsq+JDiND4rg7VqRz9TUQCNDbz0d0P WKuEVSw4GBU7OAI93Ei4Nwnh+sYQHpZDvdQU1OU2V6x8C0UVi5TBHxJHTDEnZFV45w3q 6Aag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WFARQNZE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-39abd934058sor874439f8f.8.2025.03.24.11.00.52 for (Google Transport Security); Mon, 24 Mar 2025 11:00:52 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncvSJUenXZwonYDTFH864/scQ1SFejwYfZj8oreKWMnqHRfvwKATMbZg1JtbXCU AmmPRmcY78W0OzP3BVvROn7BQItC1W9z2sxYsQEorLfwxsqlvDu4I5hCK71OEijGZ5kNFPk930/ BB7sAT0BalWa6Z5Vi6H187KnarMMpE+tlmfAxbLOzXCE7zKZXcRCzJ1+SyYHI8X/B+jTe00O0Fa dk1+tQxbdaypL408E9j6JFyXnvN9Jh3EBEHC153VbElIPMQs2U5kN85+I+I3T4VrvHaTnF7If9F i3IUnKsvbEKRLvo6phB7ejkDh+o2fX3McZ//INGgyy2QRh8D/pRblsuogrtRyvqYEcrx1SxJ7ru FL0FVIwUADT/mVHBoUOpl5vW1T6Ml5MNdPItLKoCKNybBVw== X-Received: by 2002:a5d:6d88:0:b0:391:2e6a:30fe with SMTP id ffacd0b85a97d-3997f92d305mr15123811f8f.39.1742839252269; Mon, 24 Mar 2025 11:00:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:51 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Patrice Chotard , Patrick Delaunay , Tom Rini , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH 1/6] ARM: dts: stm32: add DSI support on stm32f769 Date: Mon, 24 Mar 2025 19:00:25 +0100 Message-ID: <20250324180047.1571378-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WFARQNZE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [backport from Linux commit a995fd2e8b3c6defd1dcdd3fb350c224e41ea1d0] Add support for MIPI DSI Host controller. Since MIPI DSI is not available on stm32f746, the patch adds the "stm32f769.dtsi" file containing the dsi node inside. Signed-off-by: Dario Binacchi Reviewed-by: Patrice Chotard --- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 41 +++++++++++------------- arch/arm/dts/stm32f769-disco.dts | 2 +- arch/arm/dts/stm32f769.dtsi | 20 ++++++++++++ 3 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 arch/arm/dts/stm32f769.dtsi diff --git a/arch/arm/dts/stm32f769-disco-u-boot.dtsi b/arch/arm/dts/stm32f769-disco-u-boot.dtsi index add55c96e21f..c5ae753debe6 100644 --- a/arch/arm/dts/stm32f769-disco-u-boot.dtsi +++ b/arch/arm/dts/stm32f769-disco-u-boot.dtsi @@ -44,30 +44,25 @@ }; }; }; +}; - soc { - dsi: dsi@40016c00 { - compatible = "st,stm32-dsi"; - reg = <0x40016c00 0x800>; - resets = <&rcc STM32F7_APB2_RESET(DSI)>; - clocks = <&rcc 0 STM32F7_APB2_CLOCK(DSI)>, - <&rcc 0 STM32F7_APB2_CLOCK(LTDC)>, - <&clk_hse>; - clock-names = "pclk", "px_clk", "ref"; - bootph-all; - status = "okay"; - - ports { - port@0 { - dsi_out: endpoint { - remote-endpoint = <&panel_in>; - }; - }; - port@1 { - dsi_in: endpoint { - remote-endpoint = <&dp_out>; - }; - }; +&dsi { + clocks = <&rcc 0 STM32F7_APB2_CLOCK(DSI)>, + <&rcc 0 STM32F7_APB2_CLOCK(LTDC)>, + <&clk_hse>; + clock-names = "pclk", "px_clk", "ref"; + bootph-all; + status = "okay"; + + ports { + port@0 { + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + port@1 { + dsi_in: endpoint { + remote-endpoint = <&dp_out>; }; }; }; diff --git a/arch/arm/dts/stm32f769-disco.dts b/arch/arm/dts/stm32f769-disco.dts index d63cd2ba7eb4..ad1b442055e1 100644 --- a/arch/arm/dts/stm32f769-disco.dts +++ b/arch/arm/dts/stm32f769-disco.dts @@ -5,7 +5,7 @@ */ /dts-v1/; -#include "stm32f746.dtsi" +#include "stm32f769.dtsi" #include "stm32f769-pinctrl.dtsi" #include #include diff --git a/arch/arm/dts/stm32f769.dtsi b/arch/arm/dts/stm32f769.dtsi new file mode 100644 index 000000000000..4e7d9032149c --- /dev/null +++ b/arch/arm/dts/stm32f769.dtsi @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Dario Binacchi + */ + +#include "stm32f746.dtsi" + +/ { + soc { + dsi: dsi@40016c00 { + compatible = "st,stm32-dsi"; + reg = <0x40016c00 0x800>; + clocks = <&rcc 1 CLK_F769_DSI>, <&clk_hse>; + clock-names = "pclk", "ref"; + resets = <&rcc STM32F7_APB2_RESET(DSI)>; + reset-names = "apb"; + status = "disabled"; + }; + }; +}; From patchwork Mon Mar 24 18:00:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3878 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 674AB3F12A for ; Mon, 24 Mar 2025 19:00:56 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43cec217977sf28143965e9.0 for ; Mon, 24 Mar 2025 11:00:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839256; cv=pass; d=google.com; s=arc-20240605; b=KOY/omlBK1RkMPAGnUV2t3nQhDh+hUZqGJRe1ior9cEaQR5dmqkaR1Ux6ub/2+u4fL Qw3Kbp1ANSotZN15tV7tnAYNGtUiosr/oDU2ryGQvddpk2cSIabqALZ6ymufRUz16rxv l/znbrKHjAeN9fn7p0KfOCl66hr1E/Hbrux6VylLpslOVmW6pgHnClDZ92ZXcV6Mu8xh F5Pn3pVPeTRGeHdMNht6vJFcuoXAKl4cjBZnPorVTlAnbFwdsKH1KKjsII+MWyEOl7VO tybqMxJN8GMgCtTrGOtDg58RUD4hcgHpesqOaX6HM14L7+CWX7N8z9Mf5W1xiz1uZdsH zG/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EXb+TTmOpQDTXv2YwqqRYln2YmKvXlYooATovGKKL6U=; fh=hYNWGmij0n31zInzc7RLs7rw0ErKj64qI+RQs+mjWk4=; b=Vpdd2D/ps3FgPDUc+0T1BcRMFale7rQvcvZMCqXZyJ4gSAJWqfdqZGono7jbJYRuN7 iSfSf9jgfP1R3SICZ1H0SLOFIfxjp3QxZwYlnhHk73LeNMK0WqteksEs0cfV1ZGCfH40 bAnX53GH4HyPKYKvV93Le78vUKAQwA+P+fEgQljkgEbb3he4LaGt6beJqQGKzEQkNA+L DjuvzawnYaIxm+q+gz9KkgzPnvCl47C6IB84QyijApXXRpDSVA+rUaefd7tZwcZtcivv Abq09qG2tqRwOg6SnO5NvMYKdHIzeu6KVRfKrz5QoEaj9LAcioi2Pm+s1Tm+j4ckygzo i7BA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fNSXi6Jg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839256; x=1743444056; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=EXb+TTmOpQDTXv2YwqqRYln2YmKvXlYooATovGKKL6U=; b=KkG8SqXR6ODvkAFwJRCv/xq0a83Us+ymRja7bDWoUTQiXjfGkhVjMEbpQA/dFMl8bP sVUdoPSKtE9I5xLMshfV2K9vKmAXoTTldrxS3a5oT7uiaspbMGT/7wxPB8z/GJURMOOb zNrO31QLkACsC1RfQw3ialljPyzsbRUWtXyYQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839256; x=1743444056; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EXb+TTmOpQDTXv2YwqqRYln2YmKvXlYooATovGKKL6U=; b=hGGc3MBdKgdmplkcsSqlmzjUktjS5ppPsH8xngSPKWVFeOaq0wQN7zhl1EHmtcZ/Xo 4M4D0lUMd6Sn2hqrgpVUctVRLhrSVXTZjWswoFfp5rpYDAPfj1UWsY007W7rDLS6M7I8 q6TjRN6JLp1ZCHTzkvlD8ox34E1P/lM8+QnHUNpuwqd8Dk9bEFpdeE+NEe8GQ8q8jJ5r qhTprZIPkpJ413jLqnw07MAFX4G0ovPBGMuJtoBeKUBo7TLJECPwcNC7huu2084hZSaY gDVQ6yjn78i+DTx8jihPLu8rK9NFq/sXwTvmBVUK7G4rN8gt5IveiAE3EqIiU4/5qrOo +vfg== X-Forwarded-Encrypted: i=2; AJvYcCUuqQg4xLa8CHerzb9m9o1RhuXVUHRJbXx1PsoNMOLQfjd1wi5HmbreO+2VZ2d6NHmfoZkH+vnVXZnYfBOF@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy4ZQU4aMKhD3tX7AWO8q2cXBjQWvHwxJllnhCdXLgCJxSCU8CZ fKtILrDa7BbjFDCzptd/PIqr4jj+9USdVPz2Ei6/w7KfdLR6KEt1Jxd+GRomBAVYKg== X-Google-Smtp-Source: AGHT+IHYHGDzhORdOwab5hwmp/CK0okScT0GowZJMHK7QBTpHrwZqSVTgrdeSNlXekv9gPHnC4Srjw== X-Received: by 2002:a05:600c:c8a:b0:43d:46de:b0eb with SMTP id 5b1f17b1804b1-43d509ec4ebmr130451955e9.12.1742839255927; Mon, 24 Mar 2025 11:00:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPALt+P4HqqWUf1T+Xb7kWTH00VAOFZwxCLSMxgJFCEQwzg== Received: by 2002:a5d:5542:0:b0:390:df6c:5947 with SMTP id ffacd0b85a97d-399796f4ebcls627830f8f.1.-pod-prod-04-eu; Mon, 24 Mar 2025 11:00:54 -0700 (PDT) X-Received: by 2002:a5d:64a5:0:b0:391:31f2:b99e with SMTP id ffacd0b85a97d-3997f900bd7mr12499048f8f.2.1742839253886; Mon, 24 Mar 2025 11:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839253; cv=none; d=google.com; s=arc-20240605; b=k6ZQvEqi+G2BjUypI1qHI+D8JaW7xfl2uR1B1zr3Ez0WdPjp5/8FfuPOgD/lxCBb4Z QkIWS9JuFbA4vRJV9yBhPAhDeXRPCR/5Iy7d7AjGP/qi4vL7kFYr9IejPp9C+KRb94ha vKm952yoZSWbvNSB204VbhWrtRueWWL21KKDy0wf4V24QD7/iAwIz7/qW6C9Hlt+UoPY RC2uPVxEtyggYUfcOL1PkbTzIlbAWCN606/VUzl4gpqwXmaRsVJ0SO1D+2Yb/zG5rYR/ O4sB8o/Foky9SEc+ciogQZenjQeoXfd7uGEqJuLRL+G823042WtcpuuNuJdBSgqrafrg F5wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UI4vo8J00xZLzvVavnwZoS3tsdfhwA4zMsaYhvBtlK0=; fh=oIe0PiPZCvrcmt6IQjgU+Fb1OoVcS0Yo3ov7NWbceYk=; b=KZQvAsZ7MKH/4lRgYy8x9G8dGlnQ83HaOpE8kRpYTZbMmoSqgm7fBHgStYvI3j44q9 3/t/j13x0ozOD/vzurrIwtW6DF1T9R3zbL9GQDKv4mLdE+WbeNZftB4LdiRSpQgiol65 EDrbs4vWz2nHC0TxDMDOzIZv23EXQoqg4t12bZ7nemeEE00rG/cvCP6d9sy7nkkv0lfm RElRTyni9kaklAE9XMb29KEaqTqcRwHxfIrjVo2x0FmDILZFYLbS1iUGCuKc+UqgQjxm l2jwmf+yvDk90WJjy6/ouibUuhklyA9v7l3NBZgHGJPqVUaqWTuU/OYfOvl0ZRzFtv/G 88MA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fNSXi6Jg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43d4fc11852sor29053455e9.0.2025.03.24.11.00.53 for (Google Transport Security); Mon, 24 Mar 2025 11:00:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGnct05cbcW1IV2FZQB7HFwCZ1kS1dKb/XyU+RPjkbZLE4D3M1tIaDVN0I+jHaDGL SK+QuevbavicPrFxOe1FSlVJeRJ3CdNOGI77u7yZJj2SEP0s/4z4zQ1nORo9SIe8IeGyhrHhNuH PFFWdc9u8wlNKyiN6itDGxNE9SqsN8TMbClPAt+lJehHda55UKwsB0eE3xfOCmy/qPHF77k0N40 9rgNrp8ATOeIgr0qRKIMEBSIC5FMWJy5EaJCSpOoEUadOu1CD4zyKy/rNJ+zhaOBQIqdrLfIP20 dUexyO1nspBQInFuIvBF5gbF+Gs/Sy3FZVyw4/dK8PGIt2cqy4XwSU6pzUD0bwrmol6adqReLpI JtGWVNBa10zTu3PtdzkFsWA69UX8/xRGOJdo= X-Received: by 2002:a05:600c:3110:b0:43a:b8eb:9e5f with SMTP id 5b1f17b1804b1-43d509e38e3mr125490415e9.3.1742839253415; Mon, 24 Mar 2025 11:00:53 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:53 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Patrice Chotard , Patrick Delaunay , Tom Rini , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH 2/6] ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco Date: Mon, 24 Mar 2025 19:00:26 +0100 Message-ID: <20250324180047.1571378-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fNSXi6Jg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [backport from Linux commit f1317928fa03203929665af61e6d9ac0e29ea84d] In the schematics of document UM2033, the power supply for the micro SD card is the same 3v3 voltage that is used to power other devices on the board. By generalizing the name of the voltage regulator, it can be referenced by other nodes in the device tree without creating misunderstandings. This patch is preparatory for future developments. Signed-off-by: Dario Binacchi Reviewed-by: Patrice Chotard --- arch/arm/dts/stm32f769-disco.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/stm32f769-disco.dts b/arch/arm/dts/stm32f769-disco.dts index ad1b442055e1..b4e240a8e3eb 100644 --- a/arch/arm/dts/stm32f769-disco.dts +++ b/arch/arm/dts/stm32f769-disco.dts @@ -56,9 +56,9 @@ clock-names = "main_clk"; }; - mmc_vcard: mmc_vcard { + vcc_3v3: vcc-3v3 { compatible = "regulator-fixed"; - regulator-name = "mmc_vcard"; + regulator-name = "vcc_3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; @@ -96,7 +96,7 @@ &sdio2 { status = "okay"; - vmmc-supply = <&mmc_vcard>; + vmmc-supply = <&vcc_3v3>; cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>; broken-cd; pinctrl-names = "default", "opendrain"; From patchwork Mon Mar 24 18:00:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3879 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 12ADE3F0CD for ; Mon, 24 Mar 2025 19:00:58 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-43cf327e9a2sf37052855e9.3 for ; Mon, 24 Mar 2025 11:00:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839257; cv=pass; d=google.com; s=arc-20240605; b=FrAV9uF9G+aDI8leFaQqqviZUNTUpfolt4nAqvUHCWh4gb6w4hKQV48HB+rpG5TuG/ L0IXK4v6WmVLk5gNb0VytkSq621O3eCWb4T5nVA+0hMjmGqeNqcpHOwKG+fyz1LlbKw0 b35mIv8oQ5S6ZC6SoCgW8oOVC1Y3pjV0AwqY4VJpRujM7WtT//qiFPIFF/a/R7KIkFby 1sLJfhZY2uefI9ITaEGzenNx0CLoPVKG2JyMnyhnmOdJhoNC3y0DGzNULord5DpbgltF dOYuZRhw7xaiIEAupYJdObB6X5dlrEc8f3f45McRLvu82721ClWlMiMlk8u9r76WCUXp RXYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hpkfUCPs3TKZrndBzXqTyR3V8IC10/fM/6SG9G3ixRQ=; fh=Y51yZ5GviWHcb4bQ54TuyLyQ0sFuP5LkQTilUPqKGAI=; b=H5xQdZ0zqQ7C4DMnfBt+dpjl0LP8A+5Fr609+v/Gzsgvwu0KhCJBqFCJIeRxUWAdCK TCxfQnjSHfRU1hou5au7HgzBUy4O1RrUtmmnUVp5+PBJh7rV1z9birEIhGaVieKRs23B hGwmBgiWRVJp39MsrB5edY/ybIf3g8GSO0TfnnB2MtN/1p7Ka4ZLe+xkfp8+U+a0ypaD 5chYOw0y2E7eyK24ksS710dqItuew2h5WM05PMGvWTSloMiKiknb61nZM1s6oJTUrMFc L80wU+xn8HUy5lT2izvUDqqHmBF9cha1nrzp6dbc+nU266BJiOM3xIhYST6HWOrUNPN+ 8BGQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L7jwOKQB; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839257; x=1743444057; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hpkfUCPs3TKZrndBzXqTyR3V8IC10/fM/6SG9G3ixRQ=; b=rYniO1YxPdZtZGyNA8GL9VVc4RkdsRMMX3+ro24rMuMW0OqzMFF8SNXJPd4LoBVIWJ 4YO6tcyM8e4m26xXwiGo3+2SP053F/oV0m6oBuUeb/pqO/wsdWPLgLJlOehiqiqO59/4 V82PWjGIJCFZxQZtl3hdXAEAE0GJU865fpIeY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839257; x=1743444057; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hpkfUCPs3TKZrndBzXqTyR3V8IC10/fM/6SG9G3ixRQ=; b=vuMmP0mkI8uYao5uEdqGhLJZZhILjExPLrIN9HeQeJkYBSIQJMn/CFGQFOcQSbs5Yo juI/wg8I/g0UCdT7luacz1smrZbp5qLHn2kyoFWhNicjtmu2gzyRiBsTzliX5hn//q22 XkihwRgH+5SuhdVCtNHnd1RZa0vbHFSK2qPNvyidN5B9KDWlFxQKv+qKzWozJLrM3Kv2 DS7uVWWk1ptbt2Qm9lV1BnqJyPt9MHfRtDLNn7erXz9+w1ASSErTGgpJfHuAe5FKplaE zCAT/6aS7iPqVmPjq90whk4cX8c57YOXRu9hY8rdcOYUcL33icZr0z6mQQPcgrOdoMXa XIkw== X-Forwarded-Encrypted: i=2; AJvYcCXeV4JRZsFjpiMzJFdCFBbfs3fFY/dHAnBlHk1Dh9bBU8C3E59QjXfgnClO0GPgKFx5XiS07b/bwFKqi8Wr@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzO2RmhLxDk/hwIg0MUS03tZQEbbHPSlz6GhgAUDDxhHn3vNLqo Axv5Q1wjS0xwOH6BkoEFHXBWsTmfoluUA+Uph3Ef92YgYby13mOKiIPQDGE5f9UhJIPWzecbfA= = X-Google-Smtp-Source: AGHT+IHtykpS451+ljW4vDEDCYvT47AocYuK5VMYWvxm+YdbiI947GxTcYkIvyiItEvNpJz2L0ksgA== X-Received: by 2002:a05:600c:3110:b0:439:9e13:2dd7 with SMTP id 5b1f17b1804b1-43d509e42bemr109282855e9.2.1742839257400; Mon, 24 Mar 2025 11:00:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPAIFGk7JUnjVCeIPs8wzCo7YGGN6FcSNJiKqBsmgM6otOw== Received: by 2002:a05:600c:4790:b0:43c:ef03:56fa with SMTP id 5b1f17b1804b1-43d491bfe44ls8202065e9.2.-pod-prod-02-eu; Mon, 24 Mar 2025 11:00:55 -0700 (PDT) X-Received: by 2002:a05:600c:1548:b0:43c:f78d:82eb with SMTP id 5b1f17b1804b1-43d509f5985mr154064715e9.15.1742839255136; Mon, 24 Mar 2025 11:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839255; cv=none; d=google.com; s=arc-20240605; b=HHcDUtyPTFbsp9r22ZcF7WsQXcrrBg8wVSynMVkI39GV5+o95AwNGvlUJTOQXNlI+Q SYMPFhg5WLbwAjclDcMMoW1g1MRVRAqR7T2ek4himfcu+UG36Enjl/C6VRU/BcsubiOz wTqFkwEVBamaeY/QRW4WvJUc86bJaw1DDvfGuEXtxyeZ9F97v+LfB3h0o9fdOE2jzWZA kI/6RcQyyjBRpmq7MqUrarz8rU3D1hmgX4ttyHef/GbFzQANPjWyq9ojWOhQyKblxQUG x9IX8fHoS9PXI7vmnjbDZULwaJdblG6sOxk13oarNloSKx1oRJBMHiQALcTZEp5CGAkg Bggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iFaFn/OC4j0QG0f+ruGPqbpwF76TJl6MZZ0HQgXuxOk=; fh=oIe0PiPZCvrcmt6IQjgU+Fb1OoVcS0Yo3ov7NWbceYk=; b=h6bNNYbSR067Al0aGGSOAFgtNOg7UoGDm0LcT55dsb36NJ1Kni2Z8VKxBNo9xmjMZl pJOJhOFBStJk1QCx/Eaz/CeD4qaFG0NTFryXBU6G67EUebOHb+/kepAdrQY0aAeiSTwV JsZTM1gIbnG/thO2q22ptIgKr3N0Rx1jSkCs+0GikXXwi9tatxJlNZ0nhWyDUT9TrQu9 hUg6CY/jUhZwBE+W2ffFbk4aiYUCbfAjpSGyzIHrFvlP8wzzPWOyeOYRSuGMnAFycN84 M9vtxXlWFvybBFDuMzfqJFzU/jCGc33x8KdO5TbyqA0OsqHQQZYFsMjN/L7TfhJBVPDV Mr/g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L7jwOKQB; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43d4fd4e5f1sor30620425e9.6.2025.03.24.11.00.55 for (Google Transport Security); Mon, 24 Mar 2025 11:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncsIrBeuZqslvEzEUQ1KF98859xxnDsMZ9yt6YT24xnftWiEF45Yl8ob7I/AlG9 2FOCgVJbtNxUmnLzjrCE+WGBJ31NG1ax5zpy3asQNuEav5qw9Mjk6eTqZCE0YescxjkjT9TdaZM rbkmYy/80M/Fo1INb+vFPgOAx6g0nbl7MF/ZKdzsqDO0gwz+w4AH2Y7LzGZSXyNZuCrcOYT+2aG X40soBDh6UvbN0ElxnuAMBu87D1TJfnmbMzCV5KbJ75CTkyEGFyg1B88lSa5sZ8w9g3o8Z5t5oA rUQcquyOfJs6siauV8wWGkUQnZuwyLRLk96VCVju/L+RR+TLSWyKVqBSOZU7cOco7TpUs/sT8U5 HFU7eI8JnEhQPMfKCo7TwN/oZFvIfhXEFUtY= X-Received: by 2002:a05:600c:cce:b0:43c:eec7:eab7 with SMTP id 5b1f17b1804b1-43d509ed65amr140521595e9.11.1742839254591; Mon, 24 Mar 2025 11:00:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:54 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Patrice Chotard , Patrick Delaunay , Tom Rini , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH 3/6] ARM: dts: stm32: add display support on stm32f769-disco Date: Mon, 24 Mar 2025 19:00:27 +0100 Message-ID: <20250324180047.1571378-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L7jwOKQB; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [backport from Linux commit 598e5adfeb6062f5d4d352c0ef888b2b29d7e215] The patch adds display support on the stm32f769-disco board. Signed-off-by: Dario Binacchi Reviewed-by: Patrice Chotard --- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 34 -------------- arch/arm/dts/stm32f769-disco.dts | 58 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/arch/arm/dts/stm32f769-disco-u-boot.dtsi b/arch/arm/dts/stm32f769-disco-u-boot.dtsi index c5ae753debe6..16a9eecd4a99 100644 --- a/arch/arm/dts/stm32f769-disco-u-boot.dtsi +++ b/arch/arm/dts/stm32f769-disco-u-boot.dtsi @@ -32,18 +32,6 @@ compatible = "st,led1"; led-gpio = <&gpioj 5 0>; }; - - panel: panel { - compatible = "orisetech,otm8009a"; - reset-gpios = <&gpioj 15 1>; - status = "okay"; - - port { - panel_in: endpoint { - remote-endpoint = <&dsi_out>; - }; - }; - }; }; &dsi { @@ -52,33 +40,11 @@ <&clk_hse>; clock-names = "pclk", "px_clk", "ref"; bootph-all; - status = "okay"; - - ports { - port@0 { - dsi_out: endpoint { - remote-endpoint = <&panel_in>; - }; - }; - port@1 { - dsi_in: endpoint { - remote-endpoint = <&dp_out>; - }; - }; - }; }; <dc { clocks = <&rcc 0 STM32F7_APB2_CLOCK(LTDC)>; bootph-all; - - ports { - port@0 { - dp_out: endpoint { - remote-endpoint = <&dsi_in>; - }; - }; - }; }; &fmc { diff --git a/arch/arm/dts/stm32f769-disco.dts b/arch/arm/dts/stm32f769-disco.dts index b4e240a8e3eb..3fd5140ec5eb 100644 --- a/arch/arm/dts/stm32f769-disco.dts +++ b/arch/arm/dts/stm32f769-disco.dts @@ -24,6 +24,19 @@ reg = <0xC0000000 0x1000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + linux,dma { + compatible = "shared-dma-pool"; + linux,dma-default; + no-map; + size = <0x100000>; + }; + }; + aliases { serial0 = &usart1; }; @@ -78,6 +91,45 @@ clock-frequency = <25000000>; }; +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_out_dsi>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&dsi_panel_in>; + }; + }; + }; + + panel0: panel@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; /* dsi virtual channel (0..3) */ + reset-gpios = <&gpioj 15 GPIO_ACTIVE_LOW>; + power-supply = <&vcc_3v3>; + status = "okay"; + + port { + dsi_panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; +}; + &i2c1 { pinctrl-0 = <&i2c1_pins_b>; pinctrl-names = "default"; @@ -88,6 +140,12 @@ <dc { status = "okay"; + + port { + ltdc_out_dsi: endpoint { + remote-endpoint = <&dsi_in>; + }; + }; }; &rtc { From patchwork Mon Mar 24 18:00:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3880 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 306443F0D8 for ; Mon, 24 Mar 2025 19:00:59 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-39149cbc77dsf2889716f8f.3 for ; Mon, 24 Mar 2025 11:00:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839259; cv=pass; d=google.com; s=arc-20240605; b=KMKSQfKPOrSxBNYCfWq3qos2Bkfq1c3BneVDIqJA1+3Pd54siATpG9Rlsd06m60JG/ KuX/4Ogwc1M1MJncDng0rpqfFjP6X04Y7ZF9heAEYqSGsSQdjB5+gNoKjBYAcyAH203g 2anyMqCibTHaS3lMKMeU364TJI2CpQnm2LC6OeJn99nRupvlQoN+VdK+yay1TRkOIVRh STkOk/wv4HoKf7Sg7cWjD/057JXRiPbAVnEQF5UnvD9JR9Ifqi9fFzXiaj8MasD/RZaE ACezL7UL+dvUyoAPD5L+lCQLzpvFwtoAN8rQ0QxW8vlfjPh2mftALsVHKQMsObt48sgc d1xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WMDDQ+S358GjVYh6eRMw/94LmLUssHU33Xe8iPVJfvA=; fh=6mGGxCaFiWRyA9AJkvuftobSGQMcE/k6iagS8BSbJq4=; b=b9iOfRGsOWphaF11y1oNTvwSb8FHZcpjL84fwQek8J3kbOy6F3x5WDoWZKeMpg55yF 5RVWlOqV9BTFsq4yYA/asgFAf5hbcBh+ry5b05B8kquwjpmWqp4e/hCwJUr/zTlPM83n INLsbLMo/b++rL5iwA4jKiVjgYudPtUsNl8FUbp+CpLAyl1KRgFH4xmtqwHOCK+ldkkj 1yPkND6d5plznUlixAFHp4tDxU2XNdLBW2alphJHqlezzdainBMNTcmgM0xY9bl8xd2j 0MgnclYxtmgEMZ/Ve69+SbEg2A62sKVQPfTOEpBEWYx+aA6So3/0fbt2XzRHCe5dv9bA CgZw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e3h+NimV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839259; x=1743444059; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=WMDDQ+S358GjVYh6eRMw/94LmLUssHU33Xe8iPVJfvA=; b=DozezFxrWXU7zngeo8fyqaqo7AuYwqAogmgZKopPA5XHNpcUN45bC2Y50XP61QPZD1 ZleBzBCeIVZPwEM83KV3iOomDUGdUUeee1MBJ5NGwA1JOmMCTvF0GjNvDHHS7q37imAh 7X3g2w4EXmepoL9B2JTb4XBxVQCXVDUsjIGxY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839259; x=1743444059; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WMDDQ+S358GjVYh6eRMw/94LmLUssHU33Xe8iPVJfvA=; b=IjbubrT4q8Izx+hSsrMlB9glwTBq0CDGdRPRuQWsR4d5eaneNLsRN7LbmY0yiHgym6 h7EyZNI2SZnuT1lzwE767R4LOvNIL9ga36dB6ZxvSxvvr436nNget2zoB5+oXepYFFoL qkhSeOKGAKOu3KEFlDaWWannui/0f9Ube85NmjFs/6Kvtm17R5e9D3Zeh6pXq9NFKd9k /fbatcNuoq5Pykh5s/TS6GmbrKcNkodSqFTY+kcRqMvMAxep1ghi0WRsxGwFp6HfVhiG HeP62NBHydhB1ICsGtXuYQP8XLDae3sQVqFQLr722cg/mmBMVn+1j9IyWBBlDMDnkGv0 Atbg== X-Forwarded-Encrypted: i=2; AJvYcCVO6SJM+voCCMlBoUAzMmhFgyFIBO8whG0yCURFbVABYW6EpHhl+9/R05T1Bwp1e4OY55/Lb4py5rumiaIO@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxYiiHx5MYP43wiv+vuFQCJq8pnF4j3HkZQT44UFlls3XtTQJoF 7nJ3J16Yyg933Pywv7a7Y6TmsN3gxi6krEAGJaHaJllrgvhFREms2PlK+bnXU2WT+Q== X-Google-Smtp-Source: AGHT+IHkYqgsorf60sk+9v4rPjhk7YzSgDFJ+a4loM3p06MWBJF49LAz4ftW+qf7lHoVIVAJamoc9A== X-Received: by 2002:a05:6000:186f:b0:391:158f:3d59 with SMTP id ffacd0b85a97d-3997f90120dmr12378578f8f.15.1742839258634; Mon, 24 Mar 2025 11:00:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPAIFArRTCtGOu8jiHKvoZIYlCpkhZfRt/74fV3UTaINHfw== Received: by 2002:a05:600c:4818:b0:43c:fb0f:d9ae with SMTP id 5b1f17b1804b1-43d491c3134ls8884975e9.0.-pod-prod-05-eu; Mon, 24 Mar 2025 11:00:57 -0700 (PDT) X-Received: by 2002:a05:600c:1989:b0:43d:1f1:8cd with SMTP id 5b1f17b1804b1-43d50a37833mr89549265e9.24.1742839256691; Mon, 24 Mar 2025 11:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839256; cv=none; d=google.com; s=arc-20240605; b=Z23vk8fgVB+s0aDNLFymSn9+w5XSLl5K/zpqrXRk8foD5FXxNDyiqMhvE4JQcKRxM7 P3/ZeRhSscaeE8gxocsAlrRK8HlvnA6M5IRb6+3ggnkc8OtJDuCylhcKAG0El7ZPZi9F 89YcsH3gx7MpkBNehgAWIqh0qK/J7jlMbyBa2tebu98QySnxprxHLRMcIGv5vgnUF3G8 t1xvTZjNo+xNRKXxrKAy4ZVyWTK76prSqc8TMB393VVEUhpCCtC4G+lZRc770BMTk+5b 090n948SexwYDcPaomT+3EzmOQ+e9nJyngirZw9CvyAYys7ZnEsk5hmJb7nL5ZWh71Wj iXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=634baF+8vyDp0dvmy7CnoRrw+gWbjJIGLJPMeou/TbE=; fh=7FBkrWkiQEOIYMDw9zBpsb3TfEQ1nHGFdzvk6RWeEUU=; b=IqIEcqQfzTHPOVFpASVcumO4nNj9SiyZgtpOc0V2OKHfe9wIh7rwsOQP5idCrqRc/a 0O8krc7vx/cbuf/4ODU2zPY/Vr+YU0DqEJDcJq21XPjSwPUNcWZe8snnh/6NJqpN3Ll6 9aunp/4hQn0b3HI6bLh/078LB5gvbqXohzAmEmz4B+DuWhjCOx4rmzKLwcNMvedpw/4I 71gxJkTifYtMUlLSJ1pJnkELPdCVbBKbX8S8uirSldvPXYYif2FrFggXRVafR7vgnGXN tx6xdTB4+x2H/BFMH/hDahkC7TQFRBSvMqVd1pbubFbA7moDAjTch8CtHjJEUocED0hD xRaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e3h+NimV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43d4fd55635sor35571135e9.9.2025.03.24.11.00.56 for (Google Transport Security); Mon, 24 Mar 2025 11:00:56 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncsNxhpz2PjNJ0KUiRX/SMCPWO/kTRb3w7b8erOXEUAXgdTkg6T5KsEqrvFDmgR jYjeBSJ7PaYtgyfc1w5CKIkOPJQnTvEnYZYbuBAHO3gQgT8vjVz37txefl+0iKBd39k0mfoFdtV 3I1mOnSOo2NwRj7IvBJ8JYp+hOBNDlQTl9NJB3bgxiGFfe15TiTJjoiFqQVPCULKarLusixCEDf CgSBrKIu/ub70PYaKPvrpHaHMXe/n4T9SzueTGlt7636R/SwdcHnAQwfsmU/XkEOPgh/ZMCtoMJ JMTvAHRNDRPFZQOwojZzvhroF1DSENamqj26OdL4q1WgO1gBpggBBFZQ9H55svq3oKsQ9OsIVuB zRT+X2DCkS5hV8E8yNv0Mqq8oQFgUeTeEaQQ= X-Received: by 2002:a05:600c:c07:b0:43d:45a:8fc1 with SMTP id 5b1f17b1804b1-43d509e4640mr136027735e9.4.1742839256235; Mon, 24 Mar 2025 11:00:56 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:55 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Adam Ford , Andre Przywara , Fabio Estevam , Jonas Karlman , Kever Yang , Marek Vasut , Neil Armstrong , Oliver Gaskell , Patrice Chotard , Patrick Delaunay , Prasad Kummari , Sumit Garg , Tom Rini , Tony Dinh , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH 4/6] ARM: dts: add stm32f769-disco-mb1166-reva09 Date: Mon, 24 Mar 2025 19:00:28 +0100 Message-ID: <20250324180047.1571378-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e3h+NimV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [backport from Linux commit db4fc2c79c533986795a7750e9a12caf9d620b48] As reported in the section 8.3 (i. e. Board revision history) of document UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes related to the board revision addressed by the patch: - Board MB1166 revision A-09: - LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK The patch adds the DTS support for the new display which belongs to the the Novatek NT35510-based panel family. Signed-off-by: Dario Binacchi Reviewed-by: Patrice Chotard --- arch/arm/dts/Makefile | 1 + .../dts/stm32f769-disco-mb1166-reva09-u-boot.dtsi | 6 ++++++ arch/arm/dts/stm32f769-disco-mb1166-reva09.dts | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 arch/arm/dts/stm32f769-disco-mb1166-reva09-u-boot.dtsi create mode 100644 arch/arm/dts/stm32f769-disco-mb1166-reva09.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 267b0179a5f2..8719b58152fd 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -523,6 +523,7 @@ dtb-$(CONFIG_STM32F4) += stm32f429-disco.dtb \ dtb-$(CONFIG_STM32F7) += stm32f746-disco.dtb \ stm32f769-disco.dtb \ + stm32f769-disco-mb1166-reva09.dtb \ stm32746g-eval.dtb dtb-$(CONFIG_STM32H7) += stm32h743i-disco.dtb \ stm32h743i-eval.dtb \ diff --git a/arch/arm/dts/stm32f769-disco-mb1166-reva09-u-boot.dtsi b/arch/arm/dts/stm32f769-disco-mb1166-reva09-u-boot.dtsi new file mode 100644 index 000000000000..43dd3b993d5e --- /dev/null +++ b/arch/arm/dts/stm32f769-disco-mb1166-reva09-u-boot.dtsi @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (c) 2025 Dario Binacchi +// + +#include diff --git a/arch/arm/dts/stm32f769-disco-mb1166-reva09.dts b/arch/arm/dts/stm32f769-disco-mb1166-reva09.dts new file mode 100644 index 000000000000..ff7ff32371d0 --- /dev/null +++ b/arch/arm/dts/stm32f769-disco-mb1166-reva09.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Dario Binacchi + */ + +#include "stm32f769-disco.dts" + +&panel0 { + compatible = "frida,frd400b25025", "novatek,nt35510"; + vddi-supply = <&vcc_3v3>; + vdd-supply = <&vcc_3v3>; + /delete-property/power-supply; +}; From patchwork Mon Mar 24 18:00:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3881 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B47803F0CD for ; Mon, 24 Mar 2025 19:01:01 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-43947a0919asf32427515e9.0 for ; Mon, 24 Mar 2025 11:01:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839261; cv=pass; d=google.com; s=arc-20240605; b=WBZxrr43autaO+wBhx1aBV8eV6jg+qdZFi5RfSk90fl6yoll1aY4KKXsKnNm/nhEVh 4bgghrX12PQNUNn4Eqb7jVJwOuqXXz8zhzf2R/CaV+qBgIrFPyuAsnINsu+rNZu2g+Jw X1VTTWAOXek4YmD2NyQuqt8uzfGPeih6cSDwaIMLJuX9u6S0eLV3D2kOr2JU+fF64eCu J8zMJpK0t3AkIUkl+XMOsHtURUs1ct6h5g5Mu7JlfaFFNFjkYjQ9y5+sT4AXeKx9eaK5 VsKbZbdKNbb4klpTGky4I9YVWDHkZzM9bvMJYvc/6w4KGmgPfBhkz0kchzirqXKoJArM h0hQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=D6vadnIwB3ynPbYsb9DWy8ETyVOtywC5gjzOqwlFkhc=; fh=fjQ+nqdIL84uI+yPRFU9rnF0grrIpJOMV6K2wdB41fY=; b=ZXAdFhNon8suOIzxwyE+rF2i+GACmKbldHie1IWKOy5oH2Gdsp928B4QtutWDIjzqw smsXpNW6mzExBkWsUZcQtr6ox3tFqHFjbb8TLDutefpAP0GoeE7Q1WT3WqucmtA1D/ip Ecv8BYtxEmY+bEG1sBpR05dZFjlFdJjf8q5AbYfmmsov3IYXq+5Py++eRKEQO5Kgz+PO 80Cu66/iW2TCJO950eWbOZH+aXR7Oll0dsEgM85Hjw1m0+JVCc19+da4RGZitw1QNCy3 QtNCNlH5ZtJDK6tr7XSA7G19oV84g0ZjLPCio80VO1239++30niou099jYF1/oCW6BHG /1cA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EvcGdHyY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839261; x=1743444061; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=D6vadnIwB3ynPbYsb9DWy8ETyVOtywC5gjzOqwlFkhc=; b=eDM9s9+OhwVjgJu9xVAn+2jQhNyXxbPBg5wojFCxcfoBOXoaoZuxqjPUEqrQrlrI7l lEb8rD3PC6loSZLMq2UXdDfaWEfNX61k1lBxfBMMRm4er67N4Jw6+QFEQ2xWzDx6O1AF ZTDStJo7q5LX9RFQtc1gDlqO3TlAv+gO71VK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839261; x=1743444061; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D6vadnIwB3ynPbYsb9DWy8ETyVOtywC5gjzOqwlFkhc=; b=kPm3/Q8D2W9Kmac7VKyJ5g/aYe6hrhZQ1hxNnaw6J1yKrAAeQfMdC/J+2MxhyW3m0a /TJjnRtDATzd4nDVNvQojmIYu7fHDILaSQ0hztFHU7lhTKKVHOXzuWtjcFEWN4pNlUQ8 LwLDNz62ZGRDTKLbGPMZmWwp4eRdknTQutFtYxoe6S4sQbCduOAVKhjOXqgM3ma8sDEJ SRW5/vMmVSinVT/9dLsaNl/FFKu1ByAPXpxAAeouFwsOpENgGPO7Vm6/Z4x7RYtk+x7n aJpjPsFYj8zG18tg1JIntWaglxUGS0ljkM7VBgLMeMruumj472YXqQTLi9GaAxkqCa6k dRhg== X-Forwarded-Encrypted: i=2; AJvYcCWlcmAXwZc4Qn5NT+2E3jvP8bXdc5rc770OSp2onDP1XivA546C80p/WbrI5PmoXhtycSPPUa67faLmEaLb@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxsQE2Jw6GWFdMFAKRGbiSsPLwH/wyxD3YTWM++rqeeQvsIDoK2 zdK7bA/WkA6fBK6YzUtZWguOEErE8GL/9EYURj95bc2GlTt7O8F5irAbGJGgM3lf6WBBQRgCdw= = X-Google-Smtp-Source: AGHT+IH3HQjxvsJCxyB5VW0CudiWif+Zqg9YxakTPfyq77RuL/ik6jjmAhSxcwBW1MChwBezIloc2Q== X-Received: by 2002:a05:600c:83c7:b0:43c:fc0c:7f33 with SMTP id 5b1f17b1804b1-43d509e4a78mr140437125e9.2.1742839260524; Mon, 24 Mar 2025 11:01:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPAJTNKPEgL8D0r/nDA+DQqzVwFvH6TQdN2Tof386WlMAmQ== Received: by 2002:a05:600c:4818:b0:43c:fb0f:d9ae with SMTP id 5b1f17b1804b1-43d491c3134ls8885175e9.0.-pod-prod-05-eu; Mon, 24 Mar 2025 11:00:58 -0700 (PDT) X-Received: by 2002:a05:600c:b8e:b0:43c:e7ae:4bc9 with SMTP id 5b1f17b1804b1-43d5a369745mr68069235e9.1.1742839258445; Mon, 24 Mar 2025 11:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839258; cv=none; d=google.com; s=arc-20240605; b=QNtuLljn08zuRxirf4WCbhdzXckmrQgcwBH1+emJer7meTTzD4mjpicMOt6mk77RH5 3yDu9q4eb6qEMt9orJAYafAv1PnubRnixa0YpWOVm2CHurdYOR73P9p3QvygWu6GH836 GgDY+rQdbohP8UE7lHAuJqBrmxQntjnH3OGglVRCsDdWMncvs8Mqr7M1bsEhihNkvos1 jgowrLJ5g09ig4zcNhusFIu6RxffQlg51gPf1pxZeS43NHhQvml7NE7TReZ7H2tq4QF4 YbE0fDxkEH4IALNYgc7WpiLAQJmYIgTgcUI0Evs9euN6TQqhwBMphspEf8LEYMtZyWnY opYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HG2DFYWiEevelit2/U2259VOD01so8KV10Zrd1HvX6I=; fh=K11565CxLaRBs0yTzie3PZIJSh6AtXjqtEbwMUlBPU0=; b=SNBSL7Hoy+fonroo7HIPpQB0dRmplH6LlUlt4g41P/YPjSpsyj66OwwoKxAYTfpcVF 17TKlEAs182IlTEzXlPNuuxE9YRvrGdwJbpRzN6gn+6LYLKDiXcWXs9aiTE9tL2Aba0f SF05TEGUIQHn9/kJTWc6XI9PxgoHkB8a8drUli2aAIpa/EtBnvHhcdiYLlXDa/fsRvlr kjqKxAiT91Q3m4dwFjcr1igMjp3B9gcR1965J6fup7dOahjN+KE4t5P9hecAHQItCbec u+tZJR13/yD/EMbc1jss2ZcvFLPavUiTBHEAVnXVLEBLKR12eivFo/iHALXh2nbZWlA/ Nc6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EvcGdHyY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43d4fc7e302sor34973385e9.1.2025.03.24.11.00.58 for (Google Transport Security); Mon, 24 Mar 2025 11:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncvAgSl48p9CNb+7LvhfUVEm2wGPNHWllZGOB1iaXbSnTFJ9DAg4KQ72XWMZXS6 1IsxdOT6BdDPYdE16G0vYcP75Ci2AEPh2lS3FUP878xHoznzGUR7loKebqEo4Fng+UELYoGr/GD BigP/JmhIEJVkzXcxpFI4YK/F/zTaUpuFuQpKx0nNUitYOJfG3u/mluPa3BcGZ31x7nPQB9F09K k2kJqkVATOyoXmuRDXNBsrHegiwE8ZnzVLJgw7FiNhChzVX/9N3DruFMroFYCnZ70ddTaU1AgMn YgFwJ+KUNnvH8NzmccvkLQ/dZqzB+6WxzjNbQnghaTuE7YzX6k2SmCQUlq/COIz9nv3HbIPckwC HBzjwKWs0tkvFGkVHzb+SQFURa6UT3rgKOdI= X-Received: by 2002:a05:600c:4e56:b0:43c:fb95:c752 with SMTP id 5b1f17b1804b1-43d509e4386mr148392795e9.3.1742839257612; Mon, 24 Mar 2025 11:00:57 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:57 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Anatolij Gustschin , Anton Bambura , =?utf-8?q?Jonas_Schw=C3=B6bel?= , Simon Glass , Svyatoslav Ryhel , Tom Rini Subject: [PATCH 5/6] video: support FRIDA FRD400B25025-A-CTK Date: Mon, 24 Mar 2025 19:00:29 +0100 Message-ID: <20250324180047.1571378-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EvcGdHyY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [backport from Linux commits 9b26d5c044d6a29ebfb1845408e0f2a7c5f89818 and 219a1f49094f50bf9c382830d06149e677f76bed] The patch adds the FRIDA FRD400B25025-A-CTK panel, which belongs to the Novatek NT35510-based panel family. Signed-off-by: Dario Binacchi --- drivers/video/Kconfig | 7 + drivers/video/Makefile | 1 + drivers/video/novatek-nt35510.c | 1253 +++++++++++++++++++++++++++++++ 3 files changed, 1261 insertions(+) create mode 100644 drivers/video/novatek-nt35510.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3c3cebaacd02..76dc2d65a6d3 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -550,6 +550,13 @@ config VIDEO_LCD_HIMAX_HX8394 Say Y here if you want to enable support for Himax HX8394 dsi 4dl panel. +config VIDEO_LCD_NOVATEK_NT35510 + bool "Novatek NT35510 DSI LCD panel support" + select VIDEO_MIPI_DSI + help + Say Y here if you want to enable support for Novatek nt35510 + dsi panel. + config VIDEO_LCD_ORISETECH_OTM8009A bool "OTM8009A DSI LCD panel support" select VIDEO_MIPI_DSI diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 5a00438ce064..ff9c9e1c2512 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -59,6 +59,7 @@ obj-$(CONFIG_VIDEO_LCD_ENDEAVORU) += endeavoru-panel.o obj-$(CONFIG_VIDEO_LCD_HIMAX_HX8394) += himax-hx8394.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_LG_LD070WX3) += lg-ld070wx3.o +obj-$(CONFIG_VIDEO_LCD_NOVATEK_NT35510) += novatek-nt35510.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o obj-$(CONFIG_VIDEO_LCD_RENESAS_R61307) += renesas-r61307.o diff --git a/drivers/video/novatek-nt35510.c b/drivers/video/novatek-nt35510.c new file mode 100644 index 000000000000..f3432939c0cb --- /dev/null +++ b/drivers/video/novatek-nt35510.c @@ -0,0 +1,1253 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2025 Amarula Solutions, Dario Binacchi + * + * Inspired from the Linux kernel driver panel-novatek-nt35510.c + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define NT35510_CMD_CORRECT_GAMMA BIT(0) +#define NT35510_CMD_CONTROL_DISPLAY BIT(1) +#define NT35510_CMD_SETVCMOFF BIT(2) + +#define MCS_CMD_MAUCCTR 0xF0 /* Manufacturer command enable */ +#define MCS_CMD_READ_ID1 0xDA +#define MCS_CMD_READ_ID2 0xDB +#define MCS_CMD_READ_ID3 0xDC +#define MCS_CMD_MTP_READ_SETTING 0xF8 /* Uncertain about name */ +#define MCS_CMD_MTP_READ_PARAM 0xFF /* Uncertain about name */ + +/* + * These manufacturer commands are available after we enable manufacturer + * command set (MCS) for page 0. + */ +#define NT35510_P0_DOPCTR 0xB1 +#define NT35510_P0_SDHDTCTR 0xB6 +#define NT35510_P0_GSEQCTR 0xB7 +#define NT35510_P0_SDEQCTR 0xB8 +#define NT35510_P0_SDVPCTR 0xBA +#define NT35510_P0_DPFRCTR1 0xBD +#define NT35510_P0_DPFRCTR2 0xBE +#define NT35510_P0_DPFRCTR3 0xBF +#define NT35510_P0_DPMCTR12 0xCC + +#define NT35510_P0_DOPCTR_LEN 2 +#define NT35510_P0_GSEQCTR_LEN 2 +#define NT35510_P0_SDEQCTR_LEN 4 +#define NT35510_P0_SDVPCTR_LEN 1 +#define NT35510_P0_DPFRCTR1_LEN 5 +#define NT35510_P0_DPFRCTR2_LEN 5 +#define NT35510_P0_DPFRCTR3_LEN 5 +#define NT35510_P0_DPMCTR12_LEN 3 + +#define NT35510_DOPCTR_0_RAMKP BIT(7) /* Contents kept in sleep */ +#define NT35510_DOPCTR_0_DSITE BIT(6) /* Enable TE signal */ +#define NT35510_DOPCTR_0_DSIG BIT(5) /* Enable generic read/write */ +#define NT35510_DOPCTR_0_DSIM BIT(4) /* Enable video mode on DSI */ +#define NT35510_DOPCTR_0_EOTP BIT(3) /* Support EoTP */ +#define NT35510_DOPCTR_0_N565 BIT(2) /* RGB or BGR pixel format */ +#define NT35510_DOPCTR_1_TW_PWR_SEL BIT(4) /* TE power selector */ +#define NT35510_DOPCTR_1_CRGB BIT(3) /* RGB or BGR byte order */ +#define NT35510_DOPCTR_1_CTB BIT(2) /* Vertical scanning direction */ +#define NT35510_DOPCTR_1_CRL BIT(1) /* Source driver data shift */ +#define NT35510_P0_SDVPCTR_PRG BIT(2) /* 0 = normal operation, 1 = VGLO */ +#define NT35510_P0_SDVPCTR_AVDD 0 /* source driver output = AVDD */ +#define NT35510_P0_SDVPCTR_OFFCOL 1 /* source driver output = off color */ +#define NT35510_P0_SDVPCTR_AVSS 2 /* source driver output = AVSS */ +#define NT35510_P0_SDVPCTR_HI_Z 3 /* source driver output = High impedance */ + +/* + * These manufacturer commands are available after we enable manufacturer + * command set (MCS) for page 1. + */ +#define NT35510_P1_SETAVDD 0xB0 +#define NT35510_P1_SETAVEE 0xB1 +#define NT35510_P1_SETVCL 0xB2 +#define NT35510_P1_SETVGH 0xB3 +#define NT35510_P1_SETVRGH 0xB4 +#define NT35510_P1_SETVGL 0xB5 +#define NT35510_P1_BT1CTR 0xB6 +#define NT35510_P1_BT2CTR 0xB7 +#define NT35510_P1_BT3CTR 0xB8 +#define NT35510_P1_BT4CTR 0xB9 /* VGH boosting times/freq */ +#define NT35510_P1_BT5CTR 0xBA +#define NT35510_P1_PFMCTR 0xBB +#define NT35510_P1_SETVGP 0xBC +#define NT35510_P1_SETVGN 0xBD +#define NT35510_P1_SETVCMOFF 0xBE +#define NT35510_P1_VGHCTR 0xBF /* VGH output ctrl */ +#define NT35510_P1_SET_GAMMA_RED_POS 0xD1 +#define NT35510_P1_SET_GAMMA_GREEN_POS 0xD2 +#define NT35510_P1_SET_GAMMA_BLUE_POS 0xD3 +#define NT35510_P1_SET_GAMMA_RED_NEG 0xD4 +#define NT35510_P1_SET_GAMMA_GREEN_NEG 0xD5 +#define NT35510_P1_SET_GAMMA_BLUE_NEG 0xD6 + +/* AVDD and AVEE setting 3 bytes */ +#define NT35510_P1_AVDD_LEN 3 +#define NT35510_P1_AVEE_LEN 3 +#define NT35510_P1_VCL_LEN 3 +#define NT35510_P1_VGH_LEN 3 +#define NT35510_P1_VGL_LEN 3 +#define NT35510_P1_VGP_LEN 3 +#define NT35510_P1_VGN_LEN 3 +#define NT35510_P1_VCMOFF_LEN 2 +/* BT1CTR thru BT5CTR setting 3 bytes */ +#define NT35510_P1_BT1CTR_LEN 3 +#define NT35510_P1_BT2CTR_LEN 3 +#define NT35510_P1_BT3CTR_LEN 3 +#define NT35510_P1_BT4CTR_LEN 3 +#define NT35510_P1_BT5CTR_LEN 3 +/* 52 gamma parameters times two per color: positive and negative */ +#define NT35510_P1_GAMMA_LEN 52 + +#define NT35510_WRCTRLD_BCTRL BIT(5) +#define NT35510_WRCTRLD_A BIT(4) +#define NT35510_WRCTRLD_DD BIT(3) +#define NT35510_WRCTRLD_BL BIT(2) +#define NT35510_WRCTRLD_DB BIT(1) +#define NT35510_WRCTRLD_G BIT(0) + +#define NT35510_WRCABC_OFF 0 +#define NT35510_WRCABC_UI_MODE 1 +#define NT35510_WRCABC_STILL_MODE 2 +#define NT35510_WRCABC_MOVING_MODE 3 + +/** + * struct nt35510_config - the display-specific NT35510 configuration + * + * Some of the settings provide an array of bytes, A, B C which mean: + * A = normal / idle off mode + * B = idle on mode + * C = partial / idle off mode + * + * Gamma correction arrays are 10bit numbers, two consecutive bytes + * makes out one point on the gamma correction curve. The points are + * not linearly placed along the X axis, we get points 0, 1, 3, 5 + * 7, 11, 15, 23, 31, 47, 63, 95, 127, 128, 160, 192, 208, 224, 232, + * 240, 244, 248, 250, 252, 254, 255. The voltages tuples form + * V0, V1, V3 ... V255, with 0x0000 being the lowest voltage and + * 0x03FF being the highest voltage. + * + * Each value must be strictly higher than the previous value forming + * a rising curve like this: + * + * ^ + * | V255 + * | V254 + * | .... + * | V5 + * | V3 + * | V1 + * | V0 + * +-------------------------------------------> + * + * The details about all settings can be found in the NT35510 Application + * Note. + */ +struct nt35510_config { + /** + * @width_mm: physical panel width [mm] + */ + u32 width_mm; + /** + * @height_mm: physical panel height [mm] + */ + u32 height_mm; + /** + * @timings: display timings + */ + struct display_timing timings; + /** + * @mode_flags: DSI operation mode related flags + */ + unsigned long mode_flags; + /** + * @cmds: enable DSI commands + */ + u32 cmds; + /** + * @avdd: setting for AVDD ranging from 0x00 = 6.5V to 0x14 = 4.5V + * in 0.1V steps the default is 0x05 which means 6.0V + */ + u8 avdd[NT35510_P1_AVDD_LEN]; + /** + * @bt1ctr: setting for boost power control for the AVDD step-up + * circuit (1) + * bits 0..2 in the lower nibble controls PCK, the booster clock + * frequency for the step-up circuit: + * 0 = Hsync/32 + * 1 = Hsync/16 + * 2 = Hsync/8 + * 3 = Hsync/4 + * 4 = Hsync/2 + * 5 = Hsync + * 6 = Hsync x 2 + * 7 = Hsync x 4 + * bits 4..6 in the upper nibble controls BTP, the boosting + * amplification for the step-up circuit: + * 0 = Disable + * 1 = 1.5 x VDDB + * 2 = 1.66 x VDDB + * 3 = 2 x VDDB + * 4 = 2.5 x VDDB + * 5 = 3 x VDDB + * The defaults are 4 and 4 yielding 0x44 + */ + u8 bt1ctr[NT35510_P1_BT1CTR_LEN]; + /** + * @avee: setting for AVEE ranging from 0x00 = -6.5V to 0x14 = -4.5V + * in 0.1V steps the default is 0x05 which means -6.0V + */ + u8 avee[NT35510_P1_AVEE_LEN]; + /** + * @bt2ctr: setting for boost power control for the AVEE step-up + * circuit (2) + * bits 0..2 in the lower nibble controls NCK, the booster clock + * frequency, the values are the same as for PCK in @bt1ctr. + * bits 4..5 in the upper nibble controls BTN, the boosting + * amplification for the step-up circuit. + * 0 = Disable + * 1 = -1.5 x VDDB + * 2 = -2 x VDDB + * 3 = -2.5 x VDDB + * 4 = -3 x VDDB + * The defaults are 4 and 3 yielding 0x34 + */ + u8 bt2ctr[NT35510_P1_BT2CTR_LEN]; + /** + * @vcl: setting for VCL ranging from 0x00 = -2.5V to 0x11 = -4.0V + * in 1V steps, the default is 0x00 which means -2.5V + */ + u8 vcl[NT35510_P1_VCL_LEN]; + /** + * @bt3ctr: setting for boost power control for the VCL step-up + * circuit (3) + * bits 0..2 in the lower nibble controls CLCK, the booster clock + * frequency, the values are the same as for PCK in @bt1ctr. + * bits 4..5 in the upper nibble controls BTCL, the boosting + * amplification for the step-up circuit. + * 0 = Disable + * 1 = -0.5 x VDDB + * 2 = -1 x VDDB + * 3 = -2 x VDDB + * The defaults are 4 and 2 yielding 0x24 + */ + u8 bt3ctr[NT35510_P1_BT3CTR_LEN]; + /** + * @vgh: setting for VGH ranging from 0x00 = 7.0V to 0x0B = 18.0V + * in 1V steps, the default is 0x08 which means 15V + */ + u8 vgh[NT35510_P1_VGH_LEN]; + /** + * @bt4ctr: setting for boost power control for the VGH step-up + * circuit (4) + * bits 0..2 in the lower nibble controls HCK, the booster clock + * frequency, the values are the same as for PCK in @bt1ctr. + * bits 4..5 in the upper nibble controls BTH, the boosting + * amplification for the step-up circuit. + * 0 = AVDD + VDDB + * 1 = AVDD - AVEE + * 2 = AVDD - AVEE + VDDB + * 3 = AVDD x 2 - AVEE + * The defaults are 4 and 3 yielding 0x34 + */ + u8 bt4ctr[NT35510_P1_BT4CTR_LEN]; + /** + * @vgl: setting for VGL ranging from 0x00 = -2V to 0x0f = -15V in + * 1V steps, the default is 0x08 which means -10V + */ + u8 vgl[NT35510_P1_VGL_LEN]; + /** + * @bt5ctr: setting for boost power control for the VGL step-up + * circuit (5) + * bits 0..2 in the lower nibble controls LCK, the booster clock + * frequency, the values are the same as for PCK in @bt1ctr. + * bits 4..5 in the upper nibble controls BTL, the boosting + * amplification for the step-up circuit. + * 0 = AVEE + VCL + * 1 = AVEE - AVDD + * 2 = AVEE + VCL - AVDD + * 3 = AVEE x 2 - AVDD + * The defaults are 3 and 2 yielding 0x32 + */ + u8 bt5ctr[NT35510_P1_BT5CTR_LEN]; + /** + * @vgp: setting for VGP, the positive gamma divider voltages + * VGMP the high voltage and VGSP the low voltage. + * The first byte contains bit 8 of VGMP and VGSP in bits 4 and 0 + * The second byte contains bit 0..7 of VGMP + * The third byte contains bit 0..7 of VGSP + * VGMP 0x00 = 3.0V .. 0x108 = 6.3V in steps of 12.5mV + * VGSP 0x00 = 0V .. 0x111 = 3.7V in steps of 12.5mV + */ + u8 vgp[NT35510_P1_VGP_LEN]; + /** + * @vgn: setting for VGN, the negative gamma divider voltages, + * same layout of bytes as @vgp. + */ + u8 vgn[NT35510_P1_VGN_LEN]; + /** + * @vcmoff: setting the DC VCOM offset voltage + * The first byte contains bit 8 of VCM in bit 0 and VCMOFFSEL in bit 4. + * The second byte contains bits 0..7 of VCM. + * VCMOFFSEL the common voltage offset mode. + * VCMOFFSEL 0x00 = VCOM .. 0x01 Gamma. + * The default is 0x00. + * VCM the VCOM output voltage (VCMOFFSEL = 0) or the internal register + * offset for gamma voltage (VCMOFFSEL = 1). + * VCM 0x00 = 0V/0 .. 0x118 = 3.5V/280 in steps of 12.5mV/1step + * The default is 0x00 = 0V/0. + */ + u8 vcmoff[NT35510_P1_VCMOFF_LEN]; + /** + * @dopctr: setting optional control for display + * ERR bits 0..1 in the first byte is the ERR pin output signal setting. + * 0 = Disable, ERR pin output low + * 1 = ERR pin output CRC error only + * 2 = ERR pin output ECC error only + * 3 = ERR pin output CRC and ECC error + * The default is 0. + * N565 bit 2 in the first byte is the 16-bit/pixel format selection. + * 0 = R[4:0] + G[5:3] & G[2:0] + B[4:0] + * 1 = G[2:0] + R[4:0] & B[4:0] + G[5:3] + * The default is 0. + * DIS_EoTP_HS bit 3 in the first byte is "DSI protocol violation" error + * reporting. + * 0 = reporting when error + * 1 = not reporting when error + * DSIM bit 4 in the first byte is the video mode data type enable + * 0 = Video mode data type disable + * 1 = Video mode data type enable + * The default is 0. + * DSIG bit 5 int the first byte is the generic r/w data type enable + * 0 = Generic r/w disable + * 1 = Generic r/w enable + * The default is 0. + * DSITE bit 6 in the first byte is TE line enable + * 0 = TE line is disabled + * 1 = TE line is enabled + * The default is 0. + * RAMKP bit 7 in the first byte is the frame memory keep/loss in + * sleep-in mode + * 0 = contents loss in sleep-in + * 1 = contents keep in sleep-in + * The default is 0. + * CRL bit 1 in the second byte is the source driver data shift + * direction selection. This bit is XOR operation with bit RSMX + * of 3600h command. + * 0 (RMSX = 0) = S1 -> S1440 + * 0 (RMSX = 1) = S1440 -> S1 + * 1 (RMSX = 0) = S1440 -> S1 + * 1 (RMSX = 1) = S1 -> S1440 + * The default is 0. + * CTB bit 2 in the second byte is the vertical scanning direction + * selection for gate control signals. This bit is XOR operation + * with bit ML of 3600h command. + * 0 (ML = 0) = Forward (top -> bottom) + * 0 (ML = 1) = Reverse (bottom -> top) + * 1 (ML = 0) = Reverse (bottom -> top) + * 1 (ML = 1) = Forward (top -> bottom) + * The default is 0. + * CRGB bit 3 in the second byte is RGB-BGR order selection. This + * bit is XOR operation with bit RGB of 3600h command. + * 0 (RGB = 0) = RGB/Normal + * 0 (RGB = 1) = BGR/RB swap + * 1 (RGB = 0) = BGR/RB swap + * 1 (RGB = 1) = RGB/Normal + * The default is 0. + * TE_PWR_SEL bit 4 in the second byte is the TE output voltage + * level selection (only valid when DSTB_SEL = 0 or DSTB_SEL = 1, + * VSEL = High and VDDI = 1.665~3.3V). + * 0 = TE output voltage level is VDDI + * 1 = TE output voltage level is VDDA + * The default is 0. + */ + u8 dopctr[NT35510_P0_DOPCTR_LEN]; + /** + * @madctl: Memory data access control + * RSMY bit 0 is flip vertical. Flips the display image top to down. + * RSMX bit 1 is flip horizontal. Flips the display image left to right. + * MH bit 2 is the horizontal refresh order. + * RGB bit 3 is the RGB-BGR order. + * 0 = RGB color sequence + * 1 = BGR color sequence + * ML bit 4 is the vertical refresh order. + * MV bit 5 is the row/column exchange. + * MX bit 6 is the column address order. + * MY bit 7 is the row address order. + */ + u8 madctl; + /** + * @sdhdtctr: source output data hold time + * 0x00..0x3F = 0..31.5us in steps of 0.5us + * The default is 0x05 = 2.5us. + */ + u8 sdhdtctr; + /** + * @gseqctr: EQ control for gate signals + * GFEQ_XX[3:0]: time setting of EQ step for falling edge in steps + * of 0.5us. + * The default is 0x07 = 3.5us + * GREQ_XX[7:4]: time setting of EQ step for rising edge in steps + * of 0.5us. + * The default is 0x07 = 3.5us + */ + u8 gseqctr[NT35510_P0_GSEQCTR_LEN]; + /** + * @sdeqctr: Source driver control settings, first byte is + * 0 for mode 1 and 1 for mode 2. Mode 1 uses two steps and + * mode 2 uses three steps meaning EQS3 is not used in mode + * 1. Mode 2 is default. The last three parameters are EQS1, EQS2 + * and EQS3, setting the rise time for each equalizer step: + * 0x00 = 0.0 us to 0x0f = 7.5 us in steps of 0.5us. The default + * is 0x07 = 3.5 us. + */ + u8 sdeqctr[NT35510_P0_SDEQCTR_LEN]; + /** + * @sdvpctr: power/voltage behaviour during vertical porch time + */ + u8 sdvpctr; + /** + * @t1: the number of pixel clocks on one scanline, range + * 0x100 (258 ticks) .. 0x3FF (1024 ticks) so the value + 1 + * clock ticks. + */ + u16 t1; + /** + * @vbp: vertical back porch toward the PANEL note: not toward + * the DSI host; these are separate interfaces, in from DSI host + * and out to the panel. + */ + u8 vbp; + /** + * @vfp: vertical front porch toward the PANEL. + */ + u8 vfp; + /** + * @psel: pixel clock divisor: 0 = 1, 1 = 2, 2 = 4, 3 = 8. + */ + u8 psel; + /** + * @dpmctr12: Display timing control 12 + * Byte 1 bit 4 selects LVGL voltage level: 0 = VGLX, 1 = VGL_REG + * Byte 1 bit 1 selects gate signal mode: 0 = non-overlap, 1 = overlap + * Byte 1 bit 0 selects output signal control R/L swap, 0 = normal + * 1 = swap all O->E, L->R + * Byte 2 is CLW delay clock for CK O/E and CKB O/E signals: + * 0x00 = 0us .. 0xFF = 12.75us in 0.05us steps + * Byte 3 is FTI_H0 delay time for STP O/E signals: + * 0x00 = 0us .. 0xFF = 12.75us in 0.05us steps + */ + u8 dpmctr12[NT35510_P0_DPMCTR12_LEN]; + /** + * @gamma_corr_pos_r: Red gamma correction parameters, positive + */ + u8 gamma_corr_pos_r[NT35510_P1_GAMMA_LEN]; + /** + * @gamma_corr_pos_g: Green gamma correction parameters, positive + */ + u8 gamma_corr_pos_g[NT35510_P1_GAMMA_LEN]; + /** + * @gamma_corr_pos_b: Blue gamma correction parameters, positive + */ + u8 gamma_corr_pos_b[NT35510_P1_GAMMA_LEN]; + /** + * @gamma_corr_neg_r: Red gamma correction parameters, negative + */ + u8 gamma_corr_neg_r[NT35510_P1_GAMMA_LEN]; + /** + * @gamma_corr_neg_g: Green gamma correction parameters, negative + */ + u8 gamma_corr_neg_g[NT35510_P1_GAMMA_LEN]; + /** + * @gamma_corr_neg_b: Blue gamma correction parameters, negative + */ + u8 gamma_corr_neg_b[NT35510_P1_GAMMA_LEN]; + /** + * @wrdisbv: write display brightness + * 0x00 value means the lowest brightness and 0xff value means + * the highest brightness. + * The default is 0x00. + */ + u8 wrdisbv; + /** + * @wrctrld: write control display + * G bit 0 selects gamma curve: 0 = Manual, 1 = Automatic + * DB bit 1 selects display brightness: 0 = Manual, 1 = Automatic + * BL bit 2 controls backlight control: 0 = Off, 1 = On + * DD bit 3 controls display dimming: 0 = Off, 1 = On + * A bit 4 controls LABC block: 0 = Off, 1 = On + * BCTRL bit 5 controls brightness block: 0 = Off, 1 = On + */ + u8 wrctrld; + /** + * @wrcabc: write content adaptive brightness control + * There is possible to use 4 different modes for content adaptive + * image functionality: + * 0: Off + * 1: User Interface Image (UI-Mode) + * 2: Still Picture Image (Still-Mode) + * 3: Moving Picture Image (Moving-Mode) + * The default is 0 + */ + u8 wrcabc; + /** + * @wrcabcmb: write CABC minimum brightness + * Set the minimum brightness value of the display for CABC + * function. + * 0x00 value means the lowest brightness for CABC and 0xff + * value means the highest brightness for CABC. + * The default is 0x00. + */ + u8 wrcabcmb; +}; + +/** + * struct nt35510 - state container for the NT35510 panel + */ +struct nt35510_panel_priv { + const struct nt35510_config *conf; + struct udevice *vdd_reg; + struct udevice *vddi_reg; + struct gpio_desc *reset; +}; + +/* Manufacturer command has strictly this byte sequence */ +static const u8 nt35510_mauc_mtp_read_param[] = { 0xAA, 0x55, 0x25, 0x01 }; +static const u8 nt35510_mauc_mtp_read_setting[] = { 0x01, 0x02, 0x00, 0x20, + 0x33, 0x13, 0x00, 0x40, + 0x00, 0x00, 0x23, 0x02 }; +static const u8 nt35510_mauc_select_page_0[] = { 0x55, 0xAA, 0x52, 0x08, 0x00 }; +static const u8 nt35510_mauc_select_page_1[] = { 0x55, 0xAA, 0x52, 0x08, 0x01 }; +static const u8 nt35510_vgh_on[] = { 0x01 }; + +#define NT35510_ROTATE_0_SETTING 0x02 +#define NT35510_ROTATE_180_SETTING 0x00 + +static inline struct mipi_dsi_device *to_mipi_dsi_device(struct udevice *dev) +{ + struct mipi_dsi_panel_plat *plat = dev_get_plat(dev); + + return plat->device; +} + +static inline const struct nt35510_config *to_panel_config(struct udevice *dev) +{ + struct nt35510_panel_priv *priv = dev_get_priv(dev); + + return priv->conf; +} + +static int nt35510_send_long(struct udevice *dev, u8 cmd, u8 cmdlen, + const u8 *seq) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + const u8 *seqp = seq; + int cmdwritten = 0; + int chunk = cmdlen; + int ret; + + if (chunk > 15) + chunk = 15; + ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk); + if (ret < 0) { + dev_err(dev, "error sending DCS command seq cmd %02x\n", cmd); + return ret; + } + cmdwritten += chunk; + seqp += chunk; + + while (cmdwritten < cmdlen) { + chunk = cmdlen - cmdwritten; + if (chunk > 15) + chunk = 15; + ret = mipi_dsi_generic_write(dsi, seqp, chunk); + if (ret < 0) { + dev_err(dev, "error sending generic write seq %02x\n", cmd); + return ret; + } + cmdwritten += chunk; + seqp += chunk; + } + dev_dbg(dev, "sent command %02x %02x bytes\n", cmd, cmdlen); + return 0; +} + +static int nt35510_setup_power(struct udevice *dev) +{ + const struct nt35510_config *conf = to_panel_config(dev); + int ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETAVDD, + NT35510_P1_AVDD_LEN, + conf->avdd); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_BT1CTR, + NT35510_P1_BT1CTR_LEN, + conf->bt1ctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETAVEE, + NT35510_P1_AVEE_LEN, + conf->avee); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_BT2CTR, + NT35510_P1_BT2CTR_LEN, + conf->bt2ctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETVCL, + NT35510_P1_VCL_LEN, + conf->vcl); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_BT3CTR, + NT35510_P1_BT3CTR_LEN, + conf->bt3ctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETVGH, + NT35510_P1_VGH_LEN, + conf->vgh); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_BT4CTR, + NT35510_P1_BT4CTR_LEN, + conf->bt4ctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_VGHCTR, + ARRAY_SIZE(nt35510_vgh_on), + nt35510_vgh_on); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETVGL, + NT35510_P1_VGL_LEN, + conf->vgl); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_BT5CTR, + NT35510_P1_BT5CTR_LEN, + conf->bt5ctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETVGP, + NT35510_P1_VGP_LEN, + conf->vgp); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SETVGN, + NT35510_P1_VGN_LEN, + conf->vgn); + if (ret) + return ret; + + if (conf->cmds & NT35510_CMD_SETVCMOFF) { + ret = nt35510_send_long(dev, NT35510_P1_SETVCMOFF, + NT35510_P1_VCMOFF_LEN, + conf->vcmoff); + if (ret) + return ret; + } + + /* Typically 10 ms */ + mdelay(10); + + return 0; +} + +static int nt35510_setup_display(struct udevice *dev) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + const struct nt35510_config *conf = to_panel_config(dev); + u8 dpfrctr[NT35510_P0_DPFRCTR1_LEN]; + int ret; + + ret = nt35510_send_long(dev, NT35510_P0_DOPCTR, + NT35510_P0_DOPCTR_LEN, + conf->dopctr); + if (ret) + return ret; + + ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_ADDRESS_MODE, &conf->madctl, + sizeof(conf->madctl)); + if (ret < 0) + return ret; + + ret = mipi_dsi_dcs_write(dsi, NT35510_P0_SDHDTCTR, &conf->sdhdtctr, + sizeof(conf->sdhdtctr)); + if (ret < 0) + return ret; + + ret = nt35510_send_long(dev, NT35510_P0_GSEQCTR, + NT35510_P0_GSEQCTR_LEN, + conf->gseqctr); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P0_SDEQCTR, + NT35510_P0_SDEQCTR_LEN, + conf->sdeqctr); + if (ret) + return ret; + + ret = mipi_dsi_dcs_write(dsi, NT35510_P0_SDVPCTR, + &conf->sdvpctr, 1); + if (ret < 0) + return ret; + + /* + * Display timing control for active and idle off mode: + * the first byte contains + * the two high bits of T1A and second byte the low 8 bits, and + * the valid range is 0x100 (257) to 0x3ff (1023) representing + * 258..1024 (+1) pixel clock ticks for one scanline. At 20MHz pixel + * clock this covers the range of 12.90us .. 51.20us in steps of + * 0.05us, the default is 0x184 (388) representing 389 ticks. + * The third byte is VBPDA, vertical back porch display active + * and the fourth VFPDA, vertical front porch display active, + * both given in number of scanlines in the range 0x02..0xff + * for 2..255 scanlines. The fifth byte is 2 bits selecting + * PSEL for active and idle off mode, how much the 20MHz clock + * is divided by 0..3. This needs to be adjusted to get the right + * frame rate. + */ + dpfrctr[0] = (conf->t1 >> 8) & 0xFF; + dpfrctr[1] = conf->t1 & 0xFF; + /* Vertical back porch */ + dpfrctr[2] = conf->vbp; + /* Vertical front porch */ + dpfrctr[3] = conf->vfp; + dpfrctr[4] = conf->psel; + ret = nt35510_send_long(dev, NT35510_P0_DPFRCTR1, + NT35510_P0_DPFRCTR1_LEN, + dpfrctr); + if (ret) + return ret; + /* For idle and partial idle off mode we decrease front porch by one */ + dpfrctr[3]--; + ret = nt35510_send_long(dev, NT35510_P0_DPFRCTR2, + NT35510_P0_DPFRCTR2_LEN, + dpfrctr); + if (ret) + return ret; + ret = nt35510_send_long(dev, NT35510_P0_DPFRCTR3, + NT35510_P0_DPFRCTR3_LEN, + dpfrctr); + if (ret) + return ret; + + /* Enable TE on vblank */ + ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); + if (ret) + return ret; + + /* Turn on the pads? */ + ret = nt35510_send_long(dev, NT35510_P0_DPMCTR12, + NT35510_P0_DPMCTR12_LEN, + conf->dpmctr12); + if (ret) + return ret; + + return 0; +} + +static int nt35510_read_id(struct udevice *dev) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + u8 id1, id2, id3; + int ret; + + ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID1, &id1, 1); + if (ret < 0) { + dev_err(dev, "could not read MTP ID1\n"); + return ret; + } + + ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID2, &id2, 1); + if (ret < 0) { + dev_err(dev, "could not read MTP ID2\n"); + return ret; + } + + ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID3, &id3, 1); + if (ret < 0) { + dev_err(dev, "could not read MTP ID3\n"); + return ret; + } + + /* + * Multi-Time Programmable (?) memory contains manufacturer + * ID (e.g. Hydis 0x55), driver ID (e.g. NT35510 0xc0) and + * version. + */ + dev_info(dev, "MTP ID manufacturer: %02x version: %02x driver: %02x\n", + id1, id2, id3); + + return 0; +} + +static int nt35510_init_sequence(struct udevice *dev) +{ + const struct nt35510_config *conf = to_panel_config(dev); + int ret; + + ret = nt35510_send_long(dev, MCS_CMD_MTP_READ_PARAM, + ARRAY_SIZE(nt35510_mauc_mtp_read_param), + nt35510_mauc_mtp_read_param); + if (ret) + return ret; + + ret = nt35510_send_long(dev, MCS_CMD_MTP_READ_SETTING, + ARRAY_SIZE(nt35510_mauc_mtp_read_setting), + nt35510_mauc_mtp_read_setting); + if (ret) + return ret; + + nt35510_read_id(dev); + + /* Set up stuff in manufacturer control, page 1 */ + ret = nt35510_send_long(dev, MCS_CMD_MAUCCTR, + ARRAY_SIZE(nt35510_mauc_select_page_1), + nt35510_mauc_select_page_1); + if (ret) + return ret; + + ret = nt35510_setup_power(dev); + if (ret) + return ret; + + if (conf->cmds & NT35510_CMD_CORRECT_GAMMA) { + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_RED_POS, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_pos_r); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_GREEN_POS, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_pos_g); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_BLUE_POS, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_pos_b); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_RED_NEG, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_neg_r); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_GREEN_NEG, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_neg_g); + if (ret) + return ret; + + ret = nt35510_send_long(dev, NT35510_P1_SET_GAMMA_BLUE_NEG, + NT35510_P1_GAMMA_LEN, + conf->gamma_corr_neg_b); + if (ret) + return ret; + } + + /* Set up stuff in manufacturer control, page 0 */ + ret = nt35510_send_long(dev, MCS_CMD_MAUCCTR, + ARRAY_SIZE(nt35510_mauc_select_page_0), + nt35510_mauc_select_page_0); + if (ret) + return ret; + + ret = nt35510_setup_display(dev); + if (ret) + return ret; + + return 0; +} + +static int nt35510_panel_enable_backlight(struct udevice *dev) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + const struct nt35510_config *conf = to_panel_config(dev); + int ret; + + ret = mipi_dsi_attach(dsi); + if (ret < 0) + return ret; + + ret = nt35510_init_sequence(dev); + if (ret) + return ret; + + /* Exit sleep mode */ + ret = mipi_dsi_dcs_exit_sleep_mode(dsi); + if (ret) { + dev_err(dev, "failed to exit sleep mode (%d)\n", ret); + return ret; + } + + /* Up to 120 ms */ + mdelay(120); + + if (conf->cmds & NT35510_CMD_CONTROL_DISPLAY) { + ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, + &conf->wrctrld, + sizeof(conf->wrctrld)); + if (ret < 0) + return ret; + + ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_POWER_SAVE, + &conf->wrcabc, + sizeof(conf->wrcabc)); + if (ret < 0) + return ret; + + ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, + &conf->wrcabcmb, + sizeof(conf->wrcabcmb)); + if (ret < 0) + return ret; + } + + ret = mipi_dsi_dcs_set_display_on(dsi); + if (ret) { + dev_err(dev, "failed to turn display on (%d)\n", ret); + return ret; + } + + /* Some 10 ms */ + mdelay(10); + + ret = mipi_dsi_dcs_set_display_brightness(dsi, 0x7f); + if (ret < 0) + return ret; + + /* Need to wait a few time before sending the first image */ + mdelay(10); + + return 0; +} + +static int nt35510_panel_get_display_timing(struct udevice *dev, + struct display_timing *timings) +{ + struct nt35510_panel_priv *priv = dev_get_priv(dev); + + memcpy(timings, &priv->conf->timings, sizeof(*timings)); + return 0; +} + +static int nt35510_panel_of_to_plat(struct udevice *dev) +{ + struct nt35510_panel_priv *priv = dev_get_priv(dev); + int ret; + + if (CONFIG_IS_ENABLED(DM_REGULATOR)) { + ret = device_get_supply_regulator(dev, "vdd-supply", + &priv->vdd_reg); + if (ret) { + dev_err(dev, "Warning: cannot get vdd supply\n"); + return ret; + } + + ret = device_get_supply_regulator(dev, "vddi-supply", + &priv->vddi_reg); + if (ret) { + dev_err(dev, "Warning: cannot get vddi supply\n"); + return ret; + } + } + + priv->reset = + devm_gpiod_get_optional(dev, "reset", + GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + if (IS_ERR(priv->reset)) { + dev_err(dev, "error getting RESET GPIO\n"); + return PTR_ERR(priv->reset); + } + + return 0; +} + +static int nt35510_panel_probe(struct udevice *dev) +{ + struct nt35510_panel_priv *priv = dev_get_priv(dev); + struct mipi_dsi_panel_plat *plat = dev_get_plat(dev); + int ret; + + priv->conf = (struct nt35510_config *)dev_get_driver_data(dev); + if (!priv->conf) { + dev_err(dev, "missing device configuration\n"); + return -ENODEV; + } + + if (CONFIG_IS_ENABLED(DM_REGULATOR)) { + dev_dbg(dev, "enable regulator '%s'\n", priv->vdd_reg->name); + ret = regulator_set_enable(priv->vdd_reg, true); + if (ret) + return ret; + + dev_dbg(dev, "enable regulator '%s'\n", priv->vddi_reg->name); + ret = regulator_set_enable(priv->vddi_reg, true); + if (ret) + return ret; + } + + /* Toggle RESET in accordance with datasheet page 370 */ + if (priv->reset) { + dm_gpio_set_value(priv->reset, 1); + /* Active min 10 us according to datasheet, let's say 20 */ + mdelay(1); + dm_gpio_set_value(priv->reset, 0); + /* + * 5 ms during sleep mode, 120 ms during sleep out mode + * according to datasheet, let's use 15 ms. + */ + mdelay(150); + } + + plat->lanes = 2; + plat->format = MIPI_DSI_FMT_RGB888; + plat->mode_flags = priv->conf->mode_flags; + + return 0; +} + +static const struct panel_ops nt35510_panel_ops = { + .enable_backlight = nt35510_panel_enable_backlight, + .get_display_timing = nt35510_panel_get_display_timing, +}; + +/* + * These gamma correction values are 10bit tuples, so only bits 0 and 1 is + * ever used in the first byte. They form a positive and negative gamma + * correction curve for each color, values must be strictly higher for each + * step on the curve. As can be seen these default curves goes from 0x0001 + * to 0x03FE. + */ +#define NT35510_GAMMA_POS_DEFAULT 0x00, 0x01, 0x00, 0x43, 0x00, \ + 0x6B, 0x00, 0x87, 0x00, 0xA3, 0x00, 0xCE, 0x00, 0xF1, 0x01, \ + 0x27, 0x01, 0x53, 0x01, 0x98, 0x01, 0xCE, 0x02, 0x22, 0x02, \ + 0x83, 0x02, 0x78, 0x02, 0x9E, 0x02, 0xDD, 0x03, 0x00, 0x03, \ + 0x2E, 0x03, 0x54, 0x03, 0x7F, 0x03, 0x95, 0x03, 0xB3, 0x03, \ + 0xC2, 0x03, 0xE1, 0x03, 0xF1, 0x03, 0xFE + +#define NT35510_GAMMA_NEG_DEFAULT 0x00, 0x01, 0x00, 0x43, 0x00, \ + 0x6B, 0x00, 0x87, 0x00, 0xA3, 0x00, 0xCE, 0x00, 0xF1, 0x01, \ + 0x27, 0x01, 0x53, 0x01, 0x98, 0x01, 0xCE, 0x02, 0x22, 0x02, \ + 0x43, 0x02, 0x50, 0x02, 0x9E, 0x02, 0xDD, 0x03, 0x00, 0x03, \ + 0x2E, 0x03, 0x54, 0x03, 0x7F, 0x03, 0x95, 0x03, 0xB3, 0x03, \ + 0xC2, 0x03, 0xE1, 0x03, 0xF1, 0x03, 0xFE + +/* + * The Hydis HVA40WV1 panel + */ +static const struct nt35510_config nt35510_hydis_hva40wv1 = { + .width_mm = 52, + .height_mm = 86, + /** + * As the Hydis panel is used in command mode, the porches etc + * are settings programmed internally into the NT35510 controller + * and generated toward the physical display. As the panel is not + * used in video mode, these are not really exposed to the DSI + * host. + * + * Display frame rate control: + * Frame rate = (20 MHz / 1) / (389 * (7 + 50 + 800)) ~= 60 Hz + */ + .timings = { + /* The internal pixel clock of the NT35510 is 20 MHz */ + .pixelclock.typ = 20000, + .hactive.typ = 480, + .hfront_porch.typ = 2, + .hsync_len.typ = 0, + .hback_porch.typ = 5, + .vactive.typ = 800, + .vfront_porch.typ = 2, + .vsync_len.typ = 0, + .vback_porch.typ = 5, + }, + .mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS, + .cmds = NT35510_CMD_CORRECT_GAMMA, + /* 0x09: AVDD = 5.6V */ + .avdd = { 0x09, 0x09, 0x09 }, + /* 0x34: PCK = Hsync/2, BTP = 2 x VDDB */ + .bt1ctr = { 0x34, 0x34, 0x34 }, + /* 0x09: AVEE = -5.6V */ + .avee = { 0x09, 0x09, 0x09 }, + /* 0x24: NCK = Hsync/2, BTN = -2 x VDDB */ + .bt2ctr = { 0x24, 0x24, 0x24 }, + /* VBCLA: -2.5V, VBCLB: -2.5V, VBCLC: -2.5V */ + .vcl = { 0x00, 0x00, 0x00 }, + /* 0x24: CLCK = Hsync/2, BTN = -1 x VDDB */ + .bt3ctr = { 0x24, 0x24, 0x24 }, + /* 0x05 = 12V */ + .vgh = { 0x05, 0x05, 0x05 }, + /* 0x24: NCKA = Hsync/2, VGH = 2 x AVDD - AVEE */ + .bt4ctr = { 0x24, 0x24, 0x24 }, + /* 0x0B = -13V */ + .vgl = { 0x0B, 0x0B, 0x0B }, + /* 0x24: LCKA = Hsync, VGL = AVDD + VCL - AVDD */ + .bt5ctr = { 0x24, 0x24, 0x24 }, + /* VGMP: 0x0A3 = 5.0375V, VGSP = 0V */ + .vgp = { 0x00, 0xA3, 0x00 }, + /* VGMP: 0x0A3 = 5.0375V, VGSP = 0V */ + .vgn = { 0x00, 0xA3, 0x00 }, + /* VCMOFFSEL = VCOM voltage offset mode, VCM = 0V */ + .vcmoff = { 0x00, 0x00 }, + /* Enable TE, EoTP and RGB pixel format */ + .dopctr = { NT35510_DOPCTR_0_DSITE | NT35510_DOPCTR_0_EOTP | + NT35510_DOPCTR_0_N565, NT35510_DOPCTR_1_CTB }, + .madctl = NT35510_ROTATE_0_SETTING, + /* 0x0A: SDT = 5 us */ + .sdhdtctr = 0x0A, + /* EQ control for gate signals, 0x00 = 0 us */ + .gseqctr = { 0x00, 0x00 }, + /* SDEQCTR: source driver EQ mode 2, 2.5 us rise time on each step */ + .sdeqctr = { 0x01, 0x05, 0x05, 0x05 }, + /* SDVPCTR: Normal operation off color during v porch */ + .sdvpctr = 0x01, + /* T1: number of pixel clocks on one scanline: 0x184 = 389 clocks */ + .t1 = 0x0184, + /* VBP: vertical back porch toward the panel */ + .vbp = 7, + /* VFP: vertical front porch toward the panel */ + .vfp = 50, + /* PSEL: divide pixel clock 20MHz with 1 (no clock downscaling) */ + .psel = 0, + /* DPTMCTR12: 0x03: LVGL = VGLX, overlap mode, swap R->L O->E */ + .dpmctr12 = { 0x03, 0x00, 0x00, }, + /* Default gamma correction values */ + .gamma_corr_pos_r = { NT35510_GAMMA_POS_DEFAULT }, + .gamma_corr_pos_g = { NT35510_GAMMA_POS_DEFAULT }, + .gamma_corr_pos_b = { NT35510_GAMMA_POS_DEFAULT }, + .gamma_corr_neg_r = { NT35510_GAMMA_NEG_DEFAULT }, + .gamma_corr_neg_g = { NT35510_GAMMA_NEG_DEFAULT }, + .gamma_corr_neg_b = { NT35510_GAMMA_NEG_DEFAULT }, +}; + +static const struct nt35510_config nt35510_frida_frd400b25025 = { + .width_mm = 52, + .height_mm = 86, + .timings = { + .pixelclock.typ = 23000000, + .hactive.typ = 480, + .hfront_porch.typ = 34, + .hback_porch.typ = 34, + .hsync_len.typ = 2, + .vactive.typ = 800, + .vfront_porch.typ = 15, + .vback_porch.typ = 15, + .vsync_len.typ = 12, + }, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM, + .cmds = NT35510_CMD_CONTROL_DISPLAY | NT35510_CMD_SETVCMOFF, + /* 0x03: AVDD = 6.2V */ + .avdd = { 0x03, 0x03, 0x03 }, + /* 0x46: PCK = 2 x Hsync, BTP = 2.5 x VDDB */ + .bt1ctr = { 0x46, 0x46, 0x46 }, + /* 0x03: AVEE = -6.2V */ + .avee = { 0x03, 0x03, 0x03 }, + /* 0x36: PCK = 2 x Hsync, BTP = 2 x VDDB */ + .bt2ctr = { 0x36, 0x36, 0x36 }, + /* VBCLA: -2.5V, VBCLB: -2.5V, VBCLC: -3.5V */ + .vcl = { 0x00, 0x00, 0x02 }, + /* 0x26: CLCK = 2 x Hsync, BTN = -1 x VDDB */ + .bt3ctr = { 0x26, 0x26, 0x26 }, + /* 0x09 = 16V */ + .vgh = { 0x09, 0x09, 0x09 }, + /* 0x36: HCK = 2 x Hsync, VGH = 2 x AVDD - AVEE */ + .bt4ctr = { 0x36, 0x36, 0x36 }, + /* 0x08 = -10V */ + .vgl = { 0x08, 0x08, 0x08 }, + /* 0x26: LCK = 2 x Hsync, VGL = AVDD + VCL - AVDD */ + .bt5ctr = { 0x26, 0x26, 0x26 }, + /* VGMP: 0x080 = 4.6V, VGSP = 0V */ + .vgp = { 0x00, 0x80, 0x00 }, + /* VGMP: 0x080 = 4.6V, VGSP = 0V */ + .vgn = { 0x00, 0x80, 0x00 }, + /* VCMOFFSEL = VCOM voltage offset mode, VCM = -1V */ + .vcmoff = { 0x00, 0x50 }, + .dopctr = { NT35510_DOPCTR_0_RAMKP | NT35510_DOPCTR_0_DSITE | + NT35510_DOPCTR_0_DSIG | NT35510_DOPCTR_0_DSIM | + NT35510_DOPCTR_0_EOTP | NT35510_DOPCTR_0_N565, 0 }, + .madctl = NT35510_ROTATE_180_SETTING, + /* 0x03: SDT = 1.5 us */ + .sdhdtctr = 0x03, + /* EQ control for gate signals, 0x00 = 0 us */ + .gseqctr = { 0x00, 0x00 }, + /* SDEQCTR: source driver EQ mode 2, 1 us rise time on each step */ + .sdeqctr = { 0x01, 0x02, 0x02, 0x02 }, + /* SDVPCTR: Normal operation off color during v porch */ + .sdvpctr = 0x01, + /* T1: number of pixel clocks on one scanline: 0x184 = 389 clocks */ + .t1 = 0x0184, + /* VBP: vertical back porch toward the panel */ + .vbp = 0x1C, + /* VFP: vertical front porch toward the panel */ + .vfp = 0x1C, + /* PSEL: divide pixel clock 23MHz with 1 (no clock downscaling) */ + .psel = 0, + /* DPTMCTR12: 0x03: LVGL = VGLX, overlap mode, swap R->L O->E */ + .dpmctr12 = { 0x03, 0x00, 0x00, }, + /* write display brightness */ + .wrdisbv = 0x7f, + /* write control display */ + .wrctrld = NT35510_WRCTRLD_BCTRL | NT35510_WRCTRLD_DD | + NT35510_WRCTRLD_BL, + /* write content adaptive brightness control */ + .wrcabc = NT35510_WRCABC_STILL_MODE, + /* write CABC minimum brightness */ + .wrcabcmb = 0xff, +}; + +static const struct udevice_id nt35510_panel_ids[] = { + { + .compatible = "frida,frd400b25025", + .data = (ulong)&nt35510_frida_frd400b25025, + }, + { + .compatible = "hydis,hva40wv1", + .data = (ulong)&nt35510_hydis_hva40wv1, + }, + { } +}; + +U_BOOT_DRIVER(nt35510_panel) = { + .name = "nt35510_panel", + .id = UCLASS_PANEL, + .of_match = nt35510_panel_ids, + .ops = &nt35510_panel_ops, + .of_to_plat = nt35510_panel_of_to_plat, + .probe = nt35510_panel_probe, + .plat_auto = sizeof(struct mipi_dsi_panel_plat), + .priv_auto = sizeof(struct nt35510_panel_priv), +}; From patchwork Mon Mar 24 18:00:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3882 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A60BF3F0D8 for ; Mon, 24 Mar 2025 19:01:02 +0100 (CET) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43d025a52c2sf35013775e9.0 for ; Mon, 24 Mar 2025 11:01:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742839262; cv=pass; d=google.com; s=arc-20240605; b=LIAB9GUdB+GNOqa5BTXxfULTQSMVJJBGaBowLFKjRXrCAUsOdkVB7dax0srfEtCD5x xUskJE6vncfjl3R0XN8vnGNqPMfSrQcpZUeiH5pnI0Gea+YDu3nZstV2GaxpBNvLP1n6 a1pse1nnCsPEt6LyL0sBlkDhfQT1piOVXyYKCcw7qZFqjG9oRGjgY7VW6uaVgW1M0t2g ALwJf6WGlwDInn+0HV8a1Q/KeP+Wk09g/3qpNd1lpjTA55JtOPK0M5kJvMDaMVshbBCS Ex2GupAzjeKwaT+mS1dsVhMLAQXWmkI577tJarI2PDta6EAzeMmWn6e2rkT01BTZRB87 W1Cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NPwjPtg1NHYPJu0mbuNi8RLQTzHXFY6VCn7Rq4mfuBQ=; fh=ZeX2xTNFn2/Ya7uwFxV0Pmn/b70N5kp/OVHVERTQYTA=; b=kP8vitywhBxJOqk+G5RaW/Tc737kWjJlCwMNcqxmmTGz+/7KNnpzXsN9k3MBZ9R8aE 8FcA9hbPIsAH827KVMpzJaAI9J4f9EPYaqo9Vrao+Xai0GUkT6uTVZI5boWGOxdEab73 rIRviJmg6C27cidOUvOio+Ma/bAtigvbNQD3W51mryGo8uafo9ueRZOhsMlvJlai0Be6 jwbDmQOuJXeGZiMF+fh0O7CbhKH1RUpXde65GmielmDN6h4MFb8J4O9zRH5QMUTGpwrW so1fHmih2MF2QM2cUOxv51YRNJCOGXxSOS8fMGmxavFe5dwdaOK+ULMPUdvEENcre/WO ICRg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RQI6XJOi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1742839262; x=1743444062; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NPwjPtg1NHYPJu0mbuNi8RLQTzHXFY6VCn7Rq4mfuBQ=; b=FhlYEE3g00FMgi6GHIbKNgpS8mY1OKtF1EGd0HxM5D/hdtag65ce0SdXFwlf5t5R4y 9hC7QHB5xMGOy0ByFicWjPj5Lj2DKNNKHUCftzjl6evr8VRmvRNXdb6/BGHQ3ZmDSDl5 EeXB3HnTUfYZGEHixuPp5VJW6ubSmJJHOVC2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742839262; x=1743444062; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NPwjPtg1NHYPJu0mbuNi8RLQTzHXFY6VCn7Rq4mfuBQ=; b=hw5rO8wavehTioo2ifrfzAuhuLC9ABMGeMyRaWdrBvIi7c32qO5hJG4APcCSn3qnUh KfsuoW2zuKYHeOTt779/69gBf+lGWXhSiEDqjMK4/JKkKbGpxqVarROcbTDNAmzM81Hb eks99t+QilRd5gndBpIqfFBHGG/rEkAcG44XcdXeRSEZh8BlA7t/tx4ow1TbFA4y9FRs 4HcCFyOoO4qpBg0NWGehexL18gRmP+w+n1hd+6u5MmiwGc71d4kr1ObKIk9U0tWb9BuD D3UZV53W/6jZLFUzc0yuAsEMqO/y8kjIvL/4ZnXxjnI1BDdp+PxIrZpwMxZuZHdp1BhX bEbg== X-Forwarded-Encrypted: i=2; AJvYcCXllyrYaRJAaCVzJpwowwkoC/HYrUPvK7FE3k8wG0Qh/vIDbQ6VEZQkcsRk1B8GQLzc1ehVct/mybwEKWKX@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yw5qILADg9XN4duqldLYFdtjVC+Ul2OPiAu5wCyQ7K5Z/xcijuR YVW2VPTOoPCx743vCOHecs3cXvnWm6j7jYoJ97q4nA/u3UVLaJwL2XrfLMF2bRlgiQ== X-Google-Smtp-Source: AGHT+IEZZNPSIYKi2DJBCputj+YkrjbE2mna0Z1BFS9f/yrslhesiknz5PQlszDjbFsMUoCL4+0XrA== X-Received: by 2002:a05:6000:2b0c:b0:391:4bfd:6d5 with SMTP id ffacd0b85a97d-3997f9389d0mr7965204f8f.52.1742839261833; Mon, 24 Mar 2025 11:01:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=ARLLPAJ31RdNA1ycqU1y46LXEfauU8aIADUFZM3fzN6Qr+OfIQ== Received: by 2002:adf:ed10:0:b0:38f:21ce:c3c8 with SMTP id ffacd0b85a97d-3997970b1f1ls2388783f8f.2.-pod-prod-06-eu; Mon, 24 Mar 2025 11:01:00 -0700 (PDT) X-Received: by 2002:a5d:64e4:0:b0:38f:355b:13e9 with SMTP id ffacd0b85a97d-3997f8fa36emr13408992f8f.15.1742839259809; Mon, 24 Mar 2025 11:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742839259; cv=none; d=google.com; s=arc-20240605; b=BQpXvwzS8PENJhfW2I6KXdfReWnFnqM3YN5g0Y9RxofRE/i2bbq6A3XuPZ5nv2vj0V /XLEXrXmrWQPh5LjQTs06Ry0bKlDZaZbvofU6y9dJWXjDyoJ4BcPL7mDQvUjC7sMi+7W 0mgHR3+wglx/nygIfU3BeL18iQTw680bV4+QoMZMwxC6Dd0kINp2+9eTGOtfhmbUL9YO xNU00z8Ajgb4TzilARbZqkqo2nCHHEu5i9UDm+qXTAaBNyM5zfbwoCUgI4E1BGEnkq30 JNVymyqt4+4l1kfDppz6JUbGOaJKua1ppwwB/MxPcA4i548BtHyTW/igztPyGjFq/80E b2xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lWtLUy443OQX99OX0MPkxNLbUAbVdnOztC7Pi97r7KI=; fh=rY4murdn1MflvViWavG112HFLe3qvjXwNeUKdz+GYpc=; b=FnMDND+YiyV1ooscPfnJuQYY/FJxWBwFSr06xTqL8IOaut7yl4zFxmRAssPsHZjSFj GtuOo2P4vH9eNaGOOLq1oyYkzwBBMNdFLIFAwGhenVHnIEdNO7D5fvWgkp4nIimIc5Y+ A2Cz3a+2a1wvFKJhtWw/JrmYI6a2azQR3ro0jM7b3M6O2lbh0oxOdRmEBrE1uU05acPm bevoTZHttq9HWsgwq6rvh0lb3qO0xopJn1mPnnDd8m2WxBGSNIWqPyoU/kcazlOQYfyd 8i/P6Cyv23CQQEo8fw+K78fTuVT41SFNzfRmMiw/HnEqUHImpbuDzyldVckbQkLpRR6h 5O2w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RQI6XJOi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43d4fcaa6aesor27506805e9.4.2025.03.24.11.00.59 for (Google Transport Security); Mon, 24 Mar 2025 11:00:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ASbGncuVaEGRIQmSgjJDtq/d+w1LTd07FHm/cY/R3+a3mObAg1zNaF2F1lq1QUmOLgo drotxZdem9IL0ME3KldnGumplD5oj6k/KUwZwZjq6OVr/TK0rMllWSXhqZi8j+RFDZ7TUvgaOyA zxqqvAx6CsWjAfx9XfnGBoK+2YAnrffVP9WKq4RxWyAZY2sH+mu5SZI83wpgi8oQq+h1Ghl0ntb xQhSFdIOEhwUzthpjOvLXSGL9waU9hUs2bmzi8vrJF8ChvD7WvNRsL60lgvIpscy3H7DlMM64oz JAGPnVQFSOAaMxCCUkPuJIAPpPwXYV9rA7lvsDKX34jzeduaHgZjtufzFTWVfcuFRV90AKlodOU 1LnZ8BSLi4w4chh8SkiXc1Mf20ilixRhyArI= X-Received: by 2002:a05:6000:4012:b0:391:4674:b10f with SMTP id ffacd0b85a97d-3997f92d312mr11452577f8f.36.1742839259024; Mon, 24 Mar 2025 11:00:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.220]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556a4sm178289285e9.22.2025.03.24.11.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Mar 2025 11:00:58 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Patrice Chotard , Patrick Delaunay , Tom Rini , Vikas Manocha , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH 6/6] board: stm32f769-disco: support FRD400B25025-A-CTK display Date: Mon, 24 Mar 2025 19:00:30 +0100 Message-ID: <20250324180047.1571378-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> References: <20250324180047.1571378-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RQI6XJOi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Support FRIDA FRD400B25025-A-CTK display on stm32f769-disco board. As reported in the section 8.3 (i. e. Board revision history) of document UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes related to the board revision addressed by the patch: - Board MB1166 revision A-09: - LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK This means that the MB1166-A09 is using an NT35510 panel controller, unlike the previous versions which use an OTM8009A controller. Therefore, let's add support for NT35510 panel handling to the stm32f769-disco board configurations. Signed-off-by: Dario Binacchi --- configs/stm32f769-disco_defconfig | 2 ++ configs/stm32f769-disco_spl_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/stm32f769-disco_defconfig b/configs/stm32f769-disco_defconfig index 5be221afd2fa..e50d62e93bd6 100644 --- a/configs/stm32f769-disco_defconfig +++ b/configs/stm32f769-disco_defconfig @@ -52,12 +52,14 @@ CONFIG_DW_ALTDESCRIPTOR=y CONFIG_MII=y # CONFIG_PINCTRL_FULL is not set CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_STM32_QSPI=y CONFIG_VIDEO=y CONFIG_VIDEO_LOGO=y CONFIG_BACKLIGHT_GPIO=y +CONFIG_VIDEO_LCD_NOVATEK_NT35510=y CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y CONFIG_VIDEO_STM32=y CONFIG_VIDEO_STM32_DSI=y diff --git a/configs/stm32f769-disco_spl_defconfig b/configs/stm32f769-disco_spl_defconfig index 7d4bda440685..6229ee5089f5 100644 --- a/configs/stm32f769-disco_spl_defconfig +++ b/configs/stm32f769-disco_spl_defconfig @@ -75,6 +75,7 @@ CONFIG_MII=y # CONFIG_PINCTRL_FULL is not set CONFIG_SPL_PINCTRL=y CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_SPL_RAM=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SPI=y @@ -84,6 +85,7 @@ CONFIG_SPL_TIMER=y CONFIG_VIDEO=y CONFIG_VIDEO_LOGO=y CONFIG_BACKLIGHT_GPIO=y +CONFIG_VIDEO_LCD_NOVATEK_NT35510=y CONFIG_VIDEO_LCD_ORISETECH_OTM8009A=y CONFIG_VIDEO_STM32=y CONFIG_VIDEO_STM32_DSI=y