Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1772964pxa; Sat, 29 Aug 2020 02:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJH9LatWtgZ/dCOcRe7ZjX7Q6k5yi41pemG9LSrC0PzMX+sEsbPHvv5l0m9s/XVoGnfijL X-Received: by 2002:a05:6402:36f:: with SMTP id s15mr2770424edw.325.1598694312322; Sat, 29 Aug 2020 02:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598694312; cv=none; d=google.com; s=arc-20160816; b=Q2wmiu/h/8x0L41zYjFrWEg7yVpptuBCCnxUM2LK/E4DF1nP/EgAFo20dkKJay4pQf F0+eUDxoy4ax8QwJ3eGp7VQJ6uti//AHGuhStS8Kh7MGl0uhSdx/0Nj/IXQD69QIKRDu bTm7Ucxu+k1EKOQ4zcEvcfZPCpxpMPlGQ4Paex1bZAwW96NFTbfSsIDSLi/kRyNL3fPg tbDhI2yXSvMn0FR5+8Zv533fv6+qv5aPb1jwCUBsney1PYHUJRz0TYR1Zfwf0cWI2Bb6 IoTb4Oo3EqiOEC4B+JIO1eYpTlfxB1Le3F7Tm6LCNiF+En5Y44xo9uxmpal6gu+4viGE HYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=lIFYVDLeKFHjlb+RvHn2qDsaXBu9dvVBQXe5e80xPMo=; b=R6GTcEzN2JmcD1Y1ECyrRIu32QEh86+SnJAr7xnK9lxX7bPVnDHVV7ZjkEJXpQp43y wCfN32W/3CguhL4qQ8DjJa/ZtVUJD+PfZnwq8GduL0olshcfcZLx8sUtnXWUOwpDlu9C BAPd8JTW9ycaeLXeJel7eZRAw/xUhuF224Hw2XJ3+bQmeynniJcgAWN3VmzjmyZF+LFK gn6fpynq+aeld4WdUFy/1Q12225fSHncrGu2th4vS7J4RUExIS609i/2lZroPNS76Tkb eBh+UqrzQv+Xvfd8VPWzdVZye6ytEc7VTQmnSo9xaroAXi7NXkfjzenP7VM2RC1sjfOK vFug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CvFRKLdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn24si1242649edb.307.2020.08.29.02.44.49; Sat, 29 Aug 2020 02:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CvFRKLdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727872AbgH2Jkq (ORCPT + 99 others); Sat, 29 Aug 2020 05:40:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbgH2Jkm (ORCPT ); Sat, 29 Aug 2020 05:40:42 -0400 Received: from localhost.localdomain (unknown [194.230.155.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0FDE520E65; Sat, 29 Aug 2020 09:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598694041; bh=YkJWndd3eYDCkLFjOutEpPbilWAVMZ5PvWnnfsLUDBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CvFRKLdOf+CQCBYPTfzDQXMjTgCrqLI5nC9t1XhH9w61gTvhzxqDbU9InJ7qp2o2W EiAvwDxEQIanxP5LbeLtM/RklYvP522TENJpNRaPLRt6zS8Kw9fQ8OdmW2QIFWtmTH UEF7MDJwUMvJwGgG25ErNtWsdMWW5+otkr7J/i6g= From: Krzysztof Kozlowski To: Linus Walleij , Bartosz Golaszewski , Rob Herring , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Joel Stanley , Andrew Jeffery , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Stefan Agner , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/6] dt-bindings: gpio: Convert bindings for Maxim MAX732x family to dtschema Date: Sat, 29 Aug 2020 11:40:20 +0200 Message-Id: <20200829094024.31842-2-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829094024.31842-1-krzk@kernel.org> References: <20200829094024.31842-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the Maxim MAX732x family of GPIO expanders bindings to device tree schema by merging it with existing PCA95xx schema. These are quite similar so merging reduces duplication. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/gpio/gpio-max732x.txt | 58 --------------- .../bindings/gpio/gpio-pca95xx.yaml | 72 ++++++++++++++++++- 2 files changed, 70 insertions(+), 60 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-max732x.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-max732x.txt b/Documentation/devicetree/bindings/gpio/gpio-max732x.txt deleted file mode 100644 index b3a9c0c32823..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-max732x.txt +++ /dev/null @@ -1,58 +0,0 @@ -* MAX732x-compatible I/O expanders - -Required properties: - - compatible: Should be one of the following: - - "maxim,max7319": For the Maxim MAX7319 - - "maxim,max7320": For the Maxim MAX7320 - - "maxim,max7321": For the Maxim MAX7321 - - "maxim,max7322": For the Maxim MAX7322 - - "maxim,max7323": For the Maxim MAX7323 - - "maxim,max7324": For the Maxim MAX7324 - - "maxim,max7325": For the Maxim MAX7325 - - "maxim,max7326": For the Maxim MAX7326 - - "maxim,max7327": For the Maxim MAX7327 - - reg: I2C slave address for this device. - - gpio-controller: Marks the device node as a GPIO controller. - - #gpio-cells: Should be 2. - - first cell is the GPIO number - - second cell specifies GPIO flags, as defined in . - Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. - -Optional properties: - - The I/O expander can detect input state changes, and thus optionally act as - an interrupt controller. When the expander interrupt line is connected all the - following properties must be set. For more information please see the - interrupt controller device tree bindings documentation available at - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. - - - interrupt-controller: Identifies the node as an interrupt controller. - - #interrupt-cells: Number of cells to encode an interrupt source, shall be 2. - - first cell is the pin number - - second cell is used to specify flags - - interrupts: Interrupt specifier for the controllers interrupt. - -Please refer to gpio.txt in this directory for details of the common GPIO -bindings used by client devices. - -Example 1. MAX7325 with interrupt support enabled (CONFIG_GPIO_MAX732X_IRQ=y): - - expander: max7325@6d { - compatible = "maxim,max7325"; - reg = <0x6d>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - interrupt-parent = <&gpio4>; - interrupts = <29 IRQ_TYPE_EDGE_FALLING>; - }; - -Example 2. MAX7325 with interrupt support disabled (CONFIG_GPIO_MAX732X_IRQ=n): - - expander: max7325@6d { - compatible = "maxim,max7325"; - reg = <0x6d>; - gpio-controller; - #gpio-cells = <2>; - }; diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml index c5bb24b3b7b5..e90433b7d52b 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml @@ -9,6 +9,10 @@ title: NXP PCA95xx I2C GPIO multiplexer maintainers: - Krzysztof Kozlowski +description: |+ + Bindings for the family of I2C GPIO multiplexers/expanders: NXP PCA95xx, + Maxim MAX73xx + properties: compatible: enum: @@ -17,6 +21,15 @@ properties: - maxim,max7312 - maxim,max7313 - maxim,max7315 + - maxim,max7319 + - maxim,max7320 + - maxim,max7321 + - maxim,max7322 + - maxim,max7323 + - maxim,max7324 + - maxim,max7325 + - maxim,max7326 + - maxim,max7327 - nxp,pca6416 - nxp,pca9505 - nxp,pca9534 @@ -69,11 +82,11 @@ properties: reset-gpios: description: GPIO specification for the RESET input. This is an active low signal to - the PCA953x. + the PCA953x. Not valid for Maxim MAX732x devices. vcc-supply: description: - Optional power supply + Optional power supply. Not valid for Maxim MAX732x devices. required: - compatible @@ -83,6 +96,27 @@ required: unevaluatedProperties: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - maxim,max7320 + - maxim,max7321 + - maxim,max7322 + - maxim,max7323 + - maxim,max7324 + - maxim,max7325 + - maxim,max7326 + - maxim,max7327 + then: + properties: + reset-gpios: + maxItems: 0 + vcc-supply: + maxItems: 0 + examples: - | #include @@ -136,3 +170,37 @@ examples: ti,micbias = <0>; /* 2.1V */ }; }; + + - | + #include + + i2c2 { + #address-cells = <1>; + #size-cells = <0>; + + // MAX7325 with interrupt support enabled + gpio@6d { + compatible = "maxim,max7325"; + reg = <0x6d>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio4>; + interrupts = <29 IRQ_TYPE_EDGE_FALLING>; + }; + }; + + - | + i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + // MAX7325 with interrupt support disabled + gpio@6e { + compatible = "maxim,max7325"; + reg = <0x6e>; + gpio-controller; + #gpio-cells = <2>; + }; + }; -- 2.17.1