From patchwork Tue Jun 6 15:54:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 103973 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3513468vqr; Tue, 6 Jun 2023 09:17:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4U3DZr+3DRnzQdC7a/06BWdCHP6+QLsiREiQ3ApMPpryKd+lu7MlwO7lAZV76D7Ls+chZq X-Received: by 2002:ac8:5750:0:b0:3ef:2fbd:90cd with SMTP id 16-20020ac85750000000b003ef2fbd90cdmr103157qtx.46.1686068246085; Tue, 06 Jun 2023 09:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686068246; cv=none; d=google.com; s=arc-20160816; b=TrbAygoadjRAFYDLmUtGyCPWzcbJuU2naO1goRytpN4+CsiSNU9C54pwJ5JviKoQHI ZHvw3TpQizG5lL0398oxQjGDWhjO+v94cs/85YZaVGRbfEMl4Bya6LkOMuQRx6RelkTu LINRsEtSRxoQ+6+lZN/p6qqyCq/xYg7NIqdM+tu94CKtpywN+VyaEgvCA+se3vGsjKN4 iU/bvq/suTVTMc07e86Db0v2AtvKmBaO8qF9TzFxXDVkaaGvMrEiAeGiYPpyUIdKVD1A 20Ir8RFY/z/+jv84xHMUslUcBK6SGS5kK0LXOcs10KrO8xxfYARBe6iAbQcGONboL47z xAKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=074QNuEu3wkJpZ6uYVU90q7Ft1hIzZ14+MbfytvfGi4=; b=KQ2CtAzDrLG1/K2YdajELvvkKufUPHBbDY1GK+FK0te/AcmKXFpOxRwy6xnC1j4Vpu emMXHjA/5Z1+K1yTZ261NujQ2xWzm0VKz049CwW3D0+qfwSsx0cP7DPygZvFCXACgpRz 3tFtjnPv6pdRyQhLc34UQHOndfEpGbj2uilmTdzHkgErBjWqtrjXFe5pk4npBruXWUWL GLSuG9L2BmP/CZEJ2t9czAQcLvQOn3wQWZr/OoJXoE8WCoPIooXJZEZuexXN63sRiURD EqiZZIFxZLjJroMk3jnKSrVg35CQsYBNIx4PNA/KpUPQ4XxaEI0Vw6wx/Eb0/FczR1w8 zBHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=DgKlNh28; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a05622a045200b003f830a6984dsi6452139qtx.199.2023.06.06.09.17.10; Tue, 06 Jun 2023 09:17: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; dkim=fail header.i=@gmail.com header.s=20221208 header.b=DgKlNh28; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238308AbjFFPzN (ORCPT + 99 others); Tue, 6 Jun 2023 11:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238639AbjFFPy7 (ORCPT ); Tue, 6 Jun 2023 11:54:59 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D0C0FC; Tue, 6 Jun 2023 08:54:57 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-974f4897d87so696072866b.0; Tue, 06 Jun 2023 08:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686066896; x=1688658896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=074QNuEu3wkJpZ6uYVU90q7Ft1hIzZ14+MbfytvfGi4=; b=DgKlNh28kPbXtAVGN7IGLrY3ciApxhugNqZDvDmISjaHN7eBfLPFJfrJUFuUPAQgeO EZG8KvDALxRzU20i7JfC94UCUk0eDJSxA4JAJARdVTN8t2Q27d2wN40RfHdPmAoS1rRJ VTKjFWvPDQ5uWekDpvC7wuKl9jOz5XXZ/WFDHZ38buFlLnG1W995VcoE67Y8CUgG+KXy IZ8nWvpmjjWLYyZ1nAFdB+Mvze7rkTR2yq6z7y4df+jjyKOzXDYT5lxepaKrP3qs8Chn XqyhzOoKwd3nbNW9BvChrLDGAGR62fgg85GAmxQr7BrR+fqdbrJmNemlck1b0llRMwsk GLqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686066896; x=1688658896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=074QNuEu3wkJpZ6uYVU90q7Ft1hIzZ14+MbfytvfGi4=; b=J+uVbMTC3x2RrKzWza1nt9Vza/dpKskz4CqGFRRL/3Dl5UGOQPwZs/+ig0udQcGdgA /i3vpmujCRgSW7rhyByzHe8Ey21+yrIFJ565S5Y4cODIy8pq3lJuy0VTirVSDz1v7K2D w3s1h3TLCOptS+32lPSFbfIgxnoswYiWX8OGIhlMx19koMozdg/SfDoGPx71tyJVOIDD 6/r8x7Fn6xt1anZXd444m2vGtKBJ8AEEJs23ncdzNl2qOJUbCV2IFHiOtv6WV/wzEbhe vbOTdHyxlb3IY6rhdFNUNOWVbzjcTgQj4+uZFghhk+WqodSjJ6MmLUa0QFoKR1Hvqpx3 BcjA== X-Gm-Message-State: AC+VfDzADIqlkEcF2uG2NOTE2Wrb+hSYfrPxiNOEK/t+TtOYCpyUBF3D S9VaugOZsnCV1DE6ayxRiHc= X-Received: by 2002:a17:907:d1a:b0:974:419d:7847 with SMTP id gn26-20020a1709070d1a00b00974419d7847mr2697035ejc.71.1686066895527; Tue, 06 Jun 2023 08:54:55 -0700 (PDT) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation.station (net-188-217-50-121.cust.vodafonedsl.it. [188.217.50.121]) by smtp.gmail.com with ESMTPSA id x13-20020a170906710d00b0096f694609f3sm5800412ejj.31.2023.06.06.08.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 08:54:55 -0700 (PDT) From: Tommaso Merciai Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com, martin.hecht@avnet.eu, michael.roeder@avnet.eu, linuxfancy@googlegroups.com, Tommaso Merciai , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Sakari Ailus , Hans Verkuil , Marco Felsch , Gerald Loacker , Mikhail Rudenko , Shawn Tu , Linus Walleij , Benjamin Mugnier , =?utf-8?q?Krzysztof_Ha?= =?utf-8?q?=C5=82asa?= , Nicholas Roth , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] media: dt-bindings: alvium: add document YAML binding Date: Tue, 6 Jun 2023 17:54:03 +0200 Message-Id: <20230606155416.260941-3-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230606155416.260941-1-tomm.merciai@gmail.com> References: <20230606155416.260941-1-tomm.merciai@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767970697360609818?= X-GMAIL-MSGID: =?utf-8?q?1767970697360609818?= Add documentation of device tree in YAML schema for the ALVIUM Camera from Allied Vision Inc. References: - https://www.alliedvision.com/en/products/embedded-vision-solutions Signed-off-by: Tommaso Merciai Reviewed-by: Laurent Pinchart --- Changes since v1: - Fixed build error as suggested by RHerring bot Changes since v2: - Fixed License as suggested by KKozlowski/CDooley - Removed rotation property as suggested by CDooley/LPinchart - Fixed example node name as suggested by CDooley - Fixed title as suggested by LPinchart - Fixed compatible name as suggested by LPinchart - Removed clock as suggested by LPinchart - Removed gpios not as suggested by LPinchart - Renamed property name streamon-delay into alliedvision,lp2hs-delay-us - Fixed vendor prefix, unit append as suggested by KKozlowski - Fixed data-lanes - Fixed blank space + example indentation (from 6 -> 4 space) as suggested by KKozlowski - Dropped status into example as suggested by KKozlowski - Added vcc-ext-in supply as suggested by LPinchart - Dropped pinctrl into example as suggested by LPinchart .../media/i2c/alliedvision,alvium-csi2.yaml | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml new file mode 100644 index 000000000000..191534e2f7bd --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allied Vision Alvium Camera + +maintainers: + - Tommaso Merciai + - Martin Hecht + +allOf: + - $ref: /schemas/media/video-interface-devices.yaml# + +properties: + compatible: + const: alliedvision,alvium-csi2 + + reg: + maxItems: 1 + + vcc-ext-in-supply: + description: + Definition of the regulator used as interface power supply. + + alliedvision,lp2hs-delay-us: + maxItems: 1 + description: + Low power to high speed delay time in microseconds. + The purpose of this property is force a DPhy reset for the period + described by the microseconds on the property, before it starts + streaming. To be clear, with that value bigger than 0 the Alvium + forces a dphy-reset on all lanes for that period. That means all + lanes go up into low power state. This may help a csi2 rx ip to + reset if that IP can't deal with a continous clock. + + port: + description: Digital Output 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 + items: + - const: 1 + - const: 2 + - const: 3 + - const: 4 + + required: + - data-lanes + - link-frequencies + +required: + - compatible + - reg + - vcc-ext-in-supply + - port + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + alvium: camera@3c { + compatible = "alliedvision,alvium-csi2"; + reg = <0x3c>; + vcc-ext-in-supply = <®_vcc_ext_in>; + alliedvision,lp2hs-delay-us = <20>; + + port { + alvium_out: endpoint { + remote-endpoint = <&mipi_csi_0_in>; + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <681250000>; + }; + }; + }; + }; + +...