Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp436083rwe; Thu, 25 Aug 2022 03:12:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7KnF4ferrkffvgiPti1bGDN7meJ+BiYpkPvCoj31ei9bv30gqZv6mTELp6iw9bPDS1b8v/ X-Received: by 2002:a63:5007:0:b0:42a:29:2780 with SMTP id e7-20020a635007000000b0042a00292780mr2649985pgb.45.1661422346208; Thu, 25 Aug 2022 03:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661422346; cv=none; d=google.com; s=arc-20160816; b=MAYzJLVS3SOa2Qor07S7uo0F6Z7klbsYIpfwTvl8BRdiP/1t6NEMaFHWNqwkXiA9Dk 01JBR4iiffpTUaS1jPoA6y5mix0paj5HnCI7G0QWYsLoxFlU+R6P6gb45xyvdzAxFd4O AHQ4jHAWm27wYydBGPS9jhpD4io1AImtjTO2M/qAiMfEAcgYHQ3bHteBQ3wfKUbeW3sA zI4BAcQrrwrsIdwpPW0gFnos+cr5nE1o5a8wWkcF3pjW7ZfdR1VPCyMcn1rIqsqsglMV vpS3A6vSxu1RGwLbEbY9V9BQ8OQd10T4N7LEf13n9ZFAHtcysEidX9K8/dJqLVgkLFUs Sveg== 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=oMoyaNBNYSt/46Pb4pYavWyK3ghSvmD/XU+htNp1wco=; b=OEBligkT18br8CY7AtYzL+PeEm7CQmOnR0Sxj533oH2yKWzdMJoLT/zTaarSStK4tm 43B9Kz05CGJmyx77qekrvWYW6jXJeFUyykxU90jfSdNXm5N8ArMaQaZ9nSRaMmuqu6oj fW84IKOKnMELl9A9zdjsLtNaBbsHrpG4TPX9LVAcmf+K8H84sNmrhzUK+nYu/VIrxf5G dduDNV6XjnHbA+xr5+9lOhrwNgTaw44NGOqdAQnC1BTjjNeZLYiAHPY3E/KFHoUItXSV aEXFnF/w/h5ZGIsL6RvxOVTs+ZkuhVy95GQ6V+KmmGrj8Gwgd2gfQSpuwUPeKsdHaFyB iGeA== 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 q199-20020a632ad0000000b0041d0a3e7de3si22216211pgq.796.2022.08.25.03.12.15; Thu, 25 Aug 2022 03:12:26 -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 S240676AbiHYJlw (ORCPT + 99 others); Thu, 25 Aug 2022 05:41:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240652AbiHYJlt (ORCPT ); Thu, 25 Aug 2022 05:41:49 -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 6E2D6A8CE8 for ; Thu, 25 Aug 2022 02:41:45 -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 1oR9Ml-0006Vp-Mj; Thu, 25 Aug 2022 11:41:35 +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 1oR9Ml-001rxi-0O; Thu, 25 Aug 2022 11:41:35 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oR9Mj-006IWs-Re; Thu, 25 Aug 2022 11:41:33 +0200 From: Sascha Hauer To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , kernel@pengutronix.de, Sascha Hauer Subject: [PATCH 2/2] dt-bindings: gpio: Add gpio-latch binding document Date: Thu, 25 Aug 2022 11:41:32 +0200 Message-Id: <20220825094132.1268174-3-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220825094132.1268174-1-s.hauer@pengutronix.de> References: <20220825094132.1268174-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,URIBL_BLOCKED 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 --- .../devicetree/bindings/gpio/gpio-latch.yaml | 83 +++++++++++++++++++ 1 file changed, 83 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..0652c9d2130af --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-latch.yaml @@ -0,0 +1,83 @@ +%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 data-gpios is not fixed. The actual number of + GPIOs used for clk and data are taken from the corresponding array lengths. + +properties: + compatible: + const: gpio-latch + "#gpio-cells": + const: 2 + + clk-gpios: + description: Array of GPIOs to be used to clock a latch + + data-gpios: + description: Array of GPIOs to be used as data GPIOs + + gpio-controller: true + + gpio-line-names: true + +required: + - compatible + - "#gpio-cells" + - gpio-controller + - clk-gpios + - data-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>; + data-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