From patchwork Tue Jun 20 12:22:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 110456 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3632286vqr; Tue, 20 Jun 2023 05:38:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+2I8RsajBZfd1+JL6rEwYbc3hEOgFmRWoFVit8QKloLsgZoJVkU6/qiM5cgMSoeEe9Umw X-Received: by 2002:a17:90a:4e:b0:25b:b2ba:2ff4 with SMTP id 14-20020a17090a004e00b0025bb2ba2ff4mr7215991pjb.17.1687264708776; Tue, 20 Jun 2023 05:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687264708; cv=none; d=google.com; s=arc-20160816; b=aNTw2nBzTUKQWbthMRUyGjQK9X5xp6JjK6ZWMetui6Unl8Q0UmMQ4kfhsi4SFQ6uPf ZamBSEyu2i2/1ri9ulJqY+7csqP3CZBDI10ORYOpXr0rh4EvwVkqXTPUyUhZYnogY4z3 Sk15hlonulKRw4+u83rILPAQayDjsM/vK6Ll8wfzoX5Mp9/22gekrLlDKyw9NTSOG3KM GFpn9myxIxRZgicpitw/rC7DZe5WJPyqp/9pekj86FLZ26Ifi6yiwEnCzwEId2Fy+/+V UzDe4oUkZKi+3KisAuCo2WCLCfapQDR3q+dFwP92cBF2Rqf3KYQubG0kdxlkM7Cek2od B3Aw== 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=8JqijGATevexodiqwpgWWh8neUeu+NISOC/UOfLz2IU=; b=DuJdiDu7jnyEJGvUakV6PEIEFdYn4fhlCK8r3wtiIxdMqK7VnNEfetABuy6XiqYJ9C ayEUNX0hvLxbDy88KaFDex94XZhgpsnuw5fPOsoPR7zKTScAfZzhMrGqZnzC/3jteo5B u2Tujc8tCDnh9sBiLTpy1JsHqe1eg5iwx0jHjSgXPCsNl8fp5vUQuV/GegdkUhFU3o6P IaY3eiAZd7mfClQXjnuNbEPgdiViDyyxq0NMe6X1VyKLNVDonljQoFf+b5PZWSOtRBD3 IDaP7Q4EXJ9J3WAbaMbNdORNuphRiHekuLDlr+iP94tz7uJZsiuWEcoYdAPgYqbBO2bJ x2mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=Gidnfvi6; 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 d16-20020a17090abf9000b00259a11f3a69si1800848pjs.145.2023.06.20.05.38.15; Tue, 20 Jun 2023 05:38:28 -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=Gidnfvi6; 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 S232627AbjFTMXC (ORCPT + 99 others); Tue, 20 Jun 2023 08:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbjFTMW4 (ORCPT ); Tue, 20 Jun 2023 08:22:56 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38271730; Tue, 20 Jun 2023 05:22:50 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-987a977f62aso378483866b.1; Tue, 20 Jun 2023 05:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687263769; x=1689855769; 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=8JqijGATevexodiqwpgWWh8neUeu+NISOC/UOfLz2IU=; b=Gidnfvi63amTHS30BFQfvQsOj4NopMPAYG3pYWcsBKQCP+E3TISeR3uH6WbJbqup+d QOvt81cPCX0Z86ECWJ8OojO34VIjyADtXNCp2V0bZhUVWMdEpCgFNdjbqXjtkkn4YcSB o5s1gqayXO9XF20HN/bGSQnIW5uRbE44YSFhf/+x91vfylIjlCCAXbMh9tvK1yah1hXO tyeLvO8xpgRbVQoRP1axpz1hvBzit+ruaq0c20Q83WWOwmgfE490sh0k5SYR8fYSWbGZ 2c8sxQx+dxMewp0MladMlUQAjqW+/8Lw/P5dGoDfI0MNSX0khGvYDTLQrFQ6BegRzTsZ CXYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687263769; x=1689855769; 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=8JqijGATevexodiqwpgWWh8neUeu+NISOC/UOfLz2IU=; b=GQKzifPHa14Q6kh9oUWQJU5RbhazYt5WEglw4/+GrC5I6bQTlSX4WxbGGc0D05yVQR y14HUYCsx2mR8Jy4CU86ZVRr43IgWBZYaREsZyUtwJj8dY/TUtqzTFTeg5uVFOzmrK6s xmreBfKnEEk9BOoE3WAdVb8VIJQrDNd9GKz3GC+NpXR5Ib+SrCsMjaNyXSi8divpKsY+ rpk3XqbpEKIxN2OBbkE6jPNcFNWP9/qS/npaB2eyuqGgpfS/vWmz8znSR8Dj2+cbGX/3 8Uz55oUdX6R9b5ZanIuDNLCwLnuDvqYTtWyhHCIXeqisTVXOR7MGU725QyAhg6wtUHSb DRqg== X-Gm-Message-State: AC+VfDyut/ikYFegMXzb5MYYKslbO983BwaPsxdZ4MdaQqWsoaCbQ0xU 0VWqJ0qzGM+CF0yrYvq/MAA= X-Received: by 2002:a17:907:16a6:b0:974:5ef9:f4d4 with SMTP id hc38-20020a17090716a600b009745ef9f4d4mr10454221ejc.5.1687263769006; Tue, 20 Jun 2023 05:22:49 -0700 (PDT) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation.station (net-2-39-142-242.cust.vodafonedsl.it. [2.39.142.242]) by smtp.gmail.com with ESMTPSA id me16-20020a170906aed000b0098669cc16b2sm1305200ejb.83.2023.06.20.05.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 05:22:48 -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, hdegoede@redhat.com, Tommaso Merciai , Conor Dooley , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Sakari Ailus , Hans Verkuil , Marco Felsch , Gerald Loacker , Mikhail Rudenko , Nicholas Roth , Linus Walleij , =?utf-8?q?Krzysztof_Ha=C5=82asa?= , Shawn Tu , Benjamin Mugnier , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/3] media: dt-bindings: alvium: add document YAML binding Date: Tue, 20 Jun 2023 14:22:19 +0200 Message-Id: <20230620122225.58862-3-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620122225.58862-1-tomm.merciai@gmail.com> References: <20230620122225.58862-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?1769225279576899466?= X-GMAIL-MSGID: =?utf-8?q?1769225279576899466?= 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 Reviewed-by: Conor Dooley --- 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 Changes since v3: - Fixed vcc-ext-in-supply description as suggested by LPinchart - Fixed alliedvision,lp2hs-delay-us description as suggested by LPinchart - Added maximum to alliedvision,lp2hs-delay-us as suggested by LPinchart - Collected Reviewed-by tag from LPinchart Changes since v4: - Fixed id as reported by RHerring bot and LPinchart - Add minimum into alliedvision,lp2hs-delay-us as suggested by CDooley - Tested using make dt_binding_check DT_SCHEMA_FILES=alliedvision,alvium-csi2.yaml Changes since v5: - Fixed alliedvision,lp2hs-delay-us description as suggested by CDooley - Collected CDooley Reviewed-by tag .../media/i2c/alliedvision,alvium-csi2.yaml | 97 +++++++++++++++++++ 1 file changed, 97 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..327cd5421257 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.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: | + The regulator that supplies power to the VCC_EXT_IN pins. + + alliedvision,lp2hs-delay-us: + minimum: 1 + maximum: 150000 + description: | + Low power to high speed delay time. + + If the value is present, the camera forces a reset of all + D-PHY lanes for the duration specified by this property. All lanes + will transition to the low-power state and back to the high-speed + state after the delay. Otherwise the lanes will transition to and + remain in the high-speed state immediately after power on. + + This is meant to help CSI-2 receivers synchronizing their D-PHY + RX. + + 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>; + }; + }; + }; + }; + +...