From patchwork Wed May 26 18:48:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 448222 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp5489990jac; Wed, 26 May 2021 11:48:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnBsC6nkZOhwGMqa6phZ9CvprIbIEyahS6k0vDzfIzmZayHGue0FgithtmU0Yqezf0VmSi X-Received: by 2002:a05:6e02:eac:: with SMTP id u12mr27984716ilj.177.1622054928975; Wed, 26 May 2021 11:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622054928; cv=none; d=google.com; s=arc-20160816; b=KQOW0Dvpkoc53BiCSu1LXludNxAtjdKE57FCr7Tsk7qOCeBXixrPC9LhHBNYiKTp0K NGsI/rsKgAH8MPLPzhpfPidzdnYkMPK3dqm/Wl0l3XHnHq2n3FXzWHbIeLRTkHMF/hZk iGroMqOdNNpPi1zYpEzbWKVCjUw9Wh9Tzhjv2TFGbPUpa75hV6CX2ToVib3lAZehxOMz k9MFR16doqUAekgIXgAHopDsJHC2OWnIS2Pvi6cEuK4/58BZMvambxD+idkSwU9ZiqKZ OtNSnPlS2fEuhTZMedHU5tgNpnxX/SegzPxrb3O6OeVMRSBECXh00Q3P6w1aNQjhqfJ1 jB3A== 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=qi0dKOR1s2HsAPh6SB1Duf62T3ayP3+tZRUL8AcRwnM=; b=g7rA982M7QNLsU72Eb09RLYtKzXn9tIq8lKfYvnYXPk0dtmsDeh9zuOE2qmt+0WR5H yv3PrfTUfQfrBvbsc7TbacSN05Cm5z6HM8Mzhl4nE4TC8VJ9tEIUiGPEBxB2iy7VRWHO C7UA3UR9bItShMyPifL7ZzHwgxFiJ9d9407CN1Bh55rHQLjsEZmHqjeFnPM7KDmRC70Z UX9YCGjlxxPB4bGAbIKF7deim+r8Fvu4vazvZTGeDGnvUP4sKIwgWYaXTqaCq8UV8dpQ 9VBMdMrDYmGuOEFOgwlFet4jQJ6LHHoCbwZblVyjttmtRPpq4VYRC2QDbGCEf0TGNvSy ahSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-i2c-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 k7si105157iok.65.2021.05.26.11.48.48; Wed, 26 May 2021 11:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-i2c-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 S235596AbhEZSuT (ORCPT + 2 others); Wed, 26 May 2021 14:50:19 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:35418 "EHLO mail-oi1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232716AbhEZSuT (ORCPT ); Wed, 26 May 2021 14:50:19 -0400 Received: by mail-oi1-f171.google.com with SMTP id v22so2520062oic.2; Wed, 26 May 2021 11:48:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qi0dKOR1s2HsAPh6SB1Duf62T3ayP3+tZRUL8AcRwnM=; b=P08K41n6/3TKE84O7wv0RPDclHK38YfG/3ji8l1l/1Xs/XA4osPVLunt5G4BVhAUF0 J7KcbJAh3NAd9goUWIBTmoSqsJibPlKnnlBLNKazWVgLW2v2H06PyWnxkoOzIbrfssG1 Po6ton9/DEm3SfDg+gIkJIQJ59b8kIueWAqbYJ4jWTgM2LEX6Qwf73yc+X50Q+bz+705 s87b9EggwQ1e0BOqUTwjaMzEihMyedNrfQHf4UbwE3TT6YcWhph+EkTwyCrKT9rSvwM2 F/fQLYNg9e5dGL/Xxd7Mc0fAEjapRE+IYHcd5EikMvFhnFtJzbjZdPEabvSH923aA1Fs pYXw== X-Gm-Message-State: AOAM530im0I6NzyZvT45ZimN2H7r/ZWUcuPmByl0KMaUi2jdBZNx0YT/ TyhefMSpg9DF30k1tzcXzj1TyiXilA== X-Received: by 2002:aca:c488:: with SMTP id u130mr2937061oif.0.1622054927076; Wed, 26 May 2021 11:48:47 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x65sm7224otb.59.2021.05.26.11.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 11:48:44 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Peter Rosin , Wolfram Sang Cc: linux-kernel@vger.kernel.org, Alexandre Belloni , Jacopo Mondi , Kieran Bingham , Kishon Vijay Abraham I , Lee Jones , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Jonathan Cameron , Laurent Pinchart , linux-i2c@vger.kernel.org Subject: [PATCH v2 2/6] dt-bindings: rtc: nxp,pcf8563: Convert to DT schema Date: Wed, 26 May 2021 13:48:35 -0500 Message-Id: <20210526184839.2937899-3-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210526184839.2937899-1-robh@kernel.org> References: <20210526184839.2937899-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Convert the Philips PCF8563/Epson RTC8564 binding to DT schema format. Add 'interrupts' and 'wakeup-source' as this device has an interrupt which was not documented, but in use. Add 'start-year' as well. Cc: Alexandre Belloni Reviewed-by: Laurent Pinchart Signed-off-by: Rob Herring --- v2: - Add reference to rtc.yaml and wakeup-source and start-year properties --- .../devicetree/bindings/rtc/nxp,pcf8563.yaml | 56 +++++++++++++++++++ .../devicetree/bindings/rtc/pcf8563.txt | 29 ---------- 2 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml delete mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt -- 2.27.0 Acked-by: Alexandre Belloni diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml new file mode 100644 index 000000000000..a542b6c7ff44 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Philips PCF8563/Epson RTC8564 Real Time Clock + +maintainers: + - Alexandre Belloni + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + enum: + - epson,rtc8564 + - microcrystal,rv8564 + - nxp,pcf8563 + - nxp,pca8565 + + reg: + maxItems: 1 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + interrupts: + maxItems: 1 + + start-year: true + wakeup-source: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt deleted file mode 100644 index 0a900f7c8977..000000000000 --- a/Documentation/devicetree/bindings/rtc/pcf8563.txt +++ /dev/null @@ -1,29 +0,0 @@ -* Philips PCF8563/Epson RTC8564 Real Time Clock - -Philips PCF8563/Epson RTC8564 Real Time Clock - -Required properties: -- compatible: Should contain "nxp,pcf8563", - "epson,rtc8564" or - "microcrystal,rv8564" or - "nxp,pca8565" -- reg: I2C address for chip. - -Optional property: -- #clock-cells: Should be 0. -- clock-output-names: - overwrite the default clock name "pcf8563-clkout" - -Example: - -pcf8563: pcf8563@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - #clock-cells = <0>; -}; - -device { -... - clocks = <&pcf8563>; -... -}; From patchwork Wed May 26 18:48:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 448487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CADDEC47089 for ; Wed, 26 May 2021 18:48:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0ED2613D4 for ; Wed, 26 May 2021 18:48:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235665AbhEZSu0 (ORCPT ); Wed, 26 May 2021 14:50:26 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:45998 "EHLO mail-oi1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235774AbhEZSuZ (ORCPT ); Wed, 26 May 2021 14:50:25 -0400 Received: by mail-oi1-f170.google.com with SMTP id w127so2490875oig.12; Wed, 26 May 2021 11:48:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tIs3Bl4p7nCUo6QIJ/gkAi6qKC+97acIjJgKNO5hs7I=; b=dICR8It+BdytaFX2RMcOMenuWByRCE4DtoJ6lViavJyIiziGZAOsdz6+QOgKFQH+LC LRcwwOvqx+itfZR+S5OYClwQsqBa+Mw8dvptFeTvSihm5WUXV//h+FCpb/uFGJFlfcKq yq+KZjm2Zltrc9MYV6PPoHYiwkygWlhZ9uO5i2Id8Qi4bRZtL8hmFYsVa88r83CdheK4 e4sIb11awojUKxfjkYffpgD9ErmdDHV+9Bgwk3qR3FYK1QpDr/34A33DG5h1JOWVHwUd 7gu/JkhFZYGHo5hP+mHdCk/ygeEtC7qFtT/ljxE9Kt0ryB9gsYtyg1q8/6QeF0ay8vli DkNQ== X-Gm-Message-State: AOAM530DXCD50KJB5/hjTrnonC/gCM/AotbbCvEJxGJt6UTzK6jsR9DV +Gonzin4LZS3enE+mL4mSRz+LwUn2Q== X-Google-Smtp-Source: ABdhPJwvXH/XZyMoKx91x4niYEksJemq+xHyj+Zth3Kkkza0J0Ov9KXLYKm+HsiNUOj2kJZB/jWQCw== X-Received: by 2002:a05:6808:1402:: with SMTP id w2mr2916827oiv.72.1622054931278; Wed, 26 May 2021 11:48:51 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x65sm7224otb.59.2021.05.26.11.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 11:48:50 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Peter Rosin , Wolfram Sang Cc: linux-kernel@vger.kernel.org, Alexandre Belloni , Jacopo Mondi , Kieran Bingham , Kishon Vijay Abraham I , Lee Jones , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Jonathan Cameron , Laurent Pinchart , linux-i2c@vger.kernel.org Subject: [PATCH v2 4/6] dt-bindings: i2c: Convert i2c-mux bindings to DT schema Date: Wed, 26 May 2021 13:48:37 -0500 Message-Id: <20210526184839.2937899-5-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210526184839.2937899-1-robh@kernel.org> References: <20210526184839.2937899-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org As some of the example I2C devices don't have schemas yet, change them to ones that do. Cc: Peter Rosin Signed-off-by: Rob Herring --- v2: - Comment and bullet list cleanups --- .../bindings/i2c/i2c-demux-pinctrl.txt | 2 +- .../devicetree/bindings/i2c/i2c-mux-gpio.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 -------------- .../bindings/i2c/i2c-mux-gpmux.yaml | 124 ++++++++++++++++++ .../bindings/i2c/i2c-mux-ltc4306.txt | 4 +- .../bindings/i2c/i2c-mux-pinctrl.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux-reg.txt | 4 +- .../devicetree/bindings/i2c/i2c-mux.txt | 73 ----------- .../devicetree/bindings/i2c/i2c-mux.yaml | 87 ++++++++++++ 9 files changed, 220 insertions(+), 181 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt b/Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt index 81b5d55086fa..86b2e433a969 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt @@ -27,7 +27,7 @@ Required properties: - i2c-bus-name: The name of this bus. Also needed as pinctrl-name for the I2C parents. -Furthermore, I2C mux properties and child nodes. See i2c-mux.txt in this +Furthermore, I2C mux properties and child nodes. See i2c-mux.yaml in this directory. Example: diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt index 21da3ecbb370..e00d2b9e957a 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt @@ -22,8 +22,8 @@ Required properties: - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side port is connected to. - mux-gpios: list of gpios used to control the muxer -* Standard I2C mux properties. See i2c-mux.txt in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. Optional properties: - idle-state: value to set the muxer to when idle. When no value is diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt deleted file mode 100644 index 057083a8ba17..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.txt +++ /dev/null @@ -1,99 +0,0 @@ -General Purpose I2C Bus Mux - -This binding describes an I2C bus multiplexer that uses a mux controller -from the mux subsystem to route the I2C signals. - - .-----. .-----. - | dev | | dev | - .------------. '-----' '-----' - | SoC | | | - | | .--------+--------' - | .------. | .------+ child bus A, on MUX value set to 0 - | | I2C |-|--| Mux | - | '------' | '--+---+ child bus B, on MUX value set to 1 - | .------. | | '----------+--------+--------. - | | MUX- | | | | | | - | | Ctrl |-|-----+ .-----. .-----. .-----. - | '------' | | dev | | dev | | dev | - '------------' '-----' '-----' '-----' - -Required properties: -- compatible: i2c-mux -- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side - port is connected to. -- mux-controls: The phandle of the mux controller to use for operating the - mux. -* Standard I2C mux properties. See i2c-mux.txt in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. The sub-bus number - is also the mux-controller state described in ../mux/mux-controller.yaml - -Optional properties: -- mux-locked: If present, explicitly allow unrelated I2C transactions on the - parent I2C adapter at these times: - + during setup of the multiplexer - + between setup of the multiplexer and the child bus I2C transaction - + between the child bus I2C transaction and releasing of the multiplexer - + during releasing of the multiplexer - However, I2C transactions to devices behind all I2C multiplexers connected - to the same parent adapter that this multiplexer is connected to are blocked - for the full duration of the complete multiplexed I2C transaction (i.e. - including the times covered by the above list). - If mux-locked is not present, the multiplexer is assumed to be parent-locked. - This means that no unrelated I2C transactions are allowed on the parent I2C - adapter for the complete multiplexed I2C transaction. - The properties of mux-locked and parent-locked multiplexers are discussed - in more detail in Documentation/i2c/i2c-topology.rst. - -For each i2c child node, an I2C child bus will be created. They will -be numbered based on their order in the device tree. - -Whenever an access is made to a device on a child bus, the value set -in the relevant node's reg property will be set as the state in the -mux controller. - -Example: - mux: mux-controller { - compatible = "gpio-mux"; - #mux-control-cells = <0>; - - mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>, - <&pioA 1 GPIO_ACTIVE_HIGH>; - }; - - i2c-mux { - compatible = "i2c-mux"; - mux-locked; - i2c-parent = <&i2c1>; - - mux-controls = <&mux>; - - #address-cells = <1>; - #size-cells = <0>; - - i2c@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - ssd1307: oled@3c { - compatible = "solomon,ssd1307fb-i2c"; - reg = <0x3c>; - pwms = <&pwm 4 3000>; - reset-gpios = <&gpio2 7 1>; - reset-active-low; - }; - }; - - i2c@3 { - reg = <3>; - #address-cells = <1>; - #size-cells = <0>; - - pca9555: pca9555@20 { - compatible = "nxp,pca9555"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x20>; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml new file mode 100644 index 000000000000..9b0603a72f40 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml @@ -0,0 +1,124 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-mux-gpmux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: General Purpose I2C Bus Mux + +maintainers: + - Peter Rosin + +description: |+ + This binding describes an I2C bus multiplexer that uses a mux controller + from the mux subsystem to route the I2C signals. + + .-----. .-----. + | dev | | dev | + .------------. '-----' '-----' + | SoC | | | + | | .--------+--------' + | .------. | .------+ child bus A, on MUX value set to 0 + | | I2C |-|--| Mux | + | '------' | '--+---+ child bus B, on MUX value set to 1 + | .------. | | '----------+--------+--------. + | | MUX- | | | | | | + | | Ctrl |-|-----+ .-----. .-----. .-----. + | '------' | | dev | | dev | | dev | + '------------' '-----' '-----' '-----' + + + +allOf: + - $ref: /schemas/i2c/i2c-mux.yaml# + +properties: + compatible: + const: i2c-mux + + i2c-parent: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the I2C bus that this multiplexer's master-side port is + connected to. + + mux-controls: + maxItems: 1 + description: + The mux-controller states are the I2C sub-bus numbers. + + mux-locked: + type: boolean + description: | + Explicitly allow unrelated I2C transactions on the parent I2C adapter at + these times: + - during setup of the multiplexer + - between setup of the multiplexer and the child bus I2C transaction + - between the child bus I2C transaction and releasing of the multiplexer + - during releasing of the multiplexer + + However, I2C transactions to devices behind all I2C multiplexers connected + to the same parent adapter that this multiplexer is connected to are blocked + for the full duration of the complete multiplexed I2C transaction (i.e. + including the times covered by the above list). + If mux-locked is not present, the multiplexer is assumed to be parent-locked. + This means that no unrelated I2C transactions are allowed on the parent I2C + adapter for the complete multiplexed I2C transaction. + The properties of mux-locked and parent-locked multiplexers are discussed + in more detail in Documentation/i2c/i2c-topology.rst. + +required: + - compatible + - i2c-parent + - mux-controls + +unevaluatedProperties: false + +examples: + - | + #include + mux: mux-controller { + compatible = "gpio-mux"; + #mux-control-cells = <0>; + + mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>, + <&pioA 1 GPIO_ACTIVE_HIGH>; + }; + + i2c-mux { + compatible = "i2c-mux"; + mux-locked; + i2c-parent = <&i2c1>; + + mux-controls = <&mux>; + + #address-cells = <1>; + #size-cells = <0>; + + i2c@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + gpio@20 { + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + }; + }; + + i2c@3 { + reg = <3>; + #address-cells = <1>; + #size-cells = <0>; + + gpio@20 { + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt index 8b1e49cdce3f..29c4550c9782 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt @@ -8,8 +8,8 @@ Required Properties: The following required properties are defined externally: - - Standard I2C mux properties. See i2c-mux.txt in this directory. - - I2C child bus nodes. See i2c-mux.txt in this directory. + - Standard I2C mux properties. See i2c-mux.yaml in this directory. + - I2C child bus nodes. See i2c-mux.yaml in this directory. Optional Properties: diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt index 33119a98e144..997a287ed3f6 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt @@ -28,9 +28,9 @@ Also required are: * Standard pinctrl properties that specify the pin mux state for each child bus. See ../pinctrl/pinctrl-bindings.txt. -* Standard I2C mux properties. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. For each named state defined in the pinctrl-names property, an I2C child bus will be created. I2C child bus numbers are assigned based on the index into diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt index de00d7fc450b..b9d9755e4172 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt @@ -7,8 +7,8 @@ Required properties: - compatible: i2c-mux-reg - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side port is connected to. -* Standard I2C mux properties. See i2c-mux.txt in this directory. -* I2C child bus nodes. See i2c-mux.txt in this directory. +* Standard I2C mux properties. See i2c-mux.yaml in this directory. +* I2C child bus nodes. See i2c-mux.yaml in this directory. Optional properties: - reg: this pair of specifies the register to control the mux. diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux.txt b/Documentation/devicetree/bindings/i2c/i2c-mux.txt deleted file mode 100644 index b38f58a1c878..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mux.txt +++ /dev/null @@ -1,73 +0,0 @@ -Common i2c bus multiplexer/switch properties. - -An i2c bus multiplexer/switch will have several child busses that are -numbered uniquely in a device dependent manner. The nodes for an i2c bus -multiplexer/switch will have one child node for each child bus. - -Optional properties: -- #address-cells = <1>; - This property is required if the i2c-mux child node does not exist. - -- #size-cells = <0>; - This property is required if the i2c-mux child node does not exist. - -- i2c-mux - For i2c multiplexers/switches that have child nodes that are a mixture - of both i2c child busses and other child nodes, the 'i2c-mux' subnode - can be used for populating the i2c child busses. If an 'i2c-mux' - subnode is present, only subnodes of this will be considered as i2c - child busses. - -Required properties for the i2c-mux child node: -- #address-cells = <1>; -- #size-cells = <0>; - -Required properties for i2c child bus nodes: -- #address-cells = <1>; -- #size-cells = <0>; -- reg : The sub-bus number. - -Optional properties for i2c child bus nodes: -- Other properties specific to the multiplexer/switch hardware. -- Child nodes conforming to i2c bus binding - - -Example : - - /* - An NXP pca9548 8 channel I2C multiplexer at address 0x70 - with two NXP pca8574 GPIO expanders attached, one each to - ports 3 and 4. - */ - - mux@70 { - compatible = "nxp,pca9548"; - reg = <0x70>; - #address-cells = <1>; - #size-cells = <0>; - - i2c@3 { - #address-cells = <1>; - #size-cells = <0>; - reg = <3>; - - gpio1: gpio@38 { - compatible = "nxp,pca8574"; - reg = <0x38>; - #gpio-cells = <2>; - gpio-controller; - }; - }; - i2c@4 { - #address-cells = <1>; - #size-cells = <0>; - reg = <4>; - - gpio2: gpio@38 { - compatible = "nxp,pca8574"; - reg = <0x38>; - #gpio-cells = <2>; - gpio-controller; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux.yaml new file mode 100644 index 000000000000..24cac36037f5 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-mux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common i2c bus multiplexer/switch properties. + +maintainers: + - Peter Rosin + +description: |+ + An i2c bus multiplexer/switch will have several child busses that are numbered + uniquely in a device dependent manner. The nodes for an i2c bus + multiplexer/switch will have one child node for each child bus. + + For i2c multiplexers/switches that have child nodes that are a mixture of both + i2c child busses and other child nodes, the 'i2c-mux' subnode can be used for + populating the i2c child busses. If an 'i2c-mux' subnode is present, only + subnodes of this will be considered as i2c child busses. + +properties: + $nodename: + pattern: '^(i2c-?)?mux' + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^i2c@[0-9a-f]+$': + $ref: /schemas/i2c/i2c-controller.yaml + unevaluatedProperties: false + + properties: + reg: + description: The mux selector sub-bus number for the child I2C bus. + maxItems: 1 + +additionalProperties: true + +examples: + - | + /* + * An NXP pca9548 8 channel I2C multiplexer at address 0x70 + * with two NXP pca8574 GPIO expanders attached, one each to + * ports 3 and 4. + */ + i2c { + #address-cells = <1>; + #size-cells = <0>; + + i2c-mux@70 { + compatible = "nxp,pca9548"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + + i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + gpio@20 { + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + }; + }; + i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + + gpio@20 { + compatible = "nxp,pca9555"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + }; + }; + }; + }; +... From patchwork Wed May 26 18:48:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 448486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B40DAC47088 for ; Wed, 26 May 2021 18:49:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F6EE613BE for ; Wed, 26 May 2021 18:49:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235732AbhEZSuc (ORCPT ); Wed, 26 May 2021 14:50:32 -0400 Received: from mail-ot1-f46.google.com ([209.85.210.46]:42815 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbhEZSu0 (ORCPT ); Wed, 26 May 2021 14:50:26 -0400 Received: by mail-ot1-f46.google.com with SMTP id n3-20020a9d74030000b029035e65d0a0b8so1961792otk.9; Wed, 26 May 2021 11:48:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NUv3HY5Qq3devlXxPwSWcFNHs0zXCFYyGR/SmlCxD/4=; b=tj97cDRrKKp/2FQUJYRgYzYbiq9RUSZyJ14Ij9pyjB6x6ZJhhXIjK+OF0XTMRTwaze Tdlux5+2fFv//IZ7uc5AWfIM/4gy+DUHnO31DB91YnD31KfL2Ttsx62tqYMh2hKBo88A QWlYZK7nc4PKHHScMVdW6wxVJfV4qHXCU1PwSi0CUyHKjyof6LEcCQo/QD8cOBuZL4T6 9yJBPDSLtuAKOVBYFhjH4nZ2W3iKpxLRbH7E1GD3COiS4Od/6UWvlH0fbXMdS7sr+PQH qpDixol9ZUsS6sXHoal1nVECJVQKYQMvlFTlfVTexBK5wrLQgMJxzx0axXSX2J4vw5yi p0GA== X-Gm-Message-State: AOAM531V8WxfCzZT1ybGLNhrpxF0y/XCK8dnnuQFPUA3vZNjOZeWhuai vy2/pI8t7Qwe/aUsbBYaFnoCXXqXxA== X-Google-Smtp-Source: ABdhPJxdrrxZf5jhSx6JCFfPitKZYaitgdqLfoq5cUybptpyokb8nJxhvgCGjhgOiCrcS0rIycek9Q== X-Received: by 2002:a9d:73d8:: with SMTP id m24mr3473683otk.269.1622054932752; Wed, 26 May 2021 11:48:52 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x65sm7224otb.59.2021.05.26.11.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 11:48:52 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Peter Rosin , Wolfram Sang Cc: linux-kernel@vger.kernel.org, Alexandre Belloni , Jacopo Mondi , Kieran Bingham , Kishon Vijay Abraham I , Lee Jones , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Jonathan Cameron , Laurent Pinchart , linux-i2c@vger.kernel.org Subject: [PATCH v2 5/6] dt-bindings: i2c: i2c-mux-pca954x: Convert to DT schema Date: Wed, 26 May 2021 13:48:38 -0500 Message-Id: <20210526184839.2937899-6-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210526184839.2937899-1-robh@kernel.org> References: <20210526184839.2937899-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Convert the i2c-mux-pca954x binding to DT schema format. Add the missing compatible for 'nxp,pca9645' which is already in use. Reviewed-by: Laurent Pinchart Signed-off-by: Rob Herring --- v2: - Add 'nxp,pca9645' - Fix compatible sorting --- .../bindings/i2c/i2c-mux-pca954x.txt | 74 ------------ .../bindings/i2c/i2c-mux-pca954x.yaml | 110 ++++++++++++++++++ 2 files changed, 110 insertions(+), 74 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt deleted file mode 100644 index 9f3f3eb67e87..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt +++ /dev/null @@ -1,74 +0,0 @@ -* NXP PCA954x I2C bus switch - -The driver supports NXP PCA954x and PCA984x I2C mux/switch devices. - -Required Properties: - - - compatible: Must contain one of the following. - "nxp,pca9540", - "nxp,pca9542", - "nxp,pca9543", - "nxp,pca9544", - "nxp,pca9545", - "nxp,pca9546", "nxp,pca9846", - "nxp,pca9547", "nxp,pca9847", - "nxp,pca9548", "nxp,pca9848", - "nxp,pca9849" - - - reg: The I2C address of the device. - - The following required properties are defined externally: - - - Standard I2C mux properties. See i2c-mux.txt in this directory. - - I2C child bus nodes. See i2c-mux.txt in this directory. - -Optional Properties: - - - reset-gpios: Reference to the GPIO connected to the reset input. - - idle-state: if present, overrides i2c-mux-idle-disconnect, - Please refer to Documentation/devicetree/bindings/mux/mux-controller.yaml - - i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all - children in idle state. This is necessary for example, if there are several - multiplexers on the bus and the devices behind them use same I2C addresses. - - interrupts: Interrupt mapping for IRQ. - - interrupt-controller: Marks the device node as an interrupt controller. - - #interrupt-cells : Should be two. - - first cell is the pin number - - second cell is used to specify flags. - See also Documentation/devicetree/bindings/interrupt-controller/interrupts.txt - -Example: - - i2c-switch@74 { - compatible = "nxp,pca9548"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x74>; - - interrupt-parent = <&ipic>; - interrupts = <17 IRQ_TYPE_LEVEL_LOW>; - interrupt-controller; - #interrupt-cells = <2>; - - i2c@2 { - #address-cells = <1>; - #size-cells = <0>; - reg = <2>; - - eeprom@54 { - compatible = "atmel,24c08"; - reg = <0x54>; - }; - }; - - i2c@4 { - #address-cells = <1>; - #size-cells = <0>; - reg = <4>; - - rtc@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml new file mode 100644 index 000000000000..9f1726d0356b --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCA954x I2C bus switch + +maintainers: + - Laurent Pinchart + +description: + The binding supports NXP PCA954x and PCA984x I2C mux/switch devices. + +allOf: + - $ref: /schemas/i2c/i2c-mux.yaml# + +properties: + compatible: + oneOf: + - enum: + - nxp,pca9540 + - nxp,pca9542 + - nxp,pca9543 + - nxp,pca9544 + - nxp,pca9545 + - nxp,pca9546 + - nxp,pca9547 + - nxp,pca9548 + - nxp,pca9846 + - nxp,pca9847 + - nxp,pca9848 + - nxp,pca9849 + - items: + - const: nxp,pca9646 + - const: nxp,pca9546 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#interrupt-cells": + const: 2 + + interrupt-controller: true + + reset-gpios: + maxItems: 1 + + i2c-mux-idle-disconnect: + type: boolean + description: Forces mux to disconnect all children in idle state. This is + necessary for example, if there are several multiplexers on the bus and + the devices behind them use same I2C addresses. + + idle-state: + description: if present, overrides i2c-mux-idle-disconnect + $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + i2c-mux@74 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x74>; + + interrupt-parent = <&ipic>; + interrupts = <17 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <2>; + + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + + eeprom@54 { + compatible = "atmel,24c08"; + reg = <0x54>; + }; + }; + + i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + }; + }; + }; +... From patchwork Wed May 26 18:48:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 448225 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp5490190jac; Wed, 26 May 2021 11:49:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy37S1qPTbKi4HErkO0FXNUF/qq73MkABEUfqm1psvyMo7c2YU5gdwa4XSXXHFsXp305RJH X-Received: by 2002:a02:aa85:: with SMTP id u5mr4688380jai.75.1622054949100; Wed, 26 May 2021 11:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622054949; cv=none; d=google.com; s=arc-20160816; b=FSpSsRG2GPfkvHqyMx5EBixTNxfhGnUGQgjVJOogczyn1loxYA7zRCjL8lkeiLZMFy to3nleFffFsz+JDqQhcXbPet1iMr7ofc2/h75AnpRY5MFjmbCylCn1zcCI5G2ZZpW3J/ eImLCZ/ow6hiPRMeV8TSIdkSUGWZkvqVsJFncPRIOwUWHB//nIuN6n7u7B1Oej8ZXC6+ kpEzfkn4KV1N5DjDjsP4XjTkTqWpLrq5h5PzvLsAoooHV6yHOyhfYU2jU4ajoZKoqPQB whiBOhVl7ekuGu93bptaDFCR5GT/rIx1ZLcO8pEQ7XoGN7vPro4TVEJRtXQ3xshVDAF8 NCAQ== 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=mNKNtAI43Z/nC3L+rfhHTkgzIxEjqQehyJ1O9ZC2MQY=; b=qO/RW2D10KZ9spCwdGwvFRReii8SXxtq+htWqihADXrJgkbNDjnMKFxVx40Tn47bxv wajFpQbPXZx5x4JVMTb3OuTbqxC5W+GbeBiRtMCQdo4namRB+6v+sjM6QJwdnIN5Yxii o6t8MRwo8wglTzcj+UvIp1XvKZY4zZA5NOZXCQZTDy282e5xPFv5dNlxiZETwADGuU5+ AC7bfxGTvrFwzj1ACjfQkkF/GiglYRYc05UPFlwQZu3Wp9AhR9bNUWrQkUJWVO/2NDF5 HEa2GqxrJwFhij2AbHWAoR9iVsiYNGIKpsO4mbD0wjo/yecabVfr4WTull8rcKV+jTFl uHoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-i2c-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 z6si20853246ilq.89.2021.05.26.11.49.08; Wed, 26 May 2021 11:49:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-i2c-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-i2c-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 S233762AbhEZSuc (ORCPT + 2 others); Wed, 26 May 2021 14:50:32 -0400 Received: from mail-ot1-f46.google.com ([209.85.210.46]:39480 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235733AbhEZSu1 (ORCPT ); Wed, 26 May 2021 14:50:27 -0400 Received: by mail-ot1-f46.google.com with SMTP id d25-20020a0568300459b02902f886f7dd43so1987809otc.6; Wed, 26 May 2021 11:48:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mNKNtAI43Z/nC3L+rfhHTkgzIxEjqQehyJ1O9ZC2MQY=; b=XfjVNv09z0hfGqQcpoMZaV74GI6Gk9bpgtcgN9/Y3w5Ddflgfqd1u1ST9dQsMta1uB 92SGi2Tn0sayEklzr47L3R9qDPQV9Y7SQOR0NSnmylVn1BxN2k2Xj+IOcJFWVr013P6+ ZK9xAdXBG1N/qoeR83yAmFyAszUP+IQ1c0cLARHM6DUwXzjiBsEwvm54KHISUX0xDS8B oL7zS0LgzFEd4h6J92YzPjvY2LMOtrT57abn1L97iXGqn1yDpJI/U071tj6B3jZJk9AC NEITz8bTs4AniPxhypN0T1Nj9YUqDK0Oqov3EkSUy8UBQYkrb5DS8M4B7LsHGRGqtWpN Ym4Q== X-Gm-Message-State: AOAM530n0TLChJPy9s0V4TGAF8Xl52YQVe30M+WazL7tYwn0jWbxHVWg HX4SFaOkyUW7+VTDV1M43fLJP0uUwA== X-Received: by 2002:a05:6830:14d:: with SMTP id j13mr3424433otp.232.1622054934401; Wed, 26 May 2021 11:48:54 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x65sm7224otb.59.2021.05.26.11.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 11:48:53 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Peter Rosin , Wolfram Sang Cc: linux-kernel@vger.kernel.org, Alexandre Belloni , Jacopo Mondi , Kieran Bingham , Kishon Vijay Abraham I , Lee Jones , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Jonathan Cameron , Laurent Pinchart , linux-i2c@vger.kernel.org Subject: [PATCH v2 6/6] dt-bindings: i2c: maxim, max9286: Use the i2c-mux.yaml schema Date: Wed, 26 May 2021 13:48:39 -0500 Message-Id: <20210526184839.2937899-7-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210526184839.2937899-1-robh@kernel.org> References: <20210526184839.2937899-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use the i2c-mux.yaml schema in the maxim,max9286 binding schema. With this, several properties can be dropped as they are defined in i2c-mux.yaml already. Cc: Jacopo Mondi Cc: Kieran Bingham Cc: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Rob Herring --- .../bindings/media/i2c/maxim,max9286.yaml | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) -- 2.27.0 diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml index ee16102fdfe7..02f656e78700 100644 --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml @@ -111,17 +111,10 @@ properties: i2c-mux: type: object + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false description: | - Each GMSL link is modelled as a child bus of an i2c bus - multiplexer/switch, in accordance with bindings described in - Documentation/devicetree/bindings/i2c/i2c-mux.txt. - - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 + Each GMSL link is modelled as a child bus of an i2c bus multiplexer/switch. patternProperties: "^i2c@[0-3]$": @@ -133,12 +126,6 @@ properties: channels. properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - reg: description: The index of the GMSL channel. maxItems: 1 @@ -173,10 +160,6 @@ properties: additionalProperties: false - additionalProperties: false - - additionalProperties: false - required: - compatible - reg