Message ID | 20231217100741.1943932-2-javierm@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp633181dyi; Sun, 17 Dec 2023 02:08:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH56Wv9wWJut+qvvlusUBQDjBhMGdVIPCj6ZA2JgZBp1BO20dPSx5tAsLY5T3hpyAhhJHH0 X-Received: by 2002:a05:622a:148a:b0:425:4043:1d81 with SMTP id t10-20020a05622a148a00b0042540431d81mr19219581qtx.84.1702807706017; Sun, 17 Dec 2023 02:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702807706; cv=none; d=google.com; s=arc-20160816; b=L5MaFxgXu0cYu9D4HkKjlkxml5XruOdQ492oyqe1SSxnW0Y72cBCH6EXznBClPg0uF adGV2aLS3NPZeBL/APLpM5Ct6vptzGHbQzdLocoO8DbkOIKgyCBJnR06qmFW6H/P5eWP kfx6Bn5yfSNh7cvB0TzEulXoHhRMx/6cf0B0WX4vyBFWUuLU+ynou892Ec2T6wEYjqut yNAV6ZbRWhkVCCKs/zbyUYXMen/VKoViTqJqE6EwExRKot+1M/sN0wdU1dbWjBxJOOvI uFBIZn8yiFufbsmWIHdB0oe9TMni8KARbzAlvAYsMrmEFzLISlKaY2X2oiMrMvVu7N1G Wr5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5CR/3Io6mktEEwQ1LHj5L/2zpZ/H1ugjG/amm876pBg=; fh=XH/ap8Nu0Ho4qMO4SozedsUSGhYtMcZa+6i5RnOhocc=; b=CBNAdntHGrNBxT9Nr/uNEtTuxK/GLY5yUlfdkIsVN3+Xo6XqU7vR1M2I5CgIMigMfR rjxQlNyLh9FfkSVRkD4inms3vpEIhnbycra/RvvYfDFCQvL8kWjb+SS9UJO0s/EjWkca T3xZR8WacpJNeD/s1qZlr+8+LAltDMMd6bwa4NIsOzVZKSU9DaDNnGc5B+hO1VqBpLX1 x0gl6Q30pGPq5L1Wuum+8W/wtHlDvtoiqd22b1UMGqNajYUbzNcK7j2ERWkhmx/oSpUA ckeFjORgHVmbxoI9hNqH30GfjMS14ZDmy332Ez5Pn88BNj+9vojJ5STUzbywWrgYqbe0 yUkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XEpsZzyG; spf=pass (google.com: domain of linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kg13-20020a05622a760d00b00423dfb3e344si20090420qtb.280.2023.12.17.02.08.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 02:08:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XEpsZzyG; spf=pass (google.com: domain of linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2522-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB2571C21185 for <ouuuleilei@gmail.com>; Sun, 17 Dec 2023 10:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3549B569F; Sun, 17 Dec 2023 10:07:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XEpsZzyG" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 1E48720F1 for <linux-kernel@vger.kernel.org>; Sun, 17 Dec 2023 10:07:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702807670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5CR/3Io6mktEEwQ1LHj5L/2zpZ/H1ugjG/amm876pBg=; b=XEpsZzyG8LZUnUt2PaxQ1AmflgzJ1Fm+ekQv1RB3o9uNDx/0te+jMGnhcNqEFFrQVilwbg egeYyRW4HR2MmoCqlW7dOKOHRNiny+nns6WeSQfgzGsSu2Htosl1ACBivWG1OrQEqf25sJ dofgof93LuEskXu6EPUmYtUf0iSVArU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-l5Fru9RRPcSbAaWbWpxh4g-1; Sun, 17 Dec 2023 05:07:49 -0500 X-MC-Unique: l5Fru9RRPcSbAaWbWpxh4g-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40c42205ed0so18251465e9.2 for <linux-kernel@vger.kernel.org>; Sun, 17 Dec 2023 02:07:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702807667; x=1703412467; 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=5CR/3Io6mktEEwQ1LHj5L/2zpZ/H1ugjG/amm876pBg=; b=QmZmSl/D89f1cP7drutqBX11XC8m4ZqyB6XVERkgA4q7I2L3nt7e9iyN2i0RLqrDfr ksMAuUIPrdPnlOG4ZoK9hnFxmJUslnsUmrKPIIXG1RWSNH6gqwCK7/7UTnbGglSgTTPQ xn0nE8ICgFBwrzhE+ntAbwDZdg2WDCuY0iqJCn8vvau/Br+puA00Kum4vAArT3eTH+7M le9hyjlM1qR3am5+uz8IqoOZg0iAfT+UYTexiTIooN9+T4HwmEpz/DBV8LK5AnCvvNqK JLkaIHKIO/ObrsOR1yxa9CK3EzeB1GduE9SKvU+3mZGBrUCY5zkSyjVQU1X+mp8XocBa aY2w== X-Gm-Message-State: AOJu0YxELjNOd3lRX1kPgQ0MT6PDtQV4b29lpZda8F88yzxSF40cdstn o2RSpcb7dDEJmPmCr63URrQlauFGq3zeoT2Xq8Qu5kX4VKafmFPunZrJKgrOFZ6cdn5gbxd8o0H 6V9SgpHQaKkm2aXDN62urA44yEnRhxNKSW/DnihGmHxpIjlV3jDwqIe2MfGAKc/kjXsGBGptMM8 KJviw39oU= X-Received: by 2002:a05:600c:1393:b0:40c:4d80:f51a with SMTP id u19-20020a05600c139300b0040c4d80f51amr5305204wmf.96.1702807667330; Sun, 17 Dec 2023 02:07:47 -0800 (PST) X-Received: by 2002:a05:600c:1393:b0:40c:4d80:f51a with SMTP id u19-20020a05600c139300b0040c4d80f51amr5305183wmf.96.1702807666944; Sun, 17 Dec 2023 02:07:46 -0800 (PST) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id h2-20020a05600c350200b0040c44b4a282sm29099420wmq.43.2023.12.17.02.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 02:07:45 -0800 (PST) From: Javier Martinez Canillas <javierm@redhat.com> To: linux-kernel@vger.kernel.org Cc: Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Conor Dooley <conor@kernel.org>, Rob Herring <robh@kernel.org>, Peter Robinson <pbrobinson@gmail.com>, Geert Uytterhoeven <geert@linux-m68k.org>, Javier Martinez Canillas <javierm@redhat.com>, Conor Dooley <conor+dt@kernel.org>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] dt-bindings: display: Add SSD133x OLED controllers Date: Sun, 17 Dec 2023 11:07:03 +0100 Message-ID: <20231217100741.1943932-2-javierm@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231217100741.1943932-1-javierm@redhat.com> References: <20231217100741.1943932-1-javierm@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785523292988022973 X-GMAIL-MSGID: 1785523292988022973 |
Series |
drm/solomon: Add support for the SSD133x controller family
|
|
Commit Message
Javier Martinez Canillas
Dec. 17, 2023, 10:07 a.m. UTC
Add a Device Tree binding schema for the OLED panels based on the
Solomon SSD133x family of controllers.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
.../bindings/display/solomon,ssd133x.yaml | 63 +++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml
Comments
On Sun, Dec 17, 2023 at 11:07:03AM +0100, Javier Martinez Canillas wrote: > Add a Device Tree binding schema for the OLED panels based on the > Solomon SSD133x family of controllers. > > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> > --- > > .../bindings/display/solomon,ssd133x.yaml | 63 +++++++++++++++++++ > 1 file changed, 63 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > > diff --git a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > new file mode 100644 > index 000000000000..eee8d8c9ca35 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > @@ -0,0 +1,63 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/solomon,ssd133x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Solomon SSD133x OLED Display Controllers > + > +maintainers: > + - Javier Martinez Canillas <javierm@redhat.com> > + > +properties: > + compatible: > + enum: > + - solomon,ssd1331 > + > +required: > + - compatible > + - reg > + > +allOf: > + - $ref: solomon,ssd-common.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + const: solomon,ssd1331 > + then: > + properties: > + width: > + default: 96 > + height: > + default: 64 Do you envisage a rake of devices that are going to end up in this binding? Otherwise, why not unconditionally set the constraints? Cheers, Conor.
Conor Dooley <conor@kernel.org> writes: Hello Connor, > On Sun, Dec 17, 2023 at 11:07:03AM +0100, Javier Martinez Canillas wrote: [...] >> +properties: >> + compatible: >> + enum: >> + - solomon,ssd1331 >> + >> +required: >> + - compatible >> + - reg >> + >> +allOf: >> + - $ref: solomon,ssd-common.yaml# >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: solomon,ssd1331 >> + then: >> + properties: >> + width: >> + default: 96 >> + height: >> + default: 64 > > Do you envisage a rake of devices that are going to end up in this > binding? Otherwise, why not unconditionally set the constraints? > Because these are only for the default width and height, there can be panels using the same controller but that have a different resolution. For example, there are panels using the SSD1306 controller that have 128x32 [0], 64x32 [1] or 128x64 [2] resolutions. But answering your question, yes I think that more devices for this SSD133x family are going to be added later. Looking at [3], there is at least SSD1333 that has a different default resolutions (176x176). I think that even the SSD135x family could be supported by the same modsetting pipeline, but I need to get one to figure it out. [0]: https://es.aliexpress.com/item/1005003648174074.html [1]: https://www.buydisplay.com/white-0-49-inch-oled-display-64x32-iic-i2c-ssd1306-connector-fpc [2]: https://es.aliexpress.com/item/1005001582340858.html?gatewayAdapt=glo2esp [3]: https://www.solomon-systech.com/product-search/?technology=oled-display > Cheers, > Conor.
On Sun, Dec 17, 2023 at 10:33:24PM +0100, Javier Martinez Canillas wrote: > Conor Dooley <conor@kernel.org> writes: > > Hello Connor, > > > On Sun, Dec 17, 2023 at 11:07:03AM +0100, Javier Martinez Canillas wrote: > > [...] > > >> +properties: > >> + compatible: > >> + enum: > >> + - solomon,ssd1331 > >> + > >> +required: > >> + - compatible > >> + - reg > >> + > >> +allOf: > >> + - $ref: solomon,ssd-common.yaml# > >> + > >> + - if: > >> + properties: > >> + compatible: > >> + contains: > >> + const: solomon,ssd1331 > >> + then: > >> + properties: > >> + width: > >> + default: 96 > >> + height: > >> + default: 64 > > > > Do you envisage a rake of devices that are going to end up in this > > binding? Otherwise, why not unconditionally set the constraints? > > > > Because these are only for the default width and height, there can be > panels using the same controller but that have a different resolution. > > For example, there are panels using the SSD1306 controller that have > 128x32 [0], 64x32 [1] or 128x64 [2] resolutions. This, as you know, does not matter here. > But answering your question, yes I think that more devices for this > SSD133x family are going to be added later. Looking at [3], there is > at least SSD1333 that has a different default resolutions (176x176). That's fair enough though. I'd probably err on the side of introducing this complexity when the other users actually show up though. > > I think that even the SSD135x family could be supported by the same > modsetting pipeline, but I need to get one to figure it out. > > [0]: https://es.aliexpress.com/item/1005003648174074.html > [1]: https://www.buydisplay.com/white-0-49-inch-oled-display-64x32-iic-i2c-ssd1306-connector-fpc > [2]: https://es.aliexpress.com/item/1005001582340858.html?gatewayAdapt=glo2esp > [3]: https://www.solomon-systech.com/product-search/?technology=oled-display > > > Cheers, > > Conor. > > -- > Best regards, > > Javier Martinez Canillas > Core Platforms > Red Hat >
Conor Dooley <conor@kernel.org> writes: Hello Conor, > On Sun, Dec 17, 2023 at 10:33:24PM +0100, Javier Martinez Canillas wrote: [...] >> >> + then: >> >> + properties: >> >> + width: >> >> + default: 96 >> >> + height: >> >> + default: 64 >> > >> > Do you envisage a rake of devices that are going to end up in this >> > binding? Otherwise, why not unconditionally set the constraints? >> > >> >> Because these are only for the default width and height, there can be >> panels using the same controller but that have a different resolution. >> >> For example, there are panels using the SSD1306 controller that have >> 128x32 [0], 64x32 [1] or 128x64 [2] resolutions. > > This, as you know, does not matter here. > Are you sure? What I tried to say is that the SSD133x are just OLED controllers and manufacturers use those chips to attach a panel that has a certain resolution. While it makes sense to use all the supported width and height, some manufacturers chose to have a smaller panel instead (I used SSD1306 as an example because I knew about these but the same might be true for let's say SSD1331). Or saying another way, are you sure that every manufacturer selling RGB OLED panels using the SSD1331 chip will use the default resolution and users won't have to set a custom width and height ? I have already chosen to make the DT binding as simple as possible to prevent what happened with the SSD1306 "solomon,page-offset" property that has a broken default [0] but I think that not allowing to set the resolution is already too restrictive and would make it unusable for any panel that doesn't have the default width and height. [0]: https://lists.freedesktop.org/archives/dri-devel/2023-November/431150.html >> But answering your question, yes I think that more devices for this >> SSD133x family are going to be added later. Looking at [3], there is >> at least SSD1333 that has a different default resolutions (176x176). > > That's fair enough though. I'd probably err on the side of introducing > this complexity when the other users actually show up though. > Agree and the reason why I did not include entries for the SSD1332 and SSD1333. I was planning to add those only if there were users since it seems that the SSD1331 is the most popular controller from this family. But as explained, even for the SSD1331 it may be needed to set a width and height that is different than the default of this panel controller.
On Sun, Dec 17, 2023 at 11:00:07PM +0100, Javier Martinez Canillas wrote: > Conor Dooley <conor@kernel.org> writes: > > Hello Conor, > > > On Sun, Dec 17, 2023 at 10:33:24PM +0100, Javier Martinez Canillas wrote: > > [...] > > >> >> + then: > >> >> + properties: > >> >> + width: > >> >> + default: 96 > >> >> + height: > >> >> + default: 64 > >> > > >> > Do you envisage a rake of devices that are going to end up in this > >> > binding? Otherwise, why not unconditionally set the constraints? > >> > > >> > >> Because these are only for the default width and height, there can be > >> panels using the same controller but that have a different resolution. > >> > >> For example, there are panels using the SSD1306 controller that have > >> 128x32 [0], 64x32 [1] or 128x64 [2] resolutions. > > > > This, as you know, does not matter here. > > > > Are you sure? What I tried to say is that the SSD133x are just OLED > controllers and manufacturers use those chips to attach a panel that > has a certain resolution. > > While it makes sense to use all the supported width and height, some > manufacturers chose to have a smaller panel instead (I used SSD1306 > as an example because I knew about these but the same might be true > for let's say SSD1331). > > Or saying another way, are you sure that every manufacturer selling > RGB OLED panels using the SSD1331 chip will use the default resolution > and users won't have to set a custom width and height ? That's not at all what I was saying. I just meant unconditionally set the constraints on the property (in this case the default) since you only have one compatible. Not unconditionally set the height and width. Apologies if if that was unclear. Thanks, Conor. > I have already chosen to make the DT binding as simple as possible to > prevent what happened with the SSD1306 "solomon,page-offset" property > that has a broken default [0] but I think that not allowing to set the > resolution is already too restrictive and would make it unusable for > any panel that doesn't have the default width and height. > > [0]: https://lists.freedesktop.org/archives/dri-devel/2023-November/431150.html > > >> But answering your question, yes I think that more devices for this > >> SSD133x family are going to be added later. Looking at [3], there is > >> at least SSD1333 that has a different default resolutions (176x176). > > > > That's fair enough though. I'd probably err on the side of introducing > > this complexity when the other users actually show up though. > > > > Agree and the reason why I did not include entries for the SSD1332 and > SSD1333. I was planning to add those only if there were users since it > seems that the SSD1331 is the most popular controller from this family. > > But as explained, even for the SSD1331 it may be needed to set a width > and height that is different than the default of this panel controller. > > -- > Best regards, > > Javier Martinez Canillas > Core Platforms > Red Hat >
Conor Dooley <conor@kernel.org> writes: Hello Connor, > On Sun, Dec 17, 2023 at 11:00:07PM +0100, Javier Martinez Canillas wrote: >> Conor Dooley <conor@kernel.org> writes: >> >> Hello Conor, >> >> > On Sun, Dec 17, 2023 at 10:33:24PM +0100, Javier Martinez Canillas wrote: >> >> [...] >> >> >> >> + then: >> >> >> + properties: >> >> >> + width: >> >> >> + default: 96 >> >> >> + height: >> >> >> + default: 64 >> >> > >> >> > Do you envisage a rake of devices that are going to end up in this >> >> > binding? Otherwise, why not unconditionally set the constraints? >> >> > >> >> >> >> Because these are only for the default width and height, there can be >> >> panels using the same controller but that have a different resolution. >> >> >> >> For example, there are panels using the SSD1306 controller that have >> >> 128x32 [0], 64x32 [1] or 128x64 [2] resolutions. >> > >> > This, as you know, does not matter here. >> > >> >> Are you sure? What I tried to say is that the SSD133x are just OLED >> controllers and manufacturers use those chips to attach a panel that >> has a certain resolution. >> >> While it makes sense to use all the supported width and height, some >> manufacturers chose to have a smaller panel instead (I used SSD1306 >> as an example because I knew about these but the same might be true >> for let's say SSD1331). >> >> Or saying another way, are you sure that every manufacturer selling >> RGB OLED panels using the SSD1331 chip will use the default resolution >> and users won't have to set a custom width and height ? > > That's not at all what I was saying. I just meant unconditionally set > the constraints on the property (in this case the default) since you > only have one compatible. Not unconditionally set the height and width. > > Apologies if if that was unclear. > Oh, I see that you meant now. Sorry for my confusion! And yes, I agree with you that doesn't make sense to make it conditional if there's only a single compatible. I'll drop that if condition on v2. Thanks a lot for your feedback. > Thanks, > Conor. >
On 17/12/2023 11:07, Javier Martinez Canillas wrote: >> + - if: > + properties: > + compatible: > + contains: > + const: solomon,ssd1331 > + then: > + properties: > + width: > + default: 96 > + height: > + default: 64 > + > +unevaluatedProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + Use 4 spaces for example indentation. Best regards, Krzysztof
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes: Hello Krzysztof, > On 17/12/2023 11:07, Javier Martinez Canillas wrote: >>> + - if: >> + properties: >> + compatible: >> + contains: >> + const: solomon,ssd1331 >> + then: >> + properties: >> + width: >> + default: 96 >> + height: >> + default: 64 >> + >> +unevaluatedProperties: false >> + >> +examples: >> + - | >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + > > Use 4 spaces for example indentation. > Sure, I'll change it in v2. > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml new file mode 100644 index 000000000000..eee8d8c9ca35 --- /dev/null +++ b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/solomon,ssd133x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Solomon SSD133x OLED Display Controllers + +maintainers: + - Javier Martinez Canillas <javierm@redhat.com> + +properties: + compatible: + enum: + - solomon,ssd1331 + +required: + - compatible + - reg + +allOf: + - $ref: solomon,ssd-common.yaml# + + - if: + properties: + compatible: + contains: + const: solomon,ssd1331 + then: + properties: + width: + default: 96 + height: + default: 64 + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + oled@3c { + compatible = "solomon,ssd1331"; + reg = <0x3c>; + reset-gpios = <&gpio2 7>; + }; + + }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + oled@0 { + compatible = "solomon,ssd1331"; + reg = <0x0>; + reset-gpios = <&gpio2 7>; + dc-gpios = <&gpio2 8>; + spi-max-frequency = <10000000>; + }; + };