From nobody Fri Dec 26 15:22:44 2025 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A92D1EB3E for ; Thu, 4 Jan 2024 07:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="hrfzsH+v" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50e6ee8e911so210249e87.1 for ; Wed, 03 Jan 2024 23:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353054; x=1704957854; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oZHp7o9P6sSCcRzfgnf9GmPoPPKRvORDv/jTzo46w2U=; b=hrfzsH+vwSrcBzMmucik0aZHXRR7Pt4z9rItADrS3PjUV+bqxNH05vGO1DmxWucH1o RBszMFCIEtCNxyqizpSgmL7PJcaui+YZPfdJL/GQGlJD9lfsB7FqFIrS4iEny9OUNcZe Lf0OduwOYBh4Zx0nDzgFdcpZiR9xACuU3taEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353054; x=1704957854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oZHp7o9P6sSCcRzfgnf9GmPoPPKRvORDv/jTzo46w2U=; b=g7+RakxnZvfXF2bp5Jumx1MvP8OQ+n37t7xql5ayXFG+5R3HYaJsnPlH5BIOChH/NI cUEP5zW7MHQmMF+lE1411xz4r3xiA8uvGOYX1NtfJNK6PmLODcHumACIlEKWaJeTTy0a ZBwO4dBUQZA3q2tO98UD8T3U1/L/0ebmaAWZNL5oxuuZle7DwLlftwUzY33mYUMHk22C L+17fky+YMoptsK1hhOJUbCRzD44+WF/4awmigdReo0AfTLPQjUf9CcZH+8dQnf7QtYB 8fbsHTbmu9e0CssomuwLcQSl7EYa5enqzoDX2PxKrEM4h2Vl235fcV1SfvBHlFD7mRmh gPiw== X-Gm-Message-State: AOJu0Yy25+9kNHZTg4O/nOcVUJ0n3wcu8aD5TGqrB+9KY9PtCUYqvptR sZigNsejhkn8ZUQhTK0LNFjdyQxdR3FYADESJEGwlDwdLV4= X-Google-Smtp-Source: AGHT+IG4i/97hJ8aDZ8aV7oljAPTtFLXwe5GU9eipdE578f3Arlwv9CTDaie3sHsTnqpOAseTOaxdg== X-Received: by 2002:a05:6512:3c81:b0:50e:aa96:73ed with SMTP id h1-20020a0565123c8100b0050eaa9673edmr145525lfv.136.1704353054338; Wed, 03 Jan 2024 23:24:14 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:13 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Conor Dooley , Krzysztof Kozlowski , Lee Jones , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 1/8] dt-bindings: mfd: stm32f7: Add binding definition for DSI Date: Thu, 4 Jan 2024 08:23:37 +0100 Message-ID: <20240104072407.41290-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add binding definition for MIPI DSI Host controller. Signed-off-by: Dario Binacchi Acked-by: Conor Dooley --- (no changes since v2) Changes in v2: - Add Acked-by tag of Conor Dooley include/dt-bindings/mfd/stm32f7-rcc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/mfd/stm32f7-rcc.h b/include/dt-bindings/mf= d/stm32f7-rcc.h index 8d73a9c51e2b..a4e4f9271395 100644 --- a/include/dt-bindings/mfd/stm32f7-rcc.h +++ b/include/dt-bindings/mfd/stm32f7-rcc.h @@ -108,6 +108,7 @@ #define STM32F7_RCC_APB2_SAI1 22 #define STM32F7_RCC_APB2_SAI2 23 #define STM32F7_RCC_APB2_LTDC 26 +#define STM32F7_RCC_APB2_DSI 27 =20 #define STM32F7_APB2_RESET(bit) (STM32F7_RCC_APB2_##bit + (0x24 * 8)) #define STM32F7_APB2_CLOCK(bit) (STM32F7_RCC_APB2_##bit + 0xA0) --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AFA41EB42 for ; Thu, 4 Jan 2024 07:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="FiOP54LW" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-55559e26ccfso254555a12.3 for ; Wed, 03 Jan 2024 23:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353055; x=1704957855; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mmQnQzOW0HVCglZmRdERbSkiK/7LfpA/GFNr/QR6hMQ=; b=FiOP54LWRtPAJekmY7ZJISVrwBkRGJKBAKGPH7c51kuhUOMgUj/ZI6alLrLxRJCQfc NdqUhquMr4KtVb5I52QgpSmR8KifiSlojkrTZkf6Og98pTeTjWOE7Y5T1B8JUiPUatxn G205tRAwFGzz+g1+exE6L8mt3IqH3SoYT9M4E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353055; x=1704957855; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mmQnQzOW0HVCglZmRdERbSkiK/7LfpA/GFNr/QR6hMQ=; b=jg5aLL+qIn/AdpZ6Vfjs1iAr8IU1Xkzybj9MgOsKRoszJMbLxD+6axisQClgCMMkpj MtgzwyAch7OSvC62n8PC2MbK4YmCQIRBVoHSmAlStisd2VqLe6+7wgMVVWQ585c78WeC pQM0OpXGOcyAyL51g2ZJqJMDSv9FzBisDx+DBi8erv05FdMEEr0+cGb72nBcYBO4eXzb yVlRdawsGbVnTj/fnm0P33zE/ELIid/+V5gdjPwDEZcdFG5AbBaZqrAVySpmTp+/uUrm cmz4cqnltuTsxvCZQL7t1nPvrTjbAIh8XTXu2lEiaUcliD0PL5DpmRF13Dq5Z459EgWm gN2Q== X-Gm-Message-State: AOJu0YxnXiC3JQMvGyEZG20WbWtlJG2Ge9PcdGGO77ITCgGLV2wNbzp8 qkngqU9JmO0CIKLBMypFoHJq/palZTvpU9AQNaDS0/JGT94= X-Google-Smtp-Source: AGHT+IGXvFWA8mDJu1Q7c0DYedSHw+rzfURNkb0c8LR8zcADT4bTICSmcFYro73weF3aE9KSua+6vw== X-Received: by 2002:a50:cd91:0:b0:54c:4837:7d26 with SMTP id p17-20020a50cd91000000b0054c48377d26mr72929edi.101.1704353055677; Wed, 03 Jan 2024 23:24:15 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:15 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 2/8] ARM: dts: stm32: add DSI support on stm32f769 Date: Thu, 4 Jan 2024 08:23:38 +0100 Message-ID: <20240104072407.41290-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- (no changes since v1) arch/arm/boot/dts/st/stm32f769.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 arch/arm/boot/dts/st/stm32f769.dtsi diff --git a/arch/arm/boot/dts/st/stm32f769.dtsi b/arch/arm/boot/dts/st/stm= 32f769.dtsi new file mode 100644 index 000000000000..e09184f7079c --- /dev/null +++ b/arch/arm/boot/dts/st/stm32f769.dtsi @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Dario Binacchi + */ + +#include "stm32f746.dtsi" + +/ { + soc { + dsi: dsi@40016c00 { + compatible =3D "st,stm32-dsi"; + reg =3D <0x40016c00 0x800>; + interrupts =3D <98>; + clocks =3D <&rcc 1 CLK_F769_DSI>, <&clk_hse>; + clock-names =3D "pclk", "ref"; + resets =3D <&rcc STM32F7_APB2_RESET(DSI)>; + reset-names =3D "apb"; + status =3D "disabled"; + }; + }; +}; --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3AFE200A4 for ; Thu, 4 Jan 2024 07:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="eg7d5GxQ" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-554fe147ddeso225804a12.3 for ; Wed, 03 Jan 2024 23:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353057; x=1704957857; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/mPDNXnb7QOonc0RYCjpM23Kv+HuP4dW7ug+KwP2qeg=; b=eg7d5GxQDh4uStHHCFV+LN6cunRw8fa4OBuBM4k4H+WNQ39m8a6aS7+Ws5fBHf21jh uVxqJfwfO9YhL1AeZ7nw9CiiLn4Y+VIE4APNngisWp6OpdQ25/QwAu6aVdh7QHVCm10v QYqZK85e62NOBx7EdmCuTvp4qZnfhW9yHjQkU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353057; x=1704957857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/mPDNXnb7QOonc0RYCjpM23Kv+HuP4dW7ug+KwP2qeg=; b=Ee3syvOuLMW1mta+NdjC08fVoSomU8CsWvb+UOqtf+lIcL7IWeFZSG15NEpflV/70W cHRNoJiWkSLCe1kKbQpeAJARrdX2gdd9UogTmpqKr1DLjJSBZJVJkw61J51i0whYPkUo cs4so/X3UBkKajZQbluFtpDSqEpgxsatB8B1+GTHhTw92haIUvcnytTf8u70Fjl9lAiU WWeCguvg9HchWFz3M/9cR01X534cTUH9XHxcwLtywwQcyLZqk39NNrrnJjygJZZUFy9s L1ZIGYAm80WEYm+boRRecpEIM+sAnjKSbLviSoHyGbls5tUYm20hD3NXiUzpuUmVON5w joPg== X-Gm-Message-State: AOJu0YzVhHCSCT/xAbi5/au1x8g1J+rYcEAAnxVw1SlQSBdB1yl4Mdaw CYvT/6NPmfxh15T8eJGzY9PBpso/7Gx7BtGWxJ1jxY2qRgU= X-Google-Smtp-Source: AGHT+IGbhhZ5MqRf1nGZNrp4OpJ+DbAWZ+3Z4dyfPxAV2i1YTbF7RzAqNCf2zXHbQ+3z2GAYZ9ZhPA== X-Received: by 2002:aa7:d504:0:b0:553:861a:4963 with SMTP id y4-20020aa7d504000000b00553861a4963mr59063edq.65.1704353057013; Wed, 03 Jan 2024 23:24:17 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:16 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 3/8] ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco Date: Thu, 4 Jan 2024 08:23:39 +0100 Message-ID: <20240104072407.41290-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- (no changes since v1) arch/arm/boot/dts/st/stm32f769-disco.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/st/stm32f769-disco.dts b/arch/arm/boot/dts/s= t/stm32f769-disco.dts index 5d12ae25b327..8632bd866272 100644 --- a/arch/arm/boot/dts/st/stm32f769-disco.dts +++ b/arch/arm/boot/dts/st/stm32f769-disco.dts @@ -92,9 +92,9 @@ usbotg_hs_phy: usb-phy { clock-names =3D "main_clk"; }; =20 - mmc_vcard: mmc_vcard { + vcc_3v3: vcc_3v3 { compatible =3D "regulator-fixed"; - regulator-name =3D "mmc_vcard"; + regulator-name =3D "vcc_3v3"; regulator-min-microvolt =3D <3300000>; regulator-max-microvolt =3D <3300000>; }; @@ -128,7 +128,7 @@ &rtc { =20 &sdio2 { status =3D "okay"; - vmmc-supply =3D <&mmc_vcard>; + vmmc-supply =3D <&vcc_3v3>; cd-gpios =3D <&gpioi 15 GPIO_ACTIVE_LOW>; broken-cd; pinctrl-names =3D "default", "opendrain", "sleep"; --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CD1D20309 for ; Thu, 4 Jan 2024 07:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="Wbma6r3F" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-556cd81163fso258938a12.1 for ; Wed, 03 Jan 2024 23:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353058; x=1704957858; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c6lTYGwOZkH/q3mVT10Wfxgf2APvMbHICMTqCuHaYlQ=; b=Wbma6r3FfFGSsUM/uJC1ukkLc1uSrLUvlrrIZqT32pH2AKs4VTCaoZ+8uVbqD2gspm Q2jljneuqsXr5VmbdLaLzyhXOvdgLugJgNqfukFN0CX25v8qJKyJAMLjUg/+GoHkCcOV t0jC+65RJzBSDpEKTFK987obx0D672g2E8QEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353058; x=1704957858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c6lTYGwOZkH/q3mVT10Wfxgf2APvMbHICMTqCuHaYlQ=; b=PPHBEbNbApbyJ3Cx7BAXS7PJzLy6SBMqQXZU/7DzM0UHtv0IV22irs6yoBrZrVHqCF 8Ak9ESAVVKP9GZxE9SwA9eWKWnowbm4hFLxPtLQ3DSSJ44RybgR/mgvAXTlPIdurG9Ti E/DXqSGFyQGNEwGLAcqxWqtuGViXBLzLjmFditmxUAsozkSeoN5yYXQkuUdUkjqujTL9 CnCU7BZY12V06kIQI1BFo+HfcTC6TcW+OWFmQksWij+4pHbdeqWSglwpCecGgCwPHslN 0cedGrVh///SWZoqtKK9S/HtVU36z9u7mftT5FzMp40p6UN6C3JXspCJD+OobzLSm7WS 0YxQ== X-Gm-Message-State: AOJu0YygpDX4zsy6bZnYWuXMT3nMeGvl5pYWisoHJXAnk950fBOpfw+5 nuIjlbjXcGqWEVrb/oz6KWxYtlxi5x3jtUnpqDlB/Qz7pPU= X-Google-Smtp-Source: AGHT+IEi1tjyudB+AlxFI3mOIsNaGoyN02iNwVs9Z58wHE1jX4dbX/BxE2D06J04jM41TUZ8iMVV6w== X-Received: by 2002:a50:aa8b:0:b0:551:41c6:695 with SMTP id q11-20020a50aa8b000000b0055141c60695mr70777edc.13.1704353058515; Wed, 03 Jan 2024 23:24:18 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:18 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 4/8] ARM: dts: stm32: add display support on stm32f769-disco Date: Thu, 4 Jan 2024 08:23:40 +0100 Message-ID: <20240104072407.41290-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The patch adds display support on the stm32f769-disco board. Signed-off-by: Dario Binacchi --- (no changes since v1) arch/arm/boot/dts/st/stm32f769-disco.dts | 72 +++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/st/stm32f769-disco.dts b/arch/arm/boot/dts/s= t/stm32f769-disco.dts index 8632bd866272..d1eb5f9c78bf 100644 --- a/arch/arm/boot/dts/st/stm32f769-disco.dts +++ b/arch/arm/boot/dts/st/stm32f769-disco.dts @@ -41,7 +41,7 @@ */ =20 /dts-v1/; -#include "stm32f746.dtsi" +#include "stm32f769.dtsi" #include "stm32f769-pinctrl.dtsi" #include #include @@ -60,6 +60,19 @@ memory@c0000000 { reg =3D <0xC0000000 0x1000000>; }; =20 + reserved-memory { + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + linux,dma { + compatible =3D "shared-dma-pool"; + linux,dma-default; + no-map; + size =3D <0x100000>; + }; + }; + aliases { serial0 =3D &usart1; }; @@ -85,6 +98,13 @@ button-0 { }; }; =20 + panel_backlight: panel-backlight { + compatible =3D "gpio-backlight"; + gpios =3D <&gpioi 14 GPIO_ACTIVE_HIGH>; + default-on; + status =3D "okay"; + }; + usbotg_hs_phy: usb-phy { #phy-cells =3D <0>; compatible =3D "usb-nop-xceiv"; @@ -114,6 +134,46 @@ &clk_hse { clock-frequency =3D <25000000>; }; =20 +&dsi { + #address-cells =3D <1>; + #size-cells =3D <0>; + status =3D "okay"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dsi_in: endpoint { + remote-endpoint =3D <<dc_out_dsi>; + }; + }; + + port@1 { + reg =3D <1>; + dsi_out: endpoint { + remote-endpoint =3D <&dsi_panel_in>; + }; + }; + }; + + panel0: panel-dsi@0 { + compatible =3D "orisetech,otm8009a"; + reg =3D <0>; /* dsi virtual channel (0..3) */ + reset-gpios =3D <&gpioj 15 GPIO_ACTIVE_LOW>; + power-supply =3D <&vcc_3v3>; + backlight =3D <&panel_backlight>; + status =3D "okay"; + + port { + dsi_panel_in: endpoint { + remote-endpoint =3D <&dsi_out>; + }; + }; + }; +}; + &i2c1 { pinctrl-0 =3D <&i2c1_pins_b>; pinctrl-names =3D "default"; @@ -122,6 +182,16 @@ &i2c1 { status =3D "okay"; }; =20 +<dc { + status =3D "okay"; + + port { + ltdc_out_dsi: endpoint@0 { + remote-endpoint =3D <&dsi_in>; + }; + }; +}; + &rtc { status =3D "okay"; }; --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 189E6208AD for ; Thu, 4 Jan 2024 07:24:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="IV8bzpKz" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5569472f775so237711a12.2 for ; Wed, 03 Jan 2024 23:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353060; x=1704957860; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WW0o6HHPG/mM4iGv+v8jU++HNDacNhnTQtmfUNegT7U=; b=IV8bzpKzWoc3EKiLeVAQPVyc+dT4w42gncN6bW6LlDzEJPAZUnFNHAqeElAUI9ILJi UiyvXH+M6JpujVywZjBxBk7J8bDo3eHpamknDF67uSZCRCfS0qCQ/9tXZF30WMVFazYe DpB3KP8NqDBKJsxEQ1z0xqSA+QLld858TC66s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353060; x=1704957860; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WW0o6HHPG/mM4iGv+v8jU++HNDacNhnTQtmfUNegT7U=; b=aHLnTK3MPd8c1cEehLCIxCZeZ1NPYygxAAsi+R382FXiWNMTdKhTNdKSmBS+ZscrjL obkTLF1G2V9pXR7mEDloC+RwIvd6hjXyWNTc6nQDv0PAvcSLdhf8Qu0XoA9s5Q0ie1Td zgSXMLNg8SNXEkWrWyoOhPWbOcKDVygI9yx6evOCzBJSgObsYkUu2R4hJervFMXR+cbh Vl7PIYu1s7fuYUTd6rC6mEPJcPkgizZiqLg5w47LoDczbHiJnxeGeEVrNHoGUpx3XDt0 4/M55GYyjPGrlGrv6pKCqzCIg2z6nGTecX0hxZwB7OIlIruw06xXpEmZlc1U/7WKu3vq ERnA== X-Gm-Message-State: AOJu0YykD92jhmOUB+KWhGnrtQ5vb3QjPrDh6/z1eWyJRBIyogfZ8Dr3 6A/a9dX1ecQFV1slbmbMxFTbf58yjL5haBi52i1WKdKqq+A= X-Google-Smtp-Source: AGHT+IHvPIuIgJDDjbDtuf22xYU9uk+ojoUO5bL5pNWzXog8ZZJcQKnDJWkQWIRkgRGZKp+vHmjunA== X-Received: by 2002:a50:c082:0:b0:557:eb1:bb3c with SMTP id k2-20020a50c082000000b005570eb1bb3cmr3997edf.53.1704353060246; Wed, 03 Jan 2024 23:24:20 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:19 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Conor Dooley , Daniel Vetter , David Airlie , Jessica Zhang , Krzysztof Kozlowski , Linus Walleij , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Rob Herring , Sam Ravnborg , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 5/8] dt-bindings: nt35510: add compatible for FRIDA FRD400B25025-A-CTK Date: Thu, 4 Jan 2024 08:23:41 +0100 Message-ID: <20240104072407.41290-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The patch adds the FRIDA FRD400B25025-A-CTK panel, which belongs to the Novatek NT35510-based panel family. Signed-off-by: Dario Binacchi --- Changes in v3: - Use "enum" to have less code changed Changes in v2: - Add a dash in front of each "items:" .../devicetree/bindings/display/panel/novatek,nt35510.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt3551= 0.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt35510.ya= ml index bc92928c805b..43afb316e0e9 100644 --- a/Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml @@ -15,7 +15,9 @@ allOf: properties: compatible: items: - - const: hydis,hva40wv1 + - enum: + - hydis,hva40wv1 + - frida,frd400b25025 - const: novatek,nt35510 description: This indicates the panel manufacturer of the panel that is in turn using the NT35510 panel driver. The compatible --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1988208D0 for ; Thu, 4 Jan 2024 07:24:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="CH4SDKGZ" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-50e5a9bcec9so239175e87.3 for ; Wed, 03 Jan 2024 23:24:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353062; x=1704957862; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tEGmlMiozwdCujUlwuswF2ibPRmO4ymakUkp4ma1zKM=; b=CH4SDKGZJUTpG0OguuvRsb7N4O0dZrUTadz9FDBrqbFMmWwaARAlsTOhYWTYbw1pbY gQTzQUiGwEtBLOPV3+G7GpRfc51JEqaSltImo4PXlNbcrxMGD94LBbAO4i96SFCTI4tl g5JaNNPNIq76ogbGBVNlzjaMwSBaTKEDk3JKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353062; x=1704957862; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tEGmlMiozwdCujUlwuswF2ibPRmO4ymakUkp4ma1zKM=; b=NBsGsBOJ10+MOeQmGHQv2NF2+a/j4AtTVnH2IoU1niJqV/o+kzqQdlxtxu8MaQBAnK YZUoPoutDDa7uOK+dymedkOj4woMcZMxohfch/SrHV8ueYyl+VTxf22AhR6fiM8qsJtX pIeMVtnOZYKThGA5IlEO6e/dec32pM1LamkpnPm5I0Vswg1vtv92QGPWZTlwWjpR9hcD u+V1821qHYnnF1MY5LM2jEt0Rt/mYOz9PvLX9fQ+C93Agj2FshD8AloiLq1MOvSuNFaz CkFIAamREaLQ6XOUuZJMkVlB2o1Fc7bw1dSmdc2Loqzglsw232nYolfI0++GYze1M8Zp 4MOQ== X-Gm-Message-State: AOJu0YyrTXnzZtNeCQm5QsMvQf1tXve8JI7mpRL9/poQc9d9Db+gmO8V b/xq/8GWX+wdAoPJ3sDzJ4BvRZlaMs0eU6yXVOgaXilgy3o= X-Google-Smtp-Source: AGHT+IHw4kddbHAnr5IWzfXghTWfA1MumXEMWOqnoBQ0oz77fbQBP1rZNEUM9SeYcBK8H4ieaThBGw== X-Received: by 2002:a2e:a555:0:b0:2cc:dabc:47dd with SMTP id e21-20020a2ea555000000b002ccdabc47ddmr147911ljn.5.1704353061798; Wed, 03 Jan 2024 23:24:21 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:21 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Andre Przywara , Conor Dooley , Enric Balletbo i Serra , Geert Uytterhoeven , Krzysztof Kozlowski , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , Maxime Coquelin , Patrice Chotard , Rob Herring , Sean Nyekjaer , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 6/8] ARM: dts: add stm32f769-disco-mb1225-revb03-mb1166-reva09 Date: Thu, 4 Jan 2024 08:23:42 +0100 Message-ID: <20240104072407.41290-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 revisions addressed by the patch: - Board MB1225 revision B-03: - Memory MICRON MT48LC4M32B2B5-6A replaced by ISSI IS42S32400F-6BL - Board MB1166 revision A-09: - LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK The patch only adds the DTS support for the new display which belongs to to the Novatek NT35510-based panel family. Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - Change the status of panel_backlight node to "disabled" - Delete backlight property from panel0 node. arch/arm/boot/dts/st/Makefile | 1 + ...2f769-disco-mb1225-revb03-mb1166-reva09.dts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 arch/arm/boot/dts/st/stm32f769-disco-mb1225-revb03-mb11= 66-reva09.dts diff --git a/arch/arm/boot/dts/st/Makefile b/arch/arm/boot/dts/st/Makefile index 7892ad69b441..390dbd300a57 100644 --- a/arch/arm/boot/dts/st/Makefile +++ b/arch/arm/boot/dts/st/Makefile @@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_STM32) +=3D \ stm32f469-disco.dtb \ stm32f746-disco.dtb \ stm32f769-disco.dtb \ + stm32f769-disco-mb1225-revb03-mb1166-reva09.dts \ stm32429i-eval.dtb \ stm32746g-eval.dtb \ stm32h743i-eval.dtb \ diff --git a/arch/arm/boot/dts/st/stm32f769-disco-mb1225-revb03-mb1166-reva= 09.dts b/arch/arm/boot/dts/st/stm32f769-disco-mb1225-revb03-mb1166-reva09.d= ts new file mode 100644 index 000000000000..014cac192375 --- /dev/null +++ b/arch/arm/boot/dts/st/stm32f769-disco-mb1225-revb03-mb1166-reva09.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Dario Binacchi + */ + +#include "stm32f769-disco.dts" + +&panel_backlight { + status =3D "disabled"; +}; + +&panel0 { + compatible =3D "frida,frd400b25025", "novatek,nt35510"; + vddi-supply =3D <&vcc_3v3>; + vdd-supply =3D <&vcc_3v3>; + /delete-property/backlight; + /delete-property/power-supply; +}; --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D7CA1EB36 for ; Thu, 4 Jan 2024 07:24:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="aQUFk26r" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-554e902064aso250070a12.1 for ; Wed, 03 Jan 2024 23:24:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353063; x=1704957863; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mFqXTGTlYTvcm2/UHRhYI2FZvx1qxWqmcpgcCxysnrA=; b=aQUFk26rKu88t6kV43PT5bj/eS3iE0LkI+Yevh+RLRHOADTKCfe+Go8KVkpQ8gQfoV HZbpIqQzKxTjfAOt9jsWTBkBtrnmMQm8hkk03kvTadAODP3GBvn6jMNb94+3V80QncSw OWg2DEhiZiLTyzmxDX33xvrDj8ciso17g+/UI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353063; x=1704957863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mFqXTGTlYTvcm2/UHRhYI2FZvx1qxWqmcpgcCxysnrA=; b=Km9joYUGKaPpRRYDLph9jiMliKQ6K9+RaVhJDpr3Q7kz5pGQVyrwYC2frwOXsf8nwk EIQylVmMj1Mqmb2TZHO3/NsgBfZcNzNGs3Dek25DFnIBW3Cqdn+PhYOS34KFtTTu7vWf CE6EKNJRiDCiehfxlW0yGAU+iIz6bXFhoi1eIacVSClWWouguLh/AuOWRYuAzfNruG/E UvsTkMis9Dn530CD/oXUhvPlZLFosJZ8vzsyQ9E/LugjaZl3vvHMmY00IncaOURac4yX w+zi5a/7U+C4i7bjEOdcYfHFzaH9UBA79CGV4xPJfkWOv0t0RTVmfS/EDolS5Y0yfxal 8GlQ== X-Gm-Message-State: AOJu0YxMA1xU0AfszftA/sHoF7DLIZeYeqDutJSUJ6NA/YkAeLY9lITn gNQYp0KbPoi5Q3gz/tqZi3W2ZgdkaSMeGB9cAB/oYCZ5tYI= X-Google-Smtp-Source: AGHT+IGolS0OhHeJLWuXVGp17JD5oFnWT5GUJqwxizGFJZGbuBQMMK6lVUcoO2+IH3z6wINukqMX4w== X-Received: by 2002:a50:c19a:0:b0:557:c95:1362 with SMTP id m26-20020a50c19a000000b005570c951362mr36824edf.34.1704353063454; Wed, 03 Jan 2024 23:24:23 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:22 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Daniel Vetter , David Airlie , Jessica Zhang , Linus Walleij , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v3 7/8] drm/panel: nt35510: move hardwired parameters to configuration Date: Thu, 4 Jan 2024 08:23:43 +0100 Message-ID: <20240104072407.41290-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch, preparatory for future developments, move the hardwired parameters to configuration data to allow the addition of new NT35510-based panels. Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - Re-write the patch [7/8] "drm/panel: nt35510: refactor panel initializati= on" in the same style as the original driver in order to maintain the same structure. drivers/gpu/drm/panel/panel-novatek-nt35510.c | 140 ++++++++++++++---- 1 file changed, 115 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/dr= m/panel/panel-novatek-nt35510.c index d6dceb858008..ce8969f48286 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -171,6 +171,10 @@ struct nt35510_config { * timing in the display controller. */ const struct drm_display_mode mode; + /** + * @mode_flags: DSI operation mode related flags + */ + unsigned long mode_flags; /** * @avdd: setting for AVDD ranging from 0x00 =3D 6.5V to 0x14 =3D 4.5V * in 0.1V steps the default is 0x05 which means 6.0V @@ -273,6 +277,100 @@ struct nt35510_config { * same layout of bytes as @vgp. */ u8 vgn[NT35510_P1_VGN_LEN]; + /** + * @dopctr: setting optional control for display + * ERR bits 0..1 in the first byte is the ERR pin output signal setting. + * 0 =3D Disable, ERR pin output low + * 1 =3D ERR pin output CRC error only + * 2 =3D ERR pin output ECC error only + * 3 =3D 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 =3D R[4:0] + G[5:3] & G[2:0] + B[4:0] + * 1 =3D 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 =3D reporting when error + * 1 =3D not reporting when error + * DSIM bit 4 in the first byte is the video mode data type enable + * 0 =3D Video mode data type disable + * 1 =3D 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 =3D Generic r/w disable + * 1 =3D Generic r/w enable + * The default is 0. + * DSITE bit 6 in the first byte is TE line enable + * 0 =3D TE line is disabled + * 1 =3D 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 =3D contents loss in sleep-in + * 1 =3D 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 =3D 0) =3D S1 -> S1440 + * 0 (RMSX =3D 1) =3D S1440 -> S1 + * 1 (RMSX =3D 0) =3D S1440 -> S1 + * 1 (RMSX =3D 1) =3D 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 =3D 0) =3D Forward (top -> bottom) + * 0 (ML =3D 1) =3D Reverse (bottom -> top) + * 1 (ML =3D 0) =3D Reverse (bottom -> top) + * 1 (ML =3D 1) =3D 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 =3D 0) =3D RGB/Normal + * 0 (RGB =3D 1) =3D BGR/RB swap + * 1 (RGB =3D 0) =3D BGR/RB swap + * 1 (RGB =3D 1) =3D 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 =3D 0 or DSTB_SEL =3D 1, + * VSEL =3D High and VDDI =3D 1.665~3.3V). + * 0 =3D TE output voltage level is VDDI + * 1 =3D 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 =3D RGB color sequence + * 1 =3D 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 =3D 0..31.5us in steps of 0.5us + * The default is 0x05 =3D 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 =3D 3.5us + * GREQ_XX[7:4]: time setting of EQ step for rising edge in steps + * of 0.5us. + * The default is 0x07 =3D 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 @@ -536,46 +634,28 @@ static int nt35510_setup_display(struct nt35510 *nt) { struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(nt->dev); const struct nt35510_config *conf =3D nt->conf; - u8 dopctr[NT35510_P0_DOPCTR_LEN]; - u8 gseqctr[NT35510_P0_GSEQCTR_LEN]; u8 dpfrctr[NT35510_P0_DPFRCTR1_LEN]; - /* FIXME: set up any rotation (assume none for now) */ - u8 addr_mode =3D NT35510_ROTATE_0_SETTING; - u8 val; int ret; =20 - /* Enable TE, EoTP and RGB pixel format */ - dopctr[0] =3D NT35510_DOPCTR_0_DSITE | NT35510_DOPCTR_0_EOTP | - NT35510_DOPCTR_0_N565; - dopctr[1] =3D NT35510_DOPCTR_1_CTB; ret =3D nt35510_send_long(nt, dsi, NT35510_P0_DOPCTR, NT35510_P0_DOPCTR_LEN, - dopctr); + conf->dopctr); if (ret) return ret; =20 - ret =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_ADDRESS_MODE, &addr_mode, - sizeof(addr_mode)); + ret =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_ADDRESS_MODE, &conf->madctl, + sizeof(conf->madctl)); if (ret < 0) return ret; =20 - /* - * Source data hold time, default 0x05 =3D 2.5us - * 0x00..0x3F =3D 0 .. 31.5us in steps of 0.5us - * 0x0A =3D 5us - */ - val =3D 0x0A; - ret =3D mipi_dsi_dcs_write(dsi, NT35510_P0_SDHDTCTR, &val, - sizeof(val)); + ret =3D mipi_dsi_dcs_write(dsi, NT35510_P0_SDHDTCTR, &conf->sdhdtctr, + sizeof(conf->sdhdtctr)); if (ret < 0) return ret; =20 - /* EQ control for gate signals, 0x00 =3D 0 us */ - gseqctr[0] =3D 0x00; - gseqctr[1] =3D 0x00; ret =3D nt35510_send_long(nt, dsi, NT35510_P0_GSEQCTR, NT35510_P0_GSEQCTR_LEN, - gseqctr); + conf->gseqctr); if (ret) return ret; =20 @@ -896,7 +976,6 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) */ dsi->hs_rate =3D 349440000; dsi->lp_rate =3D 9600000; - dsi->mode_flags =3D MIPI_DSI_CLOCK_NON_CONTINUOUS; =20 /* * Every new incarnation of this display must have a unique @@ -908,6 +987,8 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) return -ENODEV; } =20 + dsi->mode_flags =3D nt->conf->mode_flags; + nt->supplies[0].supply =3D "vdd"; /* 2.3-4.8 V */ nt->supplies[1].supply =3D "vddi"; /* 1.65-3.3V */ ret =3D devm_regulator_bulk_get(dev, ARRAY_SIZE(nt->supplies), @@ -1030,6 +1111,7 @@ static const struct nt35510_config nt35510_hydis_hva4= 0wv1 =3D { .vtotal =3D 800 + 2 + 0 + 5, /* VBP =3D 5 */ .flags =3D 0, }, + .mode_flags =3D MIPI_DSI_CLOCK_NON_CONTINUOUS, /* 0x09: AVDD =3D 5.6V */ .avdd =3D { 0x09, 0x09, 0x09 }, /* 0x34: PCK =3D Hsync/2, BTP =3D 2 x VDDB */ @@ -1050,6 +1132,14 @@ static const struct nt35510_config nt35510_hydis_hva= 40wv1 =3D { .vgp =3D { 0x00, 0xA3, 0x00 }, /* VGMP: 0x0A3 =3D 5.0375V, VGSP =3D 0V */ .vgn =3D { 0x00, 0xA3, 0x00 }, + /* Enable TE, EoTP and RGB pixel format */ + .dopctr =3D { NT35510_DOPCTR_0_DSITE | NT35510_DOPCTR_0_EOTP | + NT35510_DOPCTR_0_N565, NT35510_DOPCTR_1_CTB }, + .madctl =3D NT35510_ROTATE_180_SETTING, + /* 0x0A: SDT =3D 5 us */ + .sdhdtctr =3D 0x0A, + /* EQ control for gate signals, 0x00 =3D 0 us */ + .gseqctr =3D { 0x00, 0x00 }, /* SDEQCTR: source driver EQ mode 2, 2.5 us rise time on each step */ .sdeqctr =3D { 0x01, 0x05, 0x05, 0x05 }, /* SDVPCTR: Normal operation off color during v porch */ --=20 2.43.0 From nobody Fri Dec 26 15:22:44 2025 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26C9620B28 for ; Thu, 4 Jan 2024 07:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="GLQu/VKr" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-555f95cc2e4so244681a12.3 for ; Wed, 03 Jan 2024 23:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1704353065; x=1704957865; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xWXC08AomogX9fJjDHe3MxBIDHnKEfsu8+LOFUoPPqY=; b=GLQu/VKr7toLromD7Ag/32q2Aw/qxd0rlt82toeyPHY1x4r5P5APg+GT4uOzEcZ4jP p0LgChKa8qDuH8Yk1Rg2ORvNtjjA3TpGkvSGYIRdDB0GTBERtDm+akW4HaVo/hU+1oa4 leCAz//xOjwD2iXrzfVI/KEr6XZx9edPrrZJI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704353065; x=1704957865; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xWXC08AomogX9fJjDHe3MxBIDHnKEfsu8+LOFUoPPqY=; b=sdA7GxYw/Utzba42zh3Skk3DFjfVzOjnpV4u9wCveU24mtZLSGQ3Myn0qByPP8srM3 63W+LNrXS7s3w7wE6/klSCi1k6j8MLYR9ISsTRjdBbCzNhPIiKbEkpwaXYEwa3MN+ONR s6vpUuJSjrO2I8ezZxZPx+kxPrlud9kgzamq1p1TNlsINI3uLyiSt3fb/sFfGCARVB+C qkh2OQQHRIc7737V1cyZL3WaaQnwfsH+wtKWOdNNc5+jIpvK8JYtExsDynk6NNUcBqLF BvK2TmKcyjyp8YxTbi/qFvMXVopTLve32f8mILxbLJjWY328HggTPubUf944xDu1T4G4 u6vg== X-Gm-Message-State: AOJu0YzY3GD8ooKqW0FCuq8cHKpeXfjRzFwBXCKMSgrXqneMYPQZg8yK eNESMsD5dykB5KK5WeiINDEUpdSDkSl+I+eudD+rJ2U3EWM= X-Google-Smtp-Source: AGHT+IGPMbdQfMOH07dDXotaO9QeIhqPnUIlXjQuWZ5LXIvkJSyIt5BiMSytKGKOzq3rwMMYXESNOA== X-Received: by 2002:a50:c01e:0:b0:557:b8f:3f3a with SMTP id r30-20020a50c01e000000b005570b8f3f3amr71951edb.75.1704353065121; Wed, 03 Jan 2024 23:24:25 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (net-93-150-255-34.cust.vodafonedsl.it. [93.150.255.34]) by smtp.gmail.com with ESMTPSA id d3-20020a056402000300b00553772c2968sm18530735edu.82.2024.01.03.23.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 23:24:24 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Alexandre Torgue , Dario Binacchi , Daniel Vetter , David Airlie , Jessica Zhang , Linus Walleij , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v3 8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK Date: Thu, 4 Jan 2024 08:23:44 +0100 Message-ID: <20240104072407.41290-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> References: <20240104072407.41290-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The initialization commands are taken from the STMicroelectronics driver found at [1]. To ensure backward compatibility, flags have been added to enable gamma correction setting and display control. In other cases, registers have been set to their default values according to the specifications found in the datasheet. [1] https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/B= SP/Components/nt35510/ Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - Re-write the patch [8/8] "drm/panel: nt35510: support FRIDA FRD400B25025-= A-CTK" in the same style as the original driver. drivers/gpu/drm/panel/panel-novatek-nt35510.c | 282 ++++++++++++++++-- 1 file changed, 251 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/dr= m/panel/panel-novatek-nt35510.c index ce8969f48286..c85dd0d0829d 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -36,6 +36,9 @@ #include #include =20 +#define NT35510_CMD_CORRECT_GAMMA BIT(0) +#define NT35510_CMD_CONTROL_DISPLAY BIT(1) + #define MCS_CMD_MAUCCTR 0xF0 /* Manufacturer command enable */ #define MCS_CMD_READ_ID1 0xDA #define MCS_CMD_READ_ID2 0xDB @@ -112,18 +115,33 @@ /* 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 =20 +#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 * @@ -175,6 +193,10 @@ struct nt35510_config { * @mode_flags: DSI operation mode related flags */ unsigned long mode_flags; + /** + * @cmds: enable DSI commands + */ + u32 cmds; /** * @avdd: setting for AVDD ranging from 0x00 =3D 6.5V to 0x14 =3D 4.5V * in 0.1V steps the default is 0x05 which means 6.0V @@ -224,6 +246,25 @@ struct nt35510_config { * The defaults are 4 and 3 yielding 0x34 */ u8 bt2ctr[NT35510_P1_BT2CTR_LEN]; + /** + * @vcl: setting for VCL ranging from 0x00 =3D -2.5V to 0x11 =3D -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 =3D Disable + * 1 =3D -0.5 x VDDB + * 2 =3D -1 x VDDB + * 3 =3D -2 x VDDB + * The defaults are 4 and 2 yielding 0x24 + */ + u8 bt3ctr[NT35510_P1_BT3CTR_LEN]; /** * @vgh: setting for VGH ranging from 0x00 =3D 7.0V to 0x0B =3D 18.0V * in 1V steps, the default is 0x08 which means 15V @@ -277,6 +318,19 @@ struct nt35510_config { * 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 =3D VCOM .. 0x01 Gamma. + * The default is 0x00. + * VCM the VCOM output voltage (VCMOFFSEL =3D 0) or the internal register + * offset for gamma voltage (VCMOFFSEL =3D 1). + * VCM 0x00 =3D 0V/0 .. 0x118 =3D 3.5V/280 in steps of 12.5mV/1step + * The default is 0x00 =3D 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. @@ -441,6 +495,43 @@ struct nt35510_config { * @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 =3D Manual, 1 =3D Automatic + * DB bit 1 selects display brightness: 0 =3D Manual, 1 =3D Automatic + * BL bit 2 controls backlight control: 0 =3D Off, 1 =3D On + * DD bit 3 controls display dimming: 0 =3D Off, 1 =3D On + * A bit 4 controls LABC block: 0 =3D Off, 1 =3D On + * BCTRL bit 5 controls brightness block: 0 =3D Off, 1 =3D 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; }; =20 /** @@ -584,6 +675,16 @@ static int nt35510_setup_power(struct nt35510 *nt) nt->conf->bt2ctr); if (ret) return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SETVCL, + NT35510_P1_VCL_LEN, + nt->conf->vcl); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_BT3CTR, + NT35510_P1_BT3CTR_LEN, + nt->conf->bt3ctr); + if (ret) + return ret; ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SETVGH, NT35510_P1_VGH_LEN, nt->conf->vgh); @@ -620,6 +721,12 @@ static int nt35510_setup_power(struct nt35510 *nt) if (ret) return ret; =20 + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SETVCMOFF, + NT35510_P1_VCMOFF_LEN, + nt->conf->vcmoff); + if (ret) + return ret; + /* Typically 10 ms */ usleep_range(10000, 20000); =20 @@ -799,36 +906,38 @@ static int nt35510_power_on(struct nt35510 *nt) if (ret) return ret; =20 - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_POS, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_pos_r); - if (ret) - return ret; - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_POS, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_pos_g); - if (ret) - return ret; - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_POS, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_pos_b); - if (ret) - return ret; - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_NEG, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_neg_r); - if (ret) - return ret; - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_NEG, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_neg_g); - if (ret) - return ret; - ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_NEG, - NT35510_P1_GAMMA_LEN, - nt->conf->gamma_corr_neg_b); - if (ret) - return ret; + if (nt->conf->cmds & NT35510_CMD_CORRECT_GAMMA) { + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_POS, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_pos_r); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_POS, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_pos_g); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_POS, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_pos_b); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_NEG, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_neg_r); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_NEG, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_neg_g); + if (ret) + return ret; + ret =3D nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_NEG, + NT35510_P1_GAMMA_LEN, + nt->conf->gamma_corr_neg_b); + if (ret) + return ret; + } =20 /* Set up stuff in manufacturer control, page 0 */ ret =3D nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR, @@ -907,6 +1016,26 @@ static int nt35510_prepare(struct drm_panel *panel) /* Up to 120 ms */ usleep_range(120000, 150000); =20 + if (nt->conf->cmds & NT35510_CMD_CONTROL_DISPLAY) { + ret =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, + &nt->conf->wrctrld, + sizeof(nt->conf->wrctrld)); + if (ret < 0) + return ret; + + ret =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_POWER_SAVE, + &nt->conf->wrcabc, + sizeof(nt->conf->wrcabc)); + if (ret < 0) + return ret; + + ret =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, + &nt->conf->wrcabcmb, + sizeof(nt->conf->wrcabcmb)); + if (ret < 0) + return ret; + } + ret =3D mipi_dsi_dcs_set_display_on(dsi); if (ret) { dev_err(nt->dev, "failed to turn display on (%d)\n", ret); @@ -1033,7 +1162,10 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) return PTR_ERR(bl); } bl->props.max_brightness =3D 255; - bl->props.brightness =3D 255; + if (nt->conf->cmds & NT35510_CMD_CONTROL_DISPLAY) + bl->props.brightness =3D nt->conf->wrdisbv; + else + bl->props.brightness =3D 255; bl->props.power =3D FB_BLANK_POWERDOWN; nt->panel.backlight =3D bl; } @@ -1112,6 +1244,7 @@ static const struct nt35510_config nt35510_hydis_hva4= 0wv1 =3D { .flags =3D 0, }, .mode_flags =3D MIPI_DSI_CLOCK_NON_CONTINUOUS, + .cmds =3D NT35510_CMD_CORRECT_GAMMA, /* 0x09: AVDD =3D 5.6V */ .avdd =3D { 0x09, 0x09, 0x09 }, /* 0x34: PCK =3D Hsync/2, BTP =3D 2 x VDDB */ @@ -1120,6 +1253,10 @@ static const struct nt35510_config nt35510_hydis_hva= 40wv1 =3D { .avee =3D { 0x09, 0x09, 0x09 }, /* 0x24: NCK =3D Hsync/2, BTN =3D -2 x VDDB */ .bt2ctr =3D { 0x24, 0x24, 0x24 }, + /* VBCLA: -2.5V, VBCLB: -2.5V, VBCLC: -2.5V */ + .vcl =3D { 0x00, 0x00, 0x00 }, + /* 0x24: CLCK =3D Hsync/2, BTN =3D -1 x VDDB */ + .bt3ctr =3D { 0x24, 0x24, 0x24 }, /* 0x05 =3D 12V */ .vgh =3D { 0x05, 0x05, 0x05 }, /* 0x24: NCKA =3D Hsync/2, VGH =3D 2 x AVDD - AVEE */ @@ -1132,6 +1269,8 @@ static const struct nt35510_config nt35510_hydis_hva4= 0wv1 =3D { .vgp =3D { 0x00, 0xA3, 0x00 }, /* VGMP: 0x0A3 =3D 5.0375V, VGSP =3D 0V */ .vgn =3D { 0x00, 0xA3, 0x00 }, + /* VCMOFFSEL =3D VCOM voltage offset mode, VCM =3D 0V */ + .vcmoff =3D { 0x00, 0x00 }, /* Enable TE, EoTP and RGB pixel format */ .dopctr =3D { NT35510_DOPCTR_0_DSITE | NT35510_DOPCTR_0_EOTP | NT35510_DOPCTR_0_N565, NT35510_DOPCTR_1_CTB }, @@ -1163,7 +1302,88 @@ static const struct nt35510_config nt35510_hydis_hva= 40wv1 =3D { .gamma_corr_neg_b =3D { NT35510_GAMMA_NEG_DEFAULT }, }; =20 +static const struct nt35510_config nt35510_frida_frd400b25025 =3D { + .width_mm =3D 52, + .height_mm =3D 86, + .mode =3D { + .clock =3D 23000, + .hdisplay =3D 480, + .hsync_start =3D 480 + 34, /* HFP =3D 34 */ + .hsync_end =3D 480 + 34 + 2, /* HSync =3D 2 */ + .htotal =3D 480 + 34 + 2 + 34, /* HBP =3D 34 */ + .vdisplay =3D 800, + .vsync_start =3D 800 + 15, /* VFP =3D 15 */ + .vsync_end =3D 800 + 15 + 12, /* VSync =3D 12 */ + .vtotal =3D 800 + 15 + 12 + 15, /* VBP =3D 15 */ + .flags =3D 0, + }, + .mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM, + .cmds =3D NT35510_CMD_CONTROL_DISPLAY, + /* 0x03: AVDD =3D 6.2V */ + .avdd =3D { 0x03, 0x03, 0x03 }, + /* 0x46: PCK =3D 2 x Hsync, BTP =3D 2.5 x VDDB */ + .bt1ctr =3D { 0x46, 0x46, 0x46 }, + /* 0x03: AVEE =3D -6.2V */ + .avee =3D { 0x03, 0x03, 0x03 }, + /* 0x36: PCK =3D 2 x Hsync, BTP =3D 2 x VDDB */ + .bt2ctr =3D { 0x36, 0x36, 0x36 }, + /* VBCLA: -2.5V, VBCLB: -2.5V, VBCLC: -3.5V */ + .vcl =3D { 0x00, 0x00, 0x02 }, + /* 0x26: CLCK =3D 2 x Hsync, BTN =3D -1 x VDDB */ + .bt3ctr =3D { 0x26, 0x26, 0x26 }, + /* 0x09 =3D 16V */ + .vgh =3D { 0x09, 0x09, 0x09 }, + /* 0x36: HCK =3D 2 x Hsync, VGH =3D 2 x AVDD - AVEE */ + .bt4ctr =3D { 0x36, 0x36, 0x36 }, + /* 0x08 =3D -10V */ + .vgl =3D { 0x08, 0x08, 0x08 }, + /* 0x26: LCK =3D 2 x Hsync, VGL =3D AVDD + VCL - AVDD */ + .bt5ctr =3D { 0x26, 0x26, 0x26 }, + /* VGMP: 0x080 =3D 4.6V, VGSP =3D 0V */ + .vgp =3D { 0x00, 0x80, 0x00 }, + /* VGMP: 0x080 =3D 4.6V, VGSP =3D 0V */ + .vgn =3D { 0x00, 0x80, 0x00 }, + /* VCMOFFSEL =3D VCOM voltage offset mode, VCM =3D -1V */ + .vcmoff =3D { 0x00, 0x50 }, + .dopctr =3D { 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 =3D NT35510_ROTATE_180_SETTING, + /* 0x03: SDT =3D 1.5 us */ + .sdhdtctr =3D 0x03, + /* EQ control for gate signals, 0x00 =3D 0 us */ + .gseqctr =3D { 0x00, 0x00 }, + /* SDEQCTR: source driver EQ mode 2, 1 us rise time on each step */ + .sdeqctr =3D { 0x01, 0x02, 0x02, 0x02 }, + /* SDVPCTR: Normal operation off color during v porch */ + .sdvpctr =3D 0x01, + /* T1: number of pixel clocks on one scanline: 0x184 =3D 389 clocks */ + .t1 =3D 0x0184, + /* VBP: vertical back porch toward the panel */ + .vbp =3D 0x1C, + /* VFP: vertical front porch toward the panel */ + .vfp =3D 0x1C, + /* PSEL: divide pixel clock 23MHz with 1 (no clock downscaling) */ + .psel =3D 0, + /* DPTMCTR12: 0x03: LVGL =3D VGLX, overlap mode, swap R->L O->E */ + .dpmctr12 =3D { 0x03, 0x00, 0x00, }, + /* write display brightness */ + .wrdisbv =3D 0x7f, + /* write control display */ + .wrctrld =3D NT35510_WRCTRLD_BCTRL | NT35510_WRCTRLD_DD | + NT35510_WRCTRLD_BL, + /* write content adaptive brightness control */ + .wrcabc =3D NT35510_WRCABC_STILL_MODE, + /* write CABC minimum brightness */ + .wrcabcmb =3D 0xff, +}; + static const struct of_device_id nt35510_of_match[] =3D { + { + .compatible =3D "frida,frd400b25025", + .data =3D &nt35510_frida_frd400b25025, + }, { .compatible =3D "hydis,hva40wv1", .data =3D &nt35510_hydis_hva40wv1, --=20 2.43.0