Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1905336rwd; Fri, 9 Jun 2023 04:05:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zqjEdUMB4hZ6OGef+iIbrUKGk8vk6HoGSBYOXrvPZdtaO65ElXBRurEDXgMWFLz+m450v X-Received: by 2002:a17:90b:3b8e:b0:256:2ee5:aebc with SMTP id pc14-20020a17090b3b8e00b002562ee5aebcmr652591pjb.18.1686308737627; Fri, 09 Jun 2023 04:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686308737; cv=none; d=google.com; s=arc-20160816; b=Cn9Rwi0Je3hWiyzIrSjm2myCzjZqL4HAyz6KKEkTGCiCQ37LAX784Tx3lZHAs5B9Xf 6rmUJj/9O07MdF4cZIWygywu+IwCB+txXj7zCg9jJ+StvzOyOm2HhdoS2Z+SH1gyFp1Q KxNdpuy4wktomgGwXuHGuqmKh2Nqi1eupkpJD3cUomOS1WR2xoSePT1YkY9dOfwNa4Fl /8ImlIJLK3+k0XzF5nMqAWe3h1zY2yD+pL78ls2xFMJ8YztCYpqx41mcOxDAYRTUoVym c7aAGi6VOOzgm3CIaesXlzpabhvHOEm/pRJr/YAHWf5JLW6tN+gXEahNUHlq4As9F7zz Ot0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TaEOt4XM83bcgTUl952dFzJXXohH3a20NDWkUA1Lwqw=; b=HUJ46g3fm2UZUeb3VFx8c1+XSNSksfNOmMGZi47D1ABv/CeEUogCYBt2UyYCavvc14 NwTo3gFhPSMOHNVSaf95OpM4oMhTWc1VLKpwd8tmrGkDTWlo9bLiw1jSM3kLOe7JMbWB LH8ChrOtHDueM3q3E1tmoVCzW7f8DqVIg7t9sH4I1d6hNZh6FPFjup1Phyro7TPYRNvN XsS0AJp85/11TDjcR+VLe+f+VkY/893VEUIZ8AarNySuc+C3wsPNEBDC0Onmj1iEBuOc 30kGiWWXTnL9+be4/M3qmckFeWENiGdJL62q5NTKYJxQ1W3fvAArZBMpfPHoL5zUBi7K g3Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZGPJVAX5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a17090a660200b0024df8757367si2562120pjj.87.2023.06.09.04.05.23; Fri, 09 Jun 2023 04:05: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=pass header.i=@gmail.com header.s=20221208 header.b=ZGPJVAX5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238828AbjFIKPl (ORCPT + 99 others); Fri, 9 Jun 2023 06:15:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241327AbjFIKO0 (ORCPT ); Fri, 9 Jun 2023 06:14:26 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E6849C1; Fri, 9 Jun 2023 03:04:34 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5149c51fd5bso2819625a12.0; Fri, 09 Jun 2023 03:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686305073; x=1688897073; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TaEOt4XM83bcgTUl952dFzJXXohH3a20NDWkUA1Lwqw=; b=ZGPJVAX5Dm0GqZV9T+trCFw6APuwd+DXkTXyohWbj3OSGCTDDhHu2vIiiRmbaJUD8o JffW4+eHUUoRhICUCKz7j0nDTI2TNJ1GMTZERZSgCuz0I60bK0weeFXbhSxnKiY++UBe im4jTU5k5jO2deD+ZIV6iBQgV94czGvDjDdx1UdNor3Ja1+dVqJeCITVZP6F/e+D01QF 5lmGKIyHL2G+FlOIn4oaJ4gVKxLqKApjVIWJZH6VTsHmDXWv0GJ2OgJiJN1l/gswD6u9 TIAUrEEwKdbtd+o/Pfoe6OJAz1JsoxUuJmouJO5h63/1CWu7PunXU473hMlPzzrk4VX+ LPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686305073; x=1688897073; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TaEOt4XM83bcgTUl952dFzJXXohH3a20NDWkUA1Lwqw=; b=Csd0MkPhmqdm8v8zw22yJCAPH9b62VbJwpoz/aXfQ33Oa7J9ZIt85+22rT9OIn8wHm dJOSfitwfpe/fAxnK5hNrFo/4htVwbvu27uXJCnfMVpXm8PbMc2nNSLP1zbAEz7sBzX1 79vn9Wa53QY19+mwzhdiFTrKzYBnZfBuUm4FhQcJudHTNv8R3Y+UVcOOYLgDJXhu2gOD i0Ux/9Fw4cNcZW7ymluIva5rriXpyZ4aF4yPfCZYUu+cXeRXeNWat6cyM3fV+AUH4uT2 RZgw8GnrfwKfPt+kL4PDFdZd09ExIO75OSc60p0hjQAMXZYfp5fMTuWDOEng6ivff/hz 9O3A== X-Gm-Message-State: AC+VfDzEH/A9noYSrRTEVgy9kOKu2A+TPs5xW68rg5LgxUJ5YNsKvMzq ELoaEDeagEMtawAt117BJvo= X-Received: by 2002:a17:907:9342:b0:973:8198:bbfb with SMTP id bv2-20020a170907934200b009738198bbfbmr1492263ejc.31.1686305073102; Fri, 09 Jun 2023 03:04:33 -0700 (PDT) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation (net-188-217-50-121.cust.vodafonedsl.it. [188.217.50.121]) by smtp.gmail.com with ESMTPSA id b14-20020a1709064d4e00b00974638e4a98sm1090501ejv.24.2023.06.09.03.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 03:04:32 -0700 (PDT) Date: Fri, 9 Jun 2023 12:04:29 +0200 From: Tommaso Merciai To: Sakari Ailus Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com, martin.hecht@avnet.eu, michael.roeder@avnet.eu, linuxfancy@googlegroups.com, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Hans Verkuil , Marco Felsch , Gerald Loacker , Shawn Tu , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Linus Walleij , Nicholas Roth , Mikhail Rudenko , Benjamin Mugnier , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/3] media: dt-bindings: alvium: add document YAML binding Message-ID: References: <20230608083127.545750-1-tomm.merciai@gmail.com> <20230608083127.545750-3-tomm.merciai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, On Fri, Jun 09, 2023 at 09:44:18AM +0000, Sakari Ailus wrote: > Hi Tommaso, > > On Fri, Jun 09, 2023 at 11:41:16AM +0200, Tommaso Merciai wrote: > > Hi Sakari, > > Thanks for your feedback. > > > > On Fri, Jun 09, 2023 at 08:35:20AM +0000, Sakari Ailus wrote: > > > Hi Tommaso, > > > > > > On Thu, Jun 08, 2023 at 10:31:15AM +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 > > > > 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 > > > > > > > > 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 > > > > > > > > .../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..c771e5039641 > > > > --- /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 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. > > > > > > Why do you need this? D-PHY TX is obviously controlled by the driver. > > > Explicit control of PHY initialisation is of course best option when > > > combined with some receivers, done via driver's pre_streamon and s_stream > > > callbacks. Can't your hardware do that? > > > > You mean calculate this time in some dynamical way and program this > > during pre_streamon or s_stream? > > > > If yes, unfortunately hw can't do this. > > This shouldn't be based on timing but rather progress of the bus > initialisation sequence. That's how it works on most sensors nowadays. Just to clarify, this is not a sensor: "The Alvium camera is shipped with sensor + isp in the same housing. The camera can be equipped with one out of various sensor and abstract the user from this. Camera is connected via MIPI CSI-2." > > The description is also lacking details on what delay this exactly is. What > is the bus state during that delay? Previously we have a brief thread with Laurent about the behaviour of this reg/property, I repost here: "Thanks to Martin Hecht I'm able to provide you a clearer description: Alvium normally delivers a continous clock even when it is not streaming. The purpose of this reg is force a DPhy reset for the period described by the us on the reg 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." Hope these infos can clarify. Let me know. Thanks, Tommaso > > -- > Regards, > > Sakari Ailus