Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp263486rdg; Tue, 10 Oct 2023 09:32:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFe55wV2GLKdC2cf44FN/WjVBRPD966vqJFq+YkcNTbbBq25Hs3M6EY+RW+Hd3Zk9htUSTa X-Received: by 2002:a05:6e02:1aa4:b0:34f:b296:168d with SMTP id l4-20020a056e021aa400b0034fb296168dmr25677442ilv.26.1696955542834; Tue, 10 Oct 2023 09:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696955542; cv=none; d=google.com; s=arc-20160816; b=dQUSiNCzKysfYZJmFGw3JdEStxC8oUMSXX99wh9MdXDJLoCoeNDyXq+YdIH2eIRJrx veMdXLEJvoH4aGI2ly8qtArsGUyG2rr1umRSUHRW7vKxFaaGztCiw4xEcg04jRxHWycY f/sZD5NHnR16hJSOgkRHeye99EWeuz0tNIsYRUlaxXrar0z8inz70gtpSo9i8QW8YxC/ 9o3743zL5ZUsj/c2Tzua2MVK/PW1R45akWyASoZ06cX9ebZRk/bhb1AihXR5fNYrLrRo +3EoYzBecUg1BMYSOxv/yLDHMugojelj7o39V0s06HlwNOCKc4TkAPzd019I3SNJVOoI Ssvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mv3b+Zhijx18eiGAL0f9K+yF1/omhbnb68rMxEwKig4=; fh=I3kQ6D8rP3jKDtMv2+OAjUsleb0TPzQN/cv3reCkIG8=; b=EQ9eDlabPua3yHKuqCjrCpHEap4MhyQiMOtwopOXbT9Hv///O9NaBwHYH6rFNYsgU7 sY/Y2FA6G1AxgduwdrRID5ijwasFDwKLEiwjW9m6HnOUaAoLTrJBV3FFTsBkaKP4jbDR 62UCIQ6PKcDlliDkkjVaW1dUz72ZaG0F8Ck3PSLju5JCeRiohlWpwvGkaBdlkIojYl66 l3ou5w57zKgBZ13dg2AXbhczz7okq3w2s887wXBSBR+4Ondmi5ea3d9Jn3y/ixozXWzr o81Ab49QY5a3kECk0KiDNhDuMbKxWooVqRMQ4Iizg90CkmlxWlVQDTA9QlPpwLDqY46C g6mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M+eny5t4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x5-20020a654145000000b00569362d6cebsi1256486pgp.2.2023.10.10.09.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 09:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M+eny5t4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BBEDD80309C0; Tue, 10 Oct 2023 09:32:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233403AbjJJQb6 (ORCPT + 99 others); Tue, 10 Oct 2023 12:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbjJJQbz (ORCPT ); Tue, 10 Oct 2023 12:31:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D79D4AC for ; Tue, 10 Oct 2023 09:31:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2458C433C8; Tue, 10 Oct 2023 16:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696955513; bh=k1lL82diLHKw/+zq5O/inoSt62xLZXJ0W/quVztpAvY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M+eny5t4ZV3vWX1uJnUkUFGY8jS4yRaRAZXsfRHHAmuaZpnvPddE31NAuMh70OKV2 2OXMzFryotIDqpR7jYrPqo+MlmO8TsHuIJSfveUtnKubzlT5FpEdn9DaUgf/3J5aur 0P7qFCNIOOR0x0XOUqJaqUXQehvGJmZxhbIo247FhBRJ79aEUtZYokeHo3q6Vd6RQr olRk9wKLy/404rQDql05auPtaqnYOI1wGNQuIEKw5nU+S1hi4//XWkWGaX3lSBg4/R qNBoKwhVXH6vP29vlPKVy+/EkIYqtE3ygWvnlLCUKcvrKupQ0W/Nu4KztezrJco0lC DweL500swo/eA== Date: Tue, 10 Oct 2023 17:31:48 +0100 From: Conor Dooley To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Geert Uytterhoeven , Conor Dooley , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Maarten Lankhorst , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 8/8] dt-bindings: display: Add SSD132x OLED controllers Message-ID: <20231010-headache-hazard-834a3338c473@spud> References: <20231009183522.543918-1-javierm@redhat.com> <20231009183522.543918-9-javierm@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nZTzSzTENfYlYUCo" Content-Disposition: inline In-Reply-To: <20231009183522.543918-9-javierm@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 09:32:04 -0700 (PDT) --nZTzSzTENfYlYUCo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Mon, Oct 09, 2023 at 08:34:22PM +0200, Javier Martinez Canillas wrote: > Add a Device Tree binding schema for the OLED panels based on the Solomon > SSD132x family of controllers. >=20 > Signed-off-by: Javier Martinez Canillas > --- >=20 > .../bindings/display/solomon,ssd132x.yaml | 116 ++++++++++++++++++ > 1 file changed, 116 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd= 132x.yaml >=20 > diff --git a/Documentation/devicetree/bindings/display/solomon,ssd132x.ya= ml b/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml > new file mode 100644 > index 000000000000..b64904703a3a > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml > @@ -0,0 +1,116 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/solomon,ssd132x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Solomon SSD132x OLED Controllers > + > +maintainers: > + - Javier Martinez Canillas > + > +properties: > + compatible: > + oneOf: > + - enum: > + - solomon,ssd1322 > + - solomon,ssd1325 > + - solomon,ssd1327 You don't need the oneOf here here as there is only the enum as a possible item. I didn't get anything else in the series, I have to ask - are these controllers not compatible with eachother? > + > + reg: > + maxItems: 1 > + > + reset-gpios: > + maxItems: 1 > + > + # Only required for SPI > + dc-gpios: > + description: > + GPIO connected to the controller's D/C# (Data/Command) pin, > + that is needed for 4-wire SPI to tell the controller if the > + data sent is for a command register or the display data RAM > + maxItems: 1 > + > + solomon,height: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Height in pixel of the screen driven by the controller. > + The default value is controller-dependent. You probably know better than me, operating in drm stuff, but are there really no generic properties for the weidth/height of a display? > + > + solomon,width: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Width in pixel of the screen driven by the controller. > + The default value is controller-dependent. > + > +required: > + - compatible > + - reg > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + const: solomon,ssd1322 > + then: > + properties: > + width: > + default: 480 > + height: > + default: 128 > + > + - if: > + properties: > + compatible: > + contains: > + const: solomon,ssd1325 > + then: > + properties: > + width: > + default: 128 > + height: > + default: 80 > + > + - if: > + properties: > + compatible: > + contains: > + const: solomon,ssd1327 > + then: > + properties: > + width: > + default: 128 > + height: > + default: 128 Unless you did it like this for clarity, 2 of these have the same default width and 2 have the same default height. You could cut this down to a pair of if/then/else on that basis AFAICT. :wq > + > +unevaluatedProperties: false > + > +examples: > + - | > + i2c { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + ssd1327_i2c: oled@3c { This label is unused as far as I can tell. Ditto below. Cheers, Conor. > + compatible =3D "solomon,ssd1327"; > + reg =3D <0x3c>; > + reset-gpios =3D <&gpio2 7>; > + }; > + > + }; > + - | > + spi { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + ssd1327_spi: oled@0 { > + compatible =3D "solomon,ssd1327"; > + reg =3D <0x0>; > + reset-gpios =3D <&gpio2 7>; > + dc-gpios =3D <&gpio2 8>; > + spi-max-frequency =3D <10000000>; > + }; > + }; > --=20 > 2.41.0 >=20 >=20 --nZTzSzTENfYlYUCo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZSV8dAAKCRB4tDGHoIJi 0lOVAQCYh5XfAhpN2Ub0NBL13m3+H+VbFHZ4v6rRMM5HC7VcRwEA+j1MKNddmHvS 3nuSUc3lsv02CCEFfKljwpslWizh0As= =4zyv -----END PGP SIGNATURE----- --nZTzSzTENfYlYUCo--