Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1167964pxm; Thu, 3 Mar 2022 11:39:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGo/J3z00h09+4N0NRux77IiJpcfJlWXf9g331mgJRm6mPtCkvPXDxC0CYoyvuoWNTd8bn X-Received: by 2002:a17:906:2ec6:b0:69f:286a:66ab with SMTP id s6-20020a1709062ec600b0069f286a66abmr28536726eji.684.1646336391395; Thu, 03 Mar 2022 11:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646336391; cv=none; d=google.com; s=arc-20160816; b=d05QwQVLmbRR0+0pLhocqnMrhVxckfxAjNcBk0l1sswVgi8MUOfI5ChvP5yTCeBE+x 7B8Oc12/y54BwIEwVqFmBKBeTOfTu6FXlUqu8RU8XWw4OHc3FKy9ShhjyxcAbr/zgnxr 2HUvJef1+Uea0s87RjAu+BJDl7FnsE4TPQRJdbv9d619JUcg419x37DGTFruEa3GTLHA /dQiQ31+RvghxP957nVFfmWuWQeRGTNpK0arBxu8sYI+6mwYZOYCOx3b14lrfjhKhlL4 HVo0v3dRxWHPHTVQIPTBQO/8F9Zm0c1hysQtx3kuIuh6lhIbYrBmFZBRH9siS57cjFqn 5AaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z+ent/yy95aJOm6DnI9kx/1sJTBsC05TLsSw4BZBHzs=; b=CefqMOfuMe64BhFiigveZLz755F6zkOMHkcAZvhOuwogTlGSZQrGDdfLFgY9kjKFYF 8ZytyfplxaHTU8xCW9UpwbCcmHxIoEpAj54SoWSvIYaKaWv8Jl8fTB+6CmbtFbFpsvgG QNm1XUIrtDuY+C2Rogw8oM2pB5qn7rA7W6MuyJ4Tev2RN5X3Ypq0scQdrZAjn4sokOut RIcbhXPNVX5exC6y8sWNvoGzYydph71ycPsL7Pab2ViNNzQRg0Em1DjLuTRUKmmoFS1c t9d7O/H7e3mM/hezPKWM55ouB6oqQzro/rgyMQpaDnMzgitplImrgTcZTIgXQcK6h8yd 8WUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hMDv5rKb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090658c300b006d009d84899si2055704ejs.1008.2022.03.03.11.39.28; Thu, 03 Mar 2022 11:39:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hMDv5rKb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234728AbiCCRlP (ORCPT + 99 others); Thu, 3 Mar 2022 12:41:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234762AbiCCRlJ (ORCPT ); Thu, 3 Mar 2022 12:41:09 -0500 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 6AE511A1293 for ; Thu, 3 Mar 2022 09:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646329218; 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=Z+ent/yy95aJOm6DnI9kx/1sJTBsC05TLsSw4BZBHzs=; b=hMDv5rKbeCT7D2SIRMpiySYtxKQL77Y4jyJwIxw3s1vqjkmgp4iYYUx/tg2v/xz4FQNL8D LIBADd74SZMPOAWqzDEWnWQK/4NudNdiqBR0lCnlHlwPJeTkG4IsDiSTEsm9KRgw0kaEZ+ Ny+mnzYyIvM9wmeg+I5AjG8m6KrDomg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-oB6EAaFCP6aixmlLUJNTsQ-1; Thu, 03 Mar 2022 12:40:15 -0500 X-MC-Unique: oB6EAaFCP6aixmlLUJNTsQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 577EC5EF; Thu, 3 Mar 2022 17:40:13 +0000 (UTC) Received: from cmirabil.remote.csb (unknown [10.22.9.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B3D280FC3; Thu, 3 Mar 2022 17:40:11 +0000 (UTC) From: Charles Mirabile To: linux-kernel@vger.kernel.org Cc: Charles Mirabile , Serge Schneider , Stefan Wahren , Nicolas Saenz Julienne , Mattias Brugger , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, fedora-rpi@googlegroups.com, Miguel Ojeda , Rob Herring , Dmitry Torokhov , Lee Jones , devicetree@vger.kernel.org, linux-input@vger.kernel.org, Mwesigwa Guma , Joel Savitz Subject: [PATCH v7 4/6] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Date: Thu, 3 Mar 2022 12:39:33 -0500 Message-Id: <20220303173935.100622-5-cmirabil@redhat.com> In-Reply-To: <20220303173935.100622-1-cmirabil@redhat.com> References: <20220303173935.100622-1-cmirabil@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 This patch adds the device tree bindings for the Sense HAT and each of its children devices in yaml form. Co-developed-by: Mwesigwa Guma Signed-off-by: Mwesigwa Guma Co-developed-by: Joel Savitz Signed-off-by: Joel Savitz Signed-off-by: Charles Mirabile --- .../raspberrypi,sensehat-display.yaml | 27 ++++++++ .../input/raspberrypi,sensehat-joystick.yaml | 33 +++++++++ .../bindings/mfd/raspberrypi,sensehat.yaml | 69 +++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml create mode 100644 Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml create mode 100644 Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml diff --git a/Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml b/Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml new file mode 100644 index 000000000000..5e41d6b7817d --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/auxdisplay/raspberrypi,sensehat-display.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Raspberry Pi Sensehat Display + +maintainers: + - Charles Mirabile + - Mwesigwa Guma + - Joel Savitz + +description: + This device is part of the sensehat multi function device. + For more information see ../mfd/raspberrypi,sensehat.yaml. + + This device features a programmable 8x8 RGB LED matrix. + +properties: + compatible: + const: raspberrypi,sensehat-display + +required: + - compatible + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml b/Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml new file mode 100644 index 000000000000..c97cd1d8eac6 --- /dev/null +++ b/Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/raspberrypi,sensehat-joystick.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Raspberry Pi Sensehat Joystick + +maintainers: + - Charles Mirabile + - Mwesigwa Guma + - Joel Savitz + +description: + This device is part of the sensehat multi function device. + For more information see ../mfd/raspberrypi,sensehat.yaml. + + This device features a five button joystick (up, down,left, + right, click) + +properties: + compatible: + const: raspberrypi,sensehat-joystick + + interrupts: + items: + - description: pin number for joystick interrupt + +required: + - compatible + - interrupts + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml new file mode 100644 index 000000000000..2484ec91b430 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/raspberrypi,sensehat.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Raspberry Pi Sensehat + +maintainers: + - Charles Mirabile + - Mwesigwa Guma + - Joel Savitz + +description: + The Raspberry Pi Sensehat is an addon board originally developed + for the Raspberry Pi that has a joystick and an 8x8 RGB LED display + as well as several environmental sensors. It connects via i2c and + a gpio for irq. + +properties: + compatible: + const: raspberrypi,sensehat + + reg: + items: + - description: i2c device address + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "joystick": + $ref: ../input/raspberrypi,sensehat-joystick.yaml + + "display": + $ref: ../auxdisplay/raspberrypi,sensehat-display.yaml + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - joystick + - display + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + sensehat@46 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "raspberrypi,sensehat"; + reg = <0x46>; + display { + compatible = "raspberrypi,sensehat-display"; + }; + joystick { + compatible = "raspberrypi,sensehat-joystick"; + interrupts = <23 GPIO_ACTIVE_HIGH>; + }; + }; + }; -- 2.31.1