From patchwork Tue Aug 23 17:41:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Mirabile X-Patchwork-Id: 601357 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 C1BECC32772 for ; Tue, 23 Aug 2022 19:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231713AbiHWTHg (ORCPT ); Tue, 23 Aug 2022 15:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231782AbiHWTHT (ORCPT ); Tue, 23 Aug 2022 15:07:19 -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 ESMTPS id 4A93713389C for ; Tue, 23 Aug 2022 10:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661276576; 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=+fFhfrqCii4T/WFPMsHfn5web5vqcTYDBOszx5C8k0E=; b=Yr2yeL8ZzXObNcrRKgu6bewcgm5suIOYKMeo5c6AN/7MhhSYF/3oRZ5aK2OsbfZuhHTDkB l93XI3KfG//tUfAlMSagw6gzjKyl7f9Xx6nj6dH20mPULnXyYN9QmgrSMJmyRMJ/DtI0y4 7MMoSrpoDuzNkNQ8CWRHIAQs+pHhl1Y= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-628-TRnmRCyRObuiGSH8jXgB_A-1; Tue, 23 Aug 2022 13:42:53 -0400 X-MC-Unique: TRnmRCyRObuiGSH8jXgB_A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 74B1629DD9A2; Tue, 23 Aug 2022 17:42:52 +0000 (UTC) Received: from cmirabil.redhat.com (unknown [10.22.33.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id A406514152E0; Tue, 23 Aug 2022 17:42:51 +0000 (UTC) From: Charles Mirabile To: linux-kernel@vger.kernel.org Cc: Charles Mirabile , Peter Robinson , Serge Schneider , Stefan Wahren , Nicolas Saenz Julienne , Mattias Brugger , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, rh-kdlp@googlegroups.com, Miguel Ojeda , Rob Herring , Krzysztof Kozlowski , Florian Fainelli , Broadcom internal kernel review list , Dmitry Torokhov , Lee Jones , devicetree@vger.kernel.org, linux-input@vger.kernel.org, Joel Savitz , Krzysztof Kozlowski Subject: [PATCH 3/5] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Date: Tue, 23 Aug 2022 13:41:56 -0400 Message-Id: <20220823174158.45579-4-cmirabil@redhat.com> In-Reply-To: <20220823174158.45579-1-cmirabil@redhat.com> References: <20220823174158.45579-1-cmirabil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: linux-input@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: Joel Savitz Signed-off-by: Joel Savitz Signed-off-by: Charles Mirabile Reviewed-by: Krzysztof Kozlowski --- .../raspberrypi,sensehat-display.yaml | 26 +++++++++ .../input/raspberrypi,sensehat-joystick.yaml | 31 ++++++++++ .../bindings/mfd/raspberrypi,sensehat.yaml | 57 +++++++++++++++++++ 3 files changed, 114 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..0cf59b0a519c --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml @@ -0,0 +1,26 @@ +# 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 + - 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..98b03878a570 --- /dev/null +++ b/Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml @@ -0,0 +1,31 @@ +# 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 + - 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: + maxItems: 1 + +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..bc53834fbaa7 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml @@ -0,0 +1,57 @@ +# 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 + - 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: + maxItems: 1 + + joystick: + $ref: /schemas/input/raspberrypi,sensehat-joystick.yaml# + + display: + $ref: /schemas/auxdisplay/raspberrypi,sensehat-display.yaml# + +required: + - compatible + - reg + - joystick + - display + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + hat@46 { + compatible = "raspberrypi,sensehat"; + reg = <0x46>; + display { + compatible = "raspberrypi,sensehat-display"; + }; + joystick { + compatible = "raspberrypi,sensehat-joystick"; + interrupts = <23 IRQ_TYPE_EDGE_RISING>; + }; + }; + };