From patchwork Wed Feb 26 11:25:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13992093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01CD2C18E7C for ; Wed, 26 Feb 2025 11:26:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72CB310E233; Wed, 26 Feb 2025 11:26:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CxxjwNmq"; dkim-atps=neutral Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id A778A10E233 for ; Wed, 26 Feb 2025 11:26:28 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-22114b800f7so133176915ad.2 for ; Wed, 26 Feb 2025 03:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740569188; x=1741173988; darn=lists.freedesktop.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=2RTmpIGHngtsSZ/WnYi/gqVccUnJFm776Qa1QJJB2Nw=; b=CxxjwNmqaw13HevYnMOTx2vZwCMeIGNHrfU7P5zn/nPEf7wTVb24J0ojQ7/5EGCtgV tRfM6ZTdxCddISzi1osbrkYhy28uNDyT+iiOH/JvjhbsIiqY0sIWITI6/wcUvX7CwXK9 m84FcJ/yVwoEn+48uwhRn6vjHZgrNxmthNoijiOcGeOCmE6ArQ9fHBWNafxhWEPrgN4A woz77zc/WoeY2fCaWPzRXSLAY0wyRWEBuCLvtEjew1wEXcBZmNLgTvkDjy72XAJajsjp scj9EemW+WaUN4FH1eoK1Aiba4OviQTGapdx7f/dMJL/TX0I8TzpMxOvkDiv1wrx7akU tODQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740569188; x=1741173988; 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=2RTmpIGHngtsSZ/WnYi/gqVccUnJFm776Qa1QJJB2Nw=; b=kjD8MwmidaAp1VvOXVOJehkaFizQGQJhp1/GkK+rO4PILvo3OrHx0B78AxsI86tEsV UmAIw0DPZS0VzCApYTOmXq/uKru5xaY7u9keXQD0f08Q743xvB3rlhsj3h8w42ulh89A +PwSaKnUoPasBRiedzfmlLpqVFOMHuvUDxYcJjZtm5lu9qx7i00b75vMihuQQk6j9HG/ HgE/5ZNXJfzkq/XMxa/HSnS0lk44A/VAyreSqwT+rlVVmjjfp6x+oF+vVCPLfiwDLN1W fZ2GJOVnxEUUPNezCrb3bEu31c13sdHKqbkrjePXOHAYgWoTwrPMM18OiZW5hK7LLHVK anXg== X-Forwarded-Encrypted: i=1; AJvYcCUwKW+wnkFD3YEYgIKiqMrIIO8aebzQq9A+/kp8CQmJHUJGu5Uu5rK5h+zVtBKdfZjPVb5Ue96eZ68=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yy2RmfMYSl73IaYJU7DGuW0AieKfVX9/Q8uAOMjUxxFcmUgcPJG ZUeHYA/7g567BEd5gb0nuBlYggt5XQ95DRluRywaLyoo+hORNPV5 X-Gm-Gg: ASbGnctU0V4eBFsD0stwH9DE5BlWP7A5DzUKj6uFSJKEIJEaGqOcrKiGN8acZ1ps5+l mJnGc0x1ArYofiPHV9LDqY36cWag0CJrG8WiyrmdTtzEBsBGnPXDtRYjzomCQU36RmMDrhVQISG 8APG7THeBrvL+FXAWH2yV6JORopHCV/iSGw6FDrytUdFSeF2BG72qoIW2+NKhFWiiMUGVEoZWRF KrNkX+6YADfcg+7YFCNY6Q0U5ILTfYnWvLjbi5G285KgTOpSa0nhaV2/goB2Sxtb9b4dkW89zBI WC0onUaWVCfStbjUm5XSrW/RS11Qwank5BHfuZAeGX5rsHvB/yyWTA3ssuqyLUXSMi3j4w== X-Google-Smtp-Source: AGHT+IFdM2uihMFE1scAm5JrACgtnVIbLNjAwJpcqKr3P6lxtJIGZA3FqHOXHR4oGZESQpKSGY0nfw== X-Received: by 2002:a17:902:d4d0:b0:223:3bf6:7e6e with SMTP id d9443c01a7336-2233bf67f9emr6888115ad.9.1740569188348; Wed, 26 Feb 2025 03:26:28 -0800 (PST) Received: from localhost.localdomain (221x255x40x66.ap221.ftth.ucom.ne.jp. [221.255.40.66]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2230a0009a0sm29800345ad.27.2025.02.26.03.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 03:26:27 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jakub Kicinski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add hothmi vendor prefix Date: Wed, 26 Feb 2025 20:25:48 +0900 Message-ID: <20250226112552.52494-2-kikuchan98@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250226112552.52494-1-kikuchan98@gmail.com> References: <20250226112552.52494-1-kikuchan98@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add prefix for Hotdisplay Technology Co.Ltd Signed-off-by: Hironori KIKUCHI --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5079ca6ce1d..44108bd6ae2 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -650,6 +650,8 @@ patternProperties: description: Shenzhen Hope Microelectronics Co., Ltd. "^hoperun,.*": description: Jiangsu HopeRun Software Co., Ltd. + "^hothmi,.*": + description: Hotdisplay Technology Co.Ltd "^hp,.*": description: Hewlett Packard Inc. "^hpe,.*": From patchwork Wed Feb 26 11:25:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13992094 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14FEFC021B8 for ; Wed, 26 Feb 2025 11:26:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A20D10E1D8; Wed, 26 Feb 2025 11:26:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="I1qLgYAH"; dkim-atps=neutral Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id A155D10E1D4 for ; Wed, 26 Feb 2025 11:26:35 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2232b12cd36so7855085ad.0 for ; Wed, 26 Feb 2025 03:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740569195; x=1741173995; darn=lists.freedesktop.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=QJGZpWbDvkxIZVmJShYLY/mP8QNbEoEXn4nR1fnmnoA=; b=I1qLgYAHVL+yq47FTROI0bB+IeLl6mOc0gbtDLAA7vmigLPdQKS7pNBerm8XYVkOfD qEkuzp6KlIl7ZIlb4YJsVwNq4/eKqzK+7U29qdYhZkKc61Eh5FFCwaG0GKihx1Px6N9N /lN2Y/aJwmu7Vmnhq7NpnbQ9datVjuuYQiIGdJZtxUOjtbR6JHBDOaYXUclcDlQpJv1N P5CTH1ZREMP6zKhFBxVJ/RGRxXdfUpSYj2pxxzFdPtLXYvCF3+pkTDMuaohjhOGu3Cyu pNFMp2oW6cRRRlrk96Sn6ApoDPVcgOzefJjtpagjRxoNVSujOkEEKBHYVIX5uFp9+kmg blNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740569195; x=1741173995; 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=QJGZpWbDvkxIZVmJShYLY/mP8QNbEoEXn4nR1fnmnoA=; b=QxA9JmKRvgO9pF/OkOrQAoKT/tEV8nAfsYUqst4US1p3nBu24K1sOeyljCYoERJ1sJ B1FxDOZo0KP9CNUBy4XawT0BWCOmqLXRH+uezUF3hEtGnP7EsMlRrtQjmjqwswtOyhgX 53FMHzCDZwPxU9mzgT5zI6rO245hxH7cBm5kmNBVf/SSeQrMigIqPkz5H6dV0NXOuo0z Yg/c2Ej1PjpAm6hPaVYJxSr71olsMvmvnYJj/ISP6HYH9/gDipgzVFHJQtTQQ+owylQF lLdTWALVWRV8QCBT6M+ojkUym4kMjWVzIpvkPDTJxtd8Qd9ZwFP9d4edqmoMdvzUHEIL 6gaA== X-Forwarded-Encrypted: i=1; AJvYcCUX/pj6mM5r9tpyyhhyXzWfr48jIhAwGt1mMULaRLs/I+3Ewiap4pwLURk5xo9zz3d8vxiC10TOHOM=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzCoKdzqO/UTz8RfW4oEgGhrDdjONrd8kDBtyPVu/q8OcUvYp2x YatsodileqMsgKPgyQNdVJmQC8sg5Vk3Ad86/nKTGKGBtkyNtMPJ X-Gm-Gg: ASbGncuWWrBUowpdTHoz7XDRl88AhkSN/Fx/a1s/DOX8dpM5wHyhk3NFdY9xNPp6TfO MNefjXhYNnyQj8TD92gd4B5yDP5lo+lIURWKCv3/qMjptXzoQ/AHBY6Fvul2IQzbTPHk4ydbAKw drgXS4NWReg98Ktk38sfV2GESvZT9sy+Rq+zG4/EW9wxfQCYXQrp8wCbrLx97cOk/1NqLPsK67O XmVKx1fSLW9K/k8fouODzpStglGYBOPvh++gi5eFBWbZhQIUZRY9KrwwPkQdzjcIlzBCasVSiQ4 13RVIqaQZ6Mo1UeHpUgR4djT47a4Mb8HHefASYgXP0fd9Po6I2quaDkaKX2jnkaelWVtpg== X-Google-Smtp-Source: AGHT+IG2gWi0nLGOKpj4dDyZrHjJgRgzITPsE63NdiS1YrFkAk4rdwGkFABUwfTdHYGCtVaBNOKAtw== X-Received: by 2002:a17:902:e887:b0:220:faa2:c917 with SMTP id d9443c01a7336-22320208770mr53896785ad.34.1740569195012; Wed, 26 Feb 2025 03:26:35 -0800 (PST) Received: from localhost.localdomain (221x255x40x66.ap221.ftth.ucom.ne.jp. [221.255.40.66]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2230a0009a0sm29800345ad.27.2025.02.26.03.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 03:26:34 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jakub Kicinski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: display: panel: Add some generic MIPI-DSI/DPI panels Date: Wed, 26 Feb 2025 20:25:49 +0900 Message-ID: <20250226112552.52494-3-kikuchan98@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250226112552.52494-1-kikuchan98@gmail.com> References: <20250226112552.52494-1-kikuchan98@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a binding for generic MIPI-DSI/DPI panels that require initialization with a simple command sequence before use. The initialization of the panel requires a firmware binary which can be made with the Panel Firmware Generator[1] on the web. Add 4 new panels, as they are available on the same page[1] as a preset (excluding already included ones). Note that the "xx" in the panel name is taken from a product's name, not a wildcard. [1]: https://kikuchan.github.io/panel-firmware-generator/ Signed-off-by: Hironori KIKUCHI --- .../bindings/display/panel/panel-mipi.yaml | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-mipi.yaml diff --git a/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml new file mode 100644 index 00000000000..d70cf0063fa --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-mipi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic MIPI-DSI/DPI Panels Requiring Initialization + +maintainers: + - Hironori KIKUCHI + +description: This is a binding for generic MIPI-DSI/DPI panels that require + initialization with a simple command sequence before use. + +properties: + compatible: + oneOf: + - items: + - enum: + # Unknown 3.35" 720x480 24-bit IPS LCD panel + # used in Anbernic RG 34XX + - anbernic,rg34xx-panel + # Unknown 4.00" 640x480 24-bit IPS LCD panel (YLM-LBV0400001X-V1) + # used in Anbernic RG40XX series + - anbernic,rg40xx-panel + # Unknown 3.95" 720x720 24-bit IPS LCD panel (YLM-LBN0395004H-V1) + # used in Anbernic RG CubeXX + - anbernic,rgcubexx-panel + - const: panel-mipi-dpi-spi + - items: + - enum: + # HOTHMI TFT-H028B23VGIST7G40-V1 2.80" 480x640 TFT LCD panel + - hothmi,tft-h028b23vgist7g40-v1 + - const: panel-mipi-dsi + + reg: + description: DSI / SPI channel used by that screen + maxItems: 1 + + power-supply: true + + io-supply: + description: I/O system regulator. + No need to set if this is the same as polwer-supply. + + dc-gpios: + maxItems: 1 + description: Controller data/command selection (D/CX) in 4-line SPI mode. + If not set, the controller is in 3-line SPI mode. + Disallowed for DSI. + + port: true + reset-gpios: true + + backlight: true + +required: + - compatible + - reg + +allOf: + - $ref: panel-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - panel-mipi-dpi-spi + then: + # SPI mode + $ref: /schemas/spi/spi-peripheral-props.yaml# + + - if: + properties: + compatible: + contains: + enum: + - panel-mipi-dsi + then: + # DSI mode + properties: + dc-gpios: false + +unevaluatedProperties: false + +examples: + - | + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "hothmi,tft-h028b23vgist7g40-v1", "panel-mipi-dsi"; + reg = <0>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; + }; + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "anbernic,rg40xx-panel", "panel-mipi-dpi-spi"; + reg = <0>; + + spi-max-frequency = <40000000>; + + dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + + backlight = <&backlight>; + }; + }; From patchwork Wed Feb 26 11:25:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hironori KIKUCHI X-Patchwork-Id: 13992095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9C1AC18E7C for ; Wed, 26 Feb 2025 11:26:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FB6C10E203; Wed, 26 Feb 2025 11:26:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N46NiM5I"; dkim-atps=neutral Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6622D10E203 for ; Wed, 26 Feb 2025 11:26:42 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-219f8263ae0so141443765ad.0 for ; Wed, 26 Feb 2025 03:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740569202; x=1741174002; darn=lists.freedesktop.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=im7+zQBdIJMDHrDxf6vyfzrIwGaTz096CO/yt3ADDf4=; b=N46NiM5Ib36D62sueK8KO31CTyftreqFgltauuZDUWUhHlPE+nZHGSjspYbj9g98rV 6V7GYecErC0gfA5EarI9+1rFz1xaCCS/apOQTGGFSbgmms0zStjBseQZ0PTbSZYvkfpE iDo5Gwc1PEHteBuO42MF702d8Kmz8Z2TixhJsFo8wsJP8q7MZHafUk3Wc6sjg671+kL2 8/PAz6yPfJv+hwzvZwnVQlRw1L8Jh93Hv/W1iPTKsSY5E+G4zQvPNtYXHQXjFtVqJ0e0 gvayVHEecVstcWFu3R5IkDCOVnI0rfZn58SBS1Om4adl2nYpFYqBLZ2QV4UfZuNxHaBa B3ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740569202; x=1741174002; 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=im7+zQBdIJMDHrDxf6vyfzrIwGaTz096CO/yt3ADDf4=; b=OPGrLZa6X8y2rS/jT0PWQ+tR746IY2f2aCfM+KFm4MCIPA7XvWCDiRq3Xzy2LFjgHm BRgHWO1bbKNC8AL+vP1r3nSTNfL5SmvBlsVVSQr89ykIU+hN+NtVkQkxK9le3g4bEeNG Kn8EXrocG3GFxjVwM0Yvbl2JGZ7WTtlH3KxfGyFVX1QcuzSdsJjCp9u4tKpMiVHN1+C7 AKar0Bdr1oG5G4AW8/vfMTF3B8hVXBWsD9QESosTrG5LRacS6zydgfTOuhlgqMlRzl3T g5ol2GBTt99LSLOVq5DT9anTaggy55IRCaOiOwl1swRFrsPXAx0ehREADHZHIPd+L+Ud 0gqA== X-Forwarded-Encrypted: i=1; AJvYcCW8WGS8JX/4TVl9ZoPkc1BYGivx8/LsDRmv9k4QXXyT2UmzrVJLxndIly7u9UhHnsTTsmQVX5zga60=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yz7lLb2LpncYl9Yvdef2QeMo6qhuL3iBYuGUGs37jmhN4AH5eZm cFDDru07ygTQW6XlyrYMHvP765EphwH+oqTyH0gLgReIiZgNpJoo X-Gm-Gg: ASbGncvqVfsdOvgn5/yeGVZuePJ4kcI8DLf6+cxJPE76MrcTzrd2XO5QSxCsq+HjGMs DSXuKcpbobI6ct/Lr5Zh+WuoJHGY01MdQfmPPEh2ZsLqTRC5+EWXzmteb9MCbW8voYT/ybhu+sI atAusw5MMt6rUtx00zhMOxO1s+6HJ+L4QtuvoXE7obrZnBbdTFumWgdJ/+MwGTz0RmvcqAsSG0G 3W3VePW9WtHyTR0qfWVHbvPDly+Na5lTrIiUmqWLwi5Xwp9dlMAPsmGdn+GkA3trXYw4W7qJ9d4 mQPaZcUagYGW7GZeSfKhDYwhXOhr/P8TQVSxXisro1NUequpdLD/9eSN3ytXZYDfjx+I3w== X-Google-Smtp-Source: AGHT+IEckAZcBsdhNAlfb8Tw/dHQA/L90JUKveSjplrvy1bGKlzGx7JrxRsMVaZKrPXvQzh6srGRgQ== X-Received: by 2002:a17:903:41c2:b0:21f:55e:ed64 with SMTP id d9443c01a7336-221a0ec9b4bmr294719535ad.3.1740569201647; Wed, 26 Feb 2025 03:26:41 -0800 (PST) Received: from localhost.localdomain (221x255x40x66.ap221.ftth.ucom.ne.jp. [221.255.40.66]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2230a0009a0sm29800345ad.27.2025.02.26.03.26.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 03:26:41 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jakub Kicinski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 3/3] drm: panel: Add a driver for Generic MIPI-DSI/DPI(+SPI) panels Date: Wed, 26 Feb 2025 20:25:50 +0900 Message-ID: <20250226112552.52494-4-kikuchan98@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250226112552.52494-1-kikuchan98@gmail.com> References: <20250226112552.52494-1-kikuchan98@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Although the MIPI specifications define how to communicate with a panel to display an image, some panels still require a panel-specific initialization sequence to be sent. This is a driver for such generic MIPI-DSI/DPI panels that require initialization with a simple command sequence before use. Its fundamental approach is similar to `panel-mipi-dbi` driver, which sends an initialization sequence stored in a firmware file. Moreover, this driver allows display modes, timings, and panel configuration parameters to be stored in the same file. Signed-off-by: Hironori KIKUCHI --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-mipi.c | 1181 ++++++++++++++++++++++++++++ 3 files changed, 1192 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-mipi.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d7469c565d1..46eea1974a0 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -408,6 +408,16 @@ config DRM_PANEL_MANTIX_MLAF057WE51 has a resolution of 720x1440 pixels, a built in backlight and touch controller. +config DRM_PANEL_MIPI + tristate "Generic MIPI-DSI/DPI(+SPI) panel" + depends on OF + depends on SPI || DRM_MIPI_DSI + select DRM_MIPI_DBI if SPI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Generic MIPI-DSI / + MIPI-DPI(+SPI) panels. + config DRM_PANEL_NEC_NL8048HL11 tristate "NEC NL8048HL11 RGB panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 7dcf72646ca..22276255a7b 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o +obj-$(CONFIG_DRM_PANEL_MIPI) += panel-mipi.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) += panel-newvision-nv3052c.o diff --git a/drivers/gpu/drm/panel/panel-mipi.c b/drivers/gpu/drm/panel/panel-mipi.c new file mode 100644 index 00000000000..a4da1fd2e1e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-mipi.c @@ -0,0 +1,1181 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Generic MIPI-DSI/DPI(+SPI) Panel Driver + * + * Supported panels: + * - A generic MIPI-DSI panel which implements basic DCS + * - A generic MIPI-DPI panel which implements basic DCS over SPI + * + * Copyright (C) 2025, Hironori KIKUCHI + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include