Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp99526lqo; Tue, 7 May 2024 13:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCG/Qahh4MVPaqonkU+8aO1kr+YHCjB1LFSpb5WNRueDqoMCor4nhZPLJYfzz43slmtdE9J0jTVTRAn1sOF3rg324Y4E2VD3C9xomZyA== X-Google-Smtp-Source: AGHT+IHqiPW91OxXwHtQ5aZROSacrlMIBzgUnP5qOajgoso/grTGVZERsMZ0XFd/0pUl5UGllMDr X-Received: by 2002:a50:ab14:0:b0:572:7d5b:9923 with SMTP id 4fb4d7f45d1cf-5731d9d920amr624578a12.22.1715113738549; Tue, 07 May 2024 13:28:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715113738; cv=pass; d=google.com; s=arc-20160816; b=CJxxmE2ML7cfKBT6p/p8vDBhjhI0AIJUNnnJatCtWbfRI6V+Os1B2lDNWhMcxe6y7Z aetH+SnA1dsQAEqMzi2mNIkNgE1KLcDC+uUtM3RY+o/hrCMSj3TDtHPIQjZv9zHmVgtT aN040p13nxl1QsF/2354k5FWqISRXp2axjMSFQjKk8WkD0eGUDWrC3RbvWp5tq3lyY01 ao87elpGYD/lxMCt5Dilno4M5LoBcqGX6e8eQYheYEFgj+0HnvQhEbLRa8SJu6e9GzdH ydselsa2TB87juoT0KXpDwO/GPEWsie1ng5DjmavGgRLwaE2T25cs8Zcc/Uovkbv0Mkf BlwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fwayY4PcP3g06glQiFcNINepXGReNv+ocVgBzUqT9xs=; fh=zrsSIKfyxwKPj9HNGih3aAQnenonJ3qxWfD7sIZXq5c=; b=0SrKVBqJM/33IsaZl6hERI9ohLpljNyqk2IIYWO/G1akDAxLSn49UxsfzKWH3IqO5l HIETmTWwLlcuWQSi/Q5qhxLNIwC8/uAOfVrhmTGwrSimLSy+mfhgurzZCyCcDze7+XiE rY+S556ZVewtZVrtmn9gAYrn+SeDrPg+Xoropz5QAurIdJ4LFppXpag+fy4xwQ6HUetc 26YEPhbs8Oka+NWnSPx4lqKKIWH5HeAVEe/1ZG3pk37uIEKZ9YnqrEgmrf+Xf9YxQ5EF XfcvBLoR+mDB+kAcY6vNiTfdUHVk+xrUVt0/XlZhJo4Osi4a3ZJsnY2gaQiAdZgzCoWp vO6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s/7Z6wOs"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m6-20020a056402510600b00572228a7966si6803811edd.315.2024.05.07.13.28.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 13:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s/7Z6wOs"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2271F1F214BD for ; Tue, 7 May 2024 20:28:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC990187357; Tue, 7 May 2024 20:28:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s/7Z6wOs" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B20F1187331; Tue, 7 May 2024 20:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715113718; cv=none; b=WDYUAGz6i6brvSu1vzuLJJtOpi6xRnAMMUrUbCau9vjJLe5gMhCLx9KhhWYuwbnv6H6ZMi9NVGrntzVJ6DrsXQ6u9m93UQ/hY36P/UIUznQ/doF2fKJzjc9QVAwjuiakzDD6yy3u2YPwzdCuerDCBOf9Kq96pQiV3Ue4I8WypQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715113718; c=relaxed/simple; bh=TCF7hOj8TOI1UmjmvR3q0z4EpIMUXu7CfZrmz7GNu74=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oueZSEHCOCwuQB3Poy+iXLqLqc06di5zZ/HiMnWG2jvJoktQJDWaJ9+gGvSew6hlEUFOv/Syek/lrkSH4U+8nZ/tNz2LW6ZTDrzFgLYehSfoVrXTTMGacqu9AzvlqB4ouvh7zzglBOYfVeRoLRhTr3NFxs6Kp4BObd8fXvkMRcU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s/7Z6wOs; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDD7FC2BBFC; Tue, 7 May 2024 20:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715113718; bh=TCF7hOj8TOI1UmjmvR3q0z4EpIMUXu7CfZrmz7GNu74=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s/7Z6wOsYQeEg/baJMeFadmC3zvVzz2BSK+Ay9HgDzGibFrhHxxlM11/WYZnhIh4p 0PD9QrrfR1KEkjXnOcNwgNf+/RmqTZ6NKoqNJZjbAtBA+vZGHTpunRuQqDyZi6knoC WOjIK42YJOnIk2VNva+KVBUSwdvDJZzoiYfXqV1pk1E8/sI9cWCBaiepHZzw2cDtEE A1CORuNuRBxuMEQ+6ue9qY9jJzjYieLKHsQ3SI5vxdHT7BT5Bur/tHhLfE3lLmrWLe 8VwHu9kmqIJXTSyDXuBnHcHV6ihNU7fAmedPF7X07estjZELV33Sxd3GWQc/xSbwr3 3RgrJAdZOKBZw== Date: Tue, 7 May 2024 15:28:36 -0500 From: Rob Herring To: Noralf =?iso-8859-1?Q?Tr=F8nnes?= Cc: Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kamlesh Gurudasani , Tommaso Merciai Subject: Re: [PATCH 1/5] dt-bindings: display: panel: mipi-dbi-spi: Add a pixel format property Message-ID: <20240507202836.GA997432-robh@kernel.org> References: <20240507-panel-mipi-dbi-rgb666-v1-0-6799234afa3e@tronnes.org> <20240507-panel-mipi-dbi-rgb666-v1-1-6799234afa3e@tronnes.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240507-panel-mipi-dbi-rgb666-v1-1-6799234afa3e@tronnes.org> On Tue, May 07, 2024 at 11:57:26AM +0200, Noralf Trønnes wrote: > The MIPI DBI 2.0 specification (2005) lists only two pixel formats for > the Type C Interface (SPI) and that is 3-bits/pixel RGB111 with > 2 options for bit layout. > > For Type A and B (parallel) the following formats are listed: RGB332, > RGB444, RGB565, RGB666 and RGB888 (some have 2 options for the bit layout). > > Many MIPI DBI compatible controllers support all interface types on the > same chip and often the manufacturers have chosen to provide support for > the Type A/B interface pixel formats also on the Type C interface. > > Some chips provide many pixel formats with optional bit layouts over SPI, > but the most common by far are RGB565 and RGB666. So even if the > specification doesn't list these formats for the Type C interface, the > industry has chosen to include them. > > The MIPI DCS specification lists the standard commands that can be sent > over the MIPI DBI interface. The set_address_mode (36h) command has one > bit in the parameter that controls RGB/BGR order: > This bit controls the RGB data latching order transferred from the > peripheral’s frame memory to the display device. > This means that each supported RGB format also has a BGR variant. > > Based on this rationale document the following pixel formats describing > the bit layout going over the wire: > - RGB111 (option 1): x2r1g1b1r1g1b1 (2 pixels per byte) > - BGR111 (option 1): x2b1g1r1b1g1r1 (2 pixels per byte) > - RGB111 (option 2): x1r1g1b1x1r1g1b1 (2 pixels per byte) > - BGR111 (option 2): x1b1g1r1x1b1g1r1 (2 pixels per byte) > - RGB565: r5g6b5 (2 bytes) > - BGR565: b5g6r5 (2 bytes) > - RGB666: r6x2g6x2b6x2 (3 bytes) > - BGR666: b6x2g6x2r6x2 (3 bytes) > (x: don't care) > > Signed-off-by: Noralf Trønnes > --- > .../bindings/display/panel/panel-mipi-dbi-spi.yaml | 31 ++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml > index e808215cb39e..dac8f9af100e 100644 > --- a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml > +++ b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml > @@ -50,6 +50,12 @@ description: | > | Command or data | > || > > + The standard defines one pixel format for type C: RGB111. The industry > + however has decided to provide the type A/B interface pixel formats also on > + the Type C interface and most common among these are RGB565 and RGB666. > + The MIPI DCS command set_address_mode (36h) has one bit that controls RGB/BGR > + order. This gives each supported RGB format a BGR variant. > + > The panel resolution is specified using the panel-timing node properties > hactive (width) and vactive (height). The other mandatory panel-timing > properties should be set to zero except clock-frequency which can be > @@ -90,6 +96,29 @@ properties: > > spi-3wire: true > > + format: > + description: > > + Pixel format in bit order as going on the wire: > + * `x2r1g1b1r1g1b1` - RGB111, 2 pixels per byte > + * `x2b1g1r1b1g1r1` - BGR111, 2 pixels per byte > + * `x1r1g1b1x1r1g1b1` - RGB111, 2 pixels per byte > + * `x1b1g1r1x1b1g1r1` - BGR111, 2 pixels per byte > + * `r5g6b5` - RGB565, 2 bytes > + * `b5g6r5` - BGR565, 2 bytes > + * `r6x2g6x2b6x2` - RGB666, 3 bytes > + * `b6x2g6x2r6x2` - BGR666, 3 bytes > + This property is optional for backwards compatibility and `r5g6b5` is > + assumed in its absence. Use schemas, not free form text: default: r5g6b5 > + enum: > + - x2r1g1b1r1g1b1 > + - x2b1g1r1b1g1r1 > + - x1r1g1b1x1r1g1b1 > + - x1b1g1r1x1b1g1r1 > + - r5g6b5 > + - b5g6r5 > + - r6x2g6x2b6x2 > + - b6x2g6x2r6x2 > + > required: > - compatible > - reg > @@ -116,6 +145,8 @@ examples: > reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; > write-only; > > + format = "r5g6b5"; > + > backlight = <&backlight>; > > width-mm = <35>; > > -- > 2.45.0 >