Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp48759lfv; Tue, 12 Apr 2022 16:48:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+j/4J5DaQMffkN2/lc7ec2ResfC+ybj282Ju/jpKJzcXApS8c2LMluRuVZ/nI5yVGTuqF X-Received: by 2002:a17:907:2d91:b0:6e8:abf6:c368 with SMTP id gt17-20020a1709072d9100b006e8abf6c368mr6627872ejc.124.1649807302226; Tue, 12 Apr 2022 16:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649807302; cv=none; d=google.com; s=arc-20160816; b=eFdrewqFX0sjt5PrwLkfdmYXGdcmlyFPaKFqz85OaH65RJG5nik1x9VKRSEZbMpcrm JyI32xMutHMMBoDYTcLHsFat+GvbQgf3qyXpI+fx8ljGiYjOX0XgLwnePK/eRZk6/+1n UQ9kBbieEEQL2vtiJ30Pcn/w71RfjuSYiENmK8Wxt6nOzKiaTuPe30P30FcDQZxLMYWi YEo9B2eKZI1yP8GS5dC3J5IjluY0eYPED+0hXxFU/KCHvRui6+z+UjXempmYaKmP8G2W QJ6ZdvRv9uFZ7xI9cCesAkPx8QWL25WvFVmYkggDlN875ox5hZOehAtXE8NxXaT5pPcl lltQ== 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=cGHxAvdWQJ8iHaW/TqFyPk+7TWZvjjIkZkcVb/F1XvBga9CxEjOimBiiIpUqG4tKzb YLrg67pjTDtUeo4dW2FMKHsvcsnC3RGQ7hlT918beCKFwMMkL/uOAW44CQqaV/4248Dk t8O604oYEBHbA/TeSIda1YtbtYqHOCc1JFJS00LcEiB81gNrOmdamI80l/DKSKK/m+Uf T9kuud+fNKdlBeDvvd1KFHwdrBcVY6DaQLhy2H4sdlH6ebPnz5HD6C1Ui9ifTclHDk4g atP/sKigCovdBKohZ8LyrtV2gg9eI56Js037p2bTFRCmyCtx3ZkzLtoEX4MUn4Z4k3uC 0SEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SeC0Mk7H; 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 m1-20020a1709061ec100b006e48a4b0accsi10082747ejj.1003.2022.04.12.16.47.57; Tue, 12 Apr 2022 16:48:22 -0700 (PDT) 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=SeC0Mk7H; 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 S229872AbiDLX3l (ORCPT + 99 others); Tue, 12 Apr 2022 19:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbiDLX2G (ORCPT ); Tue, 12 Apr 2022 19:28:06 -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 A9AF619C27 for ; Tue, 12 Apr 2022 15:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649802855; 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=SeC0Mk7HbI8AUy0rgdAO4pUfy759ub4kmNn8RfMv4zk2dtjON/fgv7jmh3DGkewVjh5VUc 0PLJjPyyydwrKb+PrSzBV3KsxSS8uTjDgKKsD9CsOZdKJ3xQUpWuurtnJE2y5X6AwHBi4b 2C6XMa2237kRq3jVuuEMoUO502AZ5Ck= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-413-jV2QJMBaNQm-JZsySZMRTA-1; Tue, 12 Apr 2022 16:14:14 -0400 X-MC-Unique: jV2QJMBaNQm-JZsySZMRTA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6C51D85A5BE; Tue, 12 Apr 2022 20:14:13 +0000 (UTC) Received: from cmirabil.remote.csb (unknown [10.22.32.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA279416363; Tue, 12 Apr 2022 20:14:12 +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 , Krzysztof Kozlowski , Dmitry Torokhov , Lee Jones , devicetree@vger.kernel.org, linux-input@vger.kernel.org, Mwesigwa Guma , Joel Savitz Subject: [PATCH v8 4/6] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Date: Tue, 12 Apr 2022 16:13:41 -0400 Message-Id: <20220412201343.8074-5-cmirabil@redhat.com> In-Reply-To: <20220412201343.8074-1-cmirabil@redhat.com> References: <20220412201343.8074-1-cmirabil@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-2.8 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=unavailable 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