Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2703242pxb; Mon, 19 Apr 2021 11:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUlUc+8rPQsIo3SDxm7OFGwHrt3Py9I4g5NGFU0HDu0aYxu8FG+NW+00tPOjbhqjlhdjWT X-Received: by 2002:a17:906:40da:: with SMTP id a26mr23572902ejk.513.1618857666261; Mon, 19 Apr 2021 11:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618857666; cv=none; d=google.com; s=arc-20160816; b=b7PXoGyr+BbRxpT3mlHRSgCbfxBEvZ6GkwoBuLQbui0Zv4wTc06KBWUP1zNAM1nA1F k7ksrnQzjKo9jQQWc5H8970LR7DKMSkTgtFyYq8RCD0M+xrpWiimXf7xLuAm6cxw0Yxt 3NVMb6J3iE8zTQYG6nsaSR6BsRmYfLFxkvFJUgWoZe4vx7A9mtZAGWis3YszToanlsZp Fe8m8ZNB82mv9/TPcIBVyocgVAtC/VbyS7sSvHu822FKgTxsTLJXPF6j7q3D9R77tUxt gy7+er2J58XDEgr6zww2gJ9F4jDrxt+N0Io0cBpKJFaXOLOZoHbHIahFSggMV9cV80Hg R3CQ== 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=zTk2SXqIVA9rGEzSFNovH/jJX+v5zsFoNVCfrcf7LO8=; b=dI9YXHwqj95UJ2y8KcVQ998qrInb5P4jumQWi84IIYlLkqJJrzsv3x5lDQiIvto2iT /VfSzZur/6oeGCwuaSSZuCR+x7BYeqhgzd9GMT8rvTXr+XZBMtYXAhEmdnbDtU6+1YD+ gLddH9/9GaI8yDbsQqFSVIixQMi4Rk4pdSZ6Y+iSvbVizHu6hbGgpG0CuHCjS8Ws76QL /cmtqCJD8sD/+VsMX0yFwXvOyn1u8h8hCvlvCwHPcQakCm3jdeIavwtCPgvPiqSpkDVJ qKElyZQ18dufh7kT/lkRTyatHDdra4uDJjM29BUG29ECq+2KwrWNPrZ6zR1erJZh9CKm l8+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si3452034edr.300.2021.04.19.11.40.42; Mon, 19 Apr 2021 11:41:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239366AbhDSOYv (ORCPT + 99 others); Mon, 19 Apr 2021 10:24:51 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:41773 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233823AbhDSOXr (ORCPT ); Mon, 19 Apr 2021 10:23:47 -0400 X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B572E4000C; Mon, 19 Apr 2021 14:23:14 +0000 (UTC) From: Jacopo Mondi To: Geert Uytterhoeven , Magnus Damm , Laurent Pinchart , Kieran Bingham , Rob Herring Cc: Jacopo Mondi , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v5 2/7] dt-bindings: media: max9286: Define 'maxim,gpio-poc' Date: Mon, 19 Apr 2021 16:23:40 +0200 Message-Id: <20210419142345.53152-3-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419142345.53152-1-jacopo+renesas@jmondi.org> References: <20210419142345.53152-1-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define a new vendor property in the maxim,max9286 binding schema. The new property allows to declare that the remote camera power-over-coax is controlled by one of the MAX9286 gpio lines. As it is currently not possible to establish a regulator as consumer of the MAX9286 gpio controller for this purpose, the property allows to declare that the camera power is controlled by the MAX9286 directly. The property accepts a gpio-index (0 or 1) and one line polarity flag as defined by dt-bindings/gpio/gpio.h. Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- .../bindings/media/i2c/maxim,max9286.yaml | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml index 0e7162998b77..bf93fa73ce41 100644 --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml @@ -70,6 +70,28 @@ properties: a remote serializer whose high-threshold noise immunity is not enabled is 100000 micro volts + maxim,gpio-poc: + $ref: '/schemas/types.yaml#/definitions/uint32-array' + minItems: 2 + maxItems: 2 + description: | + Index of the MAX9286 gpio output line (0 or 1) that controls Power over + Coax to the cameras and its associated polarity flag. + + The property accepts an array of two unsigned integers, the first being + the gpio line index (0 or 1) and the second being the gpio line polarity + flag (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW) as defined in + . + + When the remote cameras power is controlled by one of the MAX9286 gpio + lines, this property has to be used to specify which line among the two + available ones controls the remote camera power enablement. + + When this property is used it is not possible to register a gpio + controller as the gpio lines are controlled directly by the MAX9286 and + not available for consumers, nor the 'poc-supply' property should be + specified. + ports: $ref: /schemas/graph.yaml#/properties/ports @@ -182,7 +204,16 @@ required: - reg - ports - i2c-mux - - gpio-controller + +# If 'maxim,gpio-poc' is present, then 'poc-supply' and 'gpio-controller' +# are not allowed. +if: + required: + - maxim,gpio-poc +then: + properties: + poc-supply: false + gpio-controller: false additionalProperties: false @@ -327,4 +358,38 @@ examples: }; }; }; + + /* + * Example of a deserializer that controls the camera Power over Coax + * through one of its gpio lines. + */ + gmsl-deserializer@6c { + compatible = "maxim,max9286"; + reg = <0x6c>; + enable-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + + /* + * The remote camera power is controlled by MAX9286 GPIO line #0. + * No 'poc-supply' nor 'gpio-controller' are specified. + */ + maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>; + + /* + * Do not describe connections as they're the same as in the previous + * example. + */ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@4 { + reg = <4>; + }; + }; + + i2c-mux { + #address-cells = <1>; + #size-cells = <0>; + }; + }; }; -- 2.31.1