Message ID | 20230607131936.382406-3-tomm.merciai@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp204305vqr; Wed, 7 Jun 2023 06:36:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Ps1Zunf8kXyPvhZ1UGhl35CLJGnrqmmCgQXsR5e7YbtxkHlQxOIpCw4DTLxBhX/rKuGxY X-Received: by 2002:a05:6a21:998f:b0:10c:1501:3c22 with SMTP id ve15-20020a056a21998f00b0010c15013c22mr1563106pzb.29.1686144997809; Wed, 07 Jun 2023 06:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686144997; cv=none; d=google.com; s=arc-20160816; b=ePX2U4RZf6PNgtwJ8sao4SIhtX/zJWakrgTbCBKU/tNsiDN1VcvMzqsiNJ3a49Nc/U YIcEZPzfuMFU9pw5vEG45nbPbIyGBGc8phUsSdSYgzq1/j35/xEEkqQzePRUXTQomANv DIa86dWbSY1tylz3Pj5AMApsSTC3i3STxK5uOMsxePebaoncfUxCrP7cjvrx5DAoHjLQ 7xt1Huo0kDpkoFfiIC0bDXHQVYYAKQht6DUqe2HohHWl8kkQaqB5mOu9zM3IhF0IaEDJ PJ3fvux9Ueph3dFi0kN2hRdCPyVL79cblxHdy/u1yg1d3HlDwramijq4k/dHRFvg5xPs 9sQw== 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=7Ih3+4bsXANDBgDK6G+g4s7QhjYyFihjN9IGktwpehA=; b=THoWA9teDPyXYJXTcxcPdg5upKXVZsVF6H3vA1nJDSQy+OZaAYeOUtp/RubOISgfIP +QIlENKiYiVsPIFLZ9mCH4inFtKJY8J8JTQ8mVuS5SzElvexUgGJ6yfGonqyzgR2J5dt wLFX3oBjYpmCCtfI3JELEHlSiocMoFFIXAiPnlbqlhXuNeC6gU+UAu0iWV17skRcwoVR mOH01AunT10BVKVKL1wj8s+JbVU7U1RxW//a1cVzp3NI4zT0XapcJYub71YnW/0rt81s GcKAJXHyMIEr461JubNx0U9p2lhkFF3ct1g1MCdqhB2SMv0GLFXQ7y2BXDtxcsP3mp10 WfnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=hdLlP7TU; 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 i9-20020a170902c94900b001b224e48896si3971948pla.514.2023.06.07.06.36.24; Wed, 07 Jun 2023 06:36:37 -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=hdLlP7TU; 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 S240619AbjFGNUh (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Wed, 7 Jun 2023 09:20:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240562AbjFGNUd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 09:20:33 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2269919BF; Wed, 7 Jun 2023 06:20:15 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5147e40bbbbso1289590a12.3; Wed, 07 Jun 2023 06:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686144014; x=1688736014; 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=7Ih3+4bsXANDBgDK6G+g4s7QhjYyFihjN9IGktwpehA=; b=hdLlP7TUkCIrewirbCnomdPJIDFcJK/LqMlRtV/hfA1H0GcmBtLGzX0qhU5ZP1Df2C P2N2VTq/v+QNgJBhkExGNbEX1vAgOIVjTOi4lSNChvxYslWg3GgahexTbiRb/CmIWrCr /SeumPOD2KETRCybXqFOLBvmwRplgN5G5qIudilb6rsiCQ0XYTlhqXSaVoMQqa7fa3Za AOFnvoLdcRq4O6V077W3zsDIRD+HkQKbwrzOsMP9tyoX9JlBoo1ryvjl33yxxdCpVnvC HjEaNZCclmxmbVSlsiQHTVrz2Pm5NQLEs0GCh4Oz6L8vvnvOJFRQZcO7qm0uM+ITM0SX O1ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686144014; x=1688736014; 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=7Ih3+4bsXANDBgDK6G+g4s7QhjYyFihjN9IGktwpehA=; b=KL7hDUI+XW3F2eyFTZjkJ96sDsLIZqq/FsV8MNqVElCwj6uuZFzs4XJ7xwPNQeJrMH FSFCjKjvzIN6kG1oxOmR2mLaFwO+aXXskv574NBWBKPojB1sLR4ZqEtTRLU7+Wie/VRS witxI8w0Ylket+P/hjSJSBrGlrMLWLDhmuUM8ZXFKYdifY0uEuoMS9wemAStrbBckpqt Sbyfzf0k+igk1mGn0sCX2hBtsKRHdQx/JSh7WZkbsvIk3Q79zhn2SbyGiVMml/HQeFdt xU59cOhW+JOkfAkxuLqo9bVCbPCwgkZZZiun6n5PYcnpcgwZPpeqBHOIJERbAhj53gFr A38Q== X-Gm-Message-State: AC+VfDwe+2I7AX+U9wWarWw3LsdtuTQekpZkFRlAIobJV1dJ5JMRriFn Ac3LyR51LExJn54l0qgy7zw= X-Received: by 2002:a05:6402:147:b0:514:9c05:819e with SMTP id s7-20020a056402014700b005149c05819emr4431861edu.0.1686144013901; Wed, 07 Jun 2023 06:20:13 -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 k12-20020aa7d8cc000000b005169ffc81absm493353eds.51.2023.06.07.06.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 06:20:13 -0700 (PDT) From: Tommaso Merciai <tomm.merciai@gmail.com> Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com, martin.hecht@avnet.eu, michael.roeder@avnet.eu, linuxfancy@googlegroups.com, Tommaso Merciai <tomm.merciai@gmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Hans Verkuil <hverkuil@xs4all.nl>, Marco Felsch <m.felsch@pengutronix.de>, Gerald Loacker <gerald.loacker@wolfvision.net>, Mikhail Rudenko <mike.rudenko@gmail.com>, Nicholas Roth <nicholas@rothemail.net>, Linus Walleij <linus.walleij@linaro.org>, Michael Riesch <michael.riesch@wolfvision.net>, Benjamin Mugnier <benjamin.mugnier@foss.st.com>, =?utf-8?q?Krzysztof_Ha?= =?utf-8?q?=C5=82asa?= <khalasa@piap.pl>, Shawn Tu <shawnx.tu@intel.com>, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] media: dt-bindings: alvium: add document YAML binding Date: Wed, 7 Jun 2023 15:19:24 +0200 Message-Id: <20230607131936.382406-3-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607131936.382406-1-tomm.merciai@gmail.com> References: <20230607131936.382406-1-tomm.merciai@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768051177199558426?= X-GMAIL-MSGID: =?utf-8?q?1768051177199558426?= |
Series |
media: i2c: Add support for alvium camera
|
|
Commit Message
Tommaso Merciai
June 7, 2023, 1:19 p.m. UTC
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 <tomm.merciai@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- 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 .../media/i2c/alliedvision,alvium-csi2.yaml | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml
Comments
On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > 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 <tomm.merciai@gmail.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > 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 > > .../media/i2c/alliedvision,alvium-csi2.yaml | 96 +++++++++++++++++++ > 1 file changed, 96 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..4726d0068229 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml > @@ -0,0 +1,96 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium.yaml# This is still wrong, see Rob's bot reply in the previous version. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Allied Vision Alvium Camera > + > +maintainers: > + - Tommaso Merciai <tomm.merciai@gmail.com> > + - Martin Hecht <martin.hecht@avnet.eu> > + > +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: > + maximum: 150000 > + description: | > + Low power to high speed delay time. > + > + If the value is larger than 0, 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>; > + }; > + }; > + }; > + }; > + > +...
On 07/06/2023 15:19, Tommaso Merciai wrote: > 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 <tomm.merciai@gmail.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > 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 You still did not test it before sending. Four versions of which none were tested :( Best regards, Krzysztof
On Wed, Jun 07, 2023 at 05:06:38PM +0300, Laurent Pinchart wrote: > On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > > 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 <tomm.merciai@gmail.com> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > 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 > > > > .../media/i2c/alliedvision,alvium-csi2.yaml | 96 +++++++++++++++++++ > > 1 file changed, 96 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..4726d0068229 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml > > @@ -0,0 +1,96 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium.yaml# > > This is still wrong, see Rob's bot reply in the previous version. Arg... :'( Thanks Laurent. Regards, Tommaso > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Allied Vision Alvium Camera > > + > > +maintainers: > > + - Tommaso Merciai <tomm.merciai@gmail.com> > > + - Martin Hecht <martin.hecht@avnet.eu> > > + > > +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: > > + maximum: 150000 > > + description: | > > + Low power to high speed delay time. > > + > > + If the value is larger than 0, 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>; > > + }; > > + }; > > + }; > > + }; > > + > > +... > > -- > Regards, > > Laurent Pinchart
On Wed, 07 Jun 2023 15:19:24 +0200, Tommaso Merciai wrote: > 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 <tomm.merciai@gmail.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > 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 > > .../media/i2c/alliedvision,alvium-csi2.yaml | 96 +++++++++++++++++++ > 1 file changed, 96 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: ./Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230607131936.382406-3-tomm.merciai@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Hi Krzysztof, On Wed, Jun 07, 2023 at 04:18:48PM +0200, Krzysztof Kozlowski wrote: > On 07/06/2023 15:19, Tommaso Merciai wrote: > > 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 <tomm.merciai@gmail.com> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > 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 > > You still did not test it before sending. Four versions of which none > were tested :( You are right.. my bad. :'( After fixing id, as suggested by Laurent/bot into: $id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml# I'm running the following test: make dt_binding_check DT_SCHEMA_FILES=alliedvision,alvium-csi2.yaml With the following result: LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json /home/tom/work/mainline/linux/Documentation/devicetree/bindings/media/i2c/.alliedvision,alvium-csi2.example.dts.pre.yaml: ignoring, error parsing file DTEX Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dts DTC_CHK Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dtb Is that correct? Let me know. Thanks in advance :) Regards, Tommaso > > Best regards, > Krzysztof >
On 07/06/2023 17:20, Tommaso Merciai wrote: > Hi Krzysztof, > > On Wed, Jun 07, 2023 at 04:18:48PM +0200, Krzysztof Kozlowski wrote: >> On 07/06/2023 15:19, Tommaso Merciai wrote: >>> 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 <tomm.merciai@gmail.com> >>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> >>> --- >>> 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 >> >> You still did not test it before sending. Four versions of which none >> were tested :( > > You are right.. my bad. :'( > > After fixing id, as suggested by Laurent/bot into: > > $id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml# > > I'm running the following test: > > make dt_binding_check DT_SCHEMA_FILES=alliedvision,alvium-csi2.yaml > > With the following result: > > LINT Documentation/devicetree/bindings > CHKDT Documentation/devicetree/bindings/processed-schema.json > SCHEMA Documentation/devicetree/bindings/processed-schema.json > /home/tom/work/mainline/linux/Documentation/devicetree/bindings/media/i2c/.alliedvision,alvium-csi2.example.dts.pre.yaml: ignoring, error parsing file > DTEX Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dts > DTC_CHK Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dtb > > Is that correct? No, it doesn't look correct. You have error parsing your file. Check your yaml file and its example DTSI. Be sure you have also yamlling installed. Best regards, Krzysztof
Hey Tommaso, On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > + alliedvision,lp2hs-delay-us: > + maximum: 150000 > + description: | > + Low power to high speed delay time. > + > + If the value is larger than 0, 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. Since this new version was posted before I got a chance to reply, I still don't think it makes sense to allow 0 & then special case it, when testing for the presence of a property is trivial. The property should describe some behaviour/property of the hardware, not be a mechanism to convey what you want to write into registers. I don't really get why you'd not do: If 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. > +static int alvium_get_dt_data(struct alvium_dev *alvium) > +{ > + struct device *dev = &alvium->i2c_client->dev; > + struct device_node *node = dev->of_node; > + struct fwnode_handle *endpoint; > + int ret = 0; > + > + if (!node) > + return -EINVAL; > + > + ret = fwnode_property_read_u32(dev_fwnode(dev), > + "alliedvision,lp2hs-delay-us", > + &alvium->lp2hs_delay); > + if (ret) > + dev_info(dev, "lp2hs-delay-us not found\n"); And this print, which I also don't understand the presence of as well behaving driver should be quiet, goes away. Cheers, Conor. > + > + endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); > + if (!endpoint) { > + dev_err(dev, "endpoint node not found\n"); > + return -EINVAL; > + } > + > + if (v4l2_fwnode_endpoint_alloc_parse(endpoint, &alvium->ep)) { > + dev_err(dev, "could not parse endpoint\n"); > + return 0; > + } > + > + if (alvium->ep.bus_type != V4L2_MBUS_CSI2_DPHY) { > + dev_err(dev, "unsupported bus type\n"); > + return -EINVAL; > + } > + > + if (!alvium->ep.nr_of_link_frequencies) { > + dev_err(dev, "no link frequencies defined"); > + return -EINVAL; > + } > + > + dev_info(dev, "freq: %llu\n", > + alvium->ep.link_frequencies[0]); > + dev_info(dev, "lanes: %d\n", > + alvium->ep.bus.mipi_csi2.num_data_lanes); > + > + return 0; > +}
On Wed, Jun 07, 2023 at 06:11:54PM +0200, Krzysztof Kozlowski wrote: > On 07/06/2023 17:20, Tommaso Merciai wrote: > > Hi Krzysztof, > > > > On Wed, Jun 07, 2023 at 04:18:48PM +0200, Krzysztof Kozlowski wrote: > >> On 07/06/2023 15:19, Tommaso Merciai wrote: > >>> 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 <tomm.merciai@gmail.com> > >>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > >>> --- > >>> 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 > >> > >> You still did not test it before sending. Four versions of which none > >> were tested :( > > > > You are right.. my bad. :'( > > > > After fixing id, as suggested by Laurent/bot into: > > > > $id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml# > > > > I'm running the following test: > > > > make dt_binding_check DT_SCHEMA_FILES=alliedvision,alvium-csi2.yaml > > > > With the following result: > > > > LINT Documentation/devicetree/bindings > > CHKDT Documentation/devicetree/bindings/processed-schema.json > > SCHEMA Documentation/devicetree/bindings/processed-schema.json > > /home/tom/work/mainline/linux/Documentation/devicetree/bindings/media/i2c/.alliedvision,alvium-csi2.example.dts.pre.yaml: ignoring, error parsing file > > DTEX Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dts > > DTC_CHK Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.example.dtb > > > > Is that correct? > > No, it doesn't look correct. You have error parsing your file. Check > your yaml file and its example DTSI. > > Be sure you have also yamlling installed. Thanks for the feedback! Regards, Tommaso > > Best regards, > Krzysztof >
Hi Conor, On Wed, Jun 07, 2023 at 06:16:19PM +0100, Conor Dooley wrote: > Hey Tommaso, > > On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > > > + alliedvision,lp2hs-delay-us: > > + maximum: 150000 > > + description: | > > + Low power to high speed delay time. > > + > > + If the value is larger than 0, 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. > > Since this new version was posted before I got a chance to reply, I > still don't think it makes sense to allow 0 & then special case it, > when testing for the presence of a property is trivial. My bad, sry. My keyboard is too quick :P > The property should describe some behaviour/property of the hardware, > not be a mechanism to convey what you want to write into registers. > > I don't really get why you'd not do: > If 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. > You are suggesting the following solution: minimum: 1 maximum: 150000 Right? Personally I prefer to keep also 0 but never mind is ok also this solution. :) Let me know if I have understood correctly pls. Thanks in advance :) > > +static int alvium_get_dt_data(struct alvium_dev *alvium) > > +{ > > + struct device *dev = &alvium->i2c_client->dev; > > + struct device_node *node = dev->of_node; > > + struct fwnode_handle *endpoint; > > + int ret = 0; > > + > > + if (!node) > > + return -EINVAL; > > + > > + ret = fwnode_property_read_u32(dev_fwnode(dev), > > + "alliedvision,lp2hs-delay-us", > > + &alvium->lp2hs_delay); > > + if (ret) > > + dev_info(dev, "lp2hs-delay-us not found\n"); > > And this print, which I also don't understand the presence of as > well behaving driver should be quiet, goes away. Then you are suggesting to drop this print right? Thanks for your review! Regards, Tommaso > > Cheers, > Conor. > > > + > > + endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); > > + if (!endpoint) { > > + dev_err(dev, "endpoint node not found\n"); > > + return -EINVAL; > > + } > > + > > + if (v4l2_fwnode_endpoint_alloc_parse(endpoint, &alvium->ep)) { > > + dev_err(dev, "could not parse endpoint\n"); > > + return 0; > > + } > > + > > + if (alvium->ep.bus_type != V4L2_MBUS_CSI2_DPHY) { > > + dev_err(dev, "unsupported bus type\n"); > > + return -EINVAL; > > + } > > + > > + if (!alvium->ep.nr_of_link_frequencies) { > > + dev_err(dev, "no link frequencies defined"); > > + return -EINVAL; > > + } > > + > > + dev_info(dev, "freq: %llu\n", > > + alvium->ep.link_frequencies[0]); > > + dev_info(dev, "lanes: %d\n", > > + alvium->ep.bus.mipi_csi2.num_data_lanes); > > + > > + return 0; > > +}
On Wed, Jun 07, 2023 at 09:49:18PM +0200, Tommaso Merciai wrote: > On Wed, Jun 07, 2023 at 06:16:19PM +0100, Conor Dooley wrote: > > On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > You are suggesting the following solution: > > minimum: 1 > maximum: 150000 > > Right? > > Personally I prefer to keep also 0 but never mind > is ok also this solution. :) > > Let me know if I have understood correctly pls. > Thanks in advance :) Yup, you got it. > > > +static int alvium_get_dt_data(struct alvium_dev *alvium) > > > +{ > > > + struct device *dev = &alvium->i2c_client->dev; > > > + struct device_node *node = dev->of_node; > > > + struct fwnode_handle *endpoint; > > > + int ret = 0; > > > + > > > + if (!node) > > > + return -EINVAL; > > > + > > > + ret = fwnode_property_read_u32(dev_fwnode(dev), > > > + "alliedvision,lp2hs-delay-us", > > > + &alvium->lp2hs_delay); > > > + if (ret) > > > + dev_info(dev, "lp2hs-delay-us not found\n"); > > > > And this print, which I also don't understand the presence of as > > well behaving driver should be quiet, goes away. > > Then you are suggesting to drop this print right? Yeah, in general we do not want drivers to be printing things while they are behaving correctly & not having the property isn't an error ;) Cheers, Conor.
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..4726d0068229 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium-csi2.yaml @@ -0,0 +1,96 @@ +# 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 <tomm.merciai@gmail.com> + - Martin Hecht <martin.hecht@avnet.eu> + +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: + maximum: 150000 + description: | + Low power to high speed delay time. + + If the value is larger than 0, 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>; + }; + }; + }; + }; + +...