Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2568728pxb; Thu, 3 Feb 2022 09:15:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVgFW1zrfKUp0YeknBKGbj1fhLx35z/FJY6ed8kj+gyYfid2Jk/tzoGJ23qe0HhiO4nWKr X-Received: by 2002:a05:6a00:134b:: with SMTP id k11mr33234216pfu.33.1643908518335; Thu, 03 Feb 2022 09:15:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643908518; cv=none; d=google.com; s=arc-20160816; b=QgCzZCDItAkj8b3QbmpZFf+wczTaF8o9UVuQc7tYfkpvNSuKf6aQbakrpazT6wa2Q8 mushj+atXvSBI2zrh5x6abhlRLEsLxXGQlZYrho7YP2RIILzTKyQAerJHcm3/khFBIaQ UkXBVtXblpaRV9V5KCeINLM/XZUW4Z9JRzoI1gQTuZ1Lbv+Paw50vqSXlce5Mnueplyr TBOdfbHQfjAVo0G41YZt96Z14zT1tJzFcxb4HI+XLT1edL28ADD2vet3BvhxyO8X4w4K iIEifWxsA1qzRvVyintFHOULo7Ea9tllUH8dTJqyGexz6prljaQBq5ZzZ8iF+kLP9cl7 TwAA== 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=hUs9xNWmt9WhjQnC9DXbjWYNlVBZzZ3mJ6n8NPsFFAE=; b=glwvJp1wWsQCm/CHW2Bx0CzSSXvBzbGkO60m/WSmnP9v3KZyCvHX4doaJB0+v6FLZF ThFTUh18TFOrM0l1AfP1mHUN4ZFySmal97wHuwfRVVjW33j0fL8fpAmNyonVn2vcuf1A 4l6t8AgmyFQhyFDTwIwBbC1hS3R7e15QCqoqFkGdVTxB4Au9kEWfNVbAg124ANf+zkvb gu+hwxYEgicROPeHgpusS784bI2TWWAco/wrn8jDHrpLkpuMPxlZ4Pd1GRwMtYnp4Ld0 +gZxExxvY2vYCOP1Cs6w3vvA0iBpPDRpieWgzU7ew3BSksHq+yI6hn8489yXqe4pp3Fm 2yUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VPrxXGzb; 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 o2si2715593pll.125.2022.02.03.09.15.06; Thu, 03 Feb 2022 09:15:18 -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=VPrxXGzb; 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 S1348560AbiBCA0L (ORCPT + 99 others); Wed, 2 Feb 2022 19:26:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59797 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348564AbiBCA0H (ORCPT ); Wed, 2 Feb 2022 19:26:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643847967; 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=hUs9xNWmt9WhjQnC9DXbjWYNlVBZzZ3mJ6n8NPsFFAE=; b=VPrxXGzbwu9Zi4gBPj5RbWBw+obNRn5hBg37h+LZjwIEih1LmBjd577dSjTRM7oT2zIeNN CVuzCMAfqrjZVlBPwG0Lj4FYD3cG+3zT7at0/NGCw6U4HcJbkrQRElhQDYBvDxjiN8xupB yCq1k4XORtZW9MIUPq2ZcWX1nS1Bfww= 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-62-YZkSLdrTM-KtHOl4B05_Bw-1; Wed, 02 Feb 2022 19:26:03 -0500 X-MC-Unique: YZkSLdrTM-KtHOl4B05_Bw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB674814246; Thu, 3 Feb 2022 00:26:01 +0000 (UTC) Received: from cmirabil.remote.csb (unknown [10.22.8.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1233856A81; Thu, 3 Feb 2022 00:25:59 +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, Mwesigwa Guma , Joel Savitz Subject: [PATCH 4/6] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Date: Wed, 2 Feb 2022 19:25:19 -0500 Message-Id: <20220203002521.162878-5-cmirabil@redhat.com> In-Reply-To: <20220203002521.162878-1-cmirabil@redhat.com> References: <20220203002521.162878-1-cmirabil@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 | 32 +++++++++ .../input/raspberrypi,sensehat-joystick.yaml | 37 ++++++++++ .../bindings/mfd/raspberrypi,sensehat.yaml | 68 +++++++++++++++++++ 3 files changed, 137 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..8937adba1c4b --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +$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 + + reg: + items: + - description: | + smb register number for the first component of the fist + pixel in the range. + +required: + - compatible + - reg + +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..a6d95c903b04 --- /dev/null +++ b/Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +$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 + + reg: + items: + - description: | + smb register number for accessing the state of the buttons + + interrupts: + items: + - description: pin number for joystick interrupt + +required: + - compatible + - reg + - 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..89037be87c10 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +$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 + +patternProperties: + "^joystick(@[0-9a-f]+)?$": + $ref: ../input/raspberrypi,sensehat-joystick.yaml + + "^display(@[0-9a-f]+)?$": + $ref: ../auxdisplay/raspberrypi,sensehat-display.yaml + +required: + - "#address-cells" + - "#size-cells" + - compatible + - reg + +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@0 { + compatible = "raspberrypi,sensehat-display"; + reg = <0x0>; + }; + joystick@f2 { + compatible = "raspberrypi,sensehat-joystick"; + reg = <0x0>; + interrupts = <23 GPIO_ACTIVE_HIGH>; + }; + }; + }; -- 2.31.1