From nobody Mon Feb 9 13:35:50 2026 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.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 0B75514F9CC; Fri, 31 Jan 2025 06:44:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738305872; cv=none; b=HnKI2fMlNHYPrtjIlt4fApAAWvjRwBFHFcLr7k+EUz5W4Zp7/pSD7VqW3yfhjqSgG+v9VnF6I4ftqwU5y+J4IsFMvUrWKY4CB+YOd0cMvL5ZjY24SD8OY67BMPUOlb3YDBZYhgglNcN0znAzzawn06MVZ93Urytyj6rN9z75hKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738305872; c=relaxed/simple; bh=3WgAbT0ve3KCH1i/XCMRSlAMOwhKD4qGl4AeVigIEAY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f75MfSQ5CGSQgmADCRTfbxjfBvbSyfsIwl6/6ChrbAc3qQXwu70AKlsCMIWwxXfIeLTUalay30VkH59BtVWrJvM54E9AnmfsqQR24gXFtY8SbLPEJENrlNQIha+CGT8/Ll/rEmjQQnpNY6eLj4BUKWQRAwH/cfV0xCjbpvRQUO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WkPNxR+I; arc=none smtp.client-ip=209.85.216.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WkPNxR+I" Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2ee397a82f6so2833367a91.2; Thu, 30 Jan 2025 22:44:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738305870; x=1738910670; 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=F1vbTosznX/93FTUwC4S9oeX4Wcs8MPx5CjhjQszTJM=; b=WkPNxR+IeWfZ9fdbKjKP4tu0tysKzBHcMJBAqFljqLy6p8vh7RtXSO9HejmVDZXF6V TLL9Ow5CHtw07MQK9UMKt/wOQvsTUP4aat2bKlaJbfXPpFChE+jMkzO7zQp3uptV5ADA nH3IWP/hYtNECKyofNQhwIO5OaHzgZYSKXimWpwB9AAcBuGyTQTQ7uv38WhRI8NsmYqG nryU2UDK70ty01YJ14uSdu2pAIgquGsymK20qpwULGnbNNkutlzDGqK+MhzqD1CJ07VW unSqSU9owwebul9M49BvMFH6Q4bsgazvYtIGWQ16CUTmj0U1tkuJx35wqt+dZKByvNQh RgXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738305870; x=1738910670; 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=F1vbTosznX/93FTUwC4S9oeX4Wcs8MPx5CjhjQszTJM=; b=JtpB5g5pQUvObiH0IduVM9nDPNnwi2TYsYDMss2RAVmJa2jNtDBeur0hXsszmo2bZO AEZuV30GmkRe2+IjTSSgmC+got/3u5AgWzWJmd07UVp4bOMy2jMAfiRU6PC+shRwYDfz uZaAhgYhA0S4WllL6B3PdkJ+Cy1B4DO0gMsHBLcCUZ7Sorpv0lqa8LXdvV57OzEpc8in ViadcrzUDSDV/t1KgMrzLjKxTW5rgkpT5LliAiBieyfRUcqOdAkSCYLwRTKmlUd556Ny BmPBH64ZwNPa7PI7YmIXKdxFvIfs82VZs3qYGy37LhSSthUp3G0rsTpflB/xVzRL4m9T gQVQ== X-Forwarded-Encrypted: i=1; AJvYcCVnheVOJ+7ssVNWyopYoId+hX/61UjrRZ692wruum/z6NXefzha4paVMHLOh6QJEq8ddfnlrhJ9TTVI@vger.kernel.org X-Gm-Message-State: AOJu0YzVDtEfy7nOJwCWETq2LnTG5+9ZcyQABnIg3p0p/76kpxHgbSp+ LGgVRoRbDYWzwKta2ustsTZYB+dixZcR0OaVtKqq3SieKCZlpTr7RLoxL67C X-Gm-Gg: ASbGncum8UnSQrMlQ93NeLSu7rT56P5QfH7u6x14kGDjbcccygIkH5ftkRTkJxsAksU 071kPzuG/CrCvji4GFRDNd5e1ZZyXUVNWev+zlI1ydbNm3uW6G4ysCw4RDF4e1z9uovtbq0cv9+ OWym8WK2EfA9VihLhU9xHHGiHGfRqYEmtvUuJyYCXUB/aqHeBU1DWkNXZk7wVvSwxqEQF6N3f5p GYUBJUyLCmy5MR1FeHY6xVNqYrrHsDxCBrotSh3/ezHE8cXEETIh4Zxuv+ziIDkYgP3UyiH+GR5 0RLMjRHWc6ma166mj9ZthNih63o= X-Google-Smtp-Source: AGHT+IHGxUlsGhp7wUUYra3XimaYEg10mWNL1Fr0GHj4XpVFVFx3iKAmpTXnQfZxrOWWPh9zbbR/KA== X-Received: by 2002:a17:90b:3a08:b0:2ee:df70:1ff3 with SMTP id 98e67ed59e1d1-2f83aa7c6bemr18833079a91.0.1738305870147; Thu, 30 Jan 2025 22:44:30 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f83bfc0ddbsm5098947a91.45.2025.01.30.22.44.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2025 22:44:29 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: display: panel: Add generic MIPI-DSI/DPI panels Date: Fri, 31 Jan 2025 15:43:53 +0900 Message-ID: <20250131064354.4163579-2-kikuchan98@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250131064354.4163579-1-kikuchan98@gmail.com> References: <20250131064354.4163579-1-kikuchan98@gmail.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 is a binding for generic MIPI-DSI/DPI panels that require initialization with a simple command sequence before use. Although the `panel-simple` binding exists for generic panels, it is not suitable for panels that require initialization via their communication bus, as such panels cannot be considered "simple". While many dedicated bindings exist for such panels, the generic panels are not complex enough to warrant a dedicated binding because they only require a "simple" initialization before use. This binding addresses that gap. Signed-off-by: Hironori KIKUCHI --- .../bindings/display/panel/panel-mipi.yaml | 244 ++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-m= ipi.yaml diff --git a/Documentation/devicetree/bindings/display/panel/panel-mipi.yam= l b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml new file mode 100644 index 00000000000..681614333d8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml @@ -0,0 +1,244 @@ +# 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: + - enum: + - panel-mipi-dsi + - panel-mipi-dpi-spi + - items: + - {} + - enum: + - panel-mipi-dsi + - panel-mipi-dpi-spi + + 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 mo= de. + If not set, the controller is in 3-line SPI mode. + Disallowed for DSI. + + width-mm: true + height-mm: true + panel-timing: true + display-timings: true + + reset-delay: + description: Delay (in ms) after the reset command + $ref: /schemas/types.yaml#/definitions/uint32 + + init-delay: + description: Delay (in ms) for sending the initial command sequence + $ref: /schemas/types.yaml#/definitions/uint32 + + sleep-delay: + description: Delay (in ms) after the sleep command + $ref: /schemas/types.yaml#/definitions/uint32 + + backlight-delay: + description: Delay (in ms) for enabling the backlight + $ref: /schemas/types.yaml#/definitions/uint32 + + port: true + reset-gpios: true + rotation: true + + backlight: true + + init-sequence: + description: Encoded initial command sequence. + $ref: /schemas/types.yaml#/definitions/uint8-array + + firmware-name: + maxItems: 1 + + dsi-mode-video: + description: Enable MIPI_DSI_MODE_VIDEO. + Disallowed for SPI. + type: boolean + + dsi-mode-video-burst: + description: Enable MIPI_DSI_MODE_VIDEO_BURST. + Disallowed for SPI. + type: boolean + + dsi-mode-video-sync-pulse: + description: Enable MIPI_DSI_MODE_VIDEO_SYNC_PULSE. + Disallowed for SPI. + type: boolean + + dsi-mode-video-auto-vert: + description: Enable MIPI_DSI_MODE_VIDEO_AUTO_VERT. + Disallowed for SPI. + type: boolean + + dsi-mode-video-hse: + description: Enable MIPI_DSI_MODE_VIDEO_HSE. + Disallowed for SPI. + type: boolean + + dsi-mode-video-no-hfp: + description: Enable MIPI_DSI_MODE_VIDEO_NO_HFP. + Disallowed for SPI. + type: boolean + + dsi-mode-video-no-hbp: + description: Enable MIPI_DSI_MODE_VIDEO_NO_HBP. + Disallowed for SPI. + type: boolean + + dsi-mode-video-no-hsa: + description: Enable MIPI_DSI_MODE_VIDEO_NO_HSA. + Disallowed for SPI. + type: boolean + + dsi-mode-vsync-flush: + description: Enable MIPI_DSI_MODE_VSYNC_FLUSH. + Disallowed for SPI. + type: boolean + + dsi-mode-no-eot-packet: + description: Enable MIPI_DSI_MODE_NO_EOT_PACKET. + Disallowed for SPI. + type: boolean + + dsi-clock-non-continuous: + description: Enable MIPI_DSI_CLOCK_NON_CONTINUOUS. + Disallowed for SPI. + type: boolean + + dsi-mode-lpm: + description: Enable MIPI_DSI_MODE_LPM. + Disallowed for SPI. + type: boolean + + dsi-hs-pkt-end-aligned: + description: Enable MIPI_DSI_HS_PKT_END_ALIGNED. + Disallowed for SPI. + type: boolean + +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# + properties: + dsi-mode-video: false + dsi-mode-video-burst: false + dsi-mode-video-sync-pulse: false + dsi-mode-video-auto-vert: false + dsi-mode-video-hse: false + dsi-mode-video-no-hfp: false + dsi-mode-video-no-hbp: false + dsi-mode-video-no-hsa: false + dsi-mode-vsync-flush: false + dsi-mode-no-eot-packet: false + dsi-clock-non-continuous: false + dsi-mode-lpm: false + dsi-hs-pkt-end-aligned: false + + - if: + properties: + compatible: + contains: + enum: + - panel-mipi-dsi + then: + # DSI mode + properties: + dc-gpios: false + +unevaluatedProperties: false + +examples: + - | + dsi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "vendor,some-panel", "panel-mipi-dsi"; + reg =3D <0>; + + port { + mipi_in_panel: endpoint { + remote-endpoint =3D <&mipi_out_panel>; + }; + }; + }; + }; + - | + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0{ + compatible =3D "panel-mipi-dpi-spi"; + reg =3D <0>; + + spi-max-frequency =3D <40000000>; + + dc-gpios =3D <&gpio 24 GPIO_ACTIVE_HIGH>; + reset-gpios =3D <&gpio 25 GPIO_ACTIVE_HIGH>; + + backlight =3D <&backlight>; + + init-sequence =3D [ + 01 11 + 00 + 04 b1 01 2c 2d + 01 29 + 80 00 00 00 + ]; + + width-mm =3D <35>; + height-mm =3D <28>; + + panel-timing { + hactive =3D <160>; + vactive =3D <128>; + hback-porch =3D <0>; + vback-porch =3D <0>; + clock-frequency =3D <0>; + hfront-porch =3D <0>; + hsync-len =3D <0>; + vfront-porch =3D <0>; + vsync-len =3D <0>; + }; + }; + }; --=20 2.48.1 From nobody Mon Feb 9 13:35:50 2026 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.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 B4AE1155C88; Fri, 31 Jan 2025 06:44:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738305878; cv=none; b=naqDc9FLtLqHALD8emocNRiC51GVBFPPY8QCGgtYKLPO8WnNUOsIfD6xHuAL1twjaMdFU99W5OKRdi1iuD5IX8U4LfdlqT+q2Im8RFVc6+7mvML0EmpljIsCf/JjVPybbkVRUHIdObkRtXz2M3J8WuB9PsIrLGqbNFtYNJVvymo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738305878; c=relaxed/simple; bh=+QQ0uk9cQsUCxAtzHDM5AHEM7sGxz3Nr/ajhp5LqL4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=knPVxA0bK4XE1avcTrrnHCe58a5ECSNMf13ynwhNHWzriMJ5TrpJccV172PRli7OgO3/MOh2zKZ/8vDLSKCLuAUCXVxTG3r9me9xQwUKY0EBXduKOnW79dls3TJnaRJEkKojHEJSml8qtruUkepVnSY/5wsAbbdeWcRaDgF5p1I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qj2ZSdlJ; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qj2ZSdlJ" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2ef87d24c2dso2204266a91.1; Thu, 30 Jan 2025 22:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738305875; x=1738910675; 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=Uxt7XgylM0RNNQeFvYOcAUiv7nVUhdc6VDeUfR75H2A=; b=Qj2ZSdlJFXA08V3KWomsJaPKGRZPIYjqL7tfBarZtzwCtsIr3MAoUDTB2b8hNPMYmv mMBQaMRgsf7Omdtm2IbQcl0Q73n1GiTPF4/1Gr/Z5OJeWeVeIRsNJHBqWsjSOo9jhy88 9HjJjuBk0mafa+nCwC/cjqlXVo9gKAjoHNCDIprq9hN26r4cb+wZDW8Zr5UeM2wbtPJ/ R5NWNyZe2ccUoh+cmZ4yWH7n2Oh9EdZQf3EjJvAzrY5mMliXLDS2kqkt4s1Cug8nhIBp Eb2153Djp4+TehISLQ5X9ULfZc4ViB6ukIayKUKpKUJFk9iLXgWVUSQmthcv/aZ3a3cS QozQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738305875; x=1738910675; 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=Uxt7XgylM0RNNQeFvYOcAUiv7nVUhdc6VDeUfR75H2A=; b=jEBEtdW1kSq3HTXUcQ5mdGEGEXiOGD9TXXyvGZorvfBuZ1j1vAT1sc9m8o5O+3ljBv DzXhE31/UWiMac6cwNGBU/ukXDA+56Maia/+H4c4Hc2cDx4zAK/ZMsiFUd77Tt/NnX87 HtkJXHdlFFZt727sYNgh/p51bccQjy+n9cstMYCDv8FeMul4mWVN7lCEy1Ax4mIpPfD3 BGdIOIAzXYgzoBL9WthRURH8TNS8dKYnFzxfGIEdJQ1012DQhQJquz7//Rd920zx8uv1 AnZ5UhYDMowmTlIVs+jF3BLnoyS2bD7NDqYvDvj49p/piWl0+DHPlUHk8VnBKLMVYzGj +0nQ== X-Forwarded-Encrypted: i=1; AJvYcCUK40MRY90lo6ALncOnIy6RDINZWlYh9iJGoOqfAbkcl1uDNlqErA3drop4oftEVz+FnDoLotAmAbO9@vger.kernel.org X-Gm-Message-State: AOJu0Yx7kpzn2jqFn7WZgR5+zFL6N32ZcLHxWqGSNuEOF+R4OkCIQaQz X6S8TwsBRCuYunSQNeYWBQXt2h/mEF8ASgZ7xok9iD4CdfrsSHR32nGODpEX X-Gm-Gg: ASbGncsw+WlWJtKuwt7ZVPCtFhJjpuxrj6C+F2Ukcjc0+DOIAXshSAxJlYtUVtpA+xE vaLyXvxbKns3E8UpebLS7Jnt87TcdniC7k+EHvl4hQaIayFPWYO6MUjnOxd/vCLvFnwCny2peqZ cbgqNnVMNMvaJ0yReRGvG8ppNREteqrb7Azih8KKJhGVcyBaU3m8lq2e6MRrK/Vk07GQ6jzYz+2 qzDna7u8IGTG3zKpU7hGgKBswYbuENrC0aM8PQFOsqZvVsD15x8mleSW/HllTgTBAB7Oc7JpJ0V hj9pamZQwPjYN16vYs4On4FMl0k= X-Google-Smtp-Source: AGHT+IHCCGvbadTzQSXOFZiCDedmOYIDDA+dHN78B+HXrjLu5qnI/+PnMm+dRI48nV23T9Oqber2XA== X-Received: by 2002:a17:90b:1f86:b0:2ee:aed2:c15c with SMTP id 98e67ed59e1d1-2f83ac8c3famr14496578a91.28.1738305874754; Thu, 30 Jan 2025 22:44:34 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f83bfc0ddbsm5098947a91.45.2025.01.30.22.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2025 22:44:34 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] drm: panel: Add a driver for Generic MIPI-DSI/DPI(+SPI) panels Date: Fri, 31 Jan 2025 15:43:54 +0900 Message-ID: <20250131064354.4163579-3-kikuchan98@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250131064354.4163579-1-kikuchan98@gmail.com> References: <20250131064354.4163579-1-kikuchan98@gmail.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" 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 or in DT. Signed-off-by: Hironori KIKUCHI --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-mipi.c | 1355 ++++++++++++++++++++++++++++ 3 files changed, 1366 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. =20 +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) +=3D panel-lg-lb035q0= 2.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) +=3D panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_LG_SW43408) +=3D panel-lg-sw43408.o obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) +=3D panel-magnachip-d53e6ea= 8966.o +obj-$(CONFIG_DRM_PANEL_MIPI) +=3D panel-mipi.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) +=3D panel-nec-nl8048hl11.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) +=3D panel-newvision-nv3051d.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) +=3D panel-newvision-nv3052c.o diff --git a/drivers/gpu/drm/panel/panel-mipi.c b/drivers/gpu/drm/panel/pan= el-mipi.c new file mode 100644 index 00000000000..bcbaa15b62a --- /dev/null +++ b/drivers/gpu/drm/panel/panel-mipi.c @@ -0,0 +1,1355 @@ +// 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