Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7583592rwn; Wed, 14 Sep 2022 00:40:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mnaGSPZnKvVX0ykTRgSvEabD6VBNEwvd9N2pW9Zj+1Jl07/7tgNPDwKzHy68OY5x2za8u X-Received: by 2002:a05:6402:e96:b0:443:a086:e3e8 with SMTP id h22-20020a0564020e9600b00443a086e3e8mr30708923eda.330.1663141232701; Wed, 14 Sep 2022 00:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663141232; cv=none; d=google.com; s=arc-20160816; b=0mU1jyliivsC2YT4l+oyGGVIHwLPpNhUqaeVVC0mYToSs9d2+kkMkt2o4wWj6mWZDs ZsQW622J/GdYJnSWG3AORA7Cjwg49NDI69WgmI9Tsxw32CTPY4VOB4cxdHpMi1N3s3Cl EnjONyBxcWBf7uHTgTprxzzXvR0TjZQK0FyFVduvPQPozcYYKpr7THjsBeb45LthUZSG Ye2oIArbNFVg3CORY+Bev2i94ZIdnzwGzoN9WV1JtLP0ahoCWKsYoDMsrm0h4YO39ZUm Kr0KchXi8b3b/HGrrBOFhsNvjt86wmRk96zxAFXsdpqUw2Oof25TG1A5nPb5CuuQjF0o 2lYQ== 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; bh=rXVTsU3kYzlhrVMTVuGGPgLiqdlRxIvEGGt7a5ZRvWk=; b=eyJH9hCvmIH3uUBcVaB2RFecb+KM9+I8MWNUA0sUAdsELZcV8e/WaSZ/Zifbi/tsgT RwQ4zHz5Xtnm+LvY7KW6r15BtRZnROYAZy9/wtO5jve1rCFNBllTP0L/tQ0Qd9xgcNiR E9hW+zOVnVGmO7KUzslu+vPq9Y5JrfQQMzn3PH0usRAODcCuIyVLpC0rRaylVcrUwKhl VadtTkK2ILOJTDIpy4dMBbP/o0PSC4kDzQXI0Y1fP05P7/z9c38sUeDTOGEKOYf/4lXR LWHwtkwCtC01JLN0AWTJMP0KPlJs6JYwRNwLvy5ha0Ao8J2Q8vp3/ir6ek4jwL30rBnQ ivFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv10-20020a170907080a00b0077f1f37d754si6390084ejb.245.2022.09.14.00.40.01; Wed, 14 Sep 2022 00:40:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbiINHN2 (ORCPT + 99 others); Wed, 14 Sep 2022 03:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbiINHNX (ORCPT ); Wed, 14 Sep 2022 03:13:23 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB7466110 for ; Wed, 14 Sep 2022 00:13:21 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYMa4-00055g-Tg; Wed, 14 Sep 2022 09:13:08 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oYMa5-000eMw-Jh; Wed, 14 Sep 2022 09:13:08 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oYMa3-00Duib-5f; Wed, 14 Sep 2022 09:13:07 +0200 From: Sascha Hauer To: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , kernel@pengutronix.de, Sascha Hauer Subject: [PATCH v3 2/2] dt-bindings: gpio: Add gpio-latch binding document Date: Wed, 14 Sep 2022 09:13:06 +0200 Message-Id: <20220914071306.3254881-3-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220914071306.3254881-1-s.hauer@pengutronix.de> References: <20220914071306.3254881-1-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 adds a binding for a GPIO multiplexer driver based on latches connected to other GPIOs. Signed-off-by: Sascha Hauer --- Notes: Changes since v1: - Add license to binding file .../devicetree/bindings/gpio/gpio-latch.yaml | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-latch.yaml diff --git a/Documentation/devicetree/bindings/gpio/gpio-latch.yaml b/Documentation/devicetree/bindings/gpio/gpio-latch.yaml new file mode 100644 index 0000000000000..856a9e1e43b45 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-latch.yaml @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GPIO latch controller + +maintainers: + - Sascha Hauer + +description: | + This binding describes a GPIO multiplexer based on latches connected to + other GPIOs, like this: + + CLK0 ----------------------. ,--------. + CLK1 -------------------. `--------|> #0 | + | | | + OUT0 ----------------+--|-----------|D0 Q0|-----|< + OUT1 --------------+-|--|-----------|D1 Q1|-----|< + OUT2 ------------+-|-|--|-----------|D2 Q2|-----|< + OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|< + OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|< + OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|< + OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|< + OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|< + | | | | | | | | | `--------' + | | | | | | | | | + | | | | | | | | | ,--------. + | | | | | | | | `-----------|> #1 | + | | | | | | | | | | + | | | | | | | `--------------|D0 Q0|-----|< + | | | | | | `----------------|D1 Q1|-----|< + | | | | | `------------------|D2 Q2|-----|< + | | | | `--------------------|D3 Q3|-----|< + | | | `----------------------|D4 Q4|-----|< + | | `------------------------|D5 Q5|-----|< + | `--------------------------|D6 Q6|-----|< + `----------------------------|D7 Q7|-----|< + `--------' + + The number of clk-gpios and latched-gpios is not fixed. The actual number + of number of latches and the number of inputs per latch is derived from + the number of GPIOs given in the corresponding device tree properties. + +properties: + compatible: + const: gpio-latch + "#gpio-cells": + const: 2 + + clk-gpios: + description: Array of GPIOs to be used to clock a latch + + latched-gpios: + description: Array of GPIOs to be used as inputs per latch + + gpio-controller: true + + gpio-line-names: true + +required: + - compatible + - "#gpio-cells" + - gpio-controller + - clk-gpios + - latched-gpios + +additionalProperties: false + +examples: + - | + gpio-latch { + #gpio-cells = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_di_do_leds>; + compatible = "gpio-latch"; + gpio-controller; + + clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>; + latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>, + <&gpio3 23 0>, <&gpio3 24 0>, + <&gpio3 25 0>, <&gpio3 26 0>, + <&gpio3 27 0>, <&gpio3 28 0>; + }; -- 2.30.2