From patchwork Wed Jul 13 15:05:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 590198 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10A70C43334 for ; Wed, 13 Jul 2022 15:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236830AbiGMPFf (ORCPT ); Wed, 13 Jul 2022 11:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236783AbiGMPF2 (ORCPT ); Wed, 13 Jul 2022 11:05:28 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A597422EA for ; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id be14-20020a05600c1e8e00b003a04a458c54so1367339wmb.3 for ; Wed, 13 Jul 2022 08:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SFLYTnxGltOS1OadQL4iHNlIKerC7uXMw8HZbX2h5Bw=; b=pWJ2mDStBxvqxqXEyUi5/wzW/gakcUiJFUflrpQlBba7NBb0yWb2gWSnqUtp+ydGEU lB04w2koWZ60Yk8CW6v3QYjPG8phb1dnMYAmCYKbZEeJaU1mKQH6T9p83F/TgRhO0mIf YeczGts5Bz8QQS1mUT3srd6mT2h+fDzbYFvN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SFLYTnxGltOS1OadQL4iHNlIKerC7uXMw8HZbX2h5Bw=; b=dthCehql3SW/kxd439/WJSD77DKSX6Yqyk9AnKFOyrFnZK4wq0UYRF+7pkevE4Bhe/ Nxh2DuKiCW4LfOnRCMhvECnHRxG9dq+4J/DLQ1Xs0z/R1NipfSNGP/0VfuVu8KLUEOHa vO9AgnCBCLiCmhVeqs3ZP3whVGLqVo7kY713Dimfqt3WkstdHLMz4+OfoNhC9Urosb/n 1vi4Q28BRQevdG7ygiw6LQ1JhEIO3GAAqrPGhAlv4HTDwwBMkwKt1MvFIZqvgr/UaUhN PrtPrxJs+zREQx+2CUR8Q+QwYD1XXOluQw3MzA79Nk44Ff8yt3xFzYZ6XMnseBWy6PTB mMlg== X-Gm-Message-State: AJIora+A0hKYfxQWNRzvin8IIeHfgZ1TTB8tDti8dfPyCOx60TBVKC1H dP2WGX0fZdSA23UV/Zf5cj9N5A== X-Google-Smtp-Source: AGRyM1vKDLV5XMD/EiFbzgEkFckN+SUKqhPWdZjReQCFv4hhO6CPOuc3kfklirPAo3JWhXvjEuI3KQ== X-Received: by 2002:a1c:a1c7:0:b0:3a2:f171:8d68 with SMTP id k190-20020a1ca1c7000000b003a2f1718d68mr4139777wme.111.1657724718777; Wed, 13 Jul 2022 08:05:18 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-51-7.cust.vodafonedsl.it. [188.217.51.7]) by smtp.gmail.com with ESMTPSA id f17-20020a05600c4e9100b003a2d87aea57sm1465537wmq.10.2022.07.13.08.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 08:05:18 -0700 (PDT) From: Tommaso Merciai To: tommaso.merciai@amarulasolutions.com Cc: linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, quentin.schulz@theobroma-systems.com, Krzysztof Kozlowski , Daniel Scally , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 5/6] media: dt-bindings: ov5693: document YAML binding Date: Wed, 13 Jul 2022 17:05:05 +0200 Message-Id: <20220713150506.2085214-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> References: <20220713150506.2085214-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add documentation of device tree in YAML schema for the OV5693 CMOS image sensor from Omnivision Signed-off-by: Tommaso Merciai Reviewed-by: Krzysztof Kozlowski --- Changes since v1: - Fix allOf position as suggested by Krzysztof - Remove port description as suggested by Krzysztof - Fix EOF as suggested by Krzysztof Changes since v2: - Fix commit body as suggested by Krzysztof Changes since v3: - Add reviewed-by tags, suggested by Jacopo, Krzysztof Changes since v4: - Remove wrong Sakari reviewed-by tag, suggested by Krzysztof, Sakari Changes since v5: - Remove dovdd-supply, avdd-supply, dvdd-supply from required properties as suggested by Jacopo Changes since v6: - Add missing port node as suggested by Sakari, Rob bot .../bindings/media/i2c/ovti,ov5693.yaml | 124 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 125 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml new file mode 100644 index 000000000000..359dc08440a8 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml @@ -0,0 +1,124 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2022 Amarulasolutions +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5693.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Omnivision OV5693 CMOS Sensor + +maintainers: + - Tommaso Merciai + +description: | + The Omnivision OV5693 is a high performance, 1/4-inch, 5 megapixel, CMOS + image sensor that delivers 2592x1944 at 30fps. It provides full-frame, + sub-sampled, and windowed 10-bit MIPI images in various formats via the + Serial Camera Control Bus (SCCB) interface. + + OV5693 is controlled via I2C and two-wire Serial Camera Control Bus (SCCB). + The sensor output is available via CSI-2 serial data output (up to 2-lane). + +allOf: + - $ref: /schemas/media/video-interface-devices.yaml# + +properties: + compatible: + const: ovti,ov5693 + + reg: + maxItems: 1 + + clocks: + description: + System input clock (aka XVCLK). From 6 to 27 MHz. + maxItems: 1 + + dovdd-supply: + description: + Digital I/O voltage supply, 1.8V. + + avdd-supply: + description: + Analog voltage supply, 2.8V. + + dvdd-supply: + description: + Digital core voltage supply, 1.2V. + + reset-gpios: + description: + The phandle and specifier for the GPIO that controls sensor reset. + This corresponds to the hardware pin XSHUTDN which is physically + active low. + maxItems: 1 + + port: + description: MIPI CSI-2 transmitter port + $ref: /schemas/graph.yaml#/$defs/port-base + additionalProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + link-frequencies: true + + data-lanes: + minItems: 1 + maxItems: 2 + + required: + - data-lanes + - link-frequencies + +required: + - compatible + - reg + - clocks + - port + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ov5693: camera@36 { + compatible = "ovti,ov5693"; + reg = <0x36>; + + reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&cif_clkout_m0>; + + clocks = <&cru SCLK_CIF_OUT>; + assigned-clocks = <&cru SCLK_CIF_OUT>; + assigned-clock-rates = <19200000>; + + avdd-supply = <&vcc_1v8>; + dvdd-supply = <&vcc_1v2>; + dovdd-supply = <&vcc_2v8>; + + rotation = <90>; + orientation = <0>; + + port { + ucam_out: endpoint { + remote-endpoint = <&mipi_in_ucam>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index f679152bdbad..61c2d28aff4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14838,6 +14838,7 @@ M: Daniel Scally L: linux-media@vger.kernel.org S: Maintained T: git git://linuxtv.org/media_tree.git +F: Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml F: drivers/media/i2c/ov5693.c OMNIVISION OV5695 SENSOR DRIVER