From patchwork Mon Apr 11 21:12:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 559702 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45F64C433F5 for ; Mon, 11 Apr 2022 21:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346864AbiDKVPL (ORCPT ); Mon, 11 Apr 2022 17:15:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241766AbiDKVPK (ORCPT ); Mon, 11 Apr 2022 17:15:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1ED9F15822 for ; Mon, 11 Apr 2022 14:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649711574; 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=zQ+QBfaH3h1Scl+hTaH0HyHu0TpM43OebOl6PoDY/RM=; b=O7UgSMvDea4s6LNfh4Ggk/XC5yGF3whpTdUniHCcFVSZxKhnDrgeg/UUH6Cl3OEOmwbkGj Ilde8KAZoRptjXuw9FIgqKYM6qhqFc/FzQAOm9wG9uDc8JMo34GAQmdkeTnxhqRv6j4j+U mCs2OpCElKMoxAJHtiXMnI2WAEytwPY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-310-4XcvYW4HMR-RjuLDoYo1jQ-1; Mon, 11 Apr 2022 17:12:53 -0400 X-MC-Unique: 4XcvYW4HMR-RjuLDoYo1jQ-1 Received: by mail-wm1-f72.google.com with SMTP id q6-20020a1cf306000000b0038c5726365aso217843wmq.3 for ; Mon, 11 Apr 2022 14:12:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zQ+QBfaH3h1Scl+hTaH0HyHu0TpM43OebOl6PoDY/RM=; b=TMRTYU/Uil2VVaScaK8HC9BUmTMTewxrH2IVdgYYJ/cvoBLuyRs3rTxpWFWYX1weZ3 dLGWa6vBDXdcAFY4H8wjb5YeqFLyiS9SUDg67vUtVb1evgSEMu/ooMwiyxxAMxisPYsi 6+mOCk4W1wwMfVgA2uzZzWEr8Gu5iG0/waoGOOOr1+KJhUJyVbweHmBTQyGjOLVLft7D u4YJffxdFOqRFqZf2lD2mCqkneww7zxDUav6RpN1VAWLY63WlBgexbsLAYRgefTmh0nx DezrV4NZWC75pXcmRDQZCcG0fItuXVNbkmEhM/sPCqNv3EkCbYapAiLFjLmOQlK+ltlU atHA== X-Gm-Message-State: AOAM530XFg4YW8BpS1X08zgq4N9WlEDI3Y0WnSaQG61nMS6XluaA9qYf wRCZkezG835nbEPK3xpD0lb3lXhMOCoqT1U93e4WWMsvcsDhEdz1IhDpzvxwybsfSfWxHU3n1Ph tE0rmpIWH8oDnVTiJMaHSVA== X-Received: by 2002:a1c:202:0:b0:38e:ab4b:ce72 with SMTP id 2-20020a1c0202000000b0038eab4bce72mr978216wmc.152.1649711571861; Mon, 11 Apr 2022 14:12:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfuB7hkZg8q50JjIIMsDyKbYBXK9LNBxTvZbXiee0cHgIO0ETUBqdWkPQZa7/y0oGvzWZVvw== X-Received: by 2002:a1c:202:0:b0:38e:ab4b:ce72 with SMTP id 2-20020a1c0202000000b0038eab4bce72mr978199wmc.152.1649711571661; Mon, 11 Apr 2022 14:12:51 -0700 (PDT) Received: from minerva.home ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id l9-20020a5d6d89000000b00203d62072c4sm28723722wrs.43.2022.04.11.14.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 14:12:51 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Rob Herring , dri-devel@lists.freedesktop.org, Neil Armstrong , Geert Uytterhoeven , Mark Brown , Andy Shevchenko , Chen-Yu Tsai , Javier Martinez Canillas , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Maxime Ripard , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v2 2/5] dt-bindings: display: ssd1307fb: Extend schema for SPI controllers Date: Mon, 11 Apr 2022 23:12:40 +0200 Message-Id: <20220411211243.11121-3-javierm@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411211243.11121-1-javierm@redhat.com> References: <20220411211243.11121-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Solomon SSD130x OLED displays can either have an I2C or SPI interface, add to the schema the properties and examples for OLED devices under SPI. Signed-off-by: Javier Martinez Canillas Acked-by: Mark Brown --- Changes in v2: - Don't add compatible strings with an "-spi" suffix (Geert Uytterhoeven). .../bindings/display/solomon,ssd1307fb.yaml | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml index 6b9d0c72739a..b58d2d7bd8c1 100644 --- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml @@ -39,9 +39,14 @@ properties: reset-gpios: maxItems: 1 + dc-gpios: + maxItems: 1 + vbat-supply: description: The supply for VBAT + spi-max-frequency: true + solomon,height: $ref: /schemas/types.yaml#/definitions/uint32 default: 16 @@ -160,6 +165,7 @@ allOf: compatible: contains: const: solomon,ssd1305 + then: properties: solomon,dclk-div: @@ -213,14 +219,14 @@ examples: #address-cells = <1>; #size-cells = <0>; - ssd1307: oled@3c { + ssd1307_i2c: oled@3c { compatible = "solomon,ssd1307"; reg = <0x3c>; pwms = <&pwm 4 3000>; reset-gpios = <&gpio2 7>; }; - ssd1306: oled@3d { + ssd1306_i2c: oled@3d { compatible = "solomon,ssd1306"; reg = <0x3c>; pwms = <&pwm 4 3000>; @@ -231,3 +237,30 @@ examples: solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>; }; }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + ssd1307_spi: oled@0 { + compatible = "solomon,ssd1307"; + reg = <0x0>; + pwms = <&pwm 4 3000>; + reset-gpios = <&gpio2 7>; + dc-gpios = <&gpio2 8>; + spi-max-frequency = <10000000>; + }; + + ssd1306_spi: oled@1 { + compatible = "solomon,ssd1306"; + reg = <0x1>; + pwms = <&pwm 4 3000>; + reset-gpios = <&gpio2 7>; + dc-gpios = <&gpio2 8>; + spi-max-frequency = <10000000>; + solomon,com-lrremap; + solomon,com-invdir; + solomon,com-offset = <32>; + solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>; + }; + };